[Mesa-dev] [PATCH 4/5] i965/miptree: Shortcircuit writable & compressed miptrees
Ben Widawsky
benjamin.widawsky at intel.com
Tue Jul 14 09:56:12 PDT 2015
If I am reading the code correctly, writable mappings and mappings for
compressed miptrees will always end up using calling map_gtt.
Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
---
src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index b5cd6a0..2788270 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -2701,6 +2701,9 @@ intel_miptree_map(struct brw_context *brw,
} else if (mt->stencil_mt && !(mode & BRW_MAP_DIRECT_BIT)) {
intel_miptree_map_depthstencil(brw, mt, map, level, slice);
goto done;
+ } else if (mode & GL_MAP_WRITE_BIT || mt->compressed) {
+ intel_miptree_map_gtt(brw, mt, map, level, slice);
+ goto done;
}
if (use_intel_mipree_map_blit(brw, mt, mode, level, slice)) {
@@ -2712,6 +2715,8 @@ intel_miptree_map(struct brw_context *brw,
intel_miptree_map_movntdqa(brw, mt, map, level, slice);
#endif
} else {
+ assert(mode & GL_MAP_WRITE_BIT == 0);
+ assert(!mt->compressed);
intel_miptree_map_gtt(brw, mt, map, level, slice);
}
--
2.4.5
More information about the mesa-dev
mailing list