nv50: keep track of PGRAPH state in nv50_screen
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 8 May 2015 04:15:22 +0000 (00:15 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sat, 9 May 2015 17:36:23 +0000 (13:36 -0400)
commitf617029db3f8786d94c64f1a73c42b89b6d261fa
treee5bc89c2d03d0850b51f403526ab27060392e8a2
parentd6fb155f30ac2bd7853da32ddf99e9f7840a8f01
nv50: keep track of PGRAPH state in nv50_screen

Normally this is kept in nv50_context, and on switching the active
context, the state is copied from the previous context. However when the
last context is destroyed, this is lost, and a new context might later
be created. When the currently-active context is destroyed, save its
state in the screen, and restore it when setting the current context.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90363
Reported-by: Matteo Bruni <matteo.mystral@gmail.com>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Tested-by: Matteo Bruni <matteo.mystral@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
src/gallium/drivers/nouveau/nv50/nv50_context.c
src/gallium/drivers/nouveau/nv50/nv50_context.h
src/gallium/drivers/nouveau/nv50/nv50_screen.h
src/gallium/drivers/nouveau/nv50/nv50_state_validate.c