[Mesa-dev] [RFC PATCH 23/26] i965: fix renderbuffer wrapper setup for multisample textures

Paul Berry stereotype441 at gmail.com
Fri Jan 4 13:48:27 PST 2013


On 29 December 2012 04:35, Chris Forbes <chrisf at ijw.co.nz> wrote:

> Previously we were putting the 2x2 (or 4x2) fake dimensions of the
> surface into the renderbuffer wrapper. This is different from how
> other parts of the driver expect multisample renderbuffers to be set up,
> and produced stalls and memory stomps.
>
> Pulls multisample textures into line with classic multisample
> renderbuffers, fixing the arb_texture_multisample-sample-mask-execution
> -tex piglit.
>
> Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
>

I hope this patch can also go away once I've cleaned up the logical vs.
physical size ambiguity.


> ---
>  src/mesa/drivers/dri/intel/intel_fbo.c | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c
> b/src/mesa/drivers/dri/intel/intel_fbo.c
> index 4cc2c00..be0c117 100644
> --- a/src/mesa/drivers/dri/intel/intel_fbo.c
> +++ b/src/mesa/drivers/dri/intel/intel_fbo.c
> @@ -507,9 +507,18 @@ intel_renderbuffer_update_wrapper(struct
> intel_context *intel,
>     rb->Format = image->TexFormat;
>     rb->InternalFormat = image->InternalFormat;
>     rb->_BaseFormat = image->_BaseFormat;
> -   rb->Width = mt->level[level].width;
> -   rb->Height = mt->level[level].height;
> -   rb->NumSamples = mt->num_samples;
> +
> +   if (mt->num_samples) {
> +      /* silly hack */
> +      rb->Width = mt->singlesample_width0;
> +      rb->Height = mt->singlesample_height0;
> +      rb->NumSamples = mt->num_samples;
> +   }
> +   else {
> +      rb->Width = mt->level[level].width;
> +      rb->Height = mt->level[level].height;
> +      rb->NumSamples = mt->num_samples;
> +   }
>
>     rb->Delete = intel_delete_renderbuffer;
>     rb->AllocStorage = intel_nop_alloc_storage;
> --
> 1.8.0.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130104/525425b9/attachment.html>


More information about the mesa-dev mailing list