Repository navigation
Conversation
A scalar buffer load can use a descriptor whose record-count dword is also read as shader data. The translator previously rejected the whole program when it classified that descriptor through a scalar memory instruction. That left the host without pipelines for affected shaders. Recognize scalar buffer SRVs using the same raw view as the load. DXIL reports that view's size in bytes, so divide by the declared stride for structured descriptors to preserve the guest's bounds calculations. Require SRV metadata and continue to reject constant-buffer descriptors. Verify by dispatching a synthetic shader with a 32-byte input and checking the load and descriptor counts for both raw and four-byte-stride views. Based-on: Marvisak#953 Based-on: https://github.com/fxceless/victory-fork/blob/52ac4ec0f8a03f103c146e60228e53612759d435/crates/victory-shader/src/emit/lower.rs Tested-on: RX 6800 and Lavapipe, Fedora Linux 45, Linux native Assisted-by: gpt-6.2 sol xhigh
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.
A scalar buffer load can consume a descriptor whose record count is also used as shader data. The Linux native translator refused the program at that use, leaving the affected draw or dispatch without a host pipeline.
Use the scalar load's raw SRV view to query the buffer size. DXIL returns bytes for that view. Divide by the declared stride for structured descriptors so the shader still sees the guest record count. The lowering requires SRV metadata and preserves the refusal for CBVs.
A synthetic compute shader used a 32-byte input and verified both its loaded value and the descriptor count. It returned 32 for a raw view and 8 for a four-byte stride on RX 6800 and Lavapipe. In a separate Linux native integration build, six of 20 previously refused shaders from a world-loading profile passed DXIL validation and created host pipelines on RX 6800. The largest skipped pixel-shader group still fails at a later descriptor merge. Gameplay output and FPS remain unmeasured with this patch.
Based-on: Marvisak#953
Based-on: https://github.com/fxceless/victory-fork/blob/52ac4ec0f8a03f103c146e60228e53612759d435/crates/victory-shader/src/emit/lower.rs
Tested-on: RX 6800 and Lavapipe, Fedora Linux 45, Linux native
Assisted-by: gpt-6.2 sol xhigh