summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2017-08-02 15:31:51 +0000
committerWladimir J. van der Laan <[email protected]>2018-03-31 06:17:59 +0000
commit837fabaaa3938ad5947393caeaf97a3a7c109d1f (patch)
tree04abd9e6b82566450c8ea016cda92d9a48c65e90 /src/gallium/drivers/freedreno
parent92d529e7e4dee7a024a7745d28911857b5042fe9 (diff)
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 <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r--src/gallium/drivers/freedreno/a2xx/fd2_util.c11
1 files changed, 11 insertions, 0 deletions
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;