Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing validation for static workgroup size dimensions nonzero product. #4801

Open
Jonathan-Weinstein opened this issue May 13, 2022 · 0 comments · May be fixed by #5407
Open

Missing validation for static workgroup size dimensions nonzero product. #4801

Jonathan-Weinstein opened this issue May 13, 2022 · 0 comments · May be fixed by #5407

Comments

@Jonathan-Weinstein
Copy link

From section "2.16.1. Universal Validation Rules" of the SPIR-V 1.6 specification:
"If the workgroup size is statically specified (using the LocalSize, LocalSizeId execution modes, or the WorkgroupSize BuiltIn), the product of all workgroup size dimensions must not be zero".

The following shader violates this rule, but no validation message is emitted:

; SPIR-V
; Version: 1.3
; Generator: Khronos SPIR-V Tools Assembler; 0
; Bound: 5
; Schema: 0
               OpCapability Shader
               OpMemoryModel Logical GLSL450
               OpEntryPoint GLCompute %1 "main"
               OpExecutionMode %1 LocalSize 0 0 0
       %void = OpTypeVoid
          %3 = OpTypeFunction %void
          %1 = OpFunction %void None %3
          %4 = OpLabel
               OpReturn
               OpFunctionEnd

My spirv-val --version says this:
SPIRV-Tools v2022.2-dev unknown hash, 2022-04-11T17:22:03

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants