Texture3D LOD queries reject SamplerComparisonState in SM6.8
维护者通常 2 天内回复
@akhil9tiet 已经在做这个了。
开始于 2026年10月20日。
评估
这个 Issue 还没有评估数据。
描述
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.
- 主要语言
- C++
- 星标
- 3.7k
- 派生
- 926
- 平均合并
- 3 天 22 小时
- 30 天内合并 PR
- 45
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/DirectXShaderCompiler 的其他 Issue
-
bug needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
microsoft/DirectXShaderCompiler#9173 ·
维护者通常 2 天内回复
-
bug needs-triage
难度 2/5 1-3 小时 新手友好度 65/100
microsoft/DirectXShaderCompiler#9155 · 4 条评论 ·
维护者通常 2 天内回复
-
bug needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
microsoft/DirectXShaderCompiler#9135 ·
维护者通常 2 天内回复
-
DXC emits DW_LANG_C_plus_plus instead of DW_LANG_HLSL for HLSL可能已有人在做 @rj123-nv 于 18 天前认领。 未关闭bug needs-triage
难度 2/5 1-3 小时 新手友好度 75/100
microsoft/DirectXShaderCompiler#9087 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
microsoft/DirectXShaderCompiler#9086 ·
维护者通常 2 天内回复
查看 microsoft/DirectXShaderCompiler 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
-
feature:config kind:docs os:windows toolchain:cmake triaged
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
arch-based bug niri
难度 2/5 1-3 小时 新手友好度 68/100
noctalia-dev/noctalia#5552 ·
维护者通常 1 天内回复