https://bugs.freedesktop.org/show_bug.cgi?id=64791
Priority: medium Bug ID: 64791 Assignee: mesa-dev@lists.freedesktop.org Summary: swrast crashes with compiz Severity: normal Classification: Unclassified OS: All Reporter: pierre-bugzi...@ossman.eu Hardware: Other Status: NEW Version: unspecified Component: Other Product: Mesa I'm getting a crash when using the classic swrast driver together with compiz. I have no idea how this is supposed to work, but the issue is that getImage() gets called with NULL as the destination buffer. The calling function is swrastSetTexBuffer2(), and to me it looks a bit off. The function fetches the current texture image (creating one if needed), modifies the fields and then calls getImage(). At no point does it adjust the size of the buffer to match the new fields though. So I guess that happened implicitly at some point, but doesn't anymore. I applied this (in the spirit of similiar functions) and that got rid of the crash: Index: mesa/src/mesa/drivers/dri/swrast/swrast.c =================================================================== --- mesa/src/mesa/drivers/dri/swrast/swrast.c (revision 27412) +++ mesa/src/mesa/drivers/dri/swrast/swrast.c (working copy) @@ -94,9 +94,15 @@ else texFormat = MESA_FORMAT_ARGB8888; + /* Free old texture image */ + dri_ctx->Base.Driver.FreeTextureImageBuffer(&dri_ctx->Base, texImage); + _mesa_init_teximage_fields(&dri_ctx->Base, texImage, w, h, 1, 0, internalFormat, texFormat); + /* Allocate texture memory (no pixel data yet) */ + dri_ctx->Base.Driver.AllocTextureImageBuffer(&dri_ctx->Base, texImage); + sPriv->swrast_loader->getImage(dPriv, x, y, w, h, (char *)swImage->Buffer, dPriv->loaderPrivate); Unfortunately it doesn't seem to create something that actually works. -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev