Module: Mesa
Branch: master
Commit: 837fabaaa3938ad5947393caeaf97a3a7c109d1f
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=837fabaaa3938ad5947393caeaf97a3a7c109d1f

Author: Wladimir J. van der Laan <laa...@gmail.com>
Date:   Wed Aug  2 15:31:51 2017 +0000

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 <laa...@gmail.com>
Reviewed-by: Ilia Mirkin <imir...@alum.mit.edu>
Reviewed-by: Rob Clark <robdcl...@gmail.com>

---

 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 25f2bf419c..ee4a4d60fb 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;

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to