diff --git a/src/microsoft/compiler/dxil_signature.c b/src/microsoft/compiler/dxil_signature.c index 7f28267d560..25814f38fe1 100644 --- a/src/microsoft/compiler/dxil_signature.c +++ b/src/microsoft/compiler/dxil_signature.c @@ -315,6 +315,12 @@ get_semantic_name(nir_variable *var, struct semantic_info *info, info->kind = DXIL_SEM_TESS_FACTOR; break; + case VARYING_SLOT_VIEWPORT: + assert(glsl_get_components(var->type) == 1); + snprintf(info->name, 64, "%s", "SV_ViewportArrayIndex"); + info->kind = DXIL_SEM_VIEWPORT_ARRAY_INDEX; + break; + default: { info->index = vulkan ? var->data.location - VARYING_SLOT_VAR0 : diff --git a/src/microsoft/compiler/nir_to_dxil.c b/src/microsoft/compiler/nir_to_dxil.c index 7d288091eb2..78644e49aee 100644 --- a/src/microsoft/compiler/nir_to_dxil.c +++ b/src/microsoft/compiler/nir_to_dxil.c @@ -5772,6 +5772,7 @@ nir_var_to_dxil_sysvalue_type(nir_variable *var, uint64_t other_stage_mask) case VARYING_SLOT_PSIZ: case VARYING_SLOT_TESS_LEVEL_INNER: case VARYING_SLOT_TESS_LEVEL_OUTER: + case VARYING_SLOT_VIEWPORT: if (!((1ull << var->data.location) & other_stage_mask)) return DXIL_SYSVALUE; FALLTHROUGH;