I am working on a project which compiles glsl files to SPIRV binaries and later uses SPIRV-Cross to convert those to hlsl. My issue is similar to https://github.com/KhronosGroup/SPIRV-Cross/issues/516, but in this case with hlsl not with mtl. Also managed to reproduce it with one of the shaders from the repository(dual-source-blending.desktop.frag):
#version 450
layout(location = 0, index = 0) out vec4 FragColor0;
layout(location = 0, index = 1) out vec4 FragColor1;
void main()
{
FragColor0 = vec4(1.0);
FragColor1 = vec4(2.0);
}
After converting it with glslangValidator and SPIRV-Cross into a hlsl:
I have used spirv-cross.exe --hlsl --shader-model 51 to generate the hlsl file.
After loading this shader I have the following error message:
error X4574: Duplicate system value semantic definition: output semantic \'SV_Target0\' and output semantic \'SV_Target0\'
I am working on a project which compiles glsl files to SPIRV binaries and later uses SPIRV-Cross to convert those to hlsl. My issue is similar to https://github.com/KhronosGroup/SPIRV-Cross/issues/516, but in this case with
hlsl
not withmtl
. Also managed to reproduce it with one of the shaders from the repository(dual-source-blending.desktop.frag):After converting it with glslangValidator and SPIRV-Cross into a hlsl:
I have used
spirv-cross.exe --hlsl --shader-model 51
to generate the hlsl file. After loading this shader I have the following error message:error X4574: Duplicate system value semantic definition: output semantic \'SV_Target0\' and output semantic \'SV_Target0\'
This led me to that
would be the correct output.
Also checked the SPIR-V binaries and the attributes look correct to me: