[Mesa-dev] [PATCH] i965: Set dest type to UW for several send messages
Francisco Jerez
currojerez at riseup.net
Fri Feb 26 19:43:00 UTC 2016
Jordan Justen <jordan.l.justen at intel.com> writes:
> On 2016-02-22 18:52:13, Francisco Jerez wrote:
>> Jordan Justen <jordan.l.justen at intel.com> writes:
>>
>> > Without this, on SIMD 16 the send instruction destination will appear
>> > to write more than one destination register, causing the simulator to
>> > report an error.
>> >
>> > Of course, the send instruction can actually write more than one
>> > destination register regardless of the type set for the destination,
>> > so this is a bit strange.
>> >
>> > Suggested-by: Kenneth Graunke <kenneth at whitecape.org>
>> > Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
>> > ---
>> > src/mesa/drivers/dri/i965/brw_eu_emit.c | 4 +++-
>> > src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 2 +-
>> > 2 files changed, 4 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c
>> > index 35d8039..83b262b 100644
>> > --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
>> > +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
>> > @@ -2601,6 +2601,7 @@ brw_send_indirect_surface_message(struct brw_codegen *p,
>> > surface = addr;
>> > }
>> >
>> > + dst = retype(dst, BRW_REGISTER_TYPE_UW);
>>
>> Any reason you didn't change this in brw_send_indirect_message()
>> instead? That would also make sure that anything calling it directly
>> instead of going through brw_send_indirect_surface_message() would get
>> the destination type fixed up too.
>>
>
> Yeah, that works too. r-b with that?
>
Yeah, feel free to put my R-b with that change.
> -Jordan
>
>> > insn = brw_send_indirect_message(p, sfid, dst, payload, surface);
>> > brw_inst_set_mlen(devinfo, insn, message_len);
>> > brw_inst_set_rlen(devinfo, insn, response_len);
>> > @@ -3207,6 +3208,7 @@ brw_memory_fence(struct brw_codegen *p,
>> > * message doesn't write anything back.
>> > */
>> > insn = next_insn(p, BRW_OPCODE_SEND);
>> > + dst = retype(dst, BRW_REGISTER_TYPE_UW);
>> > brw_set_dest(p, insn, dst);
>> > brw_set_src0(p, insn, dst);
>> > brw_set_memory_fence_message(p, insn, GEN7_SFID_DATAPORT_DATA_CACHE,
>> > @@ -3473,7 +3475,7 @@ brw_barrier(struct brw_codegen *p, struct brw_reg src)
>> > assert(devinfo->gen >= 7);
>> >
>> > inst = next_insn(p, BRW_OPCODE_SEND);
>> > - brw_set_dest(p, inst, brw_null_reg());
>> > + brw_set_dest(p, inst, retype(brw_null_reg(), BRW_REGISTER_TYPE_UW));
>> > brw_set_src0(p, inst, src);
>> > brw_set_src1(p, inst, brw_null_reg());
>> >
>> > diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
>> > index ef58584..b58c938 100644
>> > --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
>> > +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
>> > @@ -431,7 +431,7 @@ fs_generator::generate_cs_terminate(fs_inst *inst, struct brw_reg payload)
>> >
>> > insn = brw_next_insn(p, BRW_OPCODE_SEND);
>> >
>> > - brw_set_dest(p, insn, brw_null_reg());
>> > + brw_set_dest(p, insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_UW));
>> > brw_set_src0(p, insn, payload);
>> > brw_set_src1(p, insn, brw_imm_d(0));
>> >
>> > --
>> > 2.7.0
>> >
>> > _______________________________________________
>> > mesa-dev mailing list
>> > mesa-dev at lists.freedesktop.org
>> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160226/b51a55d2/attachment.sig>
More information about the mesa-dev
mailing list