feat(agc): implement image_load through image tables #920
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/920"
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 Celegans12 on 2026-10-06T17:07:29Z.
What
Stacked on #758; please review the last commit only.
image_loadthrough a V# or pointer image table throws at planning (image table: ImageRead ... only samples, gathers and queries can); #5's bindless tables accepted it and #757 dropped it.PlanTableColumnsalso acceptsImageRead; packed (_pck) loads still throw.OpImageFetchbecomesReadValue, whichReadOnlyValuealso calls in the table's Float/Uint/Sint switch, so table reads share the views, unpacking (d16 included) and per-entry fault of sampling. No binding, ABI or disk cache change.image_loadof its words gives, a null entry zeros. An invalid entry reads zeros and faults only when an executing lane reads it, as for samples (TechnicalDebt unchanged).image_storeand atomics through a table, and MSAA and 1D-array dimensions.image_load, loaded bys_load_dwordx8through its SRT pointer atface * 32; with #758 it throws the message above at pc 0x26c.EmitReadOpand wrapsEmitImage; they merge cleanly. #1078, now onmain, moved image atomics ahead of theEmitImageswitch whoseImageReadcase this commit changes. #866's shader sRGB decode serves direct T#s only, so a table entry that needs it stays invalid (#757) and faults when read. Thetools/pr_overlap.pyrows come from #757 and #758.Tested
mainb3fcd6d6with #757 and #758: configure-DBUILD_TESTING=ON, full build,--target libs,ctest:ctest --output-on-failure)VK_DRIVER_FILES): 454/454 pass;agc_driver_flat_storeis left out there because it takes several minutes on Windows llvmpipeagc_driver_image_table(GPU) matches tableimage_loads to direct ones (V# and pointer tables, Float/Uint/Sint, d16), reads per-wave keys on 32-lane subgroups, and checks null, invalid and EXEC-cleared entries;agc_shader_memoryplanskey * 16 + 8. Both throw without this commit; onmaintheir shaders fail to plan. They pass with-DANYPS5_ENABLE_SPIRV_TOOLS=ON.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-06T20:13:38Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cppL627-629, L968-971core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppL197, L2458core/libs/prx/libSceAgcDriver/Graphics/include/Context.hppL137core/libs/prx/libSceAgcDriver/Graphics/include/Pipeline.hppL92core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppL521core/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cppL126, L495, L511core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppL197, L2458core/libs/prx/libSceAgcDriver/Graphics/include/Context.hppL137core/libs/prx/libSceAgcDriver/Graphics/include/Pipeline.hppL92core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppL521core/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cppL126, L256, L495, L511core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cppL170-173, L353-355core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppL200-249, L276-281, L283-295, L302-308, L379-392, L394-405, L407-408core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hppL82-85core/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hppL27-29, L60-62core/shader/recompiler/Optimization/src/BindingAllocator.cppL128-129, L131-144, L167-171core/shader/recompiler/Optimization/src/ResourceMaterializer.cppL240-246, L273-279, L283-286, L298, L357-383, L385-392, L394-396, L398-400, L402-404, L406-417, L419-431, L467-470, L474-489, L626-631, L634-651, L703-705, L713-722, L857-870, L1024-1036, L1042core/shader/recompiler/Optimization/src/ResourceTracker.cppL304-345, L409-410, L413-421, L423-424core/shader/recompiler/ShaderDiskCache.cppL73-75, L83, L422-425, L515-518, L823-825core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cppL1007-1045, L1269-1270core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cppL90-108core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cppL90-108core/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hppL59-62core/shader/recompiler/Optimization/src/ResourceMaterializer.cppL456-457, L989-990, L1000-1001, L1017, L1023-1036core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cppL90-108core/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hppL59-62core/shader/recompiler/Optimization/src/ResourceMaterializer.cppL456-457, L989-990, L1000-1001, L1017, L1023-1036core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cppL10-11, L90-108core/shader/recompiler/CMakeLists.txtL211core/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hppL59-62core/shader/recompiler/Optimization/src/ResourceMaterializer.cppL456-457, L989-990, L1000-1001, L1017, L1023-1036core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cppL5, L10-11core/libs/prx/libSceAgcDriver/Execution/src/ShaderMemory.cppL227-228core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppL2458, L3301-3303, L3617core/libs/prx/libSceAgcDriver/Graphics/include/Context.hppL137core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cppL977-979, L2106-2107, L2646-2652core/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cppL169-176, L233-235, L344-360core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppL200-249, L256-257, L276-281, L283-295, L297-299, L302-308, L344-346, L351-377, L379-392, L394-405, L407-408core/shader/recompiler/BdaAbi.hppL30core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/DescriptorBinding.hppL16-25core/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hppL11-52, L60-62core/shader/recompiler/Optimization/src/BindingAllocator.cppL152-155core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cppL1-2, L134-158, L208, L223-224, L243-271, L351-359core/shader/recompiler/Optimization/src/ResourceMaterializer.cppL5, L162-164, L203-207, L209-211, L273-279, L301-320, L326-355, L363-404, L406-407, L409-431, L467-468, L474-489, L535, L575-597, L599-631, L634-657, L667-742, L767-774, L787-831, L835-877, L883-885, L1013, L1016-1017, L1024-1048core/shader/recompiler/Recompiler.cppL349-350, L387-391, L537-538core/shader/recompiler/ShaderDiskCache.cppL66-68, L70-75, L81-83, L422-426, L492, L515-520, L811-834core/shader/recompiler/ShaderDiskCache.hppL15core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvMemory/SpirvDescriptors.hppL16-17core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cppL1007-1045, L1052-1053, L1159-1161core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvDescriptors.cppL5, L55-60, L68-71, L140-141, L153-160, L177-179core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvEmitterHelpers.cppL0-1, L135-187core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cppL1427-1461Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-09T02:28:07Z.
Closing this. As boykopovar asked after #639,
image_loadthrough image tables is now part of #757 (3b752dc7c7), which replaces the bindless path while keepingimage_loadworking. This PR's tests moved there too.Pull request closed