aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_resource.c
diff options
context:
space:
mode:
authorCharmaine Lee <[email protected]>2015-12-22 11:20:41 -0800
committerBrian Paul <[email protected]>2016-01-14 10:44:25 -0700
commit6303231a1ddf646b05c43c6bbc7fa71314ebb3fc (patch)
tree5a1c447d74ff7b7bbc2c9576fbe8dbd23208a5f3 /src/gallium/drivers/svga/svga_resource.c
parent78e628ae43015a2a8b6a1d7339eb7eb63ab56848 (diff)
svga: add DXGenMips command support
For those formats that support hw mipmap generation, use the DXGenMips command. Otherwise fallback to the mipmap generation utility. Tested with piglit, OpenGL apps (Heaven, Turbine, Cinebench) v2: make sure the texture surface was created with the render target bind flag set relocation flag to SVGA_RELOC_WRITE for the texture surface Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_resource.c')
-rw-r--r--src/gallium/drivers/svga/svga_resource.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_resource.c b/src/gallium/drivers/svga/svga_resource.c
index a910ae0ca72..1c3bcd67afa 100644
--- a/src/gallium/drivers/svga/svga_resource.c
+++ b/src/gallium/drivers/svga/svga_resource.c
@@ -107,6 +107,12 @@ svga_init_resource_functions(struct svga_context *svga)
svga->pipe.transfer_flush_region = u_transfer_flush_region_vtbl;
svga->pipe.transfer_unmap = u_transfer_unmap_vtbl;
svga->pipe.transfer_inline_write = u_transfer_inline_write_vtbl;
+
+ if (svga_have_vgpu10(svga)) {
+ svga->pipe.generate_mipmap = svga_texture_generate_mipmap;
+ } else {
+ svga->pipe.generate_mipmap = NULL;
+ }
}
void