mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +00:00
* Apply a patch to prevent the X server from segfaulting if kwin is
run with swrast_dri (e.g. with the VGA driver). (NixOS/121) svn path=/nixpkgs/branches/x-updates/; revision=26201
This commit is contained in:
parent
b813854488
commit
cf6bc1aeae
@ -14,6 +14,8 @@ stdenv.mkDerivation {
|
||||
md5 = "efe8da4d80c2a5d32a800770b8ce5dfa";
|
||||
};
|
||||
|
||||
patches = [ ./swrast-settexbuffer.patch ];
|
||||
|
||||
configureFlags =
|
||||
"--disable-gallium"
|
||||
+ stdenv.lib.optionalString (stdenv.system == "mips64-linux")
|
||||
|
24
pkgs/development/libraries/mesa/swrast-settexbuffer.patch
Normal file
24
pkgs/development/libraries/mesa/swrast-settexbuffer.patch
Normal file
@ -0,0 +1,24 @@
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user