From ce6dbbabf9371a66ce52eba81e6ab394a2a6f7d1 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Wed, 2 Feb 2022 12:39:14 -0800 Subject: [PATCH] microsoft/compiler: Only treat tess level location as special if it's a patch constant Fixes: a550c059 ("microsoft/compiler: For load_input from DS, use loadPatchConstant") Reviewed-by: Bill Kristiansen Reviewed-By: Sil Vilerino Part-of: --- src/microsoft/compiler/nir_to_dxil.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/microsoft/compiler/nir_to_dxil.c b/src/microsoft/compiler/nir_to_dxil.c index 3832cfabad3..d2dbcaa1358 100644 --- a/src/microsoft/compiler/nir_to_dxil.c +++ b/src/microsoft/compiler/nir_to_dxil.c @@ -3095,8 +3095,9 @@ emit_store_output_via_intrinsic(struct ntd_context *ctx, nir_intrinsic_instr *in * generation, so muck with them here too. */ nir_io_semantics semantics = nir_intrinsic_io_semantics(intr); - bool is_tess_level = semantics.location == VARYING_SLOT_TESS_LEVEL_INNER || - semantics.location == VARYING_SLOT_TESS_LEVEL_OUTER; + bool is_tess_level = is_patch_constant && + (semantics.location == VARYING_SLOT_TESS_LEVEL_INNER || + semantics.location == VARYING_SLOT_TESS_LEVEL_OUTER); const struct dxil_value *row = NULL; const struct dxil_value *col = NULL; @@ -3199,8 +3200,9 @@ emit_load_input_via_intrinsic(struct ntd_context *ctx, nir_intrinsic_instr *intr * generation, so muck with them here too. */ nir_io_semantics semantics = nir_intrinsic_io_semantics(intr); - bool is_tess_level = semantics.location == VARYING_SLOT_TESS_LEVEL_INNER || - semantics.location == VARYING_SLOT_TESS_LEVEL_OUTER; + bool is_tess_level = is_patch_constant && + (semantics.location == VARYING_SLOT_TESS_LEVEL_INNER || + semantics.location == VARYING_SLOT_TESS_LEVEL_OUTER); const struct dxil_value *row = NULL; const struct dxil_value *comp = NULL;