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

Author: Brian Paul <[email protected]>
Date:   Wed Jan 30 17:43:57 2013 -0700

svga: add, use SVGA3D_SURFACE_HINT_VOLUME flag

Reviewed-by: Reviewed-by: José Fonseca <[email protected]>

---

 src/gallium/drivers/svga/include/svga3d_reg.h    |    1 +
 src/gallium/drivers/svga/svga_resource_texture.c |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/svga/include/svga3d_reg.h 
b/src/gallium/drivers/svga/include/svga3d_reg.h
index 67f7218..05b83c6 100644
--- a/src/gallium/drivers/svga/include/svga3d_reg.h
+++ b/src/gallium/drivers/svga/include/svga3d_reg.h
@@ -1147,6 +1147,7 @@ typedef enum {
    SVGA3D_SURFACE_HINT_WRITEONLY       = (1 << 8),
    SVGA3D_SURFACE_MASKABLE_ANTIALIAS   = (1 << 9),
    SVGA3D_SURFACE_AUTOGENMIPMAPS       = (1 << 10),
+   SVGA3D_SURFACE_HINT_VOLUME          = (1 << 15),
 } SVGA3dSurfaceFlags;
 
 typedef
diff --git a/src/gallium/drivers/svga/svga_resource_texture.c 
b/src/gallium/drivers/svga/svga_resource_texture.c
index b703179..7f36da8 100644
--- a/src/gallium/drivers/svga/svga_resource_texture.c
+++ b/src/gallium/drivers/svga/svga_resource_texture.c
@@ -415,6 +415,10 @@ svga_texture_create(struct pipe_screen *screen,
       tex->key.numFaces = 1;
    }
 
+   if (template->target == PIPE_TEXTURE_3D) {
+      tex->key.flags |= SVGA3D_SURFACE_HINT_VOLUME;
+   }
+
    tex->key.cachable = 1;
 
    if (template->bind & PIPE_BIND_SAMPLER_VIEW)

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to