[Freedreno] [PATCH v3 6/8] freedreno: a2xx: Compressed textures support
Wladimir J. van der Laan
laanwj at gmail.com
Fri Mar 23 11:21:37 UTC 2018
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 <laanwj at gmail.com>
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
src/gallium/drivers/freedreno/a2xx/fd2_util.c | 11 +++++++++++
1 file changed, 11 insertions(+)
Change since v2: spaces->tabs
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_util.c b/src/gallium/drivers/freedreno/a2xx/fd2_util.c
index 25f2bf4..ee4a4d6 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.7.4
More information about the Freedreno
mailing list