summaryrefslogtreecommitdiff
path: root/tests/cross-compile
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cross-compile')
-rw-r--r--tests/cross-compile/glsl-samplecmplevelzero.slang4
-rw-r--r--tests/cross-compile/glsl-texturegather.slang11
-rw-r--r--tests/cross-compile/image-load.slang8
-rw-r--r--tests/cross-compile/vk-texture-indexing.slang5
4 files changed, 18 insertions, 10 deletions
diff --git a/tests/cross-compile/glsl-samplecmplevelzero.slang b/tests/cross-compile/glsl-samplecmplevelzero.slang
index 4bfd557cc..cd2ee54bd 100644
--- a/tests/cross-compile/glsl-samplecmplevelzero.slang
+++ b/tests/cross-compile/glsl-samplecmplevelzero.slang
@@ -1,7 +1,7 @@
//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))));
+// CHECK: float _S3 = (textureLod(sampler2DShadow(shadowMap_0,sampler_0), (_S2), 0));
+// CHECK: float _S4 = (textureLodOffset(sampler2DShadow(shadowMap_0,sampler_0), (_S2), 0, (ivec2(1, 1))));
Texture2D shadowMap;
SamplerComparisonState sampler;
diff --git a/tests/cross-compile/glsl-texturegather.slang b/tests/cross-compile/glsl-texturegather.slang
index 125cf6df1..1647faaac 100644
--- a/tests/cross-compile/glsl-texturegather.slang
+++ b/tests/cross-compile/glsl-texturegather.slang
@@ -1,9 +1,10 @@
-//TEST:CROSS_COMPILE(filecheck=CHECK): -profile ps_5_0 -entry main -target glsl
+//TEST:SIMPLE(filecheck=CHECK): -stage fragment -entry main -target spirv -emit-spirv-directly
+//TEST:SIMPLE(filecheck=CHECK): -stage fragment -entry main -target spirv
-// CHECK: textureGather(sampler2DShadow(t_0,sc_0), (loc_0), (3.0))
-// CHECK: textureGatherOffset(sampler2DShadow(t_0,sc_0), (loc_0), (3.0), (off_0))
-// CHECK: textureGatherOffsets(sampler2DShadow(t_0,sc_0), (loc_0), (3.0), ivec2[]((off_0), (off_0), (off_0), (off_0)))
-// CHECK: textureGatherOffsets(sampler2DShadow(t_0,sc_0), (loc_0), (3.0), ivec2[]((ivec2(6, 6)), (ivec2(7, 7)), (ivec2(8, 8)), (ivec2(9, 9))))
+// CHECK: OpImageDrefGather
+// CHECK: OpImageDrefGather
+// CHECK: OpImageDrefGather
+// CHECK: OpImageDrefGather
Texture2D t;
SamplerState s;
diff --git a/tests/cross-compile/image-load.slang b/tests/cross-compile/image-load.slang
index dc80288e6..fa1430c38 100644
--- a/tests/cross-compile/image-load.slang
+++ b/tests/cross-compile/image-load.slang
@@ -4,7 +4,8 @@
// gets properly converted to a call to `imageLoad`
// and not just `texelFetch` as it would for a `Texture*`.
-//TEST:CROSS_COMPILE:-target spirv-assembly -entry main -stage compute
+//TEST:SIMPLE(filecheck=CHECK): -target spirv -entry main -stage compute -emit-spirv-directly
+//TEST:SIMPLE(filecheck=CHECK): -target spirv -entry main -stage compute
struct Params
{
@@ -15,5 +16,8 @@ ParameterBlock<Params> gParams;
void main(uint3 tid : SV_DispatchThreadID)
{
- float f = gParams.tex.Load(int3(int2(tid.xy), int(tid.z)));
+ // CHECK: OpImageRead
+ // CHECK: OpImageWrite
+ float f = gParams.tex.Load(int3(int2(tid.xy), int(tid.z)));
+ gParams.tex[tid] = f + 1.0;
}
diff --git a/tests/cross-compile/vk-texture-indexing.slang b/tests/cross-compile/vk-texture-indexing.slang
index 9a086d5bd..ace0befd5 100644
--- a/tests/cross-compile/vk-texture-indexing.slang
+++ b/tests/cross-compile/vk-texture-indexing.slang
@@ -1,6 +1,7 @@
// vk-texture-indexing.slang
-//TEST:CROSS_COMPILE:-target spirv-assembly -entry main -stage fragment
+//TEST:SIMPLE(filecheck=CHECK):-target spirv -entry main -stage fragment
+//TEST_DISABLED:SIMPLE(filecheck=CHECK):-target spirv -entry main -stage fragment -emit-spirv-directly
struct Params
{
@@ -19,6 +20,8 @@ float4 main(
uint3 uv : UV)
: SV_Target
{
+ // CHECK: OpDecorate %{{.*}} NonUniform
+ // CHECK: OpImageFetch
float v = fetchData(uv.xy, uv.z);
return v;
}