HLSL: fix BuiltInLayer to emit semantic 'SV_RenderTargetArrayIndex' instead of 'SV_RenderTargetIndex'

This commit is contained in:
iwubcode 2022-05-21 00:52:23 -05:00
parent b3ff97d0fe
commit a6976d596a

View File

@ -645,9 +645,9 @@ void CompilerHLSL::emit_builtin_outputs_in_struct()
case BuiltInLayer:
if (hlsl_options.shader_model < 50 || get_entry_point().model != ExecutionModelGeometry)
SPIRV_CROSS_THROW("Render target index output is only supported in GS 5.0 or higher.");
SPIRV_CROSS_THROW("Render target array index output is only supported in GS 5.0 or higher.");
type = "uint";
semantic = "SV_RenderTargetIndex";
semantic = "SV_RenderTargetArrayIndex";
break;
default:
@ -797,9 +797,9 @@ void CompilerHLSL::emit_builtin_inputs_in_struct()
case BuiltInLayer:
if (hlsl_options.shader_model < 50 || get_entry_point().model != ExecutionModelFragment)
SPIRV_CROSS_THROW("Render target index input is only supported in PS 5.0 or higher.");
SPIRV_CROSS_THROW("Render target array index input is only supported in PS 5.0 or higher.");
type = "uint";
semantic = "SV_RenderTargetIndex";
semantic = "SV_RenderTargetArrayIndex";
break;
default: