summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv30/nv30_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/nv30/nv30_context.h')
-rw-r--r--src/gallium/drivers/nv30/nv30_context.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv30/nv30_context.h b/src/gallium/drivers/nv30/nv30_context.h
index 333bd4875c..9fbe66dc74 100644
--- a/src/gallium/drivers/nv30/nv30_context.h
+++ b/src/gallium/drivers/nv30/nv30_context.h
@@ -76,6 +76,10 @@ enum nv30_state_index {
#define NV30_NEW_ARRAYS (1 << 11)
#define NV30_NEW_UCP (1 << 12)
+struct nv30_state {
+ struct nouveau_stateobj *hw[NV30_STATE_MAX];
+};
+
struct nv30_context {
struct pipe_context pipe;
@@ -85,6 +89,9 @@ struct nv30_context {
struct draw_context *draw;
+ /* HW state derived from pipe states */
+ struct nv30_state state;
+
uint32_t dirty;
struct nv30_sampler_state *tex_sampler[PIPE_MAX_SAMPLERS];
@@ -93,6 +100,9 @@ struct nv30_context {
unsigned fp_samplers;
unsigned vp_samplers;
+ /* Context state */
+ struct pipe_framebuffer_state framebuffer;
+
uint32_t rt_enable;
struct pipe_buffer *rt[2];
struct pipe_buffer *zeta;
@@ -132,6 +142,14 @@ nv30_context(struct pipe_context *pipe)
return (struct nv30_context *)pipe;
}
+struct nv30_state_entry {
+ boolean (*validate)(struct nv30_context *nv30);
+ struct {
+ unsigned pipe;
+ unsigned hw;
+ } dirty;
+};
+
extern void nv30_init_state_functions(struct nv30_context *nv30);
extern void nv30_init_surface_functions(struct nv30_context *nv30);
extern void nv30_init_query_functions(struct nv30_context *nv30);