diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2023-07-11 03:06:40 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-10 12:06:40 -0700 |
| commit | 5569b4850dabbb7dbcb72278bb2918c281e0d475 (patch) | |
| tree | 0acae3b4aeb3921513894fa31be4c0f1ba44c573 /tests/cross-compile | |
| parent | 0363a4d18c655697cfb0d958add2c7bf4b156874 (diff) | |
Add glsl intrinsic for SampleCmpLevelZero with offset and correct existing intrinsic (#2975)
* Correct glsl intrinsic for SampleCmpLevelZero without offset
* Add glsl intrinsic for SampleCmpLevelZero with offset
* Add test for samplecmplevelzero glsl translation
---------
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tests/cross-compile')
| -rw-r--r-- | tests/cross-compile/glsl-samplecmplevelzero.slang | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/cross-compile/glsl-samplecmplevelzero.slang b/tests/cross-compile/glsl-samplecmplevelzero.slang new file mode 100644 index 000000000..4bfd557cc --- /dev/null +++ b/tests/cross-compile/glsl-samplecmplevelzero.slang @@ -0,0 +1,12 @@ +//TEST:CROSS_COMPILE(filecheck=CHECK): -profile ps_5_0 -entry main -target glsl + +// CHECK: float _S3 = (textureLod(sampler2DShadow(shadowMap_0,sampler_0), vec3((_S2), (0.0)), 0)); +// CHECK: float _S4 = (textureLodOffset(sampler2DShadow(shadowMap_0,sampler_0), vec3((_S2), (0.0)), 0, (ivec2(1, 1)))); + +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)); +} |
