Difference in frame generated by apitrace vs glReadpixels

José Fonseca jose.r.fonseca at gmail.com
Tue Nov 24 14:09:28 PST 2015


It sounds like the application in question doesn't take enough care to
reset all GL state that affects glReadPixels to the necessary values.

I recommend you either:

- study apitrace/retrace/glstate_images.cpp source code

-  take a trace of glretrace itself:

    apitrace trace -o glretrace.trace glretrace -S some-frame-call-no
your-app.trace
    apitrace trace dump glretrace.trace

and compare what glretrace does to dump the screenshot, vs what your app
does.

Jose


On Tue, Nov 24, 2015 at 6:29 PM, Divick Kishore <divick.kishore at gmail.com>
wrote:

> Hi,
>     I am using apitrace to debug some erroneous output with an
> application. The application is such that it does not render to
> regular framebuffer instead it renders to FBO and then reads back via
> glReadPixels which is passed on over network/socket for rendering.
>
> The issue that I see is that if I dump the framebuffer just before the
> readpixels in apitrace, it shows the correct output but surprisingly
> it doesn't show the correct output when I do readback in the
> application. This just doesn't seem right to me as I presume that
> apitrace would also be using readpixels to generate output at a given
> call.
>
> I understand that without the trace or the code it is hard to guess
> what is going on but just in case apitrace is doing something
> differently to generate the frames at a given call will help us nail
> down why there is a difference.
>
> Note that there is only one particular frame/scene in the game which
> is not right while earlier frames seem fine. I have already
> checked/tried different readback modes RGB, RGBA etc. along with
> different packing alignments etc but that doesn't seem to fix it.
>
> I would appreciate any help or pointers.
> Thanks,
> Divick
> _______________________________________________
> apitrace mailing list
> apitrace at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/apitrace
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/apitrace/attachments/20151124/706930a2/attachment.html>


More information about the apitrace mailing list