Is it valid to have duplicate Execution Modes
sjfricke opened this issue · comments
Spencer Fricke commented
Came across this while writing validation for KhronosGroup/SPIRV-Tools#4828
I assume the following is not actually allowed, but spirv-val
doesn't check it and nothing in spec to refer to it being illegal.
OpExecutionMode %entrypoint LocalSize 1 2 1
OpExecutionMode %entrypoint LocalSize 1 1 2
Raun commented
WG would like to disallow duplicate ExecutionModes except in the case where the ExecutionMode describes what happens if there is a duplicate.
For your example, that would be illegal.
FloatControls does allow duplicates (I think this is the only exception) and would need clearer documentation.
SPIR-V 1.6rev2 disallowed duplicate decorations. I'm proposing the same rule apply to ExecutionModes: https://www.khronos.org/registry/SPIR-V/specs/unified1/SPIRV.html#_decoration