nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
drm_nouveau_mem_free_t memf;
+ if (NOUVEAU_DEBUG & DEBUG_MEM) {
+ fprintf(stderr, "%s: type=0x%x, offset=0x%x, size=0x%x\n",
+ __func__, mem->type, (GLuint)mem->offset, (GLuint)mem->size);
+ }
+
if (mem->map)
drmUnmap(mem->map, mem->size);
memf.flags = mem->type;
nouveau_mem *mem;
int ret;
+ if (NOUVEAU_DEBUG & DEBUG_MEM) {
+ fprintf(stderr, "%s: requested: type=0x%x, size=0x%x, align=0x%x\n",
+ __func__, type, (GLuint)size, align);
+ }
+
mem = CALLOC(sizeof(nouveau_mem));
if (!mem)
return NULL;
mem->offset = mema.region_offset;
mem->type = mema.flags;
+ if (NOUVEAU_DEBUG & DEBUG_MEM) {
+ fprintf(stderr, "%s: actual: type=0x%x, offset=0x%x, size=0x%x\n",
+ __func__, mem->type, (GLuint)mem->offset, (GLuint)mem->size);
+ }
+
if (type & NOUVEAU_MEM_MAPPED)
ret = drmMap(nmesa->driFd, mem->offset, mem->size, &mem->map);
if (ret) {
static const struct dri_debug_control debug_control[] =
{
- { "shaders", DEBUG_SHADERS },
- { NULL, 0 }
+ { "shaders" , DEBUG_SHADERS },
+ { "mem" , DEBUG_MEM },
+ { NULL , 0 }
};
#define need_GL_ARB_vertex_program