Repository navigation
GPU: create the title's video textures, and bound the mesh path the console allows - #1
Merged
Merged
Conversation
…arget's UAV view as a degradation The title hands an optimized clear value for its NV12 and B4G4R4A4_UNORM textures; stripping the render-target flag for those formats left a clear value on a resource that is neither a render target nor a depth target, and D3D12 refuses that with E_INVALIDARG, so the textures were never created. The conversion now reports whether the host flags still allow a clear value and the creation path passes the title's only when they do. A console resource that is both a depth target and a UAV loses the UAV permission on its host copy (PC refuses both flags together), so a UAV view of one would remove the device. That is now a debug line and a null view rather than a host failure warning. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…breadcrumbs, texture to buffer copies The bindless lane of Marvisak#1333 lands here by hand: a descriptor behind a pointer the shader computes is followed through the root constants, with the bias meaning only the pointer's own adds. The mesh path gains the bound the console's 10-bit primitive indices need: a vertex index past the declared max_vertices is culled, lanes past the declared outputs store nothing, and a group count is clamped to the host's 65535. An index naming a vertex the host does not have is undefined behaviour that AMD hardware hangs on. Every host operation now leaves a breadcrumb in a lock-free ring, and a device removal dumps the newest 64, so an invalid call names itself instead of relying on DRED or the debug layer, neither of which works on every host. A texture copied into a buffer lands in the host copy of the buffer's memory and goes back to title memory once the list has run, where before the copy was dropped as unimplemented. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
The four mesh tests the bound was written with were aimed at the merged 10-PR tree and do not compile against this one's helpers, which return the lowered program without its IR module. What can be asserted here is what the lowering records: whether the vertex and primitive lane bounds were installed, and the vertex count primitive indices are culled against. The refusal test is unchanged and needs nothing new. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Graphify review 
1 bug · 19 possible issues to check · High impact
The changes add host GPU operation breadcrumbs, revise texture-copy and descriptor handling, and extend shader translation for root-constant pointers and bounded mesh outputs.
Pointer-based shader reads never bind their pointed-to buffer ·
host.rs:384
19 possible issues we couldn't confirm
- The new
mesh_groupsclamp is not applied to the title's own mesh dispatch in this file, so direct mesh dispatch counts stay unbounded ·crates/victory-gpu/src/indirect.rs:270 - Root-argument dword reads in
constants_smemignore the load's immediate offset, soffset and bias, so they can return the wrong values ·crates/victory-shader/src/emit/lower.rs:780 - Device-removed failures without DRED print the last host operations twice ·
crates/victory-gpu/src/host.rs:846 - +16 more in Graphify
They don't change the score.
What this review covered
- One review pass used all of its turns for reading code, so it reported from what it had already read.
- 4 more possible issues from the per-file sweep were left out to keep the report to its limit.
- 16 of 16 changed files inspected. This is scope, not a correctness guarantee.
Code graph · 1021 functions depend on this change
- 6 functions became more coupled. Largest:
find()(15 callers),track_words()(15 callers),null_for()(4 callers). - Gate, test list and every flagged function: in the Graphify check.
Reviewed bf03c79
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.
Three fixes, each measured against a run of the title.
A clear value only on a texture that can take one
The title asks for an optimized clear value on its NV12 and B4G4R4A4_UNORM textures. Our conversion strips the render-target flag for those formats, and D3D12 refuses a clear value on a resource that is neither a render target nor a depth target, so CreateCommittedResource returned E_INVALIDARG and those textures were never created. Measured: before, three 'no host texture ... 0x80070057' failures per run and the title died at frame 1479 reading 0xffffffffffffffff; after, no texture failures, no such crash, and a run passes frame 4000. A console resource that is both depth target and UAV is now a debug line and a null view instead of a host failure.
Bindless pointer chasing
Marvisak#1333 rebased by hand: a descriptor behind a pointer the shader computes is followed through the root constants, and the lowering binds one root view whose 16-bit register says where the pointer lives. This branch's complemented masks, cube gradient axes and descriptor stand-ins are kept.
The mesh path's bounds
The console's exp prim carries 10-bit vertex indices, so a primitive can name vertex 1023 while the program declares and every lane writes 128. Primitive indices past the declared vertices are culled, lanes past the declared outputs store nothing, and a mesh group count is clamped to 65535.
Also: every host operation leaves a breadcrumb in a lock-free ring and a removal dumps the newest 64 (neither the debug layer nor DRED works on every host), which turned 'the application made a call that is invalid' into 'dispatch 1x1x1 [compute e30970f1727063fd]' with its root arguments; and CopyTextureRegion into a buffer now lands in the host copy of its memory instead of being dropped.
cargo test --workspace: 23 suites green, victory-shader 150 passed / 1 ignored, victory-gpu 71 passed / 1 ignored. shadow::snapshot_tests::two_copies_keep_their_snapshots_apart is flaky and fails on unmodified main too. Not proven yet: the depth target is still zero because the title stops at its account picker.