Closed hitok closed 5 years ago
StorageBuffer as a storage class became core SPIR-V as of SPIR-V 1.3, which is the version you should be getting generated in the SPIR-V output when you request vulkan1.1
.
Things to check:
Hi johnkslang,
Thank you for your reply.
I compiled latest vulkan tools manually. Now, there are no any warning messages.
Hi,
After I updated the vulkan sdk from 1.1.85.0 to 1.1.92.1, i got a debug report from validation layer:
A compute shader:
A additional option "--target-env vulkan1.1" for the glslangValidator.
If to compare a human readable form of SPIR-V of this shader for 1.1.85.0 and 1.1.92.1 - we got differences:
Has changed the storage class from Uniform to StorageBuffer.
From the SPIR-V specs: the StorageBuffer enabled by extensions SPV_KHR_storage_buffer_storage_class, SPV_KHR_variable_pointers. But a SPIR-V binary, generated from 1.1.92.1, does not have OpExtension instructions.
If I roughly commented - "if (builder.getSpvVersion() < glslang::EShTargetSpv_1_3)" in the SPIRV/GlslangToSpv.cpp file:
Thereafter the glslangValidator will be generating the SPIR-V binary with OpExtension instruction, no more messages from validation layer. I would like to know what the problem is? What am I doing wrong?
Best Regards.