On 01/17/2018 08:42 AM, Ian Romanick wrote:
> On 01/17/2018 03:53 AM, Nicolai Hähnle wrote:
>> Fun fact #2: These values are simply a natural encoding of the operation
>> as a table of bit values. The result of the logic op is:
>>
>>   result_bit = (logic_op >> (2 * src_bit + dst_bit)) & 1
> 
> Oh interesting.
> 
>> That OpenGL has them reversed is really quite odd. I'd love to hear the
>> history behind it.
> 
> Big endian vs little endian perhaps?

Actually... it's not even that.  It's just a different equation for the
same thing:

   result_bit = logic_op & (1 << (2 * src_bit + dst_bit))

Everybody learns something new today. :)

>> (I think it might be useful to add this information in the comment, but
>> I'll leave that decision up to you.)
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to