FBO / Windows software rendering: flickering due to errornous blit
Submitted by Florian Kirsch
Assigned to mes..@..op.org
Description
Created attachment 28793 Example program demonstrating the flickering
I have found a bug in the frame buffer object implementation, happening with Mesa 7.4.4 using Mesa with software rendering and Windows XP.
The problem is that most of the FBO functions, such as glBindFramebufferEXT(), in their implementation fbobject.c call ctx->Driver.Flush(ctx), which then causes wmesa_flush() in wmesa.c to do a BitBlt into the visible viewer window (when double buffering is on). This clears the window ahead of time, causing severe flickering.
The simple, attached example program - a hacked gears.c with additional glBindFramebufferEXT(...) in the draw() function - should demonstrate the flickering.
For me, it helps to just comment out all lines with ctx->Driver.Flush(ctx) in fbobject.c. FBOs then work fine in the Windows software rasterizer. For other rendering paths, I guess this is not a good fix, of course.
Attachment 28793, "Example program demonstrating the flickering":
fbobug.c