summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.h
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2006-12-27 23:30:34 +1100
committerBen Skeggs <[email protected]>2006-12-27 23:53:25 +1100
commit9a20ae70ecda2e78ea6b52c3fd829d283434c1ad (patch)
tree5921bc7dbaaadc623daeb0653529acdf1c9ca21b /src/mesa/drivers/dri/nouveau/nouveau_bufferobj.h
parent1780fd4eeeef2358e929c23cfae2c348cb4a709e (diff)
nouveau: Initial buffer object support
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nouveau_bufferobj.h')
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_bufferobj.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.h b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.h
new file mode 100644
index 00000000000..fccc349b836
--- /dev/null
+++ b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.h
@@ -0,0 +1,27 @@
+#ifndef __NOUVEAU_BUFFEROBJ_H__
+#define __NOUVEAU_BUFFEROBJ_H__
+
+#include "mtypes.h"
+#include "nouveau_buffers.h"
+
+typedef struct nouveau_buffer_object_t {
+ /* Base class, must be first */
+ struct gl_buffer_object mesa;
+
+ /* Memory used for GPU access to the buffer*/
+ nouveau_mem * gpu_mem;
+ /* Buffer has been dirtied by the GPU */
+ GLboolean gpu_dirty;
+
+ /* Memory used for CPU access to the buffer */
+ nouveau_mem * cpu_mem;
+ /* Buffer has possibly been dirtied by the CPU */
+ GLboolean cpu_dirty;
+} nouveau_buffer_object;
+
+extern uint32_t nouveau_bufferobj_gpu_ref(GLcontext *ctx, GLenum access,
+ struct gl_buffer_object *obj);
+
+extern void nouveauInitBufferObjects(GLcontext *ctx);
+
+#endif