mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
more tex obj ref count debugging (temporary)
This commit is contained in:
parent
08f7fb45ef
commit
88273e08b4
2 changed files with 15 additions and 1 deletions
|
|
@ -342,6 +342,10 @@ _mesa_PushAttrib(GLbitfield mask)
|
|||
/* Bump the texture object reference counts so that they don't
|
||||
* inadvertantly get deleted.
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
printf("MESA PUSH TEX ATTRIB, INCR REF COUNT BY %d\n", ctx->Const.MaxTextureUnits);
|
||||
#endif
|
||||
|
||||
for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
|
||||
ctx->Texture.Unit[u].Current1D->RefCount++;
|
||||
ctx->Texture.Unit[u].Current2D->RefCount++;
|
||||
|
|
@ -793,6 +797,9 @@ pop_texture_group(GLcontext *ctx, const struct gl_texture_attrib *texAttrib)
|
|||
* wouldn't inadvertantly get deleted while they were still referenced
|
||||
* inside the attribute state stack.
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
printf("MESA POP TEX ATTRIB, DECR REF COUNT BY %d\n", ctx->Const.MaxTextureUnits);
|
||||
#endif
|
||||
for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
|
||||
ctx->Texture.Unit[u].Current1D->RefCount--;
|
||||
ctx->Texture.Unit[u].Current2D->RefCount--;
|
||||
|
|
|
|||
|
|
@ -562,7 +562,8 @@ delete_texture_cb(GLuint id, void *data, void *userData)
|
|||
struct gl_texture_object *texObj = (struct gl_texture_object *) data;
|
||||
GLcontext *ctx = (GLcontext *) userData;
|
||||
#ifdef DEBUG
|
||||
printf("MESA TEX DELETE %p (%u) from DestroyContext\n", texObj, texObj->Name);
|
||||
printf("MESA TEX DELETE %p (%u) from DestroyContext\n",
|
||||
(void *) texObj, texObj->Name);
|
||||
#endif
|
||||
ctx->Driver.DeleteTexture(ctx, texObj);
|
||||
}
|
||||
|
|
@ -1191,6 +1192,12 @@ _mesa_free_context_data( GLcontext *ctx )
|
|||
_mesa_make_current(ctx, NULL, NULL);
|
||||
}
|
||||
|
||||
if (ctx->AttribStackDepth > 0) {
|
||||
#ifdef DEBUG
|
||||
printf("MESA: DESTROY CONTEXT WITH NON-EMPTRY ATTRIB STACK!\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
/* unreference WinSysDraw/Read buffers */
|
||||
_mesa_unreference_framebuffer(&ctx->WinSysDrawBuffer);
|
||||
_mesa_unreference_framebuffer(&ctx->WinSysReadBuffer);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue