summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-01-30 17:43:57 -0700
committerBrian Paul <[email protected]>2013-02-01 08:00:28 -0700
commit9eff5e905ff435c0bf4e00f8c05871d1aadfbbc9 (patch)
tree6041843e8f61a9ceab43aebf639db0a0579fedf6
parent9a91ce94484789424361f22387ba15688d6bcc7d (diff)
svga: add, use SVGA3D_SURFACE_HINT_VOLUME flag
Reviewed-by: Reviewed-by: José Fonseca <[email protected]>
-rw-r--r--src/gallium/drivers/svga/include/svga3d_reg.h1
-rw-r--r--src/gallium/drivers/svga/svga_resource_texture.c4
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 67f7218b6cf..05b83c69c6c 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 b703179d04e..7f36da811ff 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)