Texture3D LOD queries reject SamplerComparisonState in SM6.8
Maintainers usually reply within 2 days
@akhil9tiet is already working on this.
Since Oct 20, 2026.
Assessment
This issue has not been assessed yet.
Description
DXC is missing SamplerComparisonState overloads of Texture3D.CalculateLevelOfDetail and Texture3D.CalculateLevelOfDetailUnclamped.
The completed SM6.8 Expanded Comparison Sampling specification proposal, under HLSL additions, declares both comparison-sampler LOD overloads and states that TextureBase represents any texture object type except Texture2DMS*, and therefore should include Texture3D. Texture3D is the only one missing support.
Reproduction
https://hlsl.godbolt.org/z/9x6xbnWPd
Texture3D<float4> Tex : register(t0);
SamplerComparisonState Samp : register(s0);
float4 main(float3 location : TEXCOORD0) : SV_Target {
float clamped = Tex.CalculateLevelOfDetail(Samp, location);
float unclamped = Tex.CalculateLevelOfDetailUnclamped(Samp, location);
return float4(clamped, unclamped, 0.0, 1.0);
}
Compile to DXIL:
dxc -T ps_6_8 -E main -Fo repro.dxil repro.hlsl
Expected behavior
Both calls compile and return scalar float LOD values. A comparison reference is not required for these queries.
Actual behavior
DXC exits with code 5 and reports:
repro.hlsl:5:23: error: no matching member function for call to 'CalculateLevelOfDetail'
repro.hlsl:6:25: error: no matching member function for call to 'CalculateLevelOfDetailUnclamped'
Control cases
| Receiver and sampler | Both LOD methods |
|---|---|
Texture3D<float4> with SamplerState |
Compile; emitted DXIL contains both clamped and unclamped CalculateLOD calls. |
Texture3D<float4> with SamplerComparisonState |
Fail as shown above. |
Texture2D<float> with SamplerComparisonState |
Compile; emitted DXIL retains the comparison sampler. |
For the ordinary-sampler control, replace only SamplerComparisonState with SamplerState in the reproduction. The Texture2D control uses a float2 location.
Environment
- Package:
directx-shader-compiler-1.10.2605.37, installed through Nix. dxc --version:libdxcompiler.so: 1.10(0-00000000)(1.10.0.0).- Host: Linux
6.18.33.2-microsoft-standard-WSL2, x86_64. - Output: DXIL; profile
ps_6_8; HLSL2021.
Implementation context
In the inspected source revision, utils/hct/gen_intrin_main.txt lines 728–729 declare both Texture3D methods with sampler, while the other six non-multisampled read-only texture families use any_sampler. The existing tools/clang/test/HLSLFileCheck/hlsl/objects/Texture/CalcLODWithSamplerComparison.hlsl regression covers those six families but omits Texture3D.
Related work
DXC issue #5560 requested the SM6.8 comparison-sampler methods; DXC PR #5802 added the general LOD overloads. This report concerns the remaining Texture3D omission.
- Dominant language
- C++
- Stars
- 3.7k
- Forks
- 926
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 45
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/DirectXShaderCompiler
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/DirectXShaderCompiler#9173 ·
Maintainers usually reply within 2 days
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
microsoft/DirectXShaderCompiler#9155 · 4 comments ·
Maintainers usually reply within 2 days
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/DirectXShaderCompiler#9135 ·
Maintainers usually reply within 2 days
-
DXC emits DW_LANG_C_plus_plus instead of DW_LANG_HLSL for HLSLPossibly taken @rj123-nv claimed this 18 days ago. Openbug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
microsoft/DirectXShaderCompiler#9087 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
microsoft/DirectXShaderCompiler#9086 ·
Maintainers usually reply within 2 days
All issues in microsoft/DirectXShaderCompiler
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
telefonicaid/fiware-orion#4836 ·
Maintainers usually reply within 1 day
-
refactor topic-ui topic-weather
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Command-Install Needs-Triage
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
microsoft/winget-cli#6718 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
leanprover/lean4#16810 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day