diff --git a/external/SPIRV-Headers b/external/SPIRV-Headers index ae6a8b3971..1c9115b562 160000 --- a/external/SPIRV-Headers +++ b/external/SPIRV-Headers @@ -1 +1 @@ -Subproject commit ae6a8b39717523d96683bc0d20b541944e28072f +Subproject commit 1c9115b562bab79ee2160fbd845f41b815b9f21f diff --git a/external/SPIRV-Tools b/external/SPIRV-Tools index 0045b01ff9..ad11927e6c 160000 --- a/external/SPIRV-Tools +++ b/external/SPIRV-Tools @@ -1 +1 @@ -Subproject commit 0045b01ff9648eeef1781282f0454ae584f3ace7 +Subproject commit ad11927e6cb251624f884327ede64a642be11f06 diff --git a/tools/clang/test/CodeGenSPIRV/meshshading.ext.optimized.hlsl b/tools/clang/test/CodeGenSPIRV/meshshading.ext.optimized.hlsl new file mode 100644 index 0000000000..3315ce5381 --- /dev/null +++ b/tools/clang/test/CodeGenSPIRV/meshshading.ext.optimized.hlsl @@ -0,0 +1,23 @@ +// RUN: %dxc -T ms_6_6 -E main -spirv -fspv-target-env=vulkan1.3 %s | FileCheck %s + +// CHECK: OpExtension "SPV_EXT_mesh_shader" + +struct Object +{ + float4 v: SV_POSITION; +}; + +RWStructuredBuffer buffer; + +// If optimizations are disabled, this function is not inlined. +// This means a RWStructuredBuffer will be created as a local variable, +// which is impossible in logical SPIR-V. +// Hence why should make sure the optimizations are enabled for mesh shaders. +void foo(RWStructuredBuffer param) { } + +[outputtopology("triangle")] +[numthreads(1, 1, 1)] +void main(out indices uint3 idx[3], out vertices Object vtx[3]) +{ + foo(buffer); +}