From 021ef0dca9060805a4a8b6ce6410598facb53e8c Mon Sep 17 00:00:00 2001 From: Sven van Haastregt Date: Tue, 27 Oct 2026 17:08:42 +0100 Subject: [PATCH] Restrict Initializers for Workgroup OpVariables The OpenCL C specification states that a local variable must not have an initializer. Add a similar restriction to the OpenCL SPIR-V Environment specification. Fixes https://github.com/KhronosGroup/OpenCL-Docs/issues/554 Signed-off-by: Sven van Haastregt --- env/validation_rules.asciidoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/env/validation_rules.asciidoc b/env/validation_rules.asciidoc index 2cc55c0f5..cdca3e6f1 100644 --- a/env/validation_rules.asciidoc +++ b/env/validation_rules.asciidoc @@ -36,6 +36,10 @@ For all *OpTypeImage* type-declaration instructions: For all image read and write instructions, if an optional _Image Operand_ is present, then it must not include *ConstOffset*. +For all *OpVariable* instructions: + + * An _Initializer_ must not be present if _Storage Class_ is *Workgroup*. + For all *Atomic Instructions*: * Only 32-bit integer types are supported for the _Result Type_ and/or