Repository navigation
test(agc): cover raw scalar instance vertex fetches - #2372
Closed
Sanjaysrinivas wants to merge 2 commits into
Closed
Sanjaysrinivas wants to merge 2 commits into
Sanjaysrinivas wants to merge 2 commits into
Conversation
…buffers With stride 0, OOB_SELECT 2 puts a fetch out of range only when NUM_RECORDS is 0, and OOB_SELECT 3 only when the offset is not below NUM_RECORDS (GFX10 table in Mesa ac_descriptors.c). A one-record descriptor therefore returns its whole element: Unreal's per-draw PrimitiveId stream is such a descriptor, and refusing it skipped the draw. A wholly out-of-range fetch reads a zero buffer.
Check one-record R32_UINT instance attributes with zero and nonzero first-instance offsets through Vulkan, preserving the fetched word and default missing components. Depends on boykopovar#1769.
Contributor
|
Tested on Linux (CachyOS x86_64, Intel RPL-S iGPU / Mesa 26.3.0-devel / Vulkan 1.4.363, GCC 16.2.1) at
LGTM! |
This was referenced Oct 9, 2026
Collaborator
|
Closing: #1769 is in main, and the two extra cases pass on main without any change, so they don't guard anything new. Reopen if you find a descriptor shape main gets wrong. |
12 tasks done
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.
What
Stride-0
R32_UINTinstance attributes withNUM_RECORDS=1andOOB_SELECT=2stopped Silent Hill 2 startup withvertex fetch exceeds descriptor byte range. This complements #1769 with two Vulkan regressions for that descriptor shape: first instance 0 and 17. They check the nonzero fetched word and the missing components(0, 0, 1)for every vertex.Depends on #1769. Its implementation and original five-case test are included as a prerequisite commit, retaining TideOPL's authorship (original
c17c5ebd4dca4129550076eb4356e81f7df0a1e7). My contribution is the two additional cases and their TechnicalDebt coverage limits. The branch starts at current maind70b89989473ba1f6ae13e44e079e67f1f8a44b0.The new case preserves the word when the descriptor has one record. This also distinguishes #1769's
OOB_SELECT=2rule from the short-buffer rule in #1426, which rounds the byte count down to whole dwords and would supply zero for this descriptor.Overlap audit, 9 October 2026, at main
f8c2f072: #2253 changes draw vertex/index ranges to use host imports where safe. It does not implement #1769's zero-stride range and zero-buffer rules or these two scalar regressions. Its conflict with this branch is inprepareDrawInputs: a combined implementation must retain the zeroed-attribute branch andfetchOfmapping, while using #2253's range handles and import offsets for the remaining attributes. Retain its alignment and pending-read checks as well. A virtual merge confirms theDraw.cppconflict; the combined implementation has not been tested here. Rebase and run both suites after whichever prerequisite lands first. The implementation dependency remains Depends on: #1769.Tested
Validation: Windows, MinGW GCC 15.2.0, Release, NVIDIA RTX 4070 Laptop GPU, Vulkan required. On latest main plus #1769,
agc_driver_graphicsandagc_driver_zero_stride_vertex_fetchpassed (2/2, 5.65 seconds). A synthetic reproduction with the title's descriptor shape failed before the prerequisite fix with the same four-byte-versus-one-byte error in 0.33 seconds. The local title retry then cleared this vertex-fetch error and reached a separate rectangle-preparation failure. That runtime includes earlier startup fixes; it is not a title test of this isolated branch.TechnicalDebt records that the range rule comes from Mesa's GFX10 descriptor table, without native PS5 hardware verification. These scalar tests cover nonempty descriptors; scalar zero-record swizzle behavior remains outside their coverage. No game shader captures, executables or logs are committed. Linux was not tested locally; full builds require the repository's maintainer-triggered workflow.
Checklist