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:
@@ -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);
|
||||
|
@@ -101,8 +101,6 @@ enum lowered_builtin_array_var {
|
||||
none,
|
||||
clip_distance,
|
||||
cull_distance,
|
||||
tess_level_outer,
|
||||
tess_level_inner,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -133,8 +131,8 @@ struct xfb_decl
|
||||
unsigned array_subscript;
|
||||
|
||||
/**
|
||||
* Non-zero if the variable is gl_ClipDistance, glTessLevelOuter or
|
||||
* gl_TessLevelInner and the driver lowers it to gl_*MESA.
|
||||
* Non-zero if the variable is gl_ClipDistance and the driver lowers it to
|
||||
* gl_*MESA.
|
||||
*/
|
||||
enum lowered_builtin_array_var lowered_builtin_array_variable;
|
||||
|
||||
|
@@ -908,7 +908,6 @@ struct gl_constants
|
||||
GLuint MaxTessGenLevel;
|
||||
GLuint MaxTessPatchComponents;
|
||||
GLuint MaxTessControlTotalOutputComponents;
|
||||
bool LowerTessLevel; /**< Lower gl_TessLevel* from float[n] to vecn? */
|
||||
bool PrimitiveRestartForPatches;
|
||||
|
||||
/** GL_OES_primitive_bounding_box */
|
||||
|
@@ -391,8 +391,6 @@ void st_init_limits(struct pipe_screen *screen,
|
||||
screen->get_param(screen, PIPE_CAP_PREFER_IMM_ARRAYS_AS_CONSTBUF);
|
||||
c->GLSLTessLevelsAsInputs =
|
||||
screen->get_param(screen, PIPE_CAP_GLSL_TESS_LEVELS_AS_INPUTS);
|
||||
c->LowerTessLevel =
|
||||
!screen->get_param(screen, PIPE_CAP_NIR_COMPACT_ARRAYS);
|
||||
c->PrimitiveRestartForPatches = false;
|
||||
|
||||
c->MaxCombinedTextureImageUnits =
|
||||
|
Reference in New Issue
Block a user