[Mesa-dev] RFC: gallium-newclear branch

Roland Scheidegger sroland at vmware.com
Sat Jun 5 08:10:24 PDT 2010


On 04.06.2010 22:08, Patrice Mandin wrote:
> Hello,
> 
> progs/trivial/tri just segfaults now, because it does not setup a
> context with depth/stencil, and src/gallium/auxiliary/util/u_clear.h
> does not check if
> 
> struct pipe_surface *ps = framebuffer->zsbuf;
> 
> is NULL or not before calling pipe->clear_depth_stencil()

Ok this should be fixed now, made a mistake in st/mesa.
As for checking for null surfaces, the code didn't do it before and it
doesn't do it now, the expectation probably being that state trackers
won't try to clear nonexisting surfaces. I'm not sure though this is
actually correct and there is a formal requirement this shouldn't be
allowed, maybe driver code should be modified to handle this instead,
but at least the mesa state tracker tries really not to do this.
In any case, we should probably specify somewhere if this is allowed or
not at the interface level.

Roland


More information about the mesa-dev mailing list