[Mesa-dev] RFC: gallium-newclear branch

Keith Whitwell keithw at vmware.com
Mon Jun 7 06:19:11 PDT 2010


On Sat, 2010-06-05 at 08:10 -0700, Roland Scheidegger wrote:
> 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.

Correct -- the design is that error checking is done in the state
tracker and the driver should be able to assume a sane set of inputs.

>  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.

The statetracker should only make valid requests of the driver.

Keith



More information about the mesa-dev mailing list