https://build.opensuse.org/package/view_file?file=0001-Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch&package=Mesa&project=openSUSE%3AFactory&srcmd5=be25d34ad69853c2bb21ed376061d573 diff -ru Mesa-7.10.1-orig//src/mesa/drivers/dri/swrast/swrast.c Mesa-7.10.1//src/mesa/drivers/dri/swrast/swrast.c --- Mesa-7.10.1-orig//src/mesa/drivers/dri/swrast/swrast.c 2010-12-14 22:43:15.000000000 +0100 +++ Mesa-7.10.1//src/mesa/drivers/dri/swrast/swrast.c 2011-03-07 18:08:17.062816112 +0100 @@ -61,6 +61,7 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_format, __DRIdrawable *dPriv) { + GET_CURRENT_CONTEXT(ctx); struct dri_context *dri_ctx; int x, y, w, h; __DRIscreen *sPriv = dPriv->driScreenPriv; @@ -90,6 +91,10 @@ _mesa_init_teximage_fields(&dri_ctx->Base, target, texImage, w, h, 1, 0, internalFormat, texFormat); + ctx->Driver.TexImage2D(ctx, target, 0, internalFormat, + w, h, 0, texture_format, GL_UNSIGNED_INT_8_8_8_8, + NULL, &ctx->Unpack, texObj, texImage); + sPriv->swrast_loader->getImage(dPriv, x, y, w, h, (char *)texImage->Data, dPriv->loaderPrivate);