diff options
author | Ben Skeggs <[email protected]> | 2007-08-13 17:21:02 +1000 |
---|---|---|
committer | Ben Skeggs <[email protected]> | 2007-08-15 14:31:25 +1000 |
commit | 40e8ce700b0e1711e08e9f33c297d495c43598b1 (patch) | |
tree | 13f860db820e5f58e1fa09abfe9b1c662c4eaa0d /src | |
parent | 386a70eeb5982976239a2d37b63cde307cfbc22c (diff) |
nouveau: reindent nouveau_buffers.h
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_buffers.c | 15 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_buffers.h | 50 |
2 files changed, 34 insertions, 31 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c index 5c5c7932bb2..7cf739fe47b 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c @@ -89,7 +89,7 @@ void nouveau_mem_free(GLcontext * ctx, nouveau_mem * mem) FREE(mem); } -nouveau_mem *nouveau_mem_alloc(GLcontext * ctx, int type, GLuint size, +nouveau_mem *nouveau_mem_alloc(GLcontext *ctx, uint32_t flags, GLuint size, GLuint align) { nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx); @@ -99,15 +99,15 @@ nouveau_mem *nouveau_mem_alloc(GLcontext * ctx, int type, GLuint size, if (NOUVEAU_DEBUG & DEBUG_MEM) { fprintf(stderr, - "%s: requested: type=0x%x, size=0x%x, align=0x%x\n", - __func__, type, (GLuint) size, align); + "%s: requested: flags=0x%x, size=0x%x, align=0x%x\n", + __func__, flags, (GLuint) size, align); } mem = CALLOC(sizeof(nouveau_mem)); if (!mem) return NULL; - mema.flags = type; + mema.flags = flags; mema.size = mem->size = size; mema.alignment = align; mem->map = NULL; @@ -127,10 +127,9 @@ nouveau_mem *nouveau_mem_alloc(GLcontext * ctx, int type, GLuint size, (GLuint) mem->size); } - if (type & NOUVEAU_MEM_MAPPED) - ret = - drmMap(nmesa->driFd, mema.map_handle, mem->size, - &mem->map); + if (flags & NOUVEAU_MEM_MAPPED) + ret = drmMap(nmesa->driFd, mema.map_handle, mem->size, + &mem->map); if (ret) { mem->map = NULL; nouveau_mem_free(ctx, mem); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_buffers.h b/src/mesa/drivers/dri/nouveau/nouveau_buffers.h index d86455184c2..f0987d2aa7d 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_buffers.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_buffers.h @@ -7,42 +7,46 @@ #include "renderbuffer.h" typedef struct nouveau_mem_t { - int type; - uint64_t offset; - uint64_t size; - void* map; + int type; + uint64_t offset; + uint64_t size; + void *map; } nouveau_mem; -extern nouveau_mem *nouveau_mem_alloc(GLcontext *ctx, int type, - GLuint size, GLuint align); -extern void nouveau_mem_free(GLcontext *ctx, nouveau_mem *mem); -extern uint32_t nouveau_mem_gpu_offset_get(GLcontext *ctx, nouveau_mem *mem); +extern nouveau_mem *nouveau_mem_alloc(GLcontext *, uint32_t flags, + GLuint size, GLuint align); +extern void nouveau_mem_free(GLcontext *, nouveau_mem *); +extern uint32_t nouveau_mem_gpu_offset_get(GLcontext *, nouveau_mem *); -extern GLboolean nouveau_memformat_flat_emit(GLcontext *ctx, - nouveau_mem *dst, +extern GLboolean nouveau_memformat_flat_emit(GLcontext *, + nouveau_mem *dst, nouveau_mem *src, GLuint dst_offset, GLuint src_offset, GLuint size); typedef struct nouveau_renderbuffer_t { - struct gl_renderbuffer mesa; /* must be first! */ - __DRIdrawablePrivate *dPriv; + struct gl_renderbuffer mesa; /* must be first! */ + __DRIdrawablePrivate *dPriv; - nouveau_mem *mem; - void * map; + nouveau_mem *mem; + void *map; - int cpp; - uint32_t offset; - uint32_t pitch; + int cpp; + uint32_t offset; + uint32_t pitch; } nouveau_renderbuffer; extern nouveau_renderbuffer *nouveau_renderbuffer_new(GLenum internalFormat, - GLvoid *map, GLuint offset, GLuint pitch, __DRIdrawablePrivate *dPriv); -extern void nouveau_window_moved(GLcontext *ctx); -extern GLboolean nouveau_build_framebuffer(GLcontext *, struct gl_framebuffer *); -extern nouveau_renderbuffer *nouveau_current_draw_buffer(GLcontext *ctx); - -extern void nouveauInitBufferFuncs(struct dd_function_table *func); + GLvoid *map, + GLuint offset, + GLuint pitch, + __DRIdrawablePrivate *); +extern void nouveau_window_moved(GLcontext *); +extern GLboolean nouveau_build_framebuffer(GLcontext *, + struct gl_framebuffer *); +extern nouveau_renderbuffer *nouveau_current_draw_buffer(GLcontext *); + +extern void nouveauInitBufferFuncs(struct dd_function_table *); #endif |