summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2023-08-29 20:58:44 +0800
committerGitHub <noreply@github.com>2023-08-29 20:58:44 +0800
commitf3ecf978a07b02681a4d70a9d83991e6661bf753 (patch)
tree124c12ea8a1000caa9405871a21d44dbed83580c /tests
parent9d4e044bad6161a593806fc6fb610d41aa8b4b22 (diff)
Correct parsing spirv with no rhs operands (#3161)
* Correct parsing spirv with no rhs operands * Guard against eof
Diffstat (limited to 'tests')
-rw-r--r--tests/language-feature/spirv-asm/typed-assignment-syntax.slang3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/language-feature/spirv-asm/typed-assignment-syntax.slang b/tests/language-feature/spirv-asm/typed-assignment-syntax.slang
index 5e449686e..a20fb6e43 100644
--- a/tests/language-feature/spirv-asm/typed-assignment-syntax.slang
+++ b/tests/language-feature/spirv-asm/typed-assignment-syntax.slang
@@ -18,6 +18,9 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
int n = outputBuffer[i];
int r = spirv_asm
{
+ // Check that this still works even with no operands on the RHS
+ %unused : $$uint = OpUndef;
+ // More normal usage
%two : $$int = OpConstant 2;
result : $$int = OpIMul $n %two;
};