Mesa (master): i965/miptree: Use intel_miptree_copy for maps
Jason Ekstrand
jekstrand at kemper.freedesktop.org
Tue Dec 13 23:49:34 UTC 2016
Module: Mesa
Branch: master
Commit: b18cd8ce2c07c2d1a666fbff1f0d92d17dd5b22c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b18cd8ce2c07c2d1a666fbff1f0d92d17dd5b22c
Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date: Tue Dec 6 12:03:28 2016 -0800
i965/miptree: Use intel_miptree_copy for maps
What we're really doing is copying a texture not blitting it in the sense
of glBlitFramebuffers. Also, the intel_miptree_copy function is capable of
properly handling compressed textures which intel_miptree_blit is not.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97473
Cc: "13.0" <mesa-stable at lists.freedesktop.org>
---
src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index c4afab9..11ad31d 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -2598,12 +2598,10 @@ intel_miptree_map_blit(struct brw_context *brw,
* temporary buffer back out.
*/
if (!(map->mode & GL_MAP_INVALIDATE_RANGE_BIT)) {
- if (!intel_miptree_blit(brw,
- mt, level, slice,
- map->x, map->y, false,
- map->linear_mt, 0, 0,
- 0, 0, false,
- map->w, map->h, GL_COPY)) {
+ if (!intel_miptree_copy(brw,
+ mt, level, slice, map->x, map->y,
+ map->linear_mt, 0, 0, 0, 0,
+ map->w, map->h)) {
fprintf(stderr, "Failed to blit\n");
goto fail;
}
@@ -2636,12 +2634,10 @@ intel_miptree_unmap_blit(struct brw_context *brw,
intel_miptree_unmap_raw(map->linear_mt);
if (map->mode & GL_MAP_WRITE_BIT) {
- bool ok = intel_miptree_blit(brw,
- map->linear_mt, 0, 0,
- 0, 0, false,
- mt, level, slice,
- map->x, map->y, false,
- map->w, map->h, GL_COPY);
+ bool ok = intel_miptree_copy(brw,
+ map->linear_mt, 0, 0, 0, 0,
+ mt, level, slice, map->x, map->y,
+ map->w, map->h);
WARN_ONCE(!ok, "Failed to blit from linear temporary mapping");
}
More information about the mesa-commit
mailing list