Repository navigation
feat(shader): decode image_sample_d_cl_o - #389
Merged
oneandonlydean merged 2 commits intoOct 4, 2026
Merged
Conversation
…ResourceMinLod The LOD clamp of an image sample looked for the MinLod capability in the emitter's own requirement list, which nothing fills, so every sample with a clamp failed to compile on every device. The check now reads the capabilities of the target, and a sample that takes the MinLod operand declares the capability in its module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MIMG opcode 0x33 samples with explicit derivatives, an LOD clamp and a texel offset. The three address flags already exist; only the opcode was missing from the decoder table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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.
|
9 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Decodes
image_sample_d_cl_o(MIMG opcode0x33): a sample with explicit derivatives, an LOD clamp and a texel offset.IMAGE_SAMPLE_D_CL_Oin LLVM'sMIMGInstructions.td, between0x32(_d_o) and0x34(_l_o), which the table already has. The address layout (offset, derivatives, coordinates, clamp) follows from the three existing flags; the decoder and the emitter are otherwise unchanged.tools/progress.pycountsIMAGE_SAMPLE_D_CL_Oas a variant ofImageSample.This branch sits on #388 (an LOD clamp cannot be emitted without it). The change of this PR is the last commit.
Tested
Windows 11, MinGW-w64 GCC 15.2.0, NVIDIA GeForce RTX 5080.
ctest: 109/109 pass.The execution test
agc_driver_image_sample_lod_clampof #388 gains twoimage_sample_d_cl_osamples, with the offsets (1, 2) and (-1, -2):max(level of the derivatives, clamp)at its coordinates moved by the offset in that level, wrapped by the sampler.unsupported MIMG opcode.Not tested: a title, 16-bit addresses (A16).
Checklist
main; no other open PR implements the same functions (feat(shader): implement MIMG sample/gather flag variants #226 adds other sample variants, not0x33; it merges cleanly with this branch)NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code