intel/fs: Rework INTERPOLATE_AT_PER_SLOT_OFFSET

This reworks INTERPOLATE_AT_PER_SLOT_OFFSET to work more like an ALU
operation and less like a send.  This is less code over-all and, as a
side-effect, it now properly handles execution groups and lowering so
SIMD32 support just falls out.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
Francisco Jerez
2016-04-25 18:06:13 -07:00
committed by Jason Ekstrand
parent 74b477039d
commit 73d60455e9
3 changed files with 9 additions and 19 deletions
+2 -15
View File
@@ -1795,21 +1795,8 @@ emit_pixel_interpolater_send(const fs_builder &bld,
{
struct brw_wm_prog_data *wm_prog_data =
brw_wm_prog_data(bld.shader->stage_prog_data);
fs_inst *inst;
fs_reg payload;
int mlen;
if (src.file == BAD_FILE) {
/* Dummy payload */
payload = bld.vgrf(BRW_REGISTER_TYPE_F, 1);
mlen = 1;
} else {
payload = src;
mlen = 2 * bld.dispatch_width() / 8;
}
inst = bld.emit(opcode, dst, payload, desc);
inst->mlen = mlen;
fs_inst *inst = bld.emit(opcode, dst, src, desc);
/* 2 floats per slot returned */
inst->size_written = 2 * dst.component_size(inst->exec_size);
inst->pi_noperspective = interpolation == INTERP_MODE_NOPERSPECTIVE;
@@ -3464,7 +3451,7 @@ fs_visitor::nir_emit_fs_intrinsic(const fs_builder &bld,
FS_OPCODE_INTERPOLATE_AT_SAMPLE,
dest,
fs_reg(), /* src */
msg_data,
component(msg_data, 0),
interpolation);
set_predicate(BRW_PREDICATE_NORMAL, inst);