From 8f6c6e333c06ae1c3b9f00396563c14a2ae09b4d Mon Sep 17 00:00:00 2001 From: Darren Wihandi <65404740+fairywreath@users.noreply.github.com> Date: Sun, 27 Apr 2025 14:31:34 -0600 Subject: Emit SPIRV NonReadable decoration for WTexture* (#6922) --- tests/wgsl/write-only-texture.slang | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/wgsl/write-only-texture.slang b/tests/wgsl/write-only-texture.slang index 56034ce6a..7fc9d4266 100644 --- a/tests/wgsl/write-only-texture.slang +++ b/tests/wgsl/write-only-texture.slang @@ -1,14 +1,22 @@ //TEST:REFLECTION(filecheck=REFLECT):-stage compute -entry computeMain -target wgsl -no-codegen -//TEST:SIMPLE(filecheck=SPV): -target spirv +//TEST:SIMPLE(filecheck=SPV): -target spirv -emit-spirv-directly +//TEST:SIMPLE(filecheck=SPV): -target spirv -emit-spirv-via-glsl //TEST:SIMPLE(filecheck=CHECK): -target wgsl -entry computeMain -stage compute //TEST:SIMPLE(filecheck=CHECK-WGSL-SPV): -target wgsl-spirv-asm -entry computeMain -stage compute //TEST:SIMPLE(filecheck=HLSL): -target hlsl -entry computeMain -profile cs_6_0 //TEST:SIMPLE(filecheck=GLSL): -target glsl -entry computeMain -stage compute // CHECK: texture_storage_2d + +// CHECK-WGSL-SPV: OpDecorate {{.*}} NonReadable // CHECK-WGSL-SPV: OpTypeImage %float 2D {{.}} 0 0 2 Rgba8 + +// SPV: OpDecorate {{.*}} NonReadable // SPV: OpTypeImage %float 2D {{.}} 0 0 2 Rgba8 + // HLSL: RWTexture2D + +// GLSL: writeonly // GLSL: image2D // REFLECT: "name": "writeOnlyTexture" @@ -21,4 +29,4 @@ WTexture2D writeOnlyTexture; void computeMain() { writeOnlyTexture.Store(int2(0,0), float4(0.2, 0.3, 0.4, 1.0)); -} \ No newline at end of file +} -- cgit v1.2.3