From 9eff5e905ff435c0bf4e00f8c05871d1aadfbbc9 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 30 Jan 2013 17:43:57 -0700 Subject: [PATCH] svga: add, use SVGA3D_SURFACE_HINT_VOLUME flag MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Reviewed-by: José Fonseca --- src/gallium/drivers/svga/include/svga3d_reg.h | 1 + src/gallium/drivers/svga/svga_resource_texture.c | 4 ++++ 2 files changed, 5 insertions(+) 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) -- 2.30.2