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

Closed
github-bot wants to merge 1 commit from gh-pr/1826/head into gh-pr/1826/base
Owner

@⁠slatefield on GitHub · 2026-11-24 23:03 UTC · original
slatefield:gpu/setname-only-when-logged → main · +4 −0 · 1 files · 1 commits · closed without merging

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.

**@⁠slatefield** on GitHub · 2026-11-24 23:03 UTC · [original](https://github.com/Marvisak/VIctory/pull/1826) `slatefield:gpu/setname-only-when-logged` → `main` · +4 −0 · 1 files · 1 commits · closed without merging 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.
SetName counted the title's UTF-16 name to its terminator and built a
String for a debug! event: a release build caps the log at INFO, so the
scan and the allocation were thrown away for every object the title
names. Ask whether the event is on first, as host::name already does for
the names we make ourselves.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:45:50 +00:00
github-bot closed this pull request 2026-11-26 04:45:50 +00:00
Author
Owner

@⁠DesertGamer on GitHub · 2026-11-24 23:06 UTC · original

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.

**@⁠DesertGamer** on GitHub · 2026-11-24 23:06 UTC · [original](https://github.com/Marvisak/VIctory/pull/1826#issuecomment-7147020880) ### 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.*
Author
Owner

@⁠upipibi on GitHub · 2026-11-24 23:12 UTC · original

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.

**@⁠upipibi** on GitHub · 2026-11-24 23:12 UTC · [original](https://github.com/Marvisak/VIctory/pull/1826#issuecomment-7147139552) 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.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 06:31 UTC · original

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

**@⁠Marvisak** on GitHub · 2026-11-25 06:31 UTC · [original](https://github.com/Marvisak/VIctory/pull/1826#issuecomment-7154884508) <!-- 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)_

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1826
No description provided.