[Mesa-dev] [PATCH 3/3] radeonsi: fix border color translation for integer textures
Nicolai Hähnle
nicolai.haehnle at amd.com
Tue Sep 26 17:26:19 UTC 2017
On 26.09.2017 18:55, Gustaw Smolarczyk wrote:
> 2017-09-26 16:46 GMT+02:00 Nicolai Hähnle <nhaehnle at gmail.com>:
>> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>>
>> This fixes the extremely unlikely case that an application uses
>> 0x80000000 or 0x3f800000 as border color for an integer texture and
>> helps in the also, but perhaps slightly less, unlikely case that 1 is
>> used as a border color.
>
> Hi,
>
> I see that it fixes the wrong optimization in si_translate_border_color.
>
> However, I also see that for floating point textures this will change
> -0.0 into 0.0 (if I understand how
> V_008F3C_SQ_TEX_BORDER_COLOR_*_BLACK work). I don't know GL rules
> enough to judge that (whether 0.0 and -0.0 should be
> indistinguishable), but is that ok?
Good question :)
There is actually a tiny bit of evidence in the spec that GLSL care
slightly about the sign of zero, though IMO it's a bit silly to assume
you're getting the correct sign for zero when you're not even guaranteed
to get denormals. Personally, I wouldn't worry about it.
Cheers,
Nicolai
>
> Regards,
> Gustaw Smolarczyk
>
More information about the mesa-dev
mailing list