brw: Replace fs_inst::pi_noperspective with a logical control source

We already have logical pixel interpolator messages that get lowered
to send messages.  We can just add an extra boolean source to those
opcodes rather than sticking a opcode-specific boolean in the generic
fs_inst data structure.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33297>
This commit is contained in:
Kenneth Graunke
2025-01-16 15:12:14 -08:00
committed by Marge Bot
parent 168ac07ffd
commit 7390d6189c
5 changed files with 16 additions and 8 deletions
+7 -4
View File
@@ -2083,12 +2083,11 @@ emit_pixel_interpolater_send(const brw_builder &bld,
srcs[INTERP_SRC_MSG_DESC] = desc;
srcs[INTERP_SRC_DYNAMIC_MODE] = flag_reg;
srcs[INTERP_SRC_NOPERSPECTIVE] = brw_imm_ud(false);
brw_inst *inst = bld.emit(opcode, dst, srcs, INTERP_NUM_SRCS);
/* 2 floats per slot returned */
inst->size_written = 2 * dst.component_size(inst->exec_size);
if (interpolation == INTERP_MODE_NOPERSPECTIVE) {
inst->pi_noperspective = true;
srcs[INTERP_SRC_NOPERSPECTIVE] = brw_imm_ud(true);
/* TGL BSpec says:
* This field cannot be set to "Linear Interpolation"
* unless Non-Perspective Barycentric Enable in 3DSTATE_CLIP is enabled"
@@ -2096,6 +2095,10 @@ emit_pixel_interpolater_send(const brw_builder &bld,
wm_prog_data->uses_nonperspective_interp_modes = true;
}
brw_inst *inst = bld.emit(opcode, dst, srcs, INTERP_NUM_SRCS);
/* 2 floats per slot returned */
inst->size_written = 2 * dst.component_size(inst->exec_size);
wm_prog_data->pulls_bary = true;
return inst;