From bf7201f4d3bb2acd7d3501b8708392dfb9f1cc28 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 27 Aug 2026 15:13:27 +0700 Subject: [PATCH] action-bar hover stops re-deriving, and multisampling asks the GPU MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - hovering the action bars re-derived the whole layout graph and hovering bags did not: `GameTooltip:SetOwner(owner, "ANCHOR_NONE")` dropped the tooltip's anchors through the conservative whole-graph derive, and with `UberTooltips` at its shipped default every action-bar button routes through that arm while a bag slot anchors `ANCHOR_RIGHT` and never does — the arm now retargets to the empty target set, and derive frames fall from 15.9 % of hovered frames to 0.2 % - `gxMultisample` clamps to what the GPU actually offers: Apple GPUs stop at 4x, so a typed 8 was a wgpu validation panic on frame one — the clamp intersects the supported counts of every format the client multisamples into and steps the request down the way the reference's device-init retry loop does, with a warning that says so - the Multisampling dropdown lands on the Graphics page with the device's own stops, built from the same enumeration that clamps a typed value on the reference's three bindings (`GetMultisampleFormats`, `GetCurrentMultisampleFormat`, `SetMultisampleFormat`) — a fixed Off/2x/4x/8x ladder would put a crash on the menu of every GPU that stops at 4 - capture hardening: a run whose `$WOW_WIN` the display clamped is refused in ~2 s instead of producing a wrong-sized shot to diff, a capture never reads the OS pointer (a cursor resting over the window arms a hover and a tooltip that a cursor an inch to the left does not), and the stall sampler writes into `benilla-config` instead of a hand-built `~/Library/Logs` path Co-Authored-By: Claude Fable 5 --- crates/benilla-app/assets/ui/OptionsFrame.xml | 55 ++++- crates/benilla-app/src/cvars.rs | 39 ++++ crates/benilla-app/src/hover_log.rs | 13 +- crates/benilla-app/src/lib.rs | 12 +- crates/benilla-app/src/local_state.rs | 21 ++ crates/benilla-app/src/perf/stall.rs | 13 +- crates/benilla-app/src/ui_pass.rs | 17 ++ crates/benilla-app/src/ui_script/input.rs | 8 +- crates/benilla-app/src/ui_script/mod.rs | 30 +++ .../src/ui_script/options_tests.rs | 100 ++++++++- .../src/ui_script/resolve_bench.rs | 70 +++++++ crates/benilla-app/src/video.rs | 67 +++++- crates/benilla-ui/src/script/cvars.rs | 191 ++++++++++++++++++ crates/benilla-ui/src/script/mod.rs | 1 + crates/benilla-ui/src/script/model.rs | 13 ++ crates/benilla-ui/src/script/tooltip/verbs.rs | 21 +- crates/benilla-world/src/view.rs | 177 ++++++++++++++++ crates/benilla-world/src/world_plugins.rs | 5 + 18 files changed, 820 insertions(+), 33 deletions(-) diff --git a/crates/benilla-app/assets/ui/OptionsFrame.xml b/crates/benilla-app/assets/ui/OptionsFrame.xml index c13aafa2..8b8a0773 100644 --- a/crates/benilla-app/assets/ui/OptionsFrame.xml +++ b/crates/benilla-app/assets/ui/OptionsFrame.xml @@ -620,7 +620,7 @@ }, Graphics = { "RowUiScale", "RowFarclip", "RowWorldDetail", - "RowWindowedMode", "RowVerticalSync", + "RowWindowedMode", "RowVerticalSync", "RowMultisample", }, Nameplates = { "RowEnemyPlates", "RowFriendlyPlates", @@ -2312,6 +2312,59 @@ "OPTION_TOOLTIP_VERTICAL_SYNC") + + + + + + + -- Multisampling: 1.12's own Video Options dropdown + -- (OptionsFrameMultiSampleDropDown, id 4), over + -- gxMultisample. Label and tooltip key are the + -- reference's GlobalStrings (MULTISAMPLE = + -- "Multisampling" / OPTION_TOOLTIP_MULTISAMPLING). + -- + -- The STOPS ARE THE DEVICE'S, not a fixed ladder: + -- built here from GetMultisampleFormats(), which + -- is what this GPU actually accepts (decision + -- 1631's enumeration, the same one that clamps a + -- typed gxMultisample). That is the reference's + -- design too -- its list comes from a D3D + -- CheckDeviceMultiSampleType sweep or a GL + -- wglGetPixelFormatAttribivARB sweep -- and it is + -- why the row cannot offer a mode that would kill + -- the client. An Apple GPU shows three stops + -- (1x/2x/4x); a machine with 8x shows four. + -- + -- NOT marked deferred. That flag stages a value + -- until Apply (uiScale's mid-drag rescale is what + -- it exists for); this row writes live like every + -- other. What it cannot do is take effect live: + -- gxMultisample is LATCHED (decision 1629 -- the + -- camera reads its sample count once, at spawn), + -- exactly as the reference's own row is, whose + -- callback echoes "set pending gxRestart". The + -- CVar moves and persists on the click; the + -- picture changes at the next launch. + OptionsRow_OnLoad(self, "gxMultisample", "Multisampling", + "OPTION_TOOLTIP_MULTISAMPLING") + local stops = {} + local fmt = { GetMultisampleFormats() } + -- Three varargs per entry, the walk OptionsFrame.lua + -- l.354 does (`for i=1, arg.n, 3`). The text is + -- MULTISAMPLING_FORMAT_STRING verbatim, inlined + -- rather than read off the global so the row does + -- not depend on GlobalStrings being loaded. + for i = 1, table.getn(fmt), 3 do + table.insert(stops, { + text = format("%d-bit color %d-bit depth %dx multisample", + fmt[i], fmt[i + 1], fmt[i + 2]), + value = tostring(fmt[i + 2]), + }) + end + OptionsDropdownRow_Setup(self, stops) + +