[Mesa-dev] [PATCH] st/mesa: Flush the bitmap cache in st_BlitFramebuffer

Fredrik Höglund fredrik at kde.org
Fri May 15 12:32:30 PDT 2015


On Friday 15 May 2015, Brian Paul wrote:
> On 05/15/2015 12:10 PM, Fredrik Höglund wrote:
> > With DSA we can no longer rely on this being done in st_validate_state
> > in response to the framebuffer bindings having changed.
> >
> > This fixes the ext_framebuffer_multisample-bitmap piglit test.
> > ---
> >   src/mesa/state_tracker/st_cb_blit.c | 4 ++++
> >   1 file changed, 4 insertions(+)
> >
> > diff --git a/src/mesa/state_tracker/st_cb_blit.c b/src/mesa/state_tracker/st_cb_blit.c
> > index bbaedd1..75289ae 100644
> > --- a/src/mesa/state_tracker/st_cb_blit.c
> > +++ b/src/mesa/state_tracker/st_cb_blit.c
> > @@ -36,6 +36,7 @@
> >
> >   #include "st_context.h"
> >   #include "st_texture.h"
> > +#include "st_cb_bitmap.h"
> >   #include "st_cb_blit.h"
> >   #include "st_cb_fbo.h"
> >   #include "st_atom.h"
> > @@ -93,6 +94,9 @@ st_BlitFramebuffer(struct gl_context *ctx,
> >
> >      st_validate_state(st);
> >
> > +   /* Make sure bitmap rendering has landed in the read framebuffer */
> 
> Or the draw framebuffer, right?

Right.  I was thinking that it only matters for the read buffer, since that's
the source.  But if glBitmap() calls targeting the destination buffer are
flushed after the blit, the rendering will happen in the wrong order. 
 
I'll change the comment to say "framebuffers"

> > +   st_flush_bitmap_cache(st);
> > +
> >      clip.srcX0 = srcX0;
> >      clip.srcY0 = srcY0;
> >      clip.srcX1 = srcX1;
> >
> 
> Reviewed-by: Brian Paul <brianp at vmware.com>
> 
> 


More information about the mesa-dev mailing list