Issue Description
When you use the same struct as both ParameterBlock<Foo> and ParameterBlock<Foo[N]> where N is a constexpr integer, the generated SPIR-V is invalid.
Reproducer Code
struct View {
float foo;
}
ParameterBlock<View> main_view;
ParameterBlock<View[3]> shadow_views;
[shader("fragment")]
float main() {
return main_view.foo + shadow_views[0].foo;
}
Expected Behavior
The SPIR-V should be valid.
Actual Behavior
slangc a.slang -target spirv -o out.spv && spirv-val out.spv
error: line 33: rules: A Block or BufferBlock cannot be nested within another Block or BufferBlock.
%_Array_std140_View3 = OpTypeStruct %_arr_View_std140_int_3
Environment
- Slang Version: 2025.21.2, 2025.24.3
- OS: Linux 6.18.2-arch2-1 x86_64
Additional context
Probably closely related to #7431
Issue Description
When you use the same struct as both
ParameterBlock<Foo>andParameterBlock<Foo[N]>where N is a constexpr integer, the generated SPIR-V is invalid.Reproducer Code
Expected Behavior
The SPIR-V should be valid.
Actual Behavior
Environment
Additional context
Probably closely related to #7431