Mesa (master): svga: improve check for 3D compressed textures

Brian Paul brianp at kemper.freedesktop.org
Tue Nov 19 16:03:48 UTC 2013


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

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Nov 19 07:54:17 2013 -0800

svga: improve check for 3D compressed textures

This is basically a a respin of f1dfcf4bce35e6796f873d9a00103b280da81e4c
per Jose's suggestion.

Just set the SVGA3dSurfaceFormatCaps flags for 3D and cube textures
when checking the texture format capabilities.  This will filter out
unsupported combinations like 3D+DXT.

Reviewed-by: Jose Fonseca <jfonseca at vmware.com>

---

 src/gallium/drivers/svga/svga_screen.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index ebcad2c..c16be16 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -447,11 +447,6 @@ svga_is_format_supported( struct pipe_screen *screen,
       }
    }
    
-   if (target == PIPE_TEXTURE_3D && util_format_is_compressed(format)) {
-      /* we don't support compressed 3D textures at this time */
-      return FALSE;
-   }
-
    /*
     * Query the host capabilities.
     */
@@ -469,6 +464,13 @@ svga_is_format_supported( struct pipe_screen *screen,
       mask.texture = 1;
    }
 
+   if (target == PIPE_TEXTURE_CUBE) {
+      mask.cubeTexture = 1;
+   }
+   if (target == PIPE_TEXTURE_3D) {
+      mask.volumeTexture = 1;
+   }
+
    return (caps.value & mask.value) == mask.value;
 }
 




More information about the mesa-commit mailing list