Closed spencer-lunarg closed 1 month ago
Using v2024.1.21 slangc
v2024.1.21
Taking the simple hlsl
struct Particle { float4 _m0; }; [[vk::binding(0)]] RWStructuredBuffer<Particle> particleOut; float4 main() : SV_TARGET { return particleOut[0]._m0; }
running slangc in.hlsl -o out.spv -emit-spirv-directly -target spirv -enable-effect-annotations -entry main -stage fragment
slangc in.hlsl -o out.spv -emit-spirv-directly -target spirv -enable-effect-annotations -entry main -stage fragment
will produce
OpDecorate %RWStructuredBuffer Block OpDecorate %RWStructuredBuffer Block
which is invalid and with the latest 1.3.283.0 Vulkan SDK, the spirv-val out.spv --target-env vulkan1.3 --skip-block-layout will produce the error
1.3.283.0
spirv-val out.spv --target-env vulkan1.3 --skip-block-layout
error: line 34: ID '14' decorated with Block multiple times is not allowed. %RWStructuredBuffer = OpTypeStruct %_runtimearr_Particle_std430
Using
v2024.1.21
slangcTaking the simple hlsl
running
slangc in.hlsl -o out.spv -emit-spirv-directly -target spirv -enable-effect-annotations -entry main -stage fragment
will produce
which is invalid and with the latest
1.3.283.0
Vulkan SDK, thespirv-val out.spv --target-env vulkan1.3 --skip-block-layout
will produce the error