[mesa/f22] Backport a patch fixing partially transparent screenshots
Kalev Lember
kalev at fedoraproject.org
Sun Mar 8 22:14:55 UTC 2015
commit 056237b02913e89a012cd676ac7346ee4f1032f6
Author: Kalev Lember <kalevlember at gmail.com>
Date: Sun Mar 8 22:40:35 2015 +0100
Backport a patch fixing partially transparent screenshots
https://bugs.freedesktop.org/show_bug.cgi?id=89292
...Image-Stash-everything-other-than-PIXEL_T.patch | 47 ++++++++++++++++++++++
mesa.spec | 10 ++++-
2 files changed, 56 insertions(+), 1 deletion(-)
---
diff --git a/0001-meta-TexSubImage-Stash-everything-other-than-PIXEL_T.patch b/0001-meta-TexSubImage-Stash-everything-other-than-PIXEL_T.patch
new file mode 100644
index 0000000..1f8b8c4
--- /dev/null
+++ b/0001-meta-TexSubImage-Stash-everything-other-than-PIXEL_T.patch
@@ -0,0 +1,47 @@
+From b1ab02d9c0cc11ba8ef4efaba9452d644b6a0811 Mon Sep 17 00:00:00 2001
+From: Jason Ekstrand <jason.ekstrand at intel.com>
+Date: Fri, 27 Feb 2015 12:29:03 -0800
+Subject: [PATCH] meta/TexSubImage: Stash everything other than
+ PIXEL_TRANSFER/store in meta_begin
+
+Previously, there were bugs where if the app set a scissor it could affect
+the area of the texture that was downloaded. There was also potential that
+the framebuffer SRGB state could affect downloads. This ensures that those
+will get saved/restored and can't affect the texture download.
+
+Cc: 10.5 <mesa-stable at lists.freedesktop.org>
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89292
+Reviewed-by: Neil Roberts <neil at linux.intel.com>
+---
+ src/mesa/drivers/common/meta_tex_subimage.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/mesa/drivers/common/meta_tex_subimage.c b/src/mesa/drivers/common/meta_tex_subimage.c
+index bba2b4f..971ed59 100644
+--- a/src/mesa/drivers/common/meta_tex_subimage.c
++++ b/src/mesa/drivers/common/meta_tex_subimage.c
+@@ -193,8 +193,8 @@ _mesa_meta_pbo_TexSubImage(struct gl_context *ctx, GLuint dims,
+ if (allocate_storage)
+ ctx->Driver.AllocTextureImageBuffer(ctx, tex_image);
+
+- /* Only stash the current FBO */
+- _mesa_meta_begin(ctx, 0);
++ _mesa_meta_begin(ctx, ~(MESA_META_PIXEL_TRANSFER |
++ MESA_META_PIXEL_STORE));
+
+ _mesa_GenFramebuffers(2, fbos);
+ _mesa_BindFramebuffer(GL_READ_FRAMEBUFFER, fbos[0]);
+@@ -312,8 +312,8 @@ _mesa_meta_pbo_GetTexSubImage(struct gl_context *ctx, GLuint dims,
+ if (!pbo_tex_image)
+ return false;
+
+- /* Only stash the current FBO */
+- _mesa_meta_begin(ctx, 0);
++ _mesa_meta_begin(ctx, ~(MESA_META_PIXEL_TRANSFER |
++ MESA_META_PIXEL_STORE));
+
+ _mesa_GenFramebuffers(2, fbos);
+
+--
+2.3.1
+
diff --git a/mesa.spec b/mesa.spec
index bd65668..97a67f4 100644
--- a/mesa.spec
+++ b/mesa.spec
@@ -54,7 +54,7 @@
Summary: Mesa graphics libraries
Name: mesa
Version: 10.5.0
-Release: 1.%{git}%{?dist}
+Release: 2.%{git}%{?dist}
License: MIT
Group: System Environment/Libraries
URL: http://www.mesa3d.org
@@ -77,6 +77,10 @@ Patch15: mesa-9.2-hardware-float.patch
Patch20: mesa-10.2-evergreen-big-endian.patch
Patch30: mesa-10.3-bigendian-assert.patch
+# Backported from upstream
+# https://bugs.freedesktop.org/show_bug.cgi?id=89292
+Patch31: 0001-meta-TexSubImage-Stash-everything-other-than-PIXEL_T.patch
+
# https://bugs.freedesktop.org/show_bug.cgi?id=73512
Patch99: 0001-opencl-use-versioned-.so-in-mesa.icd.patch
@@ -362,6 +366,7 @@ grep -q ^/ src/gallium/auxiliary/vl/vl_decoder.c && exit 1
%patch15 -p1 -b .hwfloat
%patch20 -p1 -b .egbe
%patch30 -p1 -b .beassert
+%patch31 -p1 -b .transparent-screenshots
%if 0%{?with_opencl}
%patch99 -p1 -b .icd
@@ -710,6 +715,9 @@ rm -rf $RPM_BUILD_ROOT
# Generate changelog using:
# git log old_commit_sha..new_commit_sha --format="- %H: %s (%an)"
%changelog
+* Sun Mar 08 2015 Kalev Lember <kalevlember at gmail.com> - 10.5.0-2.20150218
+- Backport a patch fixing partially transparent screenshots (fdo#89292)
+
* Wed Feb 18 2015 Igor Gnatenko <ignatenkobrain at fedoraproject.org> - 10.5.0-1.20150218
- 10.5.0
More information about the scm-commits
mailing list