HLSL: add error for expected comparison sampler in SampleCmp* ops
This adds an error message if a non-comparison sampler is used with comparison sampling methods. There's no functional change for correct shaders.
This commit is contained in:
parent
32a385e9d7
commit
3cbc32f472
6 changed files with 224 additions and 0 deletions
10
Test/hlsl.samplecmp.negative2.frag
Normal file
10
Test/hlsl.samplecmp.negative2.frag
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
Texture2D g_shadowTex;
|
||||
SamplerState g_shadowSampler;
|
||||
|
||||
float4 main() : SV_Target0
|
||||
{
|
||||
g_shadowTex.GatherCmpRed(g_shadowSampler, float2(0,0), 0, int2(0,0)); // ERROR (should be comparison sampler)
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue