diff options
author | Karol Herbst <[email protected]> | 2018-01-07 21:42:19 +0100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-01-08 10:12:53 +1100 |
commit | efd2169c1a40f552b3a6a0b03bb787255b8febf6 (patch) | |
tree | 2492a4dc1c0e7a1642fe5ec5826540e4fd89f46e /src/mesa/state_tracker | |
parent | 6f4ac7b418c64f03f05e496953fe0c1d09864ab9 (diff) |
nir: fix st_nir_assign_var_locations for patch variables
Signed-off-by: Karol Herbst <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_nir.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index 5683dfcccce..1c5de3d5def 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -139,8 +139,12 @@ st_nir_assign_var_locations(struct exec_list *var_list, unsigned *size, } bool processed = false; - if (var->data.patch) { - unsigned patch_loc = var->data.location - VARYING_SLOT_VAR0; + if (var->data.patch && + var->data.location != VARYING_SLOT_TESS_LEVEL_INNER && + var->data.location != VARYING_SLOT_TESS_LEVEL_OUTER && + var->data.location != VARYING_SLOT_BOUNDING_BOX0 && + var->data.location != VARYING_SLOT_BOUNDING_BOX1) { + unsigned patch_loc = var->data.location - VARYING_SLOT_PATCH0; if (processed_patch_locs & (1 << patch_loc)) processed = true; |