[Mesa-dev] [PATCH 09/14] i965/compaction: Add support for Gen5.

Matt Turner mattst88 at gmail.com
Tue Sep 23 13:25:55 PDT 2014


On Tue, Sep 23, 2014 at 1:10 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> On Thu, Aug 28, 2014 at 8:10 PM, Matt Turner <mattst88 at gmail.com> wrote:
>> +            int jump = brw_inst_imm_d(brw, insn);
>> +            int jump_compacted = jump / sizeof(brw_compact_inst);
>> +            int jump_uncompacted = jump / sizeof(brw_inst);
>> +
>> +            target_old_ip = this_old_ip + jump_uncompacted;
>> +            target_compacted_count = compacted_counts[target_old_ip];
>> +            jump_compacted -= (target_compacted_count -
>> this_compacted_count);
>> +            brw_inst_set_imm_ud(brw, insn, jump_compacted *
>> +                                           sizeof(brw_compact_inst));
>
>
> Any reason why you're reading it as a signed value and then writing it back
> in unsigned?

IIRC brw_inst_set_imm_d() is broken. It's been long enough that I've
forgotten the exact details, but _ud sets the exact bits you pass it,
while _d does something wrong.


More information about the mesa-dev mailing list