I have a spirv code like this:
OpDecorate %_arr_int_int_6 ArrayStride 4
......
; Types, variables and constants
......
%_ptr_Function__arr_int_int_6 = OpTypePointer Function %_arr_int_int_6
......
; Function main
%main = OpFunction %void None %3
%4 = OpLabel
%11 = OpVariable %_ptr_Function__arr_int_int_6 Function
and spirv-val tools complains about
error: line 36: [VUID-StandaloneSpirv-None-10684] Invalid explicit layout decorations on type for operand '10[%_ptr_Function__arr_int_int_6]'
%11 = OpVariable %_ptr_Function__arr_int_int_6 Function
it turns out that we should not specify the explicit layout decoration for type _arr_int_int_6, as it passes spirv-val if I delete this line
OpDecorate %_arr_int_int_6 ArrayStride 4
However, after reading this rule VUID-StandaloneSpirv-None-10684 couple of times, it looks like the rule should only be used on shader interface, instead of private variable (Function storage class).
So I'm wondering if this is spirv-val issue that it over-validates, or I misunderstood something?
I have a spirv code like this:
and spirv-val tools complains about
it turns out that we should not specify the explicit layout decoration for type
_arr_int_int_6, as it passes spirv-val if I delete this lineHowever, after reading this rule
VUID-StandaloneSpirv-None-10684couple of times, it looks like the rule should only be used on shader interface, instead of private variable (Function storage class).So I'm wondering if this is spirv-val issue that it over-validates, or I misunderstood something?