feat(shader): implement MIMG sample/gather flag variants #226
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/226"
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 asimplestray on 2026-10-01T17:00:52Z.
What
Implements 43 MIMG opcodes (shaders 609/1166 -> 652/1166):
IMAGE_SAMPLE_*bias/lod/clamp/compare/derivative/offset/level-zero combinations (0x21-0x3Frange).IMAGE_GATHER4*variants including vanillaIMAGE_GATHER4(0x40), bias/lod/compare/offset combinations (0x41-0x5E).imageSample/imageGathertranslation (compare-ref, bias, lod, offset and derivative flow throughMemoryInfo); 15 pre-existing shared-enum rows now name their specific opcode.Tested
Linux (GCC,
BUILD_TESTING=ON,ANYPS5_ENABLE_SPIRV_TOOLS=OFF): full build,ctest90/90 pass, including the newimage_sample_gathertest (decode opcode + family + image classification plus translation of all 43 encodings).Checklist
main; no other open PR implements the same opcodes (checked open shader PRs: none touch MIMG sample/gather).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-01T17:01:17Z.
Progress report (
313de1c→f6e689d)📈 GPU shader instructions: 63.29% (+3.68%, +43 implemented instructions)
✅ 43 implemented
IMAGE_GATHER4IMAGE_GATHER4_BIMAGE_GATHER4_B_CLIMAGE_GATHER4_B_CL_OIMAGE_GATHER4_B_OIMAGE_GATHER4_CLIMAGE_GATHER4_CL_OIMAGE_GATHER4_C_BIMAGE_GATHER4_C_B_CLIMAGE_GATHER4_C_B_CL_OIMAGE_GATHER4_C_B_OIMAGE_GATHER4_C_CLIMAGE_GATHER4_C_CL_OIMAGE_GATHER4_C_LIMAGE_GATHER4_C_L_OIMAGE_GATHER4_LIMAGE_GATHER4_L_OIMAGE_GATHER4_OIMAGE_SAMPLE_B_CLIMAGE_SAMPLE_B_CL_OIMAGE_SAMPLE_B_OIMAGE_SAMPLE_CIMAGE_SAMPLE_CLIMAGE_SAMPLE_CL_OIMAGE_SAMPLE_C_BIMAGE_SAMPLE_C_B_CLIMAGE_SAMPLE_C_B_CL_OIMAGE_SAMPLE_C_B_OIMAGE_SAMPLE_C_CLIMAGE_SAMPLE_C_CL_OIMAGE_SAMPLE_C_DIMAGE_SAMPLE_C_D_CLIMAGE_SAMPLE_C_D_CL_OIMAGE_SAMPLE_C_D_OIMAGE_SAMPLE_C_LIMAGE_SAMPLE_C_LZ_OIMAGE_SAMPLE_C_L_OIMAGE_SAMPLE_C_OIMAGE_SAMPLE_DIMAGE_SAMPLE_D_CLIMAGE_SAMPLE_D_OIMAGE_SAMPLE_LZ_OIMAGE_SAMPLE_O