tgsi: remove unused tgsi_shader_info fields

Removes:
uses_persp_center
uses_persp_centroid
uses_persp_sample
uses_linear_center
uses_linear_centroid
uses_linear_sample

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24100>
This commit is contained in:
Thomas H.P. Andersen
2023-07-11 18:22:27 +02:00
committed by Marge Bot
parent 76b0e7b25c
commit 6c513ef4fd
3 changed files with 1 additions and 81 deletions
+1 -31
View File
@@ -298,43 +298,13 @@ static void scan_instruction(const struct nir_shader *nir,
const nir_variable *var = nir_intrinsic_get_var(intr, 0);
const nir_variable_mode mode = var->data.mode;
nir_deref_instr *const deref = nir_src_as_deref(intr->src[0]);
enum glsl_base_type base_type =
glsl_get_base_type(glsl_without_array(var->type));
if (nir_deref_instr_has_indirect(deref)) {
if (mode == nir_var_shader_in)
info->indirect_files |= (1 << TGSI_FILE_INPUT);
}
if (mode == nir_var_shader_in) {
if (mode == nir_var_shader_in)
gather_intrinsic_load_deref_info(nir, intr, deref, need_texcoord, var, info);
switch (var->data.interpolation) {
case INTERP_MODE_NONE:
if (glsl_base_type_is_integer(base_type))
break;
if (var->data.per_primitive)
break;
FALLTHROUGH;
case INTERP_MODE_SMOOTH:
if (var->data.sample)
info->uses_persp_sample = true;
else if (var->data.centroid)
info->uses_persp_centroid = true;
else
info->uses_persp_center = true;
break;
case INTERP_MODE_NOPERSPECTIVE:
if (var->data.sample)
info->uses_linear_sample = true;
else if (var->data.centroid)
info->uses_linear_centroid = true;
else
info->uses_linear_center = true;
break;
}
}
break;
}
case nir_intrinsic_interp_deref_at_centroid:
-44
View File
@@ -169,50 +169,6 @@ scan_src_operand(struct tgsi_shader_info *info,
if (name == TGSI_SEMANTIC_POSITION &&
usage_mask_after_swizzle & TGSI_WRITEMASK_Z)
info->reads_z = true;
/* Process only interpolated varyings. Don't include POSITION.
* Don't include integer varyings, because they are not
* interpolated. Don't process inputs interpolated by INTERP
* opcodes. Those are tracked separately.
*/
if ((!is_interp_instruction || src_index != 0) &&
(name == TGSI_SEMANTIC_GENERIC ||
name == TGSI_SEMANTIC_TEXCOORD ||
name == TGSI_SEMANTIC_COLOR ||
name == TGSI_SEMANTIC_BCOLOR ||
name == TGSI_SEMANTIC_FOG ||
name == TGSI_SEMANTIC_CLIPDIST)) {
switch (info->input_interpolate[input]) {
case TGSI_INTERPOLATE_COLOR:
case TGSI_INTERPOLATE_PERSPECTIVE:
switch (info->input_interpolate_loc[input]) {
case TGSI_INTERPOLATE_LOC_CENTER:
info->uses_persp_center = true;
break;
case TGSI_INTERPOLATE_LOC_CENTROID:
info->uses_persp_centroid = true;
break;
case TGSI_INTERPOLATE_LOC_SAMPLE:
info->uses_persp_sample = true;
break;
}
break;
case TGSI_INTERPOLATE_LINEAR:
switch (info->input_interpolate_loc[input]) {
case TGSI_INTERPOLATE_LOC_CENTER:
info->uses_linear_center = true;
break;
case TGSI_INTERPOLATE_LOC_CENTROID:
info->uses_linear_centroid = true;
break;
case TGSI_INTERPOLATE_LOC_SAMPLE:
info->uses_linear_sample = true;
break;
}
break;
/* TGSI_INTERPOLATE_CONSTANT doesn't do any interpolation. */
}
}
}
}
-6
View File
@@ -90,12 +90,6 @@ struct tgsi_shader_info
bool writes_samplemask; /**< does fragment shader write sample mask? */
bool writes_edgeflag; /**< vertex shader outputs edgeflag */
bool uses_kill; /**< KILL or KILL_IF instruction used? */
bool uses_persp_center;
bool uses_persp_centroid;
bool uses_persp_sample;
bool uses_linear_center;
bool uses_linear_centroid;
bool uses_linear_sample;
bool uses_persp_opcode_interp_centroid;
bool uses_persp_opcode_interp_offset;
bool uses_persp_opcode_interp_sample;