summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/wgsl/texture-sampler-less.slang8
-rw-r--r--tests/wgsl/texture.slang8
2 files changed, 12 insertions, 4 deletions
diff --git a/tests/wgsl/texture-sampler-less.slang b/tests/wgsl/texture-sampler-less.slang
index 1a6cb5341..893e867b7 100644
--- a/tests/wgsl/texture-sampler-less.slang
+++ b/tests/wgsl/texture-sampler-less.slang
@@ -311,23 +311,27 @@ bool TEST_texture(
// https://www.w3.org/TR/WGSL/#texturegather
// ==================================
-#if 0
+ // WGSL: textureGather({{.*}}t2D
&& all(Tv4(T(0)) == t2D.Gather(float2(u, u)))
+ // WGSL: textureGather({{.*}}tCube
&& all(Tv4(T(0)) == tCube.Gather(normalize(float3(u, 1 - u, u))))
+ // WGSL: textureGather({{.*}}t2DArray
&& all(Tv4(T(0)) == t2DArray.Gather(float3(u, u, 0)))
+ // WGSL: textureGather({{.*}}tCubeArray
&& all(Tv4(T(0)) == tCubeArray.Gather(float4(normalize(float3(u, 1 - u, u)), 0)))
#if TEST_WHEN_CONSTEXPR_WORKS_FOR_OFFSET
// Offset variant
+ // W-GSL: textureGather({{.*}}t2D
&& all(Tv4(T(0)) == t2D.Gather(float2(u2, u), int2(0, 0)))
+ // W-GSL: textureGather({{.*}}t2DArray
&& all(Tv4(T(0)) == t2DArray.Gather(float3(u2, u, 0), int2(0, 0)))
#endif // #if TEST_WHEN_CONSTEXPR_WORKS_FOR_OFFSET
-#endif
// =====================================
// T SampleGrad()
diff --git a/tests/wgsl/texture.slang b/tests/wgsl/texture.slang
index 999555a55..af39cf52a 100644
--- a/tests/wgsl/texture.slang
+++ b/tests/wgsl/texture.slang
@@ -346,21 +346,25 @@ bool TEST_texture(
// https://www.w3.org/TR/WGSL/#texturegather
// ==================================
-#if 0
+ // WGSL: textureGather({{.*}}t2D
&& all(Tv4(T(0)) == t2D.Gather(samplerState, float2(u, u)))
+ // WGSL: textureGather({{.*}}tCube
&& all(Tv4(T(0)) == tCube.Gather(samplerState, normalize(float3(u, 1 - u, u))))
+ // WGSL: textureGather({{.*}}t2DArray
&& all(Tv4(T(0)) == t2DArray.Gather(samplerState, float3(u, u, 0)))
+ // WGSL: textureGather({{.*}}tCubeArray
&& all(Tv4(T(0)) == tCubeArray.Gather(samplerState, float4(normalize(float3(u, 1 - u, u)), 0)))
// Offset variant
+ // WGSL: textureGather({{.*}}t2D
&& all(Tv4(T(0)) == t2D.Gather(samplerState, float2(u2, u), int2(0, 0)))
+ // WGSL: textureGather({{.*}}t2DArray
&& all(Tv4(T(0)) == t2DArray.Gather(samplerState, float3(u2, u, 0), int2(0, 0)))
-#endif
// =====================================
// T SampleGrad()