Repository navigation
docs(shader): list the samples unnormalized S#s are accepted for - #8403
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
harisibrar1
left a comment
There was a problem hiding this comment.
Checked against main:
- The implicit-LOD and gradient additions are accurate:
DescriptorBindingBuilder.cpp:206-209refuses only uses outside explicit/implicit/gradient/non-zero-LOD/offset, and depth compare is still refused at lines 210-212. - The multi-level clause is incomplete.
DescriptorBindingBuilder.cpp:251marks an image exact at its base level when every S# sampling it has mip filter 0 (((words[2] >> 26) & 3) == 0, for any accepted use), or is used only for explicit LOD with no min LOD and no bias.tests/ShaderMemory.cpp:6313-6314pin the first branch: implicit-LOD and selected-LOD reads through an S# without a mip filter are flagged exact, and a point mip filter is not (:6316). So a multi-level view is also accepted through an S# without a mip filter, not only when read byimage_sample_lz. - Suggested wording: "on a single-layer 1D or 2D view that is one level at mip 0, is sampled only through S#s without a mip filter, or is read only by
image_sample_lzthrough an S# without minimum LOD or bias". The error text atShaderResources.cpp:4661has the samelz-only wording. check_conventions.py --base main --head pr-8403: passes.
Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.
…el view at its base Co-Authored-By: Claude <noreply@anthropic.com>
|
@harisibrar1 thanks, you're right: |
harisibrar1
left a comment
There was a problem hiding this comment.
Rechecked b8596dc against main:
- The new text matches
DescriptorBindingBuilder.cpp:251: a multi-level view is taken when every S# sampling it has no mip filter, or uses it only forimage_sample_lzwithout minimum LOD or bias. - Your correction to my wording is right:
exactalso requiresproof.samplers[pair.sampler](line 251), which is set only for accepted unnormalized S#s (line 243), so a normalized S# on the same image clears it. "that only unnormalized S#s sample" and keeping the normalized-S# clause for the one-level case only is accurate. tools/check_conventions.py --base mainpasses on this head.
Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.
|
Checked the new text against |
What
The "Unnormalized S#s" entry in
docs/dev/debt/shader.mdsays unnormalized S#s are accepted only for explicit-LODimage_samplewithout derivatives, on a single-level view of mip 0. Two changes since then make that too narrow:63ed0ffea, "sample the base level through unnormalized samplers") accepts implicit-LOD and gradient samples too:DescriptorBindingBuilder.cpp:206-208refuses only uses outside explicit LOD, offset and non-zero LOD whenSamplesBaseLevelIfUnnormalized(Resources.hpp:146-147) does not hold, andSpirvImageEmitter.cppthen emits them at LOD 0. Comparison (DescriptorBindingBuilder.cpp:210-211) and_aare still refused.ShaderResources.cpp:4656-4662also accepts a multi-level view whenexactAtBaseholds.DescriptorBindingBuilder.cpp:244-253sets it for an image that only accepted unnormalized S#s sample, each with no mip filter or used only for explicit LOD 0 (image_sample_lz) without minimum LOD or bias; a normalized S# on the same image clears it.ShaderMemory.cpp:6347-6350pins the mip-filter case. @harisibrar1 found that case in review; the first version named onlyimage_sample_lz.The entry now reads "used only by
image_samplewithout comparison or_a, on a single-layer 1D or 2D view that is one level at mip 0 (even when the image is also sampled through a normalized S#), or that only unnormalized S#s sample, each without a mip filter or only byimage_sample_lzwithout minimum LOD or bias". The rest is unchanged.Tested
Docs only; nothing was built or run. Checked on
main56b299c3aby reading the lines above; the second commit's lines were read onmain865166414.ShaderMemory.cpppins the same behaviour: it accepts compute_l, plain,_b,_cland_dsamples through an unnormalized S# and a pixel implicit-LOD sample (around lines 5973-6100).python tools/check_conventions.py --base origin/mainwith this title and body passes.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code