nv30: avoid doing extra work on clear and hitting unexpected states
authorIlia Mirkin <imirkin@alum.mit.edu>
Thu, 5 Mar 2015 17:10:15 +0000 (12:10 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sun, 24 May 2015 16:00:03 +0000 (12:00 -0400)
commitaba3392541f38f82e3ebde251fdcca78e90adbf3
treed21943249b5e1c53d8e3a7e80407891df2387a2b
parent207ae2b0efcdb48a39fd91b05181c7e6d81e5002
nv30: avoid doing extra work on clear and hitting unexpected states

Clearing can happen at a time when various state objects are incoherent
and not ready for a draw. Some of the validation functions don't handle
this well, so only flush the framebuffer state. This has the advantage
of also not doing extra work.

This works around some crashes that can happen when clearing.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
src/gallium/drivers/nouveau/nv30/nv30_clear.c
src/gallium/drivers/nouveau/nv30/nv30_context.h
src/gallium/drivers/nouveau/nv30/nv30_draw.c
src/gallium/drivers/nouveau/nv30/nv30_state_validate.c
src/gallium/drivers/nouveau/nv30/nv30_vbo.c