diff --git a/src/microsoft/compiler/dxil_nir.c b/src/microsoft/compiler/dxil_nir.c index 9d3fc9fc08c..3b686bc0e2a 100644 --- a/src/microsoft/compiler/dxil_nir.c +++ b/src/microsoft/compiler/dxil_nir.c @@ -1792,10 +1792,13 @@ dxil_reassign_driver_locations(nir_shader* s, nir_variable_mode modes, nir_sort_variables_with_modes(s, variable_location_cmp, modes); uint64_t result = 0; - unsigned driver_loc = 0; + unsigned driver_loc = 0, driver_patch_loc = 0; nir_foreach_variable_with_modes(var, s, modes) { - result |= 1ull << var->data.location; - var->data.driver_location = driver_loc++; + if (var->data.location < 64) + result |= 1ull << var->data.location; + /* Overlap patches with non-patch */ + var->data.driver_location = var->data.patch ? + driver_patch_loc++ : driver_loc++; } return result; } diff --git a/src/microsoft/compiler/nir_to_dxil.c b/src/microsoft/compiler/nir_to_dxil.c index d24f804e3c0..c3cf696f221 100644 --- a/src/microsoft/compiler/nir_to_dxil.c +++ b/src/microsoft/compiler/nir_to_dxil.c @@ -5511,6 +5511,8 @@ nir_var_to_dxil_sysvalue_type(nir_variable *var, uint64_t other_stage_mask) case VARYING_SLOT_CLIP_DIST0: case VARYING_SLOT_CLIP_DIST1: case VARYING_SLOT_PSIZ: + case VARYING_SLOT_TESS_LEVEL_INNER: + case VARYING_SLOT_TESS_LEVEL_OUTER: if (!((1ull << var->data.location) & other_stage_mask)) return DXIL_SYSVALUE; FALLTHROUGH;