[Mesa-dev] [PATCH] r300g: only allow byteswapped formats on big endian

Michel Dänzer michel at daenzer.net
Mon Feb 13 08:22:48 UTC 2017


On 13/02/17 05:17 PM, Michel Dänzer wrote:
> On 11/02/17 08:01 AM, Grazvydas Ignotas wrote:
>> They cause regressions on little endian.
>>
>> Fixes: 172bfdaa9e ("r300g: add support for PIPE_FORMAT_x8R8G8B8_*")
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98869
>> Signed-off-by: Grazvydas Ignotas <notasas at gmail.com>
>> ---
>> no commit access
>>
>>  src/gallium/drivers/r300/r300_texture.c | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
>> index fbac07a..929c3fe 100644
>> --- a/src/gallium/drivers/r300/r300_texture.c
>> +++ b/src/gallium/drivers/r300/r300_texture.c
>> @@ -47,6 +47,11 @@
>>   */
>>  static enum pipe_format r300_unbyteswap_array_format(enum pipe_format format)
>>  {
>> +    /* FIXME: Disabled on little endian because of a reported regression:
>> +     * https://bugs.freedesktop.org/show_bug.cgi?id=98869 */
>> +    if (PIPE_ENDIAN_NATIVE != PIPE_ENDIAN_BIG)
>> +        return format;
> 
> Is there any reason to believe that whatever issue this avoids couldn't
> happen on big endian hosts as well?

More to the point, this seems to disable part of the logic needed for
supporting PIPE_FORMAT_x8R8G8B8_* on little endian, but leaves those
formats advertised as supported. Did you confirm that there are no
piglit gpu profile regressions with this patch?


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the mesa-dev mailing list