mirror of
https://github.com/RPCS3/glslang.git
synced 2024-12-01 07:01:12 +00:00
3cbc32f472
This adds an error message if a non-comparison sampler is used with comparison sampling methods. There's no functional change for correct shaders.
13 lines
319 B
GLSL
13 lines
319 B
GLSL
|
|
Texture2D g_shadowTex;
|
|
SamplerState g_shadowSampler;
|
|
SamplerComparisonState g_shadowSamplerComp;
|
|
|
|
float4 main() : SV_Target0
|
|
{
|
|
g_shadowTex.SampleCmp(g_shadowSamplerComp, float2(0,0), 0); // OK
|
|
g_shadowTex.SampleCmp(g_shadowSampler, float2(0,0), 0); // ERROR (should be comparison sampler)
|
|
|
|
return 0;
|
|
}
|