From 837fabaaa3938ad5947393caeaf97a3a7c109d1f Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Wed, 2 Aug 2017 15:31:51 +0000 Subject: [PATCH] freedreno: a2xx: Compressed textures support Add support for: - PIPE_FORMAT_ETC1_RGB8 - PIPE_FORMAT_DXT1_RGB - PIPE_FORMAT_DXT1_RGBA - PIPE_FORMAT_DXT3_RGBA - PIPE_FORMAT_DXT5_RGBA Signed-off-by: Wladimir J. van der Laan Reviewed-by: Ilia Mirkin Reviewed-by: Rob Clark --- src/gallium/drivers/freedreno/a2xx/fd2_util.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_util.c b/src/gallium/drivers/freedreno/a2xx/fd2_util.c index 25f2bf419cf..ee4a4d60fb1 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_util.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_util.c @@ -183,6 +183,17 @@ fd2_pipe2surface(enum pipe_format format) case PIPE_FORMAT_R32G32B32A32_FLOAT: return FMT_32_32_32_32_FLOAT; + /* Compressed textures. */ + case PIPE_FORMAT_ETC1_RGB8: + return FMT_ETC1_RGB; + case PIPE_FORMAT_DXT1_RGB: + case PIPE_FORMAT_DXT1_RGBA: + return FMT_DXT1; + case PIPE_FORMAT_DXT3_RGBA: + return FMT_DXT2_3; + case PIPE_FORMAT_DXT5_RGBA: + return FMT_DXT4_5; + /* YUV buffers. */ case PIPE_FORMAT_UYVY: return FMT_Cr_Y1_Cb_Y0; -- 2.30.2