SHA256
1
0
forked from pool/Mesa

- U_llvmpipe-Do-not-use-barriers-if-not-using-threads.patch

* llvmpipe: Do not use barriers if not using threads; triggers
    on single cpu machines (like KVM in openQA) with gcc6 and
    latest glibc(bnc#971350)

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=505
This commit is contained in:
Stefan Dirsch 2016-03-16 11:39:21 +00:00 committed by Git OBS Bridge
parent 7b397a6dfe
commit b9543c3565
3 changed files with 52 additions and 0 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed Mar 16 11:31:20 UTC 2016 - sndirsch@suse.com
- U_llvmpipe-Do-not-use-barriers-if-not-using-threads.patch
* llvmpipe: Do not use barriers if not using threads; triggers
on single cpu machines (like KVM in openQA) with gcc6 and
latest glibc(bnc#971350)
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Mar 14 12:02:29 UTC 2016 - dmueller@suse.com Mon Mar 14 12:02:29 UTC 2016 - dmueller@suse.com

View File

@ -70,6 +70,7 @@ Patch17: u_st-va-hardlink-driver-instances-to-gallium_drv_video.patch
Patch18: n_VDPAU-XVMC-libs-Replace-hardlinks-with-copies.patch Patch18: n_VDPAU-XVMC-libs-Replace-hardlinks-with-copies.patch
# Already upstream # Already upstream
Patch19: U_clover-Fix-build-against-LLVM-3.8.patch Patch19: U_clover-Fix-build-against-LLVM-3.8.patch
Patch20: U_llvmpipe-Do-not-use-barriers-if-not-using-threads.patch
BuildRequires: autoconf >= 2.60 BuildRequires: autoconf >= 2.60
BuildRequires: automake BuildRequires: automake
BuildRequires: bison BuildRequires: bison
@ -563,6 +564,7 @@ rm -rf docs/README.{VMS,WIN32,OS2}
%patch17 -p1 %patch17 -p1
%patch18 -p1 %patch18 -p1
%patch19 -p1 %patch19 -p1
%patch20 -p1
%build %build
%if 0%{?suse_version} >= 1310 %if 0%{?suse_version} >= 1310

View File

@ -0,0 +1,42 @@
From 4ed4c1d9210b11ce6faea81455c21531904ea45b Mon Sep 17 00:00:00 2001
From: Vinson Lee <vlee@freedesktop.org>
Date: Wed, 10 Feb 2016 16:42:19 -0800
Subject: [PATCH] llvmpipe: Do not use barriers if not using threads.
Cc: mesa-stable@lists.freedesktop.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94088
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
---
src/gallium/drivers/llvmpipe/lp_rast.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c
index d22e507..9e56c96 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.c
+++ b/src/gallium/drivers/llvmpipe/lp_rast.c
@@ -910,7 +910,9 @@ lp_rast_create( unsigned num_threads )
create_rast_threads(rast);
/* for synchronizing rasterization threads */
- pipe_barrier_init( &rast->barrier, rast->num_threads );
+ if (rast->num_threads > 0) {
+ pipe_barrier_init( &rast->barrier, rast->num_threads );
+ }
memset(lp_dummy_tile, 0, sizeof lp_dummy_tile);
@@ -967,7 +969,9 @@ void lp_rast_destroy( struct lp_rasterizer *rast )
}
/* for synchronizing rasterization threads */
- pipe_barrier_destroy( &rast->barrier );
+ if (rast->num_threads > 0) {
+ pipe_barrier_destroy( &rast->barrier );
+ }
lp_scene_queue_destroy(rast->full_scenes);
--
2.6.2