Merge pull request #2138 from EpicGames/fixes_hlsl

HLSL: Don't restrict SV_RenderTargetArrayIndex to GS and MS.
This commit is contained in:
Hans-Kristian Arntzen 2023-04-27 16:58:27 +02:00 committed by GitHub
commit 0f48b39b7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -724,10 +724,8 @@ void CompilerHLSL::emit_builtin_primitive_outputs_in_struct()
{
case BuiltInLayer:
{
const ExecutionModel model = get_entry_point().model;
if (hlsl_options.shader_model < 50 ||
(model != ExecutionModelGeometry && model != ExecutionModelMeshEXT))
SPIRV_CROSS_THROW("Render target array index output is only supported in GS/MS 5.0 or higher.");
if (hlsl_options.shader_model < 50)
SPIRV_CROSS_THROW("Render target array index output is only supported in SM 5.0 or higher.");
type = "uint";
semantic = "SV_RenderTargetArrayIndex";
break;