agc_driver_image_sample_derivatives fails instead of skipping its offset cases without VK_KHR_maintenance8 #827

Closed
opened 2026-10-06 07:45:27 +00:00 by LeandroLP23 · 0 comments
LeandroLP23 commented 2026-10-06 07:45:27 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-06T07:45:27Z.


agc_driver_image_sample_derivatives fails on a device without VK_KHR_maintenance8:

ShaderRecompiler::Recompile: SPIR-V emission failed: hash=0x140697145558272 stage=4 opcode=ImageSampleRaw reason=has a texel offset that is not a constant, which image sampling takes only with VK_KHR_maintenance8 and shaderImageGatherExtended

The 2D cases include _o variants (image_sample_cd_o, image_sample_d_o_g16, ...) whose offset comes from a VGPR. Since #303 the recompiler accepts such offsets only with maintenance8 (target.nonConstantImageOffsets) and fails otherwise, as ShaderMemory.cpp expects. The execution test does not account for that and fails as a whole instead of skipping the offset cases when device->Target().nonConstantImageOffsets is false. The AMD Windows driver used here does not expose maintenance8.

Environment

  • main at 481c85e7, Release, MinGW-w64 GCC 15.2.0 (WinLibs r7), Windows 11 Home 10.0.26300
  • AMD Radeon 860M (RDNA 3.5, device 0x1114), driver 32.0.13058.8001, Vulkan 1.3.302, subgroup size 64 (wave32 compute runs on 32-wide subgroups)

Reproduce

ctest --test-dir build -R '^agc_driver_image_sample_derivatives$' --output-on-failure
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5724872302 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/827). Originally posted by [LeandroLP23](https://github.com/LeandroLP23) on 2026-10-06T07:45:27Z. --- `agc_driver_image_sample_derivatives` fails on a device without `VK_KHR_maintenance8`: ``` ShaderRecompiler::Recompile: SPIR-V emission failed: hash=0x140697145558272 stage=4 opcode=ImageSampleRaw reason=has a texel offset that is not a constant, which image sampling takes only with VK_KHR_maintenance8 and shaderImageGatherExtended ``` The 2D cases include `_o` variants (`image_sample_cd_o`, `image_sample_d_o_g16`, ...) whose offset comes from a VGPR. Since #303 the recompiler accepts such offsets only with maintenance8 (`target.nonConstantImageOffsets`) and fails otherwise, as `ShaderMemory.cpp` expects. The execution test does not account for that and fails as a whole instead of skipping the offset cases when `device->Target().nonConstantImageOffsets` is false. The AMD Windows driver used here does not expose maintenance8. ### Environment - `main` at 481c85e7, Release, MinGW-w64 GCC 15.2.0 (WinLibs r7), Windows 11 Home 10.0.26300 - AMD Radeon 860M (RDNA 3.5, device 0x1114), driver 32.0.13058.8001, Vulkan 1.3.302, subgroup size 64 (wave32 compute runs on 32-wide subgroups) ### Reproduce ``` ctest --test-dir build -R '^agc_driver_image_sample_derivatives$' --output-on-failure ```
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#827
No description provided.