Mesa (master): i965/miptree: Stop setting total_width/ height for existing bo
Topi Pohjolainen
tpohjola at kemper.freedesktop.org
Tue Jul 18 19:27:32 UTC 2017
Module: Mesa
Branch: master
Commit: d401bd3e8fc26be9966375f345e496c103f70c3c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d401bd3e8fc26be9966375f345e496c103f70c3c
Author: Topi Pohjolainen <topi.pohjolainen at intel.com>
Date: Tue Jun 27 21:52:19 2017 +0300
i965/miptree: Stop setting total_width/height for existing bo
Now that image surface vertical slice calculator doesn't depend
on total_height, total dimensions are only needed when new buffer
objects are created. Therefore one can safely ignore them when
miptrees are created for already exisiting buffer objects.
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 4 ----
src/mesa/drivers/dri/i965/intel_tex_image.c | 2 --
2 files changed, 6 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index da454add98..cefe33f84b 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -1024,8 +1024,6 @@ miptree_create_for_planar_image(struct brw_context *brw,
return NULL;
mt->target = target;
- mt->total_width = width;
- mt->total_height = height;
if (i == 0)
planar_mt = mt;
@@ -1109,8 +1107,6 @@ intel_miptree_create_for_dri_image(struct brw_context *brw,
mt->level[0].level_y = image->tile_y;
mt->level[0].slice[0].x_offset = image->tile_x;
mt->level[0].slice[0].y_offset = image->tile_y;
- mt->total_width += image->tile_x;
- mt->total_height += image->tile_y;
/* From "OES_EGL_image" error reporting. We report GL_INVALID_OPERATION
* for EGL images from non-tile aligned sufaces in gen4 hw and earlier which has
diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c
index ba5d099fb4..26ea9a5983 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_image.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_image.c
@@ -268,8 +268,6 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
if (mt == NULL)
return;
mt->target = target;
- mt->total_width = rb->Base.Base.Width;
- mt->total_height = rb->Base.Base.Height;
_mesa_lock_texture(&brw->ctx, texObj);
texImage = _mesa_get_tex_image(ctx, texObj, target, 0);
More information about the mesa-commit
mailing list