glsl: Remove the TessLevel lowering special case from xfb.

The NIR vectorized tess level pass applies later, and it leaves the name
as-is, so we don't need to mess around with
gl_TessLevelInnerMesa/OuterMesa.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21940>
This commit is contained in:
Emma Anholt
2023-03-15 16:26:38 -07:00
committed by Marge Bot
parent 84006587d7
commit d2a3fa7569
4 changed files with 5 additions and 27 deletions

View File

@@ -259,13 +259,6 @@ xfb_decl_init(struct xfb_decl *xfb_decl, const struct gl_constants *consts,
strcmp(xfb_decl->var_name, "gl_CullDistance") == 0) {
xfb_decl->lowered_builtin_array_variable = cull_distance;
}
if (consts->LowerTessLevel &&
(strcmp(xfb_decl->var_name, "gl_TessLevelOuter") == 0))
xfb_decl->lowered_builtin_array_variable = tess_level_outer;
if (consts->LowerTessLevel &&
(strcmp(xfb_decl->var_name, "gl_TessLevelInner") == 0))
xfb_decl->lowered_builtin_array_variable = tess_level_inner;
}
/**
@@ -338,12 +331,6 @@ xfb_decl_assign_location(struct xfb_decl *xfb_decl,
actual_array_size = prog->last_vert_prog ?
prog->last_vert_prog->info.cull_distance_array_size : 0;
break;
case tess_level_outer:
actual_array_size = 4;
break;
case tess_level_inner:
actual_array_size = 2;
break;
case none:
default:
actual_array_size = glsl_array_size(xfb_decl->matched_candidate->type);
@@ -367,7 +354,9 @@ xfb_decl_assign_location(struct xfb_decl *xfb_decl,
disable_varying_packing,
xfb_enabled) ||
strcmp(xfb_decl->matched_candidate->toplevel_var->name, "gl_ClipDistance") == 0 ||
strcmp(xfb_decl->matched_candidate->toplevel_var->name, "gl_CullDistance") == 0;
strcmp(xfb_decl->matched_candidate->toplevel_var->name, "gl_CullDistance") == 0 ||
strcmp(xfb_decl->matched_candidate->toplevel_var->name, "gl_TessLevelInner") == 0 ||
strcmp(xfb_decl->matched_candidate->toplevel_var->name, "gl_TessLevelOuter") == 0;
unsigned array_elem_size = xfb_decl->lowered_builtin_array_variable ?
1 : (array_will_be_lowered ? vector_elements : 4) * matrix_cols * dmul;
@@ -689,12 +678,6 @@ xfb_decl_find_candidate(struct xfb_decl *xfb_decl,
case cull_distance:
name = "gl_ClipDistanceMESA";
break;
case tess_level_outer:
name = "gl_TessLevelOuterMESA";
break;
case tess_level_inner:
name = "gl_TessLevelInnerMESA";
break;
}
struct hash_entry *entry =
_mesa_hash_table_search(tfeedback_candidates, name);