diff options
author | Eric Anholt <[email protected]> | 2014-04-25 13:29:41 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-05-01 15:12:27 -0700 |
commit | e16c5c906316c58c0633e9bba02339ef981e5ef3 (patch) | |
tree | 3879fcda354e8877002b430a61ce7dad84398499 /src/mesa/drivers/dri/i965/intel_tex_image.c | |
parent | e3a9ca4563790f54976a969bf70cd5f45cbc4e13 (diff) |
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 <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_tex_image.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_tex_image.c | 16 |
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 9e8b36ef8f0..bbb66026f23 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); } |