From: Ben Skeggs Date: Wed, 27 Dec 2006 04:39:52 +0000 (+1100) Subject: nouveau: record *actual* type of memory that was alloc'd, not the requested types. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2dd37534506e85351fb114c79fd6c994a9c355c0;p=mesa.git nouveau: record *actual* type of memory that was alloc'd, not the requested types. --- 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 {