Repository navigation
Conversation
added 2 commits
November 25, 2026 12:28
BeginQuery, EndQuery and ResolveQueryData now record into the host list: a console query heap gets a host heap on first use, of the matching type (occlusion kinds share one, timestamps their own, pipeline statistics theirs). Resolutions land in a read-back buffer the list maps once it has run and copies into title memory. Timestamps are the host GPU's clock, so they are rescaled to the title's TICKS (100 MHz) on the way out; the queue's frequency comes from GetTimestampFrequency. D3D12 has no BeginQuery for timestamps, so begin_query skips them and only EndQuery marks them, as the API requires. A heap whose kind or device cannot give a host heap keeps the previous plausible answers, marked as a shortcut.
The D3D12 debug layer (now usable: `diagnostics` did not forward to victory-gpu) showed two calls that remove the device when the title loads its world, both now gone: - `GetResourceAllocationInfo` asked about the title's texture description, which may carry the unordered-access flag in a format the host cannot view as unordered access. It answers the live texture's own description instead; the number is a statistic of shared bytes. - A texture unordered view took the title's view format unconditionally. `B5G5R5A1_UNORM` cannot be a typed unordered access view (menu), and `CreateUnorderedAccessView` refused it, which removes the device. `fits` now asks `typed_store` for the format the view really takes and lets the slot fall back to the null-view path. shortcut: such views are null and their writes dropped; map the format to one the host can store when the world needs them. With these the world loads and runs mesh pipelines; the title then dies of a TDR (1428 draws a frame, 8 s of GPU time), a throughput problem, not an invalid call.
Author
catminou4
reviewed
Nov 25, 2026
catminou4
left a comment
Contributor
There was a problem hiding this comment.
Two invalid title calls + diagnostics (+272, README+apps+gpu). Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows-sys); not compiled or tested on this macOS arm64 host. rustc 1.98.1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The D3D12 debug layer (previously unusable — the app's
diagnosticsfeature did not forward tovictory-gpu, soVICTORY_D3D12_DEBUGandVICTORY_D3D12_WARPcould never turn on) names two calls that remove the device while the title loads its world.Both are gone:
crates/victory-gpu/src/resource.rsinshared_texture:GetResourceAllocationInfowas asked about the title's texture description, which may carryALLOW_UNORDERED_ACCESSin a format the host cannot view as unordered access — an invalid call, answered by device removal. It now asks the live host texture's own description. The result is only theSAVEDstatistic of shared bytes.crates/victory-gpu/src/descriptor/host.rsinfits: a texture unordered view took the title's view format unconditionally.CreateUnorderedAccessViewwithB5G5R5A1_UNORM(the menu's) is an invalid call, and the debug layer removes the device.fitsnow askstyped_store(D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW) about the format the view really takes and rejects the ones the host cannot store, so the slot falls back to the existing null-view path.What it changes in the title
Before: device removed after ~550 frames at the start of the world load (
DXGI_ERROR_INVALID_CALL).After: the world loads, mesh pipelines run, menus at 30 fps; the title then dies of
DXGI_ERROR_DEVICE_HUNG— 1428 draws a frame at 4282 ms/frame, an 8 s submission. That is a throughput problem (world batching/culling), not an invalid call, and is not addressed here.Verification
cargo test -p victory-gpu: 141 passed, 2 failed —descriptor::host::tests::dynamic_slots_are_held_until_releasedandmemory::tests::lists_share_a_table_and_copies_keep_their_views, both failing onmainbefore this change.cargo check -p victory-gpuclean; the touched hunks arerustfmt-clean (the crate has pre-existing formatting drift under rustfmt 1.98.1).I:\GTA6-Xbox: 13 stored messages drain, and the two errors above no longer appear; the remaining warnings are the descriptor-heap cap, pipeline-library misses, a missing RTV slot and the TDR.