On Wed, 2009-04-01 at 22:15 -0700, Ian Romanick wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Eric Anholt wrote: > > On Wed, 2009-04-01 at 18:30 -0700, Ian Romanick wrote: > >> Track whether or not front-buffer rendering may have occured. If > >> there might be any pending front-buffer rendering waiting to get to > >> the screen, flush it from glFlush and related paths in the driver. > >> > >> Signed-off-by: Ian Romanick <ian.d.roman...@intel.com> > >> --- > >> src/mesa/drivers/dri/intel/intel_buffers.c | 2 ++ > >> src/mesa/drivers/dri/intel/intel_context.c | 11 +++++++++++ > >> src/mesa/drivers/dri/intel/intel_context.h | 10 ++++++++++ > >> 3 files changed, 23 insertions(+), 0 deletions(-) > >> > >> diff --git a/src/mesa/drivers/dri/intel/intel_buffers.c > >> b/src/mesa/drivers/dri/intel/intel_buffers.c > >> index f1908cb..26dd818 100644 > >> --- a/src/mesa/drivers/dri/intel/intel_buffers.c > >> +++ b/src/mesa/drivers/dri/intel/intel_buffers.c > >> @@ -204,6 +204,8 @@ intel_draw_buffer(GLcontext * ctx, struct > >> gl_framebuffer *fb) > >> intel_batchbuffer_flush(intel->batch); > >> intel->front_cliprects = GL_TRUE; > >> colorRegions[0] = intel_get_rb_region(fb, BUFFER_FRONT_LEFT); > >> + > >> + intel->front_buffer_dirty = GL_TRUE; > > > > Why is DrawBuffers the right place for this? It looks like some > > triangles, then glFlush, then some triangles, then glFlush, the last set > > of triangles wouldn't show up. > > /me puts a paper bag over his head. > > My goal was to set the bit in as few places as possible. I don't really > care if we do extra flushes. I want to avoid setting the bit in 47 > different places and missing one. > > I think setting the flag in DrawBuffers and only clearing it in > intelFlush when the draw buffer is no long GL_FRONT is the right way to > accomplish this. Thoughts?
It means people doing glFlush with front buffer rendering get punished if they flush without having rendered. Seems fine to me. -- Eric Anholt e...@anholt.net eric.anh...@intel.com
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------------
_______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev