fix(shader): map image-table entries filled with ones to no record #15611
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15611"
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 XatiX on 2026-11-03T21:43:38Z.
What
An image-table entry whose eight words are all
0xffffffff(how an unbound slot is filled) was turned into a poison record, so a lane that selected it read zeros and raised an image-table BDA fault. Each batch then logged it at completion asdeferred write-back failed: image table: ... selected the descriptor at ... (words ffffffff ...): invalid format.Such an entry now maps to no record (
NullCode), as an all-zero entry already does. This applies only when the table's image is sampled, read-only and not atomic. A lane that selects it still reads zeros, but no fault is raised, so what the shader produces does not change.#10556 made a directly bound sampled T# with an unset format (0 or 0x1ff, including the
0xffffffff-filled slots of PPSA02721) decode as null, and kept image-table entries as poison. This PR does not widen that rule. Only an image-table entry with all eight words set is affected, and the TYPE 15 refusal for direct T#s thatagc_shader_memorychecks is unchanged.What the console returns for such an entry is not measured. The existing debt entry for unset-format T#s now covers this case. I rewrote it to lead with the gap and to stay under the 1000-character limit; it keeps every rule it stated before.
agc_shader_memory(image tables) gains a step after the null-entry check. It fills that entry with ones and expectsNullCodewith no expected fault. Onmainit fails withimage tables: an entry filled with ones was mapped to a record or expects a fault.Tested
ctest -V -R "shader_memory|image_table|shader_replay|type_zero|agc_driver_graphics|bindless"withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1andANYPS5_REQUIRE_VULKAN=1, run on the same machine from a clean build of the rebased branch. The image-table and bindless execution tests were built (ANYPS5_AGC_EXECUTION_TESTS, now includingImageTableVariants). The filter selects 18 tests. Each log starts with its tested commit and these variables.e818079123, onmain4d513cadcc): 18/18 passed.main'sResourceMaterializer.cpp(29bcc501b7, the same file as at4d513cadcc) with the new test: 16/18 passed. Onlyagc_shader_memoryandagc_shader_bindlessfail, both at the new check,image tables: an entry filled with ones was mapped to a record or expects a fault;agc_shader_bindlessruns the same test binary.VUID-error, and nothing was skipped. Logs (candidate, control and build settings): attached to the retest comment.deferred write-back failed: image tablelines, from about 4 pixel shaders selecting entries at0x3e1240820and0x3e1040640. With it there were none, and the screen looks the same.tools/check_conventions.py --base upstream/mainandtools/check_main_sync.pypass on the rebased head.tools/pr_overlap.py --branchreports #12790 and #14692 atdocs/dev/debt/shader.mdL251. Both add their own entries next to this one and do not edit it, so a merge keeps both.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)🤖 Generated with Claude Code