[prev in list] [next in list] [prev in thread] [next in thread]
List: dri-devel
Subject: [Bug 12241] With the game trackballs large parts get rendered black
From: bugzilla-daemon () freedesktop ! org
Date: 2007-08-31 21:41:46
Message-ID: 20070831214147.4C8E3130070 () annarchy ! freedesktop ! org
[Download RAW message or body]
http://bugs.freedesktop.org/show_bug.cgi?id=12241
------- Comment #1 from brian.paul@tungstengraphics.com 2007-08-31 14:41 PST -------
First, you'll want to rebuild Mesa from sources in debug mode (make
linux-dri-debug).
A stack trace at the time of the failed assertion could be helpful.
Otherwise, I think I can guess what's going on.
Texture objects (see struct gl_texturea_object) are reference counted. That
means anytime we assign a texture object pointer, we need to use the
_mesa_reference_texobj() function to make sure the refcounts are handled
properly.
Looking at the r300 driver, there's a few places where pointers to texture
objects are present. For example, in r300DestroyTexObj() there's:
for (i = 0; i < rmesa->radeon.glCtx->Const.MaxTextureUnits; i++) {
if (rmesa->state.texture.unit[i].texobj == t) {
rmesa->state.texture.unit[i].texobj = NULL;
}
}
That should be changed to:
for (i = 0; i < rmesa->radeon.glCtx->Const.MaxTextureUnits; i++) {
if (rmesa->state.texture.unit[i].texobj == t) {
_mesa_reference_texobj(&rmesa->state.texture.unit[i].texobj, NULL);
}
}
Another one is in r300UpdateTexture:
rmesa->state.texture.unit[unit].texobj = t;
should be:
_mesa_reference_texobj(&rmesa->state.texture.unit[unit].texobj, t);
Actually, these changes will trigger some warnings because the 'texobj' above
is a r300TexObjPtr, not a gl_texture_object *. So either add some casting or
write a wrapper for _mesa_reference_texobj() that takes r300TexObjPtr types
instead.
Once the refcounting is done properly, the problem should be fixed.
--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic