[Mesa-dev] [PATCH 08/17] intle: Add an assert for glCopyTexSubImage() being called on MSAA buffers.

Paul Berry stereotype441 at gmail.com
Sun Jun 2 16:50:12 PDT 2013


On 28 May 2013 15:55, Eric Anholt <eric at anholt.net> wrote:

> Chad Versace <chad.versace at linux.intel.com> writes:
>
> > On 05/28/2013 01:54 PM, Eric Anholt wrote:
> >> Marek Olšák <maraeo at gmail.com> writes:
> >>
> >>> CopyTexSubImage can be called on a multisample renderbuffer if the
> >>> renderbuffer is part of the window-system framebuffer (i.e. comes from
> >>> the visual).
> >>>
> >>> IIRC, the game Cogs uses it if both MSAA and Post Filters are enabled.
> >>
> >> Good to note; I hadn't thought about this.  This should be covered by
> >> the blorp CTSI path, but at least we'll find out more obviously now if
> >> that turns out to be false for some reason.
>

Actually, the blorp CTSI path doesn't cover the case where the texture and
the renderbuffer have different color formats, so these assertions fire in
the Piglit "copyteximage" tests.

There are several other bugs in the intel implementation of
glCopyTexSubImage which are exposed by those Piglit tests--I'm just about
to publish a patch series that gets them to pass again.  I'll include
fixing the assertions in that patch series.


> >
> > --- -8<- ----
> > static void
> > intelCopyTexSubImage(struct gl_context *ctx, GLuint dims,
> >                       struct gl_texture_image *texImage,
> >                       GLint xoffset, GLint yoffset, GLint zoffset,
> >                       struct gl_renderbuffer *rb,
> >                       GLint x, GLint y,
> >                       GLsizei width, GLsizei height)
> > {
> >     struct intel_context *intel = intel_context(ctx);
> >     if (dims != 3) {
> > #ifndef I915
> >        /* Try BLORP first.  It can handle almost everything. */
> >        if (brw_blorp_copytexsubimage(intel, rb, texImage, x, y,
> >                                      xoffset, yoffset, width, height))
> >           return;
> > #endif
> >
> >        /* Next, try the BLT engine. */
> >        if (intel_copy_texsubimage(intel,
> >                                   intel_texture_image(texImage),
> >                                   xoffset, yoffset,
> >                                   intel_renderbuffer(rb), x, y, width,
> height))
> >           return;
> >     }
> > --- ->8- ----
> >
> > If the read buffer is multi-sampled and brw_blorp_copytexsubimage fails
> for an
> > unexpected reason, then the assertions fail. To avoid that disaster, I
> think
> > the assertions should be replaced with `if (is_multisampled) return
> false`.
>
> The code that gets called after that will also be a trainwreck in the
> presence of multisampling.  You really want to assert at this point.
>
> _______________________________________________
> 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/20130602/64ae0e75/attachment.html>


More information about the mesa-dev mailing list