We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d4aa499 commit 9e2ceebCopy full SHA for 9e2ceeb
Tutorials/Tutorial23_CommandQueues/src/Terrain.cpp
@@ -240,6 +240,12 @@ void Terrain::CreatePSO(const ScenePSOCreateAttribs& Attr)
240
ShaderCI.FilePath = "GenerateTerrain.csh";
241
ShaderCI.EntryPoint = "CSMain";
242
243
+ // Vulkan requires image format to be specified in the shader, but glslang does not support
244
+ // the [[vk::image_format]] attribute (https://github.com/KhronosGroup/glslang/issues/3790).
245
+ // So we have to convert HLSL to GLSL so that the converter can add the attribute from the
246
+ // /*format=...*/ comment.
247
+ ShaderCI.CompileFlags = SHADER_COMPILE_FLAG_HLSL_TO_SPIRV_VIA_GLSL;
248
+
249
RefCntAutoPtr<IShader> pCS;
250
m_Device->CreateShader(ShaderCI, &pCS);
251
0 commit comments