etnaviv: allow R/B swapped surfaces to be cleared
authorLucas Stach <l.stach@pengutronix.de>
Wed, 10 May 2017 16:01:05 +0000 (18:01 +0200)
committerChristian Gmeiner <christian.gmeiner@gmail.com>
Tue, 16 May 2017 19:07:42 +0000 (21:07 +0200)
Fixes: 7f62ffb68ad ("etnaviv: add support for rb swap")
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
src/gallium/drivers/etnaviv/etnaviv_translate.h

index d0623db..e8466d6 100644 (file)
@@ -416,6 +416,8 @@ translate_clear_color(enum pipe_format format,
    switch (format) {
    case PIPE_FORMAT_B8G8R8A8_UNORM:
    case PIPE_FORMAT_B8G8R8X8_UNORM:
+   case PIPE_FORMAT_R8G8B8A8_UNORM:
+   case PIPE_FORMAT_R8G8B8X8_UNORM:
       clear_value = etna_cfloat_to_uintN(color->f[2], 8) |
                     (etna_cfloat_to_uintN(color->f[1], 8) << 8) |
                     (etna_cfloat_to_uintN(color->f[0], 8) << 16) |