I have been using shaderc in project to compile shaders in runtime rather than through the command line then provide the spirv file. when compiling the glsl file it works when using normal compiler options where nothing is set, however recently I needed some extra functionality with ray tracing which requires a higher version of spirv. I set the target enviorment here
Where i set the target enviroment, however now I am recieving errors regarding curtain extensions being needed such as SPV_KHR_storage_buffer_storage_c
The exact error:
2 VUID-VkShaderModuleCreateInfo-pCode-08737 Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-08737 ] | MessageID = 0xa5625282 | vkCreateShaderModule(): pCreateInfo->pCode (spirv-val produced an error):
2nd operand of TypePointer: operand StorageBuffer(12) requires one of these extensions: SPV_KHR_storage_buffer_storage_class SPV_KHR_variable_pointers
%_ptr_StorageBuffer_PerInstanceBuffer = OpTypePointer StorageBuffer %PerInstanceBuffer
. The Vulkan spec states: If pCode is a pointer to SPIR-V code, pCode must adhere to the validation rules described by the Validation Rules within a Module section of the SPIR-V Environment appendix (https://vulkan.lunarg.com/doc/view/1.3.280.0/windows/1.3-extensions/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-08737)
Even when supplying these extensions despite them being core in vulkan 1.1 and I am using vulkan 1.3 It still gives these errors when compiling the shaders. When removing Options.SetTargetEnviroments(), it complains about needing a higher spirv version for raytracing
Exact Error:
assembly compilation failed ../Core/Source/Core/Render/Shaders/Miss.rmiss:2: error: 'GL_EXT_ray_tracing' : not supported for current targeted SPIR-V version
I have also tried to use Options.SetTargetSpirv() however this results in the same error.
I have been using shaderc in project to compile shaders in runtime rather than through the command line then provide the spirv file. when compiling the glsl file it works when using normal compiler options where nothing is set, however recently I needed some extra functionality with ray tracing which requires a higher version of spirv. I set the target enviorment here
Where i set the target enviroment, however now I am recieving errors regarding curtain extensions being needed such as SPV_KHR_storage_buffer_storage_c
The exact error:
Even when supplying these extensions despite them being core in vulkan 1.1 and I am using vulkan 1.3 It still gives these errors when compiling the shaders. When removing Options.SetTargetEnviroments(), it complains about needing a higher spirv version for raytracing
Exact Error:
I have also tried to use Options.SetTargetSpirv() however this results in the same error.
My version: