OSDN Git Service

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)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 3 Jun 2015 11:28:58 +0000 (12:28 +0100)
commit07aa6d78bbc9639dd7bbc86bbb375aae1103ddfd
treebf497503c9cf094ea510885a62963725690694d8
parent70816a66d5431db37cb6207efe6439b895746d16
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>
(cherry picked from commit aba3392541f38f82e3ebde251fdcca78e90adbf3)
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