[Mesa-dev] [PATCH] gm107/ir: add missing setcond flags for LOP variants

Samuel Pitoiset samuel.pitoiset at gmail.com
Mon Jun 27 22:03:41 UTC 2016



On 06/28/2016 12:01 AM, Ilia Mirkin wrote:
> Hm, dangerous:
>
> CodeEmitterGM107::emitCC(int pos)
> {
>    emitField(pos, 1, insn->defExists(1));
> }
>
> That should *probably* be insn->flagsDef >= 0. IIRC I fixed up
> gf100/gk110 before. But that might have been nv50-specific, I forget
> (which has somewhat different flags).

Yeah, right. But this can be fixed in a separate patch.

>
> On Mon, Jun 27, 2016 at 5:55 PM, Samuel Pitoiset
> <samuel.pitoiset at gmail.com> wrote:
>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
>> Cc: <mesa-stable at lists.freedesktop.org>
>> ---
>>  src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp
>> index 80761e2..c7bd4e1 100644
>> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp
>> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp
>> @@ -1632,12 +1632,14 @@ CodeEmitterGM107::emitLOP()
>>        }
>>        emitPRED (0x30);
>>        emitX    (0x2b);
>> +      emitCC   (0x2f);
>
> The pattern might not be obvious, but these are sorted by decreasing
> bitfield position. Please keep the order.

Mmmh, I would definitely prefer to sort by arguments... but whatever 
I'll fix that.

>
>>        emitField(0x29, 2, lop);
>>        emitINV  (0x28, insn->src(1));
>>        emitINV  (0x27, insn->src(0));
>>     } else {
>>        emitInsn (0x04000000);
>>        emitX    (0x39);
>> +      emitCC   (0x34);
>>        emitINV  (0x38, insn->src(1));
>>        emitINV  (0x37, insn->src(0));
>>        emitField(0x35, 2, lop);
>> --
>> 2.8.0
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list