summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/glsl-intrinsic/intrinsic-texture.slang24
-rw-r--r--tests/language-feature/capability/capability6.slang13
2 files changed, 29 insertions, 8 deletions
diff --git a/tests/glsl-intrinsic/intrinsic-texture.slang b/tests/glsl-intrinsic/intrinsic-texture.slang
index 3b80b2d26..c40390c57 100644
--- a/tests/glsl-intrinsic/intrinsic-texture.slang
+++ b/tests/glsl-intrinsic/intrinsic-texture.slang
@@ -1,13 +1,13 @@
//TEST:SIMPLE(filecheck=HLSL): -allow-glsl -stage compute -entry computeMain -target hlsl -DHLSL
//TEST:SIMPLE(filecheck=HLSL): -allow-glsl -stage fragment -entry fragMain -target hlsl -DHLSL
-//TEST:SIMPLE(filecheck=GLSL): -allow-glsl -stage compute -entry computeMain -target glsl
-//TEST:SIMPLE(filecheck=GLSL): -allow-glsl -stage fragment -entry fragMain -target glsl
-//TEST:SIMPLE(filecheck=SPIR): -allow-glsl -stage compute -entry computeMain -target spirv
-//TEST:SIMPLE(filecheck=SPIR): -allow-glsl -stage fragment -entry fragMain -target spirv
-//TEST:SIMPLE(filecheck=CUDA): -allow-glsl -stage compute -entry computeMain -target cuda
-//TEST:SIMPLE(filecheck=CUDA): -allow-glsl -stage fragment -entry fragMain -target cuda
+//TEST:SIMPLE(filecheck=GLSL): -allow-glsl -stage compute -entry computeMain -target glsl -DGLSL
+//TEST:SIMPLE(filecheck=GLSL): -allow-glsl -stage fragment -entry fragMain -target glsl -DGLSL
+//TEST:SIMPLE(filecheck=SPIR): -allow-glsl -stage compute -entry computeMain -target spirv -DSPIRV
+//TEST:SIMPLE(filecheck=SPIR): -allow-glsl -stage fragment -entry fragMain -target spirv -DSPIRV
+//TEST:SIMPLE(filecheck=CUDA): -allow-glsl -stage compute -entry computeMain -target cuda -DCUDA
+//TEST:SIMPLE(filecheck=CUDA): -allow-glsl -stage fragment -entry fragMain -target cuda -DCUDA
-//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -output-using-type
+//TEST(compute, vulkan):COMPARE_COMPUTE(filecheck-buffer=BUF):-vk -compute -entry computeMain -allow-glsl -output-using-type -xslang -DSPIRV
// TODO: This test revealed a few problems for a path from GLSL to HLSL
//T-EST(compute):COMPARE_COMPUTE(filecheck-buffer=BUF):-dx12 -compute -entry computeMain -allow-glsl -use-dxil -output-using-type -profile cs_6_6 -xslang -DHLSL
@@ -1433,7 +1433,15 @@ bool textureFuncs( Sampler1D<vector<T,N>> gsampler1D
;
}
-[require(cpp_cuda_glsl_hlsl_spirv,compute,fragment)]
+#if defined(HLSL)
+[require(hlsl, sm_5_1, compute_fragment)]
+#elif defined(GLSL)
+[require(glsl, sm_5_1, compute_fragment)]
+#elif defined(SPIRV)
+[require(spirv, sm_5_1, compute_fragment)]
+#elif defined(CUDA)
+[require(cuda, sm_5_1, compute_fragment)]
+#endif
__extern_cpp void TEST_main()
{
// GLSL: void main(
diff --git a/tests/language-feature/capability/capability6.slang b/tests/language-feature/capability/capability6.slang
new file mode 100644
index 000000000..3d6642063
--- /dev/null
+++ b/tests/language-feature/capability/capability6.slang
@@ -0,0 +1,13 @@
+//TEST:SIMPLE(filecheck=CHECK): -target spirv -emit-spirv-directly -entry computeMain -stage compute
+//TEST:SIMPLE(filecheck=CHECK_IGNORE_CAPS): -target spirv -emit-spirv-directly -entry computeMain -stage compute -ignore-capabilities
+// CHECK_IGNORE_CAPS-NOT: error 36104
+
+
+
+[require(spirv, hlsl)]
+// CHECK: error 36111
+// CHECK_IGNORE_CAPS-NOT: error 36111
+void computeMain()
+{
+
+}