summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/intel_tex_image.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2014-04-25 13:29:41 -0700
committerEric Anholt <eric@anholt.net>2014-05-01 15:12:27 -0700
commite16c5c906316c58c0633e9bba02339ef981e5ef3 (patch)
tree3879fcda354e8877002b430a61ce7dad84398499 /src/mesa/drivers/dri/i965/intel_tex_image.c
parente3a9ca4563790f54976a969bf70cd5f45cbc4e13 (diff)
downloadexternal_mesa3d-e16c5c906316c58c0633e9bba02339ef981e5ef3.zip
external_mesa3d-e16c5c906316c58c0633e9bba02339ef981e5ef3.tar.gz
external_mesa3d-e16c5c906316c58c0633e9bba02339ef981e5ef3.tar.bz2
i965: Drop use of intel_region from miptrees.
Note: region->width/height used to reflect the total_width/height padding of separate stencil, though mt->total_width didn't. region->width/height was being used in EGL images, where the padded value would have been the wrong one, so I converted them to use rb->Width/Height. v2: Drop debug printf that slipped in (caught by Ken) Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_tex_image.c')
-rw-r--r--src/mesa/drivers/dri/i965/intel_tex_image.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c
index 9e8b36e..bbb6602 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_image.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_image.c
@@ -254,8 +254,8 @@ intel_set_texture_image_bo(struct gl_context *ctx,
intel_texobj->needs_validate = true;
intel_image->mt->offset = offset;
- assert(pitch % intel_image->mt->region->cpp == 0);
- intel_image->base.RowStride = pitch / intel_image->mt->region->cpp;
+ assert(pitch % intel_image->mt->cpp == 0);
+ intel_image->base.RowStride = pitch / intel_image->mt->cpp;
/* Immediately validate the image to the object. */
intel_miptree_reference(&intel_texobj->mt, intel_image->mt);
@@ -285,8 +285,8 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
intel_update_renderbuffers(pDRICtx, dPriv);
rb = intel_get_renderbuffer(fb, BUFFER_FRONT_LEFT);
- /* If the region isn't set, then intel_update_renderbuffers was unable
- * to get the buffers for the drawable.
+ /* If the miptree isn't set, then intel_update_renderbuffers was unable
+ * to get the BO for the drawable from the window system.
*/
if (!rb || !rb->mt)
return;
@@ -308,11 +308,11 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
_mesa_lock_texture(&brw->ctx, texObj);
texImage = _mesa_get_tex_image(ctx, texObj, target, level);
intel_miptree_make_shareable(brw, rb->mt);
- intel_set_texture_image_bo(ctx, texImage, rb->mt->region->bo, target,
+ intel_set_texture_image_bo(ctx, texImage, rb->mt->bo, target,
internalFormat, texFormat, 0,
- rb->mt->region->width,
- rb->mt->region->height,
- rb->mt->region->pitch,
+ rb->Base.Base.Width,
+ rb->Base.Base.Height,
+ rb->mt->pitch,
0, 0);
_mesa_unlock_texture(&brw->ctx, texObj);
}