[Mesa-dev] [PATCH 05/12] i965/blorp: store x and y offsets in brw_blorp_mip_info.
Eric Anholt
eric at anholt.net
Fri Sep 7 09:32:51 PDT 2012
Paul Berry <stereotype441 at gmail.com> writes:
> Currently, gen{6,7}_blorp_emit_surface_state assumes that the src and
> dst surfaces are mapped to miplevel 0 and layer 0 (thus no surface
> offset is required). This is a bug, since the user might try to blit
> to and from levels/layers other than 0.
> diff --git a/src/mesa/drivers/dri/i965/brw_blorp.cpp b/src/mesa/drivers/dri/i965/brw_blorp.cpp
> index 7322a04..6acc591 100644
> --- a/src/mesa/drivers/dri/i965/brw_blorp.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_blorp.cpp
> this->mt = mt;
> - this->level = level;
> - this->layer = layer;
> this->width = mt->level[level].width;
> this->height = mt->level[level].height;
> +
> + /* Construct a dummy renderbuffer just to extract tile offsets. */
> + struct intel_renderbuffer rb;
> + rb.mt = mt;
> + rb.mt_level = level;
> + rb.mt_layer = layer;
> + intel_renderbuffer_set_draw_offset(&rb);
> + x_offset = rb.draw_x;
> + y_offset = rb.draw_y;
I know you're just moving the code here, but as a fixup, please just use
intel_miptree_get_image_offset directly.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120907/4db19305/attachment.pgp>
More information about the mesa-dev
mailing list