intel/fs: Make logical URB write instructions more like other logical instructions
The changes to fs_visitor::validate() helped track down a place where I initially forgot to convert a message to the new sources layout. This had caused a different validation failure in dEQP-GLES31.functional.tessellation.tesscoord.triangles_equal_spacing, but this were not detected until after SENDs were lowered. Tiger Lake, Ice Lake, and Skylake had similar results. (Ice Lake shown) total instructions in shared programs: 19951145 -> 19951133 (<.01%) instructions in affected programs: 2429 -> 2417 (-0.49%) helped: 8 / HURT: 0 total cycles in shared programs: 858904152 -> 858862331 (<.01%) cycles in affected programs: 5702652 -> 5660831 (-0.73%) helped: 2138 / HURT: 1255 Broadwell total cycles in shared programs: 904869459 -> 904835501 (<.01%) cycles in affected programs: 7686744 -> 7652786 (-0.44%) helped: 2861 / HURT: 2050 Tiger Lake, Ice Lake, and Skylake had similar results. (Ice Lake shown) Instructions in all programs: 141442369 -> 141442032 (-0.0%) Instructions helped: 337 Cycles in all programs: 9099270231 -> 9099036492 (-0.0%) Cycles helped: 40661 Cycles hurt: 28606 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17605>
This commit is contained in:
@@ -73,8 +73,27 @@ lower_urb_write_logical_send(const fs_builder &bld, fs_inst *inst,
|
||||
|
||||
assert(inst->header_size == 0);
|
||||
|
||||
fs_reg *payload_sources = new fs_reg[inst->mlen];
|
||||
fs_reg payload = fs_reg(VGRF, bld.shader->alloc.allocate(inst->mlen),
|
||||
BRW_REGISTER_TYPE_F);
|
||||
|
||||
unsigned header_size = 0;
|
||||
payload_sources[header_size++] = inst->src[URB_LOGICAL_SRC_HANDLE];
|
||||
if (per_slot_present)
|
||||
payload_sources[header_size++] = inst->src[URB_LOGICAL_SRC_PER_SLOT_OFFSETS];
|
||||
|
||||
if (channel_mask_present)
|
||||
payload_sources[header_size++] = inst->src[URB_LOGICAL_SRC_CHANNEL_MASK];
|
||||
|
||||
for (unsigned i = header_size, j = 0; i < inst->mlen; i++, j++)
|
||||
payload_sources[i] = offset(inst->src[URB_LOGICAL_SRC_DATA], bld, j);
|
||||
|
||||
bld.LOAD_PAYLOAD(payload, payload_sources, inst->mlen, header_size);
|
||||
|
||||
delete [] payload_sources;
|
||||
|
||||
inst->opcode = SHADER_OPCODE_SEND;
|
||||
inst->header_size = 1;
|
||||
inst->header_size = header_size;
|
||||
inst->dst = brw_null_reg();
|
||||
|
||||
inst->sfid = BRW_SFID_URB;
|
||||
@@ -88,13 +107,11 @@ lower_urb_write_logical_send(const fs_builder &bld, fs_inst *inst,
|
||||
inst->ex_mlen = 0;
|
||||
inst->send_has_side_effects = true;
|
||||
|
||||
fs_reg tmp = inst->src[0];
|
||||
|
||||
inst->resize_sources(4);
|
||||
|
||||
inst->src[0] = brw_imm_ud(0); /* desc */
|
||||
inst->src[1] = brw_imm_ud(0); /* ex_desc */
|
||||
inst->src[2] = tmp;
|
||||
inst->src[2] = payload;
|
||||
inst->src[3] = brw_null_reg();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user