Backport a patch fixing partially transparent screenshots

https://bugs.freedesktop.org/show_bug.cgi?id=89292
This commit is contained in:
Kalev Lember 2015-03-08 22:40:35 +01:00
parent 9199e7c86e
commit 056237b029
2 changed files with 56 additions and 1 deletions

View File

@ -0,0 +1,47 @@
From b1ab02d9c0cc11ba8ef4efaba9452d644b6a0811 Mon Sep 17 00:00:00 2001
From: Jason Ekstrand <jason.ekstrand@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@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89292
Reviewed-by: Neil Roberts <neil@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

View File

@ -54,7 +54,7 @@
Summary: Mesa graphics libraries Summary: Mesa graphics libraries
Name: mesa Name: mesa
Version: 10.5.0 Version: 10.5.0
Release: 1.%{git}%{?dist} Release: 2.%{git}%{?dist}
License: MIT License: MIT
Group: System Environment/Libraries Group: System Environment/Libraries
URL: http://www.mesa3d.org URL: http://www.mesa3d.org
@ -77,6 +77,10 @@ Patch15: mesa-9.2-hardware-float.patch
Patch20: mesa-10.2-evergreen-big-endian.patch Patch20: mesa-10.2-evergreen-big-endian.patch
Patch30: mesa-10.3-bigendian-assert.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 # https://bugs.freedesktop.org/show_bug.cgi?id=73512
Patch99: 0001-opencl-use-versioned-.so-in-mesa.icd.patch 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 %patch15 -p1 -b .hwfloat
%patch20 -p1 -b .egbe %patch20 -p1 -b .egbe
%patch30 -p1 -b .beassert %patch30 -p1 -b .beassert
%patch31 -p1 -b .transparent-screenshots
%if 0%{?with_opencl} %if 0%{?with_opencl}
%patch99 -p1 -b .icd %patch99 -p1 -b .icd
@ -710,6 +715,9 @@ rm -rf $RPM_BUILD_ROOT
# Generate changelog using: # Generate changelog using:
# git log old_commit_sha..new_commit_sha --format="- %H: %s (%an)" # git log old_commit_sha..new_commit_sha --format="- %H: %s (%an)"
%changelog %changelog
* Sun Mar 08 2015 Kalev Lember <kalevlember@gmail.com> - 10.5.0-2.20150218
- Backport a patch fixing partially transparent screenshots (fdo#89292)
* Wed Feb 18 2015 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 10.5.0-1.20150218 * Wed Feb 18 2015 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 10.5.0-1.20150218
- 10.5.0 - 10.5.0