nouveau: reindent nouveau_buffers.h
[mesa.git] / src / mesa / drivers / dri / nouveau / nouveau_buffers.h
1 #ifndef __NOUVEAU_BUFFERS_H__
2 #define __NOUVEAU_BUFFERS_H__
3
4 #include <stdint.h>
5 #include "mtypes.h"
6 #include "utils.h"
7 #include "renderbuffer.h"
8
9 typedef struct nouveau_mem_t {
10 int type;
11 uint64_t offset;
12 uint64_t size;
13 void *map;
14 } nouveau_mem;
15
16 extern nouveau_mem *nouveau_mem_alloc(GLcontext *, uint32_t flags,
17 GLuint size, GLuint align);
18 extern void nouveau_mem_free(GLcontext *, nouveau_mem *);
19 extern uint32_t nouveau_mem_gpu_offset_get(GLcontext *, nouveau_mem *);
20
21 extern GLboolean nouveau_memformat_flat_emit(GLcontext *,
22 nouveau_mem *dst,
23 nouveau_mem *src,
24 GLuint dst_offset,
25 GLuint src_offset,
26 GLuint size);
27
28 typedef struct nouveau_renderbuffer_t {
29 struct gl_renderbuffer mesa; /* must be first! */
30 __DRIdrawablePrivate *dPriv;
31
32 nouveau_mem *mem;
33 void *map;
34
35 int cpp;
36 uint32_t offset;
37 uint32_t pitch;
38 } nouveau_renderbuffer;
39
40 extern nouveau_renderbuffer *nouveau_renderbuffer_new(GLenum internalFormat,
41 GLvoid *map,
42 GLuint offset,
43 GLuint pitch,
44 __DRIdrawablePrivate *);
45 extern void nouveau_window_moved(GLcontext *);
46 extern GLboolean nouveau_build_framebuffer(GLcontext *,
47 struct gl_framebuffer *);
48 extern nouveau_renderbuffer *nouveau_current_draw_buffer(GLcontext *);
49
50 extern void nouveauInitBufferFuncs(struct dd_function_table *);
51
52 #endif