[Mesa-dev] [PATCH] i965/aub: Dump a final bitmap from DestroyContext.

Jose Fonseca jfonseca at vmware.com
Fri Mar 30 10:08:15 PDT 2012



----- Original Message -----
> On 03/30/2012 03:12 AM, Jose Fonseca wrote:
> >
> > ----- Original Message -----
> >> Certain applications don't call SwapBuffers before exiting.  Yet,
> >> we'd
> >> really like to see a bitmap containing the final rendered image
> >> even
> >> if
> >> they choose never to present it.
> >>
> >> In particular, Piglit tests (at least with -auto -fbo) fall into
> >> this
> >> category.  Many of them failed to dump any images at all.
> >>
> >> Dumping one final image at context destruction time seems to solve
> >> the
> >> issue.
> >
> > Another alternative would be for piglit and mesa should
> > use/implement
> > http://www.opengl.org/registry/specs/GREMEDY/frame_terminator.txt
> > , so that the whole stack has a precise knowledge of where frames
> > are.
> 
> Would having the piglit framework call glFrameTerminatorGREMEDY after
> calling piglit_display be sufficient?  That ought to be easy enough.
>
> One the Mesa side, I think most apps only use
> glFrameTerminatorGREMEDY
> in debug builds, so it might not be that helpful here.

I suppose you'd also need to add support for glFrameTerminatorGREMEDY in Mesa, so that you can hook into it inside the Intel driver, and invoke aub_dump_bmp() when it happens.  The issue with calling when the context is destroyed is that there is no guarantee that the last frame was the most interesting.

Another alternative would be to call aub_dump_bmp() on ReadPixels (just the first when there are many in succession) when there is no PBO bound.  As ReadPixels is a way for the pixels go out into the world were they can be seen, just like SwapBuffers.

Jose


More information about the mesa-dev mailing list