pan/bi: Use canonical sample names
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
This commit is contained in:
parent
2e84a1b4d8
commit
3797fc9af9
|
@ -35,7 +35,7 @@ const char * bi_message_type_name(enum bifrost_message_type T);
|
|||
const char * bi_output_mod_name(enum bi_clamp mod);
|
||||
const char * bi_minmax_mode_name(enum bifrost_minmax_mode mod);
|
||||
const char * bi_round_mode_name(enum bi_round mod);
|
||||
const char * bi_interp_mode_name(enum bifrost_interp_mode mode);
|
||||
const char * bi_interp_mode_name(enum bi_sample mode);
|
||||
const char * bi_class_name(enum bi_class cl);
|
||||
const char * bi_cond_name(enum bi_cond cond);
|
||||
const char * bi_special_op_name(enum bi_special_op op);
|
||||
|
|
|
@ -88,13 +88,13 @@ bi_round_mode_name(enum bi_round mod)
|
|||
}
|
||||
|
||||
const char *
|
||||
bi_interp_mode_name(enum bifrost_interp_mode mode)
|
||||
bi_interp_mode_name(enum bi_sample mode)
|
||||
{
|
||||
switch (mode) {
|
||||
case BIFROST_INTERP_CENTER: return ".center";
|
||||
case BIFROST_INTERP_CENTROID: return ".centroid";
|
||||
case BIFROST_INTERP_SAMPLE: return ".sample";
|
||||
case BIFROST_INTERP_EXPLICIT: return ".explicit";
|
||||
case BI_SAMPLE_CENTER: return ".center";
|
||||
case BI_SAMPLE_CENTROID: return ".centroid";
|
||||
case BI_SAMPLE_SAMPLE: return ".sample";
|
||||
case BI_SAMPLE_EXPLICIT: return ".explicit";
|
||||
default: return ".unknown";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ const char * bi_message_type_name(enum bifrost_message_type T);
|
|||
const char * bi_output_mod_name(enum bi_clamp mod);
|
||||
const char * bi_minmax_mode_name(enum bifrost_minmax_mode mod);
|
||||
const char * bi_round_mode_name(enum bi_round mod);
|
||||
const char * bi_interp_mode_name(enum bifrost_interp_mode mode);
|
||||
const char * bi_interp_mode_name(enum bi_sample mode);
|
||||
const char * bi_flow_control_name(enum bifrost_flow mode);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -222,12 +222,12 @@ enum bifrost_minmax_mode {
|
|||
BIFROST_SRC0_WINS = 0x3,
|
||||
};
|
||||
|
||||
enum bifrost_interp_mode {
|
||||
BIFROST_INTERP_CENTER = 0x0,
|
||||
BIFROST_INTERP_CENTROID = 0x1,
|
||||
BIFROST_INTERP_SAMPLE = 0x2,
|
||||
BIFROST_INTERP_EXPLICIT = 0x3,
|
||||
BIFROST_INTERP_NONE = 0x4,
|
||||
enum bi_sample {
|
||||
BI_SAMPLE_CENTER = 0x0,
|
||||
BI_SAMPLE_CENTROID = 0x1,
|
||||
BI_SAMPLE_SAMPLE = 0x2,
|
||||
BI_SAMPLE_EXPLICIT = 0x3,
|
||||
BI_SAMPLE_NONE = 0x4,
|
||||
};
|
||||
|
||||
enum bifrost_update_mode {
|
||||
|
|
|
@ -150,17 +150,17 @@ bi_emit_ld_output(bi_context *ctx, nir_intrinsic_instr *instr)
|
|||
bi_emit(ctx, ins);
|
||||
}
|
||||
|
||||
static enum bifrost_interp_mode
|
||||
static enum bi_sample
|
||||
bi_interp_for_intrinsic(nir_intrinsic_op op)
|
||||
{
|
||||
switch (op) {
|
||||
case nir_intrinsic_load_barycentric_centroid:
|
||||
return BIFROST_INTERP_CENTROID;
|
||||
return BI_SAMPLE_CENTROID;
|
||||
case nir_intrinsic_load_barycentric_sample:
|
||||
return BIFROST_INTERP_SAMPLE;
|
||||
return BI_SAMPLE_SAMPLE;
|
||||
case nir_intrinsic_load_barycentric_pixel:
|
||||
default:
|
||||
return BIFROST_INTERP_CENTER;
|
||||
return BI_SAMPLE_CENTER;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -170,7 +170,7 @@ bi_emit_ld_vary(bi_context *ctx, nir_intrinsic_instr *instr)
|
|||
bi_instruction ins = {
|
||||
.type = BI_LOAD_VAR,
|
||||
.load_vary = {
|
||||
.interp_mode = BIFROST_INTERP_CENTER,
|
||||
.interp_mode = BI_SAMPLE_CENTER,
|
||||
.update_mode = BIFROST_UPDATE_STORE,
|
||||
.reuse = false,
|
||||
.flat = instr->intrinsic != nir_intrinsic_load_interpolated_input,
|
||||
|
@ -189,7 +189,7 @@ bi_emit_ld_vary(bi_context *ctx, nir_intrinsic_instr *instr)
|
|||
}
|
||||
}
|
||||
|
||||
if (ins.load_vary.interp_mode == BIFROST_INTERP_CENTER) {
|
||||
if (ins.load_vary.interp_mode == BI_SAMPLE_CENTER) {
|
||||
/* Zero it out for center interpolation */
|
||||
ins.src[0] = BIR_INDEX_ZERO;
|
||||
} else {
|
||||
|
@ -608,7 +608,7 @@ bi_emit_ld_frag_coord(bi_context *ctx, nir_intrinsic_instr *instr)
|
|||
bi_instruction load = {
|
||||
.type = BI_LOAD_VAR,
|
||||
.load_vary = {
|
||||
.interp_mode = BIFROST_INTERP_CENTER,
|
||||
.interp_mode = BI_SAMPLE_CENTER,
|
||||
.update_mode = BIFROST_UPDATE_CLOBBER,
|
||||
.var_id = (i == 0) ?
|
||||
BI_VARYING_NAME_FRAG_Z :
|
||||
|
|
|
@ -133,7 +133,7 @@ extern unsigned bi_class_props[BI_NUM_CLASSES];
|
|||
|
||||
/* BI_LD_VARY */
|
||||
struct bi_load_vary {
|
||||
enum bifrost_interp_mode interp_mode;
|
||||
enum bi_sample interp_mode;
|
||||
enum bifrost_update_mode update_mode;
|
||||
enum bi_varying_name var_id;
|
||||
unsigned index;
|
||||
|
|
Loading…
Reference in New Issue