import mesa-19.1.4-3.el8_1
This commit is contained in:
parent
f2aa419a82
commit
9da3f5aaa8
@ -0,0 +1,72 @@
|
||||
From d0ff02e567541468309923fed2320da6cbd81779 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Crocker <bcrocker@redhat.com>
|
||||
Date: Thu, 21 Nov 2019 17:33:31 -0500
|
||||
Subject: [PATCH] llvmpipe: use ppc64le/ppc64 Large code model for JIT-compiled
|
||||
shaders
|
||||
|
||||
Large programs, e.g. gnome-shell and firefox, may tax the
|
||||
addressability of the Medium code model once a (potentially unbounded)
|
||||
number of dynamically generated JIT-compiled shader programs are
|
||||
linked in and relocated. Yet the default code model as of LLVM 8 is
|
||||
Medium or even Small.
|
||||
|
||||
The cost of changing from Medium to Large is negligible:
|
||||
- an additional 8-byte pointer stored immediately before the shader entrypoint;
|
||||
- change an add-immediate (addis) instruction to a load (ld).
|
||||
|
||||
Testing with WebGL Conformance
|
||||
(https://www.khronos.org/registry/webgl/sdk/tests/webgl-conformance-tests.html)
|
||||
yields clean runs with this change (and crashes without it).
|
||||
|
||||
Testing with glxgears shows no detectable performance difference.
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1753327, 1543572, 1747110, and 1582226
|
||||
|
||||
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/223
|
||||
|
||||
Co-authored by: Nemanja Ivanovic <nemanjai@ca.ibm.com>, Tom Stellard <tstellar@redhat.com>
|
||||
|
||||
CC: mesa-stable@lists.freedesktop.org
|
||||
|
||||
Signed-off-by: Ben Crocker <bcrocker@redhat.com>
|
||||
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
||||
---
|
||||
src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 15 ++++++++++++++-
|
||||
1 file changed, 14 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
|
||||
index f307c26d4f7..af891f44684 100644
|
||||
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
|
||||
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
|
||||
@@ -692,7 +692,19 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
|
||||
* when not using MCJIT so no instructions are generated which the old JIT
|
||||
* can't handle. Not entirely sure if we really need to do anything yet.
|
||||
*/
|
||||
-#if defined(PIPE_ARCH_LITTLE_ENDIAN) && defined(PIPE_ARCH_PPC_64)
|
||||
+#ifdef PIPE_ARCH_PPC_64
|
||||
+ /*
|
||||
+ * Large programs, e.g. gnome-shell and firefox, may tax the addressability
|
||||
+ * of the Medium code model once dynamically generated JIT-compiled shader
|
||||
+ * programs are linked in and relocated. Yet the default code model as of
|
||||
+ * LLVM 8 is Medium or even Small.
|
||||
+ * The cost of changing from Medium to Large is negligible:
|
||||
+ * - an additional 8-byte pointer stored immediately before the shader entrypoint;
|
||||
+ * - change an add-immediate (addis) instruction to a load (ld).
|
||||
+ */
|
||||
+ builder.setCodeModel(CodeModel::Large);
|
||||
+
|
||||
+#ifdef PIPE_ARCH_LITTLE_ENDIAN
|
||||
/*
|
||||
* Versions of LLVM prior to 4.0 lacked a table entry for "POWER8NVL",
|
||||
* resulting in (big-endian) "generic" being returned on
|
||||
@@ -704,6 +716,7 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
|
||||
*/
|
||||
if (MCPU == "generic")
|
||||
MCPU = "pwr8";
|
||||
+#endif
|
||||
#endif
|
||||
builder.setMCPU(MCPU);
|
||||
if (gallivm_debug & (GALLIVM_DEBUG_IR | GALLIVM_DEBUG_ASM | GALLIVM_DEBUG_DUMP_BC)) {
|
||||
--
|
||||
2.21.0
|
||||
|
@ -41,7 +41,7 @@
|
||||
Name: mesa
|
||||
Summary: Mesa graphics libraries
|
||||
Version: 19.1.4
|
||||
Release: 2%{?rctag:.%{rctag}}%{?dist}
|
||||
Release: 3%{?rctag:.%{rctag}}%{?dist}
|
||||
|
||||
License: MIT
|
||||
URL: http://www.mesa3d.org
|
||||
@ -58,6 +58,7 @@ Source4: Mesa-MLAA-License-Clarification-Email.txt
|
||||
Source5: glesv2.pc
|
||||
|
||||
Patch0: 0001-mesa-add-support-for-CET-to-x86-x86-64-asm-files.patch
|
||||
Patch1: 0001-llvmpipe-use-ppc64le-ppc64-Large-code-model-for-JIT-.patch
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
|
||||
@ -601,6 +602,9 @@ done
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Nov 25 2019 Ben Crocker <bcrocker@redhat.com> - 19.1.4-3
|
||||
- Patch to require Large CodeModel for llvmpipe on ppc64
|
||||
|
||||
* Fri Aug 09 2019 Dave Airlie <airlied@redhat.com> - 19.1.4-2
|
||||
- Add CET support to asm files
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user