-
Notifications
You must be signed in to change notification settings - Fork 795
Closed
Labels
enhancementFeature suggestionFeature suggestionsm6.7spirvWork related to SPIR-VWork related to SPIR-V
Description
SM6.7 added SampleCmlLevel which is similar to SampleCmp
, but which fixes the LOD at which the comparison is done.
Texture2D<float> tex;
SamplerComparisonState samplerComparisonState;
float4 main() : SV_Target {
float tmp = tex.SampleCmpLevel(samplerComparisonState, float2(0, 0), 2, 3);
return tmp.xxxx;
}
$ dxc -T ps_6_7 shader.hlsl -spirv -fspv-target-env=vulkan1.3
shader.hlsl:7:19: error: intrinsic 'SampleCmpLevel' method unimplemented
float tmp = tex.SampleCmpLevel(samplerComparisonState, float2(0, 0), 2, 3);
Seems like this could be implemented with a small change in DXC: SampleCmpLevelZero
uses the correct instruction, but fixes the LOD to 0. But passing a register is possible, so seems like implementation will be straightforward.
Metadata
Metadata
Assignees
Labels
enhancementFeature suggestionFeature suggestionsm6.7spirvWork related to SPIR-VWork related to SPIR-V