From f622b3072d3400ef6febd62d9a0fee1e436c1a1e Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Thu, 1 Jun 2023 13:08:11 -0700 Subject: [PATCH] microsoft/compiler: Viewport/layer as input to GS/HS needs to set feature bit Part-of: --- src/microsoft/compiler/nir_to_dxil.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/microsoft/compiler/nir_to_dxil.c b/src/microsoft/compiler/nir_to_dxil.c index fd66c89..2a8806e 100644 --- a/src/microsoft/compiler/nir_to_dxil.c +++ b/src/microsoft/compiler/nir_to_dxil.c @@ -6369,6 +6369,11 @@ emit_module(struct ntd_context *ctx, const struct nir_to_dxil_options *opts) if (ctx->shader->info.outputs_written & (VARYING_BIT_VIEWPORT | VARYING_BIT_LAYER)) ctx->mod.feats.array_layer_from_vs_or_ds = true; + } else if (ctx->shader->info.stage == MESA_SHADER_GEOMETRY || + ctx->shader->info.stage == MESA_SHADER_TESS_CTRL) { + if (ctx->shader->info.inputs_read & + (VARYING_BIT_VIEWPORT | VARYING_BIT_LAYER)) + ctx->mod.feats.array_layer_from_vs_or_ds = true; } if (ctx->mod.feats.native_low_precision && ctx->mod.minor_version < 2) { -- 2.7.4