fix(shader): decode image_sample_cd as a derivative sample #395
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/395"
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 MichonGoddijn231849 on 2026-10-02T17:53:23Z.
What
The image decoder refused
image_sample_cdwith "unsupported image coarse derivative (_cd) address layout", although the opcode table already describes it as a derivative sample.image_sample_cdpasses its derivatives in theimage_sample_daddress layout. Only the hardware LOD selection differs: one LOD per quad instead of one per pixel.image_sample_ddoes. The result is the same whenever the lanes of a quad pass equal derivatives, which is what coarse derivatives normally are.GTA V uses
image_sample_cdin G-buffer shaders of the Prologue. Their draws were skipped.Tested
Windows 11 Pro, AMD Ryzen 5 7600, NVIDIA GeForce RTX 5080 (driver 32.0.16.1074), 32 GB DDR5-5600, MinGW-w64 GCC 15.2.0.
_cdrefusals are gone from the Prologue's skip report and those draws render.image_sample_cd, which were refused before.ctest: all tests pass.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🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MichonGoddijn231849 on 2026-10-05T15:17:10Z.
Closing in favour of #475 (adriadam10, merged), which implements
image_sample_cdand its variants. It's also more exact than this PR: it reads each quad's gradients from its first active lane, as the hardware does, where this one sampled every lane with its own gradients.Pull request closed