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 <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>
This commit is contained in:
Jesse Natalie 2022-02-02 12:39:14 -08:00 committed by Marge Bot
parent 0c711dc823
commit ce6dbbabf9
1 changed files with 6 additions and 4 deletions

View File

@ -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;