diff options
-rw-r--r-- | src/gallium/drivers/svga/include/svga3d_reg.h | 1 | ||||
-rw-r--r-- | 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 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) |