Hi Fredrik, I'd prefer flushing the bitmap cache in st_BlitFramebuffer.
We might have more bugs like this in st/mesa. Marek On Fri, May 15, 2015 at 5:59 PM, Fredrik Höglund <fred...@kde.org> wrote: > On Friday 15 May 2015, Fredrik Höglund wrote: >> On Friday 15 May 2015, Michel Dänzer wrote: >> > On 14.05.2015 22:52, fred...@kemper.freedesktop.org (Fredrik HXXglund) >> > wrote: >> > > >> > > URL: >> > http://cgit.freedesktop.org/mesa/mesa/commit/?id=6b284f08ab399154ad10e2166440b44cbbdcb2c5 >> > > Author: Laura Ekstrand <la...@jlekstrand.net> >> > > Date: Tue Feb 3 14:47:00 2015 -0800 >> > > >> > > main: _mesa_blit_framebuffer updates its arbitrary framebuffers. >> > > >> > > Previously, we used _mesa_update_state to update the currently bound >> > > framebuffers prior to performing a blit. Now that >> > > _mesa_blit_framebuffer >> > > uses arbitrary framebuffers, _mesa_update_state is not specific >> > > enough. >> > > >> > > Reviewed-by: Fredrik Höglund <fred...@kde.org> >> > > Signed-off-by: Fredrik Höglund <fred...@kde.org> >> > >> > This commit broke the piglit test >> > spec@ext_framebuffer_multisample@bitmap with the radeonsi driver: >> > >> > Probe color at (224,0) >> > Left: 0.000000 0.000000 0.000000 1.000000 >> > Right: 1.000000 1.000000 1.000000 1.000000 >> > >> > Looks like it's because the bottom right squares of the Xs are missing, >> > see the attached picture. >> > >> > Any ideas? >> >> I did notice that failure as well, but when I ran the test manually it >> passed for me, leading me to think that it was a spurious failure. >> >> The output looks exactly the same for me. But the test works by >> comparing the left and right halves of the framebuffer, so if the >> bottom right squares are missing on both sides, the test should >> pass. >> >> The left side is the test image, and the right side is the reference >> image. > > Okay, so I've finished analyzing the failure. The glBindFramebuffer() > calls that precede the glBlitFramebuffer() call cause _NEW_BUFFERS to > be set. This used to result in _mesa_update_state() being called from > _mesa_blit_framebuffer(), which in turn would call st_invalidate_state(), > which would mark the framebuffer state as invalid. st_BlitFramebuffer() > would then call st_validate_state() which would call > update_framebuffer_state() which would call st_flush_bitmap_cache(). > That call to st_flush_bitmap_cache() is what caused the rendering by the > last glBitmap() call to land in the framebuffer. > > The attached patch fixes the problem by restoring the > _mesa_update_state() call. The bug can also be fixed by calling > st_flush_bitmap_cache() from st_BlitFramebuffer(). > > Fredrik > > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev