Summary: | piglit glean/vertProg1 core dumps with RV790 | ||
---|---|---|---|
Product: | Mesa | Reporter: | Chris Rankin <rankincj> |
Component: | Drivers/DRI/R600 | Assignee: | Default DRI bug account <dri-devel> |
Status: | RESOLVED WORKSFORME | QA Contact: | |
Severity: | major | ||
Priority: | medium | CC: | dima |
Version: | git | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Chris Rankin
2010-03-17 15:33:06 UTC
This same bug seems to be triggered by "bin/vp-bad-program -auto". The problem happens when destroying the GLContext: - we call _mesa_free_context_data(), which sets ctx->DrawBuffer = NULL - _mesa_free_context_data() then calls _mesa_free_texture_data() - _mesa_free_texture_data() calls r600DeleteTexture() - r600DeleteTexture() calls radeonFlush() via radeon_firevertices() - radeonFlush() tries to dereference ctx->DrawBuffer, which has just been set to NULL - BANG! Adding a simple (ctx->DrawBuffer != NULL) check to radeonFlush() makes 43 of the vertProg1 piglit tests pass, with 2 failures: Program: RSQ test 2 (reciprocal square root of negative value) Expected color: -1, 0.1, 0.447, 1 Observed color: 0, 0, 0, 0 Program: LIT test 2 (degenerate case: 0 ^ 0 -> 1) Expected color: 1, 0.65, 1, 1 Observed color: 1, 0.65098, 0, 1 Patches are welcome :) You can send the fix to mesa3d-dev@lists.sourceforge.net. git commands format-patch and send-email are very easy tools to send patches to the mailing list. (In reply to comment #3) > Patches are welcome :) Actually, I would describe this as "the cause" rather than "the fix". I was hoping that someone who understands what the code *should* be doing would step in at this point. Maybe Mesa shouldn't be calling radeonFlush() in the first place here? Or maybe ctx->DrawBuffer shouldn't be unreferenced so early in the clean-up sequence? I have no intention of papering over this bug with an off-hand NULL check at this stage. I think this may have been fixed by fef9b532cd1631cc53056b9eba4369d1310b88df. For reference, the bug that patch fixes happens when a context is destroyed that's not the current context. For example because the current context has already been set to NULL. *** Bug 28260 has been marked as a duplicate of this bug. *** Note: classic r600 driver has been abandoned. all glean/vertProg1 tests pass with r600g (gallium driver) on my rv770 tested with mesa git master e81ee67b51651e99e7e8e52c1ccafc66835d57cd and mesa 8.0.4 |
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.