Sean D'Epagnier wrote:
> Hi, I got the latest sources last night, and recompiled linux-fbdev.
> I found that there was an undefined reference to _mesa_notifyDestroy.
>
> I looked at the older code, and it was a nop anyway, so I just deleted the
> call
> from glfbdev.c
>
> I realized later that I must be missing something.
>
> Whenever a glfbdev program exits, it prints this:
>
> main/framebuffer.c:183: _mesa_free_framebuffer_data: Assertion `fb->RefCount
> == 0' failed.
>
>
>
> I added the following code to "glFBDevDestroyContext" to try to fix the
> problem. I found it in the glx driver:
>
> GLcontext *mesaCtx = &context->glcontext;
>
> _swsetup_DestroyContext( mesaCtx );
> _swrast_DestroyContext( mesaCtx );
> _tnl_DestroyContext( mesaCtx );
> _vbo_DestroyContext( mesaCtx );
>
> It seemed to have no effect, is it good or bad to have this code?
Those changes are correct.
> I thought someone might have a guess at what is causing this problem since
> it's
> a somewhat recent change. Right now all glfbdev applications exit abnormally,
> but otherwise seem to run fine.
Can you try this patch:
diff --git a/src/mesa/drivers/fbdev/glfbdev.c
b/src/mesa/drivers/fbdev/glfbdev.c
index 0ece386..6fdcdd1 100644
--- a/src/mesa/drivers/fbdev/glfbdev.c
+++ b/src/mesa/drivers/fbdev/glfbdev.c
@@ -682,9 +682,16 @@ glFBDevDestroyBuffer( GLFBDevBufferPtr buffer )
if (buffer == curDraw || buffer == curRead) {
glFBDevMakeCurrent( NULL, NULL, NULL);
}
+#if 0
/* free the software depth, stencil, accum buffers */
_mesa_free_framebuffer_data(&buffer->glframebuffer);
_mesa_free(buffer);
+#else
+ {
+ struct gl_framebuffer *fb = &buffer->glframebuffer;
+ _mesa_unreference_framebuffer(&fb);
+ }
+#endif
}
}
-Brian
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev