GPU: build an object name only where the log takes it #1824

Closed
slatefield wants to merge 1 commit from upstream-pr/1826 into main
slatefield commented 2026-11-24 23:03:02 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by slatefield on 2026-11-24T23:03:02Z.


Closing: the triage is right that #541 supersedes this. Once SetName stores the name as WKPDID_D3DDebugObjectNameW private data, the UTF-16 scan has to happen in every build anyway, so the early return this PR adds would either be dead weight or, if it stayed, make those names disappear in release builds. It was a four-line saving and #541 is the better change. No hard feelings from me if it lands as-is.

The observation behind it still stands for whatever ends up there: today the scan and the String are built before a debug! that release builds (INFO cap) never emit.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6593170655 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1826). Originally posted by [slatefield](https://github.com/slatefield) on 2026-11-24T23:03:02Z. --- Closing: the triage is right that #541 supersedes this. Once `SetName` stores the name as `WKPDID_D3DDebugObjectNameW` private data, the UTF-16 scan has to happen in every build anyway, so the early return this PR adds would either be dead weight or, if it stayed, make those names disappear in release builds. It was a four-line saving and #541 is the better change. No hard feelings from me if it lands as-is. The observation behind it still stands for whatever ends up there: today the scan and the `String` are built before a `debug!` that release builds (INFO cap) never emit.
Melow-code commented 2026-11-24 23:05:42 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Melow-code on 2026-11-24T23:05:36Z.

Review: APPROVED


The tracing::enabled!(DEBUG) guard avoids a UTF-16 to UTF-8 conversion on every SetName call in release builds. The diagnostics config still logs. Clean, +4/−0.

<!-- greyfinch-sync:Marvisak/VIctory:review:6048823968 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1826#pullrequestreview-6048823968). Originally posted by [Melow-code](https://github.com/Melow-code) on 2026-11-24T23:05:36Z. **Review:** APPROVED --- The tracing::enabled!(DEBUG) guard avoids a UTF-16 to UTF-8 conversion on every SetName call in release builds. The diagnostics config still logs. Clean, +4/−0.
catminou4 commented 2026-11-25 00:06:18 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T23:47:33Z.

Review: COMMENTED


Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.

Object names built only where logging needs them: debug-name formatting moved behind the log check — avoids per-resource string formatting in release. Fine.

<!-- greyfinch-sync:Marvisak/VIctory:review:6049280958 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1826#pullrequestreview-6049280958). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-24T23:47:33Z. **Review:** COMMENTED --- Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff. Object names built only where logging needs them: debug-name formatting moved behind the log check — avoids per-resource string formatting in release. Fine.
DesertGamer commented 2026-11-25 00:06:40 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DesertGamer on 2026-11-24T23:06:27Z.


VIctory V2: community PRs, merged and tested

Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch.

Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1).

⚠️ Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk.

Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help:
https://DesertGamer/VIctory-V2

Unofficial community fork of Marvisak/VIctory, GPL-3.0.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7147020880 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1826#issuecomment-7147020880). Originally posted by [DesertGamer](https://github.com/DesertGamer) on 2026-11-24T23:06:27Z. --- ### VIctory V2: community PRs, merged and tested Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch. **Where it stands today:** launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1). :warning: Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk. Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help: https://DesertGamer/VIctory-V2 *Unofficial community fork of Marvisak/VIctory, GPL-3.0.*
upipibi commented 2026-11-25 00:06:44 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-24T23:12:35Z.


NVIDIA run: RTX 3070 8 GB, driver 616.56, Windows 11, debug, dbb04eb (on main 70564ae). cargo test -p victory-gpu --locked: 76 passed, 2 failed, 1 ignored. The 2 are the capped-heap failures main has on NVIDIA (#1744: dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views), so there are no new failures.

AI-assisted (Claude Code). Synthetic tests only.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7147139552 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1826#issuecomment-7147139552). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-24T23:12:35Z. --- NVIDIA run: RTX 3070 8 GB, driver 616.56, Windows 11, debug, `dbb04eb` (on `main` `70564ae`). `cargo test -p victory-gpu --locked`: 76 passed, 2 failed, 1 ignored. The 2 are the capped-heap failures `main` has on NVIDIA (#1744: `dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views`), so there are no new failures. AI-assisted (Claude Code). Synthetic tests only.
Marvisak commented 2026-11-25 07:03:18 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T06:31:48Z.


Automated triage for the maintainers.

Needs work. set_name in crates/victory-gpu/src/object.rs now returns S_OK without reading the name unless DEBUG logging is on. On main that is correct, since names only reach the log, and it saves a UTF-16 conversion per object. But #541 (merge candidate) makes SetName store the name as WKPDID_D3DDebugObjectNameW private data. The title, or a capture tool, can read that back through GetPrivateData. With both merged, names would silently stop being stored in normal builds. Please restrict the early return to the log formatting only, or coordinate with #541 so the stored name is kept either way.

CI: no check runs on the head commit.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7154884508 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1826#issuecomment-7154884508). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T06:31:48Z. --- <!-- victory-triage v1 head=dbb04eb1386746a3c29a83a0b8fa91848e5983d7 verdict=needs-work at=2026-11-25T06:37:30Z --> Automated triage for the maintainers. **Needs work.** `set_name` in `crates/victory-gpu/src/object.rs` now returns `S_OK` without reading the name unless DEBUG logging is on. On `main` that is correct, since names only reach the log, and it saves a UTF-16 conversion per object. But #541 (merge candidate) makes `SetName` store the name as `WKPDID_D3DDebugObjectNameW` private data. The title, or a capture tool, can read that back through `GetPrivateData`. With both merged, names would silently stop being stored in normal builds. Please restrict the early return to the log formatting only, or coordinate with #541 so the stored name is kept either way. CI: no check runs on the head commit. --- _Generated by [Claude Code](https://claude.ai/code)_
upstream-sync closed this pull request 2026-11-25 13:01:36 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!1824
No description provided.