Thomas & Jose, I think you are most familiar with this code...

The attached patch fixes a bug I found with softpipe and 
glDrawPixels(GL_STENCIL_INDEX).

The failing case was basically:

glClear(GL_STENCIL_BUFFER_BIT);
...
glDrawPixels(GL_STENCIL_INDEX).

Drawing stencil images is done by mapping the stencil buffer, writing 
the stencil values then unmapping the stencil buffer.

With softpipe, a glClear() call just sets tile 'clear' flags; it 
doesn't actually write to the framebuffer.

So when we mapped the stencil buffer to do the glDrawPixels we weren't 
getting the glClear()'d values.  Later, the tile cache was getting 
flushed and that would overwrite the glDrawPixels() values.

The attached patch flushes the driver's render cache when we get a 
pipe_transfer object.  Also, I think the 
PIPE_TEXTURE_USAGE_RENDER_TARGET flag needs to be set on the z/stencil 
buffer (since we do render to it).

-Brian


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to