From: Brian Paul Date: Thu, 31 Jan 2013 00:43:57 +0000 (-0700) Subject: svga: add, use SVGA3D_SURFACE_HINT_VOLUME flag X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9eff5e905ff435c0bf4e00f8c05871d1aadfbbc9;p=mesa.git svga: add, use SVGA3D_SURFACE_HINT_VOLUME flag Reviewed-by: Reviewed-by: José Fonseca --- 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)