From b0e150511a6a536c8ad9e74910b30ae179a10ec9 Mon Sep 17 00:00:00 2001 From: Mukund Keshava Date: Wed, 30 Apr 2025 16:07:02 +0530 Subject: Add subscript operator support in cuda (#6830) * cuda: Add support for subscript operator This CL adds support for the subscript operator for Read Only textures in cuda. Also adds a test for this. Fixes #6781 * format code * fix review comments * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Ellie Hermaszewska --- .../capability-invalid-fragment-in-compute.slang | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'tests/language-feature/capability') diff --git a/tests/language-feature/capability/capability-invalid-fragment-in-compute.slang b/tests/language-feature/capability/capability-invalid-fragment-in-compute.slang index 946ba4470..ccf834167 100644 --- a/tests/language-feature/capability/capability-invalid-fragment-in-compute.slang +++ b/tests/language-feature/capability/capability-invalid-fragment-in-compute.slang @@ -1,7 +1,7 @@ -//TEST:SIMPLE(filecheck=CHECK): -target hlsl -emit-spirv-directly -entry computeMain -stage compute -allow-glsl -DPRE -//TEST:SIMPLE(filecheck=CHECK): -target hlsl -emit-spirv-directly -entry computeMain -stage compute -allow-glsl -DPOST -//TEST:SIMPLE(filecheck=CHECK_IGNORE_CAPS): -target hlsl -emit-spirv-directly -entry computeMain -stage compute -allow-glsl -ignore-capabilities -DPRE -//TEST:SIMPLE(filecheck=CHECK_IGNORE_CAPS): -target hlsl -emit-spirv-directly -entry computeMain -stage compute -allow-glsl -ignore-capabilities -DPOST +//TEST:SIMPLE(filecheck=CHECK): -target hlsl -emit-spirv-directly -entry computeMain -stage compute -allow-glsl +//TEST:SIMPLE(filecheck=CHECK): -target hlsl -emit-spirv-directly -entry computeMain -stage compute -allow-glsl +//TEST:SIMPLE(filecheck=CHECK_IGNORE_CAPS): -target hlsl -emit-spirv-directly -entry computeMain -stage compute -allow-glsl -ignore-capabilities +//TEST:SIMPLE(filecheck=CHECK_IGNORE_CAPS): -target hlsl -emit-spirv-directly -entry computeMain -stage compute -allow-glsl -ignore-capabilities // CHECK_IGNORE_CAPS-NOT: error 36107 // CHECK: error 36107 @@ -11,11 +11,5 @@ Texture2D rw; [numthreads(1,1,1)] void computeMain() { -#ifdef PRE - rw.Load(0); -#endif - clip(0.0f); -#ifdef POST - rw.Load(0); -#endif + clip(0.0f); // clip is not supported in compute shader, so this throws an error. } \ No newline at end of file -- cgit v1.2.3