[Mesa-dev] [PATCH 1/3] gallium: add double opcodes and TGSI execution (v3.1)
Dave Airlie
airlied at gmail.com
Thu Feb 19 13:52:04 PST 2015
I've addressed most of these,
>>
>> + /* double modifiers handled by caller */
>> + if (dtype)
>> + return;
>
> Should the below code just get moved to fetch_source? Or does it rely
> on local args which makes that a pain? If it's not too hard, I think
> it'd be a lot cleaner / clearer than an extra param here.
I've reworked it, for fetch_source its not so bad, for store_dest its a
bit messy as it needs to return the dst pointer but with that it isn't
that much uglier. I'll post a followup.
>> +
>> + wmask = inst->Dst[0].Register.WriteMask;
>> + if (wmask & TGSI_WRITEMASK_XY) {
>
> Please comment as to why this is written differently than the
> unary/trinary cases. I assume it's for something like DSLT?
Okay added something small here.
>> +}
>> +
>> diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c
>> index c90d24c..8313722 100644
>> --- a/src/gallium/auxiliary/tgsi/tgsi_info.c
>> +++ b/src/gallium/auxiliary/tgsi/tgsi_info.c
>> @@ -231,10 +231,33 @@ static const struct tgsi_opcode_info opcode_info[TGSI_OPCODE_LAST] =
>> { 1, 1, 0, 0, 0, 0, COMP, "LSB", TGSI_OPCODE_LSB },
>> { 1, 1, 0, 0, 0, 0, COMP, "IMSB", TGSI_OPCODE_IMSB },
>> { 1, 1, 0, 0, 0, 0, COMP, "UMSB", TGSI_OPCODE_UMSB },
>> -
>> { 1, 1, 0, 0, 0, 0, OTHR, "INTERP_CENTROID", TGSI_OPCODE_INTERP_CENTROID },
>> { 1, 2, 0, 0, 0, 0, OTHR, "INTERP_SAMPLE", TGSI_OPCODE_INTERP_SAMPLE },
>> { 1, 2, 0, 0, 0, 0, OTHR, "INTERP_OFFSET", TGSI_OPCODE_INTERP_OFFSET },
>> + { 1, 1, 0, 0, 0, 0, COMP, "F2D", TGSI_OPCODE_F2D },
>
> I'd group these with the other COMP ones... That's why I had added the
> whitespace for INTERP_*.
eh? these are in opcode order, grouping them makes no sense.
I've updated all the docs with the correct channel assignments as well.
Dave.
More information about the mesa-dev
mailing list