From 20ce6f136188c24a019153e78c87872fb0a03060 Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Wed, 10 May 2017 18:01:05 +0200 Subject: [PATCH] etnaviv: allow R/B swapped surfaces to be cleared Fixes: 7f62ffb68ad ("etnaviv: add support for rb swap") Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner --- src/gallium/drivers/etnaviv/etnaviv_translate.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/etnaviv/etnaviv_translate.h b/src/gallium/drivers/etnaviv/etnaviv_translate.h index d0623db1472..e8466d63ff1 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_translate.h +++ b/src/gallium/drivers/etnaviv/etnaviv_translate.h @@ -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) | -- 2.30.2