fix(agc): take the pixel input count from the shader header #17911
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17911"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by stuart-russell on 2026-11-09T22:01:53Z.
What
SPI_PS_IN_CONTROL.INPUT_NUM(bits 0 to 5) is the queued interpolant count; a fragment shader can declare more inputs than the state sets up, and the draw then decoded fewer interpolators than the shader reads.DecodePixelStageInfotakes the fragment shader header and uses the larger of the queued count andnum_input_semantics, throwing when that count exceeds 32.SPI_PS_IN_CONTROL.VALID_NUM(bits 9 to 13) declares per-primitive inputs, which this path cannot emulate; it throws instead of mis-decoding.decodeDrawpasses the fragment program's header.Split from #10420; independent of the other pieces.
References
SPI_PS_IN_CONTROLfields as above; an unwrittenSPI_PS_INPUT_CNTL_iholdsANCILLARY | FLAT_SHADE | OFFSETall clear withDEFAULT_VALequal toi.Tested
agc_driver_pm4,agc_driver_graphics,agc_gcn_color_targetand the otheragc_driver_*suites the pattern selects (32 tests) pass, andtools/check_conventions.py --base origin/mainpasses, on697b66b1e4. NewShaderDeclaredPixelInputTestscovers the queued-only decode, a header declaring five inputs, the defaulted control register for an unwritten one, the per-primitive throw and the 32-input limit.ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest --test-dir build -R 'agc_driver_graph' -Vpasses with noVUID-lines. This machine has no Vulkan device, so that run covers the decode path only.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)