summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv30/nv30_context.h
diff options
context:
space:
mode:
authorPatrice Mandin <pmandin@caramail.com>2008-06-20 22:19:22 +0200
committerPatrice Mandin <pmandin@caramail.com>2008-06-20 22:19:22 +0200
commit5e1d657d50c247d903b865572bd3e74048e8a8f1 (patch)
tree7e135b477baa38764fb938af23707bbba101ca90 /src/gallium/drivers/nv30/nv30_context.h
parentd785a0c8b2ff45d07a8d2992d089eb96c04658db (diff)
nv30: Add separate nv30 state stuff for fb, based on nv40 one, need to use it now
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);