summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nv50/nv50_screen.h
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-05-08 00:15:22 -0400
committerIlia Mirkin <[email protected]>2015-05-09 13:36:23 -0400
commitf617029db3f8786d94c64f1a73c42b89b6d261fa (patch)
treee5bc89c2d03d0850b51f403526ab27060392e8a2 /src/gallium/drivers/nouveau/nv50/nv50_screen.h
parentd6fb155f30ac2bd7853da32ddf99e9f7840a8f01 (diff)
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 <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> Tested-by: Matteo Bruni <[email protected]> Cc: [email protected]
Diffstat (limited to 'src/gallium/drivers/nouveau/nv50/nv50_screen.h')
-rw-r--r--src/gallium/drivers/nouveau/nv50/nv50_screen.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.h b/src/gallium/drivers/nouveau/nv50/nv50_screen.h
index f8ce365135a..881051b1862 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_screen.h
+++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.h
@@ -25,10 +25,34 @@ struct nv50_context;
struct nv50_blitter;
+struct nv50_graph_state {
+ uint32_t instance_elts; /* bitmask of per-instance elements */
+ uint32_t instance_base;
+ uint32_t interpolant_ctrl;
+ uint32_t semantic_color;
+ uint32_t semantic_psize;
+ int32_t index_bias;
+ boolean uniform_buffer_bound[3];
+ boolean prim_restart;
+ boolean point_sprite;
+ boolean rt_serialize;
+ boolean flushed;
+ boolean rasterizer_discard;
+ uint8_t tls_required;
+ boolean new_tls_space;
+ uint8_t num_vtxbufs;
+ uint8_t num_vtxelts;
+ uint8_t num_textures[3];
+ uint8_t num_samplers[3];
+ uint8_t prim_size;
+ uint16_t scissor;
+};
+
struct nv50_screen {
struct nouveau_screen base;
struct nv50_context *cur_ctx;
+ struct nv50_graph_state save_state;
struct nouveau_bo *code;
struct nouveau_bo *uniforms;