summaryrefslogtreecommitdiffstats
path: root/tests/diagnostics
diff options
context:
space:
mode:
authorDarren Wihandi <65404740+fairywreath@users.noreply.github.com>2025-01-24 16:13:16 -0500
committerGitHub <noreply@github.com>2025-01-24 13:13:16 -0800
commit0dd9076db2154d787f6e06b713721e877b746b83 (patch)
tree24f75b2c612fc0ee5a3ba8157c4d0dde7ff9a3a0 /tests/diagnostics
parent92c9fffb95c92b0bc07eb1c656375928b5cd5c33 (diff)
Add bgra8 format (#6163)
* add brga8 format * add tests * minor fixes * cleanup * maybe fix broken quad control test * add missing xslang flag on test --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tests/diagnostics')
-rw-r--r--tests/diagnostics/image-format-unsupported-by-backend.slang19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/diagnostics/image-format-unsupported-by-backend.slang b/tests/diagnostics/image-format-unsupported-by-backend.slang
new file mode 100644
index 000000000..270c2b63e
--- /dev/null
+++ b/tests/diagnostics/image-format-unsupported-by-backend.slang
@@ -0,0 +1,19 @@
+//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_SPIRV): -target spirv
+//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_GLSL): -target glsl
+//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK_WGSL): -target wgsl
+
+// CHECK_SPIRV: warning 31105{{.*}}bgra8
+// CHECK_GLSL: warning 31105{{.*}}bgra8
+[format("bgra8")]
+RWTexture2D<float4> outputTexture;
+
+// CHECK_WGSL: warning 31105{{.*}}rg8
+[format("rg8")]
+RWTexture2D<float4> outputTexture2;
+
+[numthreads(8, 8, 1)]
+void main(uint3 threadID : SV_DispatchThreadID)
+{
+ outputTexture[threadID.xy] = float4(1.0, 1.0, 1.0, 1.0);
+ outputTexture2[threadID.xy] = float4(1.0, 1.0, 1.0, 1.0);
+}