intel/eu: Use descriptor constructors for pixel interpolator messages.
v2: Use SET_BITS macro instead of left shift (Ken). Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
@@ -350,6 +350,23 @@ brw_dp_write_desc(const struct gen_device_info *devinfo,
|
|||||||
SET_BITS(send_commit_msg, 15, 15));
|
SET_BITS(send_commit_msg, 15, 15));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Construct a message descriptor immediate with the specified pixel
|
||||||
|
* interpolator function controls.
|
||||||
|
*/
|
||||||
|
static inline uint32_t
|
||||||
|
brw_pixel_interp_desc(const struct gen_device_info *devinfo,
|
||||||
|
unsigned msg_type,
|
||||||
|
bool noperspective,
|
||||||
|
unsigned simd_mode,
|
||||||
|
unsigned slot_group)
|
||||||
|
{
|
||||||
|
return (SET_BITS(slot_group, 11, 11) |
|
||||||
|
SET_BITS(msg_type, 13, 12) |
|
||||||
|
SET_BITS(!!noperspective, 14, 14) |
|
||||||
|
SET_BITS(simd_mode, 16, 16));
|
||||||
|
}
|
||||||
|
|
||||||
void brw_urb_WRITE(struct brw_codegen *p,
|
void brw_urb_WRITE(struct brw_codegen *p,
|
||||||
struct brw_reg dest,
|
struct brw_reg dest,
|
||||||
unsigned msg_reg_nr,
|
unsigned msg_reg_nr,
|
||||||
|
@@ -3255,25 +3255,23 @@ brw_pixel_interpolator_query(struct brw_codegen *p,
|
|||||||
unsigned response_length)
|
unsigned response_length)
|
||||||
{
|
{
|
||||||
const struct gen_device_info *devinfo = p->devinfo;
|
const struct gen_device_info *devinfo = p->devinfo;
|
||||||
struct brw_inst *insn;
|
|
||||||
const uint16_t exec_size = brw_get_default_exec_size(p);
|
const uint16_t exec_size = brw_get_default_exec_size(p);
|
||||||
const uint16_t qtr_ctrl = brw_get_default_group(p) / 8;
|
const unsigned slot_group = brw_get_default_group(p) / 16;
|
||||||
|
const unsigned simd_mode = (exec_size == BRW_EXECUTE_16);
|
||||||
|
const unsigned desc =
|
||||||
|
brw_message_desc(devinfo, msg_length, response_length, false) |
|
||||||
|
brw_pixel_interp_desc(devinfo, mode, noperspective, simd_mode,
|
||||||
|
slot_group);
|
||||||
|
|
||||||
/* brw_send_indirect_message will automatically use a direct send message
|
/* brw_send_indirect_message will automatically use a direct send message
|
||||||
* if data is actually immediate.
|
* if data is actually immediate.
|
||||||
*/
|
*/
|
||||||
insn = brw_send_indirect_message(p,
|
brw_send_indirect_message(p,
|
||||||
GEN7_SFID_PIXEL_INTERPOLATOR,
|
GEN7_SFID_PIXEL_INTERPOLATOR,
|
||||||
dest,
|
dest,
|
||||||
mrf,
|
mrf,
|
||||||
vec1(data), 0);
|
vec1(data),
|
||||||
brw_inst_set_mlen(devinfo, insn, msg_length);
|
desc);
|
||||||
brw_inst_set_rlen(devinfo, insn, response_length);
|
|
||||||
|
|
||||||
brw_inst_set_pi_simd_mode(devinfo, insn, exec_size == BRW_EXECUTE_16);
|
|
||||||
brw_inst_set_pi_slot_group(devinfo, insn, qtr_ctrl / 2);
|
|
||||||
brw_inst_set_pi_nopersp(devinfo, insn, noperspective);
|
|
||||||
brw_inst_set_pi_message_type(devinfo, insn, mode);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Reference in New Issue
Block a user