intel/fs: Initialize mlen for gen7 varying pull constant load messages.
This makes the message length available at the IR level, which should save some guesswork in a future commit. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
@@ -4824,7 +4824,7 @@ lower_varying_pull_constant_logical_send(const fs_builder &bld, fs_inst *inst)
|
|||||||
inst->src[1] = tmp;
|
inst->src[1] = tmp;
|
||||||
|
|
||||||
inst->opcode = FS_OPCODE_VARYING_PULL_CONSTANT_LOAD_GEN7;
|
inst->opcode = FS_OPCODE_VARYING_PULL_CONSTANT_LOAD_GEN7;
|
||||||
|
inst->mlen = inst->exec_size / 8;
|
||||||
} else {
|
} else {
|
||||||
const fs_reg payload(MRF, FIRST_PULL_LOAD_MRF(devinfo->gen),
|
const fs_reg payload(MRF, FIRST_PULL_LOAD_MRF(devinfo->gen),
|
||||||
BRW_REGISTER_TYPE_UD);
|
BRW_REGISTER_TYPE_UD);
|
||||||
|
@@ -1530,17 +1530,15 @@ fs_generator::generate_varying_pull_constant_load_gen7(fs_inst *inst,
|
|||||||
* gen7, so the fact that it's a send message is hidden at the IR level.
|
* gen7, so the fact that it's a send message is hidden at the IR level.
|
||||||
*/
|
*/
|
||||||
assert(inst->header_size == 0);
|
assert(inst->header_size == 0);
|
||||||
assert(!inst->mlen);
|
assert(inst->mlen);
|
||||||
assert(index.type == BRW_REGISTER_TYPE_UD);
|
assert(index.type == BRW_REGISTER_TYPE_UD);
|
||||||
|
|
||||||
uint32_t simd_mode, rlen, mlen;
|
uint32_t simd_mode, rlen;
|
||||||
if (inst->exec_size == 16) {
|
if (inst->exec_size == 16) {
|
||||||
mlen = 2;
|
|
||||||
rlen = 8;
|
rlen = 8;
|
||||||
simd_mode = BRW_SAMPLER_SIMD_MODE_SIMD16;
|
simd_mode = BRW_SAMPLER_SIMD_MODE_SIMD16;
|
||||||
} else {
|
} else {
|
||||||
assert(inst->exec_size == 8);
|
assert(inst->exec_size == 8);
|
||||||
mlen = 1;
|
|
||||||
rlen = 4;
|
rlen = 4;
|
||||||
simd_mode = BRW_SAMPLER_SIMD_MODE_SIMD8;
|
simd_mode = BRW_SAMPLER_SIMD_MODE_SIMD8;
|
||||||
}
|
}
|
||||||
@@ -1554,7 +1552,7 @@ fs_generator::generate_varying_pull_constant_load_gen7(fs_inst *inst,
|
|||||||
brw_set_dest(p, send, retype(dst, BRW_REGISTER_TYPE_UW));
|
brw_set_dest(p, send, retype(dst, BRW_REGISTER_TYPE_UW));
|
||||||
brw_set_src0(p, send, offset);
|
brw_set_src0(p, send, offset);
|
||||||
brw_set_desc(p, send,
|
brw_set_desc(p, send,
|
||||||
brw_message_desc(devinfo, mlen, rlen, false) |
|
brw_message_desc(devinfo, inst->mlen, rlen, false) |
|
||||||
brw_sampler_desc(devinfo, surf_index,
|
brw_sampler_desc(devinfo, surf_index,
|
||||||
0, /* LD message ignores sampler unit */
|
0, /* LD message ignores sampler unit */
|
||||||
GEN5_SAMPLER_MESSAGE_SAMPLE_LD,
|
GEN5_SAMPLER_MESSAGE_SAMPLE_LD,
|
||||||
@@ -1580,7 +1578,7 @@ fs_generator::generate_varying_pull_constant_load_gen7(fs_inst *inst,
|
|||||||
brw_send_indirect_message(
|
brw_send_indirect_message(
|
||||||
p, BRW_SFID_SAMPLER, retype(dst, BRW_REGISTER_TYPE_UW),
|
p, BRW_SFID_SAMPLER, retype(dst, BRW_REGISTER_TYPE_UW),
|
||||||
offset, addr,
|
offset, addr,
|
||||||
brw_message_desc(devinfo, mlen, rlen, false) |
|
brw_message_desc(devinfo, inst->mlen, rlen, false) |
|
||||||
brw_sampler_desc(devinfo,
|
brw_sampler_desc(devinfo,
|
||||||
0 /* surface */,
|
0 /* surface */,
|
||||||
0 /* sampler */,
|
0 /* sampler */,
|
||||||
|
Reference in New Issue
Block a user