Summary: | [r300g] tiling / texture transfer crash in World of Warcraft | ||
---|---|---|---|
Product: | Mesa | Reporter: | Chris Rankin <rankincj> |
Component: | Drivers/DRI/r300 | Assignee: | Default DRI bug account <dri-devel> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | ||
Version: | git | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Recent backtrace using mesa git with -gdwarf-2 |
Description
Chris Rankin
2010-06-20 15:21:44 UTC
I'm not a developer, but you may try recompiling mesa and wine with CFLAGS="-g -gdwarf-2", you will get a better backtrace. Created attachment 36584 [details]
Recent backtrace using mesa git with -gdwarf-2
In src/gallium/drivers/r300/r300_context.c static void r300_flush_cb(void *data) { struct r300_context* const cs_context_copy = data; cs_context_copy->context.flush(&cs_context_copy->context, 0, NULL); } The crash happens when the context.flush function pointer does not contain a valid value. I believe the "data" pointer is not valid. I have committed some fixes, can you please test latest mesa git? (In reply to comment #4) > I have committed some fixes, can you please test latest mesa git? Backtrace: =>0 0x00000000 (0x0039e9d0) 1 0x7dd5b61d radeon_drm_bufmgr_set_tiling+0xbc() in r300_dri.so (0x0039e9d0) 2 0x7dd6c1f2 r300_flush_cb+0x21(data=0x7d0fcce8) [/home/chris/Programs/mesa/src/gallium/drivers/r300/r300_context.c:128] in r300_dri.so (0x0039ea00) 3 0x7dd5b61d radeon_drm_bufmgr_set_tiling+0xbc() in r300_dri.so (0x0039ea00) 4 0x7d0fcce8 (0x0039ea20) 5 0x7dd7652e r300_set_framebuffer_state+0x16d(pipe=0x7bacf7f8, state=(nil)) [/home/chris/Programs/mesa/src/gallium/drivers/r300/r300_state.c:625] in r300_dri.so (0x0039ea20) ... Nope, exactly the same crash as before. (In reply to comment #4) > I believe the "data" pointer is not valid. Or possibly the context.flush field has not been assigned? I am having curious success with this simple patch: --- a/src/gallium/drivers/r300/r300_context.c +++ b/src/gallium/drivers/r300/r300_context.c @@ -125,7 +125,9 @@ static void r300_flush_cb(void *data) { struct r300_context* const cs_context_copy = data; - cs_context_copy->context.flush(&cs_context_copy->context, 0, NULL); + if (cs_context_copy->context.flush) { + cs_context_copy->context.flush(&cs_context_copy->context, 0, NULL); + } } #define R300_INIT_ATOM(atomname, atomsize) \ (In reply to comment #4) > I believe the "data" pointer is not valid. That data pointer looks like it *used* to belong to a r300_context object that has since been destroyed. Basically, r300_create_context() stores a reference to the newly-created r300_context object inside the radeon_libdrm_winsys struct: rws->set_flush_cb(r300->rws, r300_flush_cb, r300); Warcraft then destroys the context again, but this reference inside the winsys lingers somehow. And then Azeroth explodes when radeon_drm_bufmgr_set_tiling() tries to flush the buffer data. I think you are right. That seems to be the only logical explanation. The fix is not trivial, I'll send you a patch when I have one. OK so I've committed some fixes because they don't break anything. Please let me know if they help. PS: There is a new bug in the GLSL compiler in master. I hope you won't hit that. (In reply to comment #9) > OK so I've committed some fixes because they don't break anything. Please let > me know if they help. Yes, that seems to have fixed it. Thanks. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.