summaryrefslogtreecommitdiffstats
path: root/tests/language-feature
diff options
context:
space:
mode:
authorMukund Keshava <mkeshava@nvidia.com>2025-04-30 16:07:02 +0530
committerGitHub <noreply@github.com>2025-04-30 10:37:02 +0000
commitb0e150511a6a536c8ad9e74910b30ae179a10ec9 (patch)
treecb749d757e0e556d987d6a30020971ed5a6aa41d /tests/language-feature
parent41ac7a0d8b4e9c08eccc2153020900e0262cae84 (diff)
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 <ellieh@nvidia.com>
Diffstat (limited to 'tests/language-feature')
-rw-r--r--tests/language-feature/capability/capability-invalid-fragment-in-compute.slang16
1 files changed, 5 insertions, 11 deletions
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<int> 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