diff options
author | Ben Skeggs <[email protected]> | 2006-12-27 15:39:52 +1100 |
---|---|---|
committer | Ben Skeggs <[email protected]> | 2006-12-27 23:53:25 +1100 |
commit | 2dd37534506e85351fb114c79fd6c994a9c355c0 (patch) | |
tree | f237048a2852e8ae18797357bfed0cb4bcb6f767 | |
parent | 7b59a424b519c37b7c94e4ea8c420794c6a0eb4c (diff) |
nouveau: record *actual* type of memory that was alloc'd, not the requested types.
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_buffers.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_buffers.h | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c index 6d73e9ff518..e628dd5b3c4 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c @@ -91,7 +91,7 @@ nouveau_mem_alloc(GLcontext *ctx, int type, GLuint size, GLuint align) if (!mem) return NULL; - mema.flags = mem->type = type; + mema.flags = type; mema.size = mem->size = size; mema.alignment = align; mem->map = NULL; @@ -102,6 +102,7 @@ nouveau_mem_alloc(GLcontext *ctx, int type, GLuint size, GLuint align) return NULL; } mem->offset = mema.region_offset; + mem->type = mema.flags; if (type & NOUVEAU_MEM_MAPPED) ret = drmMap(nmesa->driFd, mem->offset, mem->size, &mem->map); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_buffers.h b/src/mesa/drivers/dri/nouveau/nouveau_buffers.h index a8d85b279bf..d86455184c2 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_buffers.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_buffers.h @@ -19,8 +19,10 @@ extern void nouveau_mem_free(GLcontext *ctx, nouveau_mem *mem); extern uint32_t nouveau_mem_gpu_offset_get(GLcontext *ctx, nouveau_mem *mem); extern GLboolean nouveau_memformat_flat_emit(GLcontext *ctx, - nouveau_mem *dst, nouveau_mem *src, - GLuint dst_offset, GLuint src_offset, + nouveau_mem *dst, + nouveau_mem *src, + GLuint dst_offset, + GLuint src_offset, GLuint size); typedef struct nouveau_renderbuffer_t { |