summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.h
blob: fccc349b836615a161fcb1eecd89ee2fe2c06369 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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