PKGBUILDs/extra/libgl/7.4-branch.patch
2009-09-26 09:35:50 -05:00

137 lines
4.7 KiB
Diff

From b5eafa2d51855b8fb3f36378a5478374daca28a7 Mon Sep 17 00:00:00 2001
From: Aidan Thornton <makosoft@googlemail.com>
Date: Mon, 18 May 2009 10:47:00 +0000
Subject: Initialize psp->waitX/waitGL for swrast_dri.so.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21053 .
(cherry picked from commit f2445dfd85b42aafe0634e17b2929b4122ff3f03)
---
diff --git a/src/glx/x11/drisw_glx.c b/src/glx/x11/drisw_glx.c
index 5e3d763..b843ce4 100644
--- a/src/glx/x11/drisw_glx.c
+++ b/src/glx/x11/drisw_glx.c
@@ -405,6 +405,8 @@ driCreateScreen(__GLXscreenConfigs * psc, int screen,
psp->createContext = driCreateContext;
psp->createDrawable = driCreateDrawable;
psp->swapBuffers = driSwapBuffers;
+ psp->waitX = NULL;
+ psp->waitGL = NULL;
return psp;
--
cgit v0.8.2
From 46a2aad2cfec0ae54bc1a3ba5aacf6f59065d64b Mon Sep 17 00:00:00 2001
From: Brian Paul <brianp@vmware.com>
Date: Tue, 19 May 2009 15:03:19 +0000
Subject: mesa: fix texture object reference counting in texture_override()
Fixes bug 21756: r200: Mesa-7.4.2 release regression: "Quit on exit".
---
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 348a2d9..efff065 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -429,7 +429,7 @@ texture_override(GLcontext *ctx,
}
if (texObj->_Complete) {
texUnit->_ReallyEnabled = textureBit;
- texUnit->_Current = texObj;
+ _mesa_reference_texobj(&texUnit->_Current, texObj);
update_texture_compare_function(ctx, texObj);
}
}
--
cgit v0.8.2
From 3ed7e9bfcc7f013518a8d56844b78fb1993687f7 Mon Sep 17 00:00:00 2001
From: Brian Paul <brianp@vmware.com>
Date: Tue, 19 May 2009 16:02:55 +0000
Subject: mesa: assign trb->Base.StencilBits in update_wrapper().
When we render to a depth/stencil texture there are stencil bits.
(cherry picked from commit c99a60c40d4ece363d37a5af895124f08a645c6b)
---
diff --git a/src/mesa/main/texrender.c b/src/mesa/main/texrender.c
index 49de6f5..cc74d58 100644
--- a/src/mesa/main/texrender.c
+++ b/src/mesa/main/texrender.c
@@ -507,6 +507,7 @@ update_wrapper(GLcontext *ctx, const struct gl_renderbuffer_attachment *att)
trb->Base.BlueBits = trb->TexImage->TexFormat->BlueBits;
trb->Base.AlphaBits = trb->TexImage->TexFormat->AlphaBits;
trb->Base.DepthBits = trb->TexImage->TexFormat->DepthBits;
+ trb->Base.StencilBits = trb->TexImage->TexFormat->StencilBits;
}
--
cgit v0.8.2
From 63d1e89138fca3e04896392a9f62e04ee88249fe Mon Sep 17 00:00:00 2001
From: Brian Paul <brianp@vmware.com>
Date: Tue, 19 May 2009 16:04:17 +0000
Subject: mesa: allow depth/stencil textures to be attached to GL_STENCIL_ATTACHMENT
See sourceforge bug #2793846.
(cherry picked from commit 042d9a513213b1fa356c0d80abc62b9327e0bcc2)
---
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 876d691..5a7ba45 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -323,6 +323,7 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
/* OK */
}
else if (ctx->Extensions.EXT_packed_depth_stencil &&
+ ctx->Extensions.ARB_depth_texture &&
texImage->TexFormat->BaseFormat == GL_DEPTH_STENCIL_EXT) {
/* OK */
}
@@ -332,9 +333,18 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
}
}
else {
- /* no such thing as stencil textures */
- att->Complete = GL_FALSE;
- return;
+ ASSERT(format == GL_STENCIL);
+ ASSERT(att->Renderbuffer->StencilBits);
+ if (ctx->Extensions.EXT_packed_depth_stencil &&
+ ctx->Extensions.ARB_depth_texture &&
+ att->Renderbuffer->_BaseFormat == GL_DEPTH_STENCIL_EXT) {
+ /* OK */
+ }
+ else {
+ /* no such thing as stencil-only textures */
+ att->Complete = GL_FALSE;
+ return;
+ }
}
}
else if (att->Type == GL_RENDERBUFFER_EXT) {
--
cgit v0.8.2
From 35f5222ae0a16e0ac275110b6cbbbd13f74fd101 Mon Sep 17 00:00:00 2001
From: Brian Paul <brianp@vmware.com>
Date: Wed, 20 May 2009 14:14:45 +0000
Subject: mesa: remove texUnit->_Current = NULL assignment
A follow-on to commit 46a2aad2cfec0ae54bc1a3ba5aacf6f59065d64b which
fixes a texture object memory leak.
See bug 21756.
---
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index efff065..71851e1 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -485,7 +485,6 @@ update_texture_state( GLcontext *ctx )
GLbitfield enableBits;
GLuint tex;
- texUnit->_Current = NULL;
texUnit->_ReallyEnabled = 0;
texUnit->_GenFlags = 0;
--
cgit v0.8.2