OSDN Git Service

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)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 20 May 2015 21:04:45 +0000 (22:04 +0100)
commit113e2bd73269864b08536fee9e7147718dfd7c07
treed19e080298ea948f60fe8c62b9eac9f14e6b035c
parente63d65b23599fd5e65107d2e1a8bebea1d493bee
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
(cherry picked from commit f617029db3f8786d94c64f1a73c42b89b6d261fa)
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