summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nouveau/nouveau_context.h
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-03-01 15:28:26 +1000
committerBen Skeggs <bskeggs@redhat.com>2011-03-01 17:23:31 +1000
commit1ba8e9510812f155359d380bda6876cdee5ba21e (patch)
treeed88f07edf5da16df482e1a3c35f5675f9ab7e2b /src/gallium/drivers/nouveau/nouveau_context.h
parent96d57722fda62e7710eb5281bcf014ddfb824ef9 (diff)
nouveau: ensure vbo_dirty is set when buffer write transfer complete
This introduces a shared nouveau_context struct to track such things. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'src/gallium/drivers/nouveau/nouveau_context.h')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_context.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_context.h b/src/gallium/drivers/nouveau/nouveau_context.h
new file mode 100644
index 0000000000..696e0d3f24
--- /dev/null
+++ b/src/gallium/drivers/nouveau/nouveau_context.h
@@ -0,0 +1,26 @@
+#ifndef __NOUVEAU_CONTEXT_H__
+#define __NOUVEAU_CONTEXT_H__
+
+#include "pipe/p_context.h"
+
+struct nouveau_context {
+ struct pipe_context pipe;
+ struct nouveau_screen *screen;
+
+ boolean vbo_dirty;
+
+ void (*copy_data)(struct nouveau_context *,
+ struct nouveau_bo *dst, unsigned, unsigned,
+ struct nouveau_bo *src, unsigned, unsigned, unsigned);
+ void (*push_data)(struct nouveau_context *,
+ struct nouveau_bo *dst, unsigned, unsigned,
+ unsigned, void *);
+};
+
+static INLINE struct nouveau_context *
+nouveau_context(struct pipe_context *pipe)
+{
+ return (struct nouveau_context *)pipe;
+}
+
+#endif