diff options
| author | Darren Wihandi <65404740+fairywreath@users.noreply.github.com> | 2025-01-08 22:50:57 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-08 19:50:57 -0800 |
| commit | 2249d6ffb19e4db8580c76ccb04ab4ca3ddc8394 (patch) | |
| tree | a5d975e79c60fe735a5d9f5948a5534e3a37ec5b /tests/cross-compile/glsl-samplecmplevelzero.slang | |
| parent | 63b8d9e1d0b0bba66f13013aa6b80bd9fab4036b (diff) | |
Add SampleCmpLevel intrinsics (#6004)
* add SampleCmpLevel intrinsics
* update tests
* fix typo
* fix broken glsl test
* refactor SampleCmpLevelZero
* fix metallib test
* fix broken test on dx12
---------
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tests/cross-compile/glsl-samplecmplevelzero.slang')
| -rw-r--r-- | tests/cross-compile/glsl-samplecmplevelzero.slang | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/cross-compile/glsl-samplecmplevelzero.slang b/tests/cross-compile/glsl-samplecmplevelzero.slang index 556addf80..7ef1f28f3 100644 --- a/tests/cross-compile/glsl-samplecmplevelzero.slang +++ b/tests/cross-compile/glsl-samplecmplevelzero.slang @@ -1,12 +1,16 @@ //TEST:CROSS_COMPILE(filecheck=CHECK): -profile ps_5_0 -entry main -target glsl -// CHECK: float {{.*}} = (textureLod(sampler2DShadow(shadowMap_0,sampler_0), ({{.*}}), 0)); -// CHECK: float {{.*}} = (textureLodOffset(sampler2DShadow(shadowMap_0,sampler_0), ({{.*}}), 0, (ivec2(1, 1)))); +// CHECK: float {{.*}} = (textureLod(sampler2DShadow(shadowMap_0,sampler_0), ({{.*}}), (0.0))); +// CHECK: float {{.*}} = (textureLodOffset(sampler2DShadow(shadowMap_0,sampler_0), ({{.*}}), (0.0), (ivec2(1, 1)))); +// CHECK: float {{.*}} = (textureLod(sampler2DShadow(shadowMap_0,sampler_0), ({{.*}}), (1.5))); +// CHECK: float {{.*}} = (textureLodOffset(sampler2DShadow(shadowMap_0,sampler_0), ({{.*}}), (1.5), (ivec2(2, 2)))); Texture2D shadowMap; SamplerComparisonState sampler; float4 main(float4 p : SV_POSITION) { return shadowMap.SampleCmpLevelZero(sampler, float2(0.0), 0.0) - + shadowMap.SampleCmpLevelZero(sampler, float2(0.0), 0.0, int2(1,1)); + + shadowMap.SampleCmpLevelZero(sampler, float2(0.0), 0.0, int2(1,1)) + + shadowMap.SampleCmpLevel(sampler, float2(0.0), 0.0, 1.5) + + shadowMap.SampleCmpLevel(sampler, float2(0.0), 0.0, 1.5, int2(2,2)); } |
