nir: remove INTERP_MODE_COLOR

It's only used by radeonsi and doesn't have to be public.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26918>
This commit is contained in:
Marek Olšák
2023-12-24 13:06:08 -05:00
parent 1d5dbde522
commit d84a616d4d
5 changed files with 3 additions and 7 deletions

View File

@@ -213,7 +213,7 @@ void ir_print_visitor::visit(ir_variable *ir)
"in ", "out ", "inout ",
"const_in ", "sys ", "temporary " };
STATIC_ASSERT(ARRAY_SIZE(mode) == ir_var_mode_count);
const char *const interp[] = { "", "smooth", "flat", "noperspective", "explicit", "color" };
const char *const interp[] = { "", "smooth", "flat", "noperspective", "explicit" };
STATIC_ASSERT(ARRAY_SIZE(interp) == INTERP_MODE_COUNT);
const char *const precision[] = { "", "highp ", "mediump ", "lowp "};

View File

@@ -411,7 +411,6 @@ glsl_interp_mode_name(enum glsl_interp_mode qual)
ENUM(INTERP_MODE_FLAT),
ENUM(INTERP_MODE_NOPERSPECTIVE),
ENUM(INTERP_MODE_EXPLICIT),
ENUM(INTERP_MODE_COLOR),
};
STATIC_ASSERT(ARRAY_SIZE(names) == INTERP_MODE_COUNT);
return NAME(qual);

View File

@@ -952,7 +952,6 @@ enum glsl_interp_mode
INTERP_MODE_FLAT,
INTERP_MODE_NOPERSPECTIVE,
INTERP_MODE_EXPLICIT,
INTERP_MODE_COLOR, /**< glShadeModel determines the interp mode */
INTERP_MODE_COUNT /**< Number of interpolation qualifiers */
};

View File

@@ -135,7 +135,6 @@ barycentric_ij_index(nir_intrinsic_instr *intr)
switch (nir_intrinsic_interp_mode(intr)) {
case INTERP_MODE_NONE:
case INTERP_MODE_SMOOTH:
case INTERP_MODE_COLOR:
return index;
case INTERP_MODE_NOPERSPECTIVE:
return index + 3;
@@ -419,9 +418,6 @@ FragmentShader::scan_input(nir_intrinsic_instr *intr, int index_src_id)
break;
case INTERP_MODE_FLAT:
break;
case INTERP_MODE_COLOR:
tgsi_interpolate = TGSI_INTERPOLATE_COLOR;
break;
case INTERP_MODE_EXPLICIT:
default:
assert(0);

View File

@@ -133,6 +133,8 @@ struct nir_lower_subgroups_options;
#define SI_MAX_VS_OUTPUTS 40
#define SI_USER_CLIP_PLANE_MASK 0x3F
#define INTERP_MODE_COLOR INTERP_MODE_COUNT
#define SI_PS_INPUT_CNTL_0000 (S_028644_OFFSET(0x20) | S_028644_DEFAULT_VAL(0))
#define SI_PS_INPUT_CNTL_0001 (S_028644_OFFSET(0x20) | S_028644_DEFAULT_VAL(3))
#define SI_PS_INPUT_CNTL_UNUSED SI_PS_INPUT_CNTL_0000