import mesa-19.3.4-2.el8

This commit is contained in:
CentOS Sources 2020-04-28 04:57:29 -04:00 committed by Andrew Lukoshko
parent 9da3f5aaa8
commit f053d63396
10 changed files with 219 additions and 973 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/mesa-19.1.4.tar.xz
SOURCES/mesa-19.3.4.tar.xz

View File

@ -1 +1 @@
75602d642c3d92fff29d7c50a8afd61577adf3b8 SOURCES/mesa-19.1.4.tar.xz
73dccea365efef46c700bcfd87d14209381efa3d SOURCES/mesa-19.3.4.tar.xz

View File

@ -0,0 +1,77 @@
From 7881d29f2c729e4a8a5af21a0abcf3db18e22918 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Fri, 14 Feb 2020 15:00:13 +1000
Subject: [PATCH 1/2] dri: add another get shm variant.
When Brian in 02c3dad0f3b4d26e0faa5cc51d06bc50d693dcdc restricted
the shm permissions it means we hit the fallback paths in some
scenarios we hadn't before.
When you use Xephyr to xdmcp from one user to another the new perms
stop the X server (running as user a) attaching to the SHM segments
from gnome-shell (running as user b).
In this case however only the GLX side of the code had insight into this,
and the dri could was meant of fall back, and it worked for put image
fine but the get image path was broken, since there was no indication
in the broken case of the need to fallback.
This adds a return type to a new interface member that lets the
caller know it has to fallback.
Fixes: 02c3dad0f3b4 ("Call shmget() with permission 0600 instead of 0777")
---
include/GL/internal/dri_interface.h | 15 ++++++++++++++-
src/gallium/state_trackers/dri/drisw.c | 3 +++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index 09782c8baeb..e40106575c0 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -634,7 +634,7 @@ struct __DRIdamageExtensionRec {
* SWRast Loader extension.
*/
#define __DRI_SWRAST_LOADER "DRI_SWRastLoader"
-#define __DRI_SWRAST_LOADER_VERSION 5
+#define __DRI_SWRAST_LOADER_VERSION 6
struct __DRIswrastLoaderExtensionRec {
__DRIextension base;
@@ -711,6 +711,19 @@ struct __DRIswrastLoaderExtensionRec {
int width, int height, int stride,
int shmid, char *shmaddr, unsigned offset,
void *loaderPrivate);
+
+ /**
+ * get shm image to drawable (v2)
+ *
+ * There are some cases where GLX can't use SHM, but DRI
+ * still tries, we need to get a return type for when to
+ * fallback to the non-shm path.
+ *
+ * \since 6
+ */
+ GLboolean (*getImageShm2)(__DRIdrawable *readable,
+ int x, int y, int width, int height,
+ int shmid, void *loaderPrivate);
};
/**
diff --git a/src/gallium/state_trackers/dri/drisw.c b/src/gallium/state_trackers/dri/drisw.c
index e3fb3f1b925..df364c47391 100644
--- a/src/gallium/state_trackers/dri/drisw.c
+++ b/src/gallium/state_trackers/dri/drisw.c
@@ -138,6 +138,9 @@ get_image_shm(__DRIdrawable *dPriv, int x, int y, int width, int height,
if (!res->screen->resource_get_handle(res->screen, NULL, res, &whandle, PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE))
return FALSE;
+ if (loader->base.version > 5 && loader->getImageShm2)
+ return loader->getImageShm2(dPriv, x, y, width, height, whandle.handle, dPriv->loaderPrivate);
+
loader->getImageShm(dPriv, x, y, width, height, whandle.handle, dPriv->loaderPrivate);
return TRUE;
}
--
2.21.1

View File

@ -1,72 +0,0 @@
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

View File

@ -1,794 +0,0 @@
diff -up mesa-19.1.4/meson.build.cet mesa-19.1.4/meson.build
--- mesa-19.1.4/meson.build.cet 2019-08-08 02:39:16.000000000 +1000
+++ mesa-19.1.4/meson.build 2019-08-09 15:31:35.381426323 +1000
@@ -1061,6 +1061,10 @@ foreach f : ['strtof', 'mkostemp', 'posi
endif
endforeach
+if cc.has_header('cet.h')
+ pre_args += '-DHAVE_CET_H'
+endif
+
# strtod locale support
if cc.links('''
#define _GNU_SOURCE
diff -up mesa-19.1.4/src/mesa/x86/3dnow_xform1.S.cet mesa-19.1.4/src/mesa/x86/3dnow_xform1.S
--- mesa-19.1.4/src/mesa/x86/3dnow_xform1.S.cet 2019-08-08 02:39:17.000000000 +1000
+++ mesa-19.1.4/src/mesa/x86/3dnow_xform1.S 2019-08-09 15:31:35.381426323 +1000
@@ -37,7 +37,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points1_general )
HIDDEN(_mesa_3dnow_transform_points1_general)
GLNAME( _mesa_3dnow_transform_points1_general ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
@@ -102,7 +102,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points1_identity )
HIDDEN(_mesa_3dnow_transform_points1_identity)
GLNAME( _mesa_3dnow_transform_points1_identity ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
@@ -150,7 +150,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points1_3d_no_rot )
HIDDEN(_mesa_3dnow_transform_points1_3d_no_rot)
GLNAME( _mesa_3dnow_transform_points1_3d_no_rot ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
@@ -208,7 +208,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points1_perspective )
HIDDEN(_mesa_3dnow_transform_points1_perspective)
GLNAME( _mesa_3dnow_transform_points1_perspective ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
@@ -262,7 +262,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points1_2d )
HIDDEN(_mesa_3dnow_transform_points1_2d)
GLNAME( _mesa_3dnow_transform_points1_2d ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
@@ -318,7 +318,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points1_2d_no_rot )
HIDDEN(_mesa_3dnow_transform_points1_2d_no_rot)
GLNAME( _mesa_3dnow_transform_points1_2d_no_rot ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
@@ -372,7 +372,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points1_3d )
HIDDEN(_mesa_3dnow_transform_points1_3d)
GLNAME( _mesa_3dnow_transform_points1_3d ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
diff -up mesa-19.1.4/src/mesa/x86/3dnow_xform2.S.cet mesa-19.1.4/src/mesa/x86/3dnow_xform2.S
--- mesa-19.1.4/src/mesa/x86/3dnow_xform2.S.cet 2019-08-08 02:39:17.000000000 +1000
+++ mesa-19.1.4/src/mesa/x86/3dnow_xform2.S 2019-08-09 15:31:35.382426334 +1000
@@ -37,7 +37,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points2_general )
HIDDEN(_mesa_3dnow_transform_points2_general)
GLNAME( _mesa_3dnow_transform_points2_general ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
@@ -118,7 +118,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points2_perspective )
HIDDEN(_mesa_3dnow_transform_points2_perspective)
GLNAME( _mesa_3dnow_transform_points2_perspective ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
@@ -174,7 +174,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points2_3d )
HIDDEN(_mesa_3dnow_transform_points2_3d)
GLNAME( _mesa_3dnow_transform_points2_3d ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
@@ -251,7 +251,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points2_3d_no_rot )
HIDDEN(_mesa_3dnow_transform_points2_3d_no_rot)
GLNAME( _mesa_3dnow_transform_points2_3d_no_rot ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
@@ -310,7 +310,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points2_2d )
HIDDEN(_mesa_3dnow_transform_points2_2d)
GLNAME( _mesa_3dnow_transform_points2_2d ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
@@ -374,7 +374,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points2_2d_no_rot )
HIDDEN(_mesa_3dnow_transform_points2_2d_no_rot)
GLNAME( _mesa_3dnow_transform_points2_2d_no_rot ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
@@ -430,7 +430,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points2_identity )
HIDDEN(_mesa_3dnow_transform_points2_identity)
GLNAME( _mesa_3dnow_transform_points2_identity ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
diff -up mesa-19.1.4/src/mesa/x86/3dnow_xform3.S.cet mesa-19.1.4/src/mesa/x86/3dnow_xform3.S
--- mesa-19.1.4/src/mesa/x86/3dnow_xform3.S.cet 2019-08-08 02:39:17.000000000 +1000
+++ mesa-19.1.4/src/mesa/x86/3dnow_xform3.S 2019-08-09 15:31:35.382426334 +1000
@@ -37,7 +37,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points3_general )
HIDDEN(_mesa_3dnow_transform_points3_general)
GLNAME( _mesa_3dnow_transform_points3_general ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
@@ -122,7 +122,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points3_perspective )
HIDDEN(_mesa_3dnow_transform_points3_perspective)
GLNAME( _mesa_3dnow_transform_points3_perspective ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
@@ -203,7 +203,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points3_3d )
HIDDEN(_mesa_3dnow_transform_points3_3d)
GLNAME( _mesa_3dnow_transform_points3_3d ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
@@ -291,7 +291,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points3_3d_no_rot )
HIDDEN(_mesa_3dnow_transform_points3_3d_no_rot)
GLNAME( _mesa_3dnow_transform_points3_3d_no_rot ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
@@ -367,7 +367,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points3_2d )
HIDDEN(_mesa_3dnow_transform_points3_2d)
GLNAME( _mesa_3dnow_transform_points3_2d ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
@@ -440,7 +440,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points3_2d_no_rot )
HIDDEN(_mesa_3dnow_transform_points3_2d_no_rot)
GLNAME( _mesa_3dnow_transform_points3_2d_no_rot ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
@@ -507,7 +507,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points3_identity )
HIDDEN(_mesa_3dnow_transform_points3_identity)
GLNAME( _mesa_3dnow_transform_points3_identity ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
diff -up mesa-19.1.4/src/mesa/x86/3dnow_xform4.S.cet mesa-19.1.4/src/mesa/x86/3dnow_xform4.S
--- mesa-19.1.4/src/mesa/x86/3dnow_xform4.S.cet 2019-08-08 02:39:17.000000000 +1000
+++ mesa-19.1.4/src/mesa/x86/3dnow_xform4.S 2019-08-09 15:31:35.383426344 +1000
@@ -37,7 +37,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points4_general )
HIDDEN(_mesa_3dnow_transform_points4_general)
GLNAME( _mesa_3dnow_transform_points4_general ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
@@ -130,7 +130,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points4_perspective )
HIDDEN(_mesa_3dnow_transform_points4_perspective)
GLNAME( _mesa_3dnow_transform_points4_perspective ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
@@ -210,7 +210,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points4_3d )
HIDDEN(_mesa_3dnow_transform_points4_3d)
GLNAME( _mesa_3dnow_transform_points4_3d ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
@@ -300,7 +300,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points4_3d_no_rot )
HIDDEN(_mesa_3dnow_transform_points4_3d_no_rot)
GLNAME( _mesa_3dnow_transform_points4_3d_no_rot ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
MOV_L ( ARG_MATRIX, ESI )
@@ -373,7 +373,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points4_2d )
HIDDEN(_mesa_3dnow_transform_points4_2d)
GLNAME( _mesa_3dnow_transform_points4_2d ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
@@ -448,7 +448,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points4_2d_no_rot )
HIDDEN(_mesa_3dnow_transform_points4_2d_no_rot)
GLNAME( _mesa_3dnow_transform_points4_2d_no_rot ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
@@ -516,7 +516,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_3dnow_transform_points4_identity )
HIDDEN(_mesa_3dnow_transform_points4_identity)
GLNAME( _mesa_3dnow_transform_points4_identity ):
-
+ _CET_ENDBR
PUSH_L ( ESI )
MOV_L ( ARG_DEST, ECX )
diff -up mesa-19.1.4/src/mesa/x86-64/xform4.S.cet mesa-19.1.4/src/mesa/x86-64/xform4.S
--- mesa-19.1.4/src/mesa/x86-64/xform4.S.cet 2019-08-08 02:39:17.000000000 +1000
+++ mesa-19.1.4/src/mesa/x86-64/xform4.S 2019-08-09 15:31:35.384426355 +1000
@@ -21,6 +21,11 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
+#ifdef HAVE_CET_H
+#include <cet.h>
+#else
+#define _CET_ENDBR
+#endif
#ifdef USE_X86_64_ASM
@@ -32,6 +37,7 @@
.globl _mesa_x86_64_cpuid
.hidden _mesa_x86_64_cpuid
_mesa_x86_64_cpuid:
+ _CET_ENDBR
pushq %rbx
movl (%rdi), %eax
movl 8(%rdi), %ecx
@@ -54,6 +60,7 @@ _mesa_x86_64_transform_points4_general:
* rsi = matrix
* rdx = source
*/
+ _CET_ENDBR
movl V4F_COUNT(%rdx), %ecx /* count */
movzbl V4F_STRIDE(%rdx), %eax /* stride */
@@ -129,7 +136,7 @@ p4_constants:
* because it ensures that the last matrix row (or is it column?) is 0,0,0,1
*/
_mesa_x86_64_transform_points4_3d:
-
+ _CET_ENDBR
leaq p4_constants(%rip), %rax
prefetchnta 64(%rsi)
@@ -197,7 +204,7 @@ p4_3d_done:
.globl _mesa_x86_64_transform_points4_identity
.hidden _mesa_x86_64_transform_points4_identity
_mesa_x86_64_transform_points4_identity:
-
+ _CET_ENDBR
movl V4F_COUNT(%rdx), %ecx /* count */
movzbl V4F_STRIDE(%rdx), %eax /* stride */
@@ -226,7 +233,7 @@ p4_identity_done:
.globl _mesa_3dnow_transform_points4_3d_no_rot
.hidden _mesa_3dnow_transform_points4_3d_no_rot
_mesa_3dnow_transform_points4_3d_no_rot:
-
+ _CET_ENDBR
movl V4F_COUNT(%rdx), %ecx /* count */
movzbl V4F_STRIDE(%rdx), %eax /* stride */
@@ -291,7 +298,7 @@ p4_3d_no_rot_done:
.globl _mesa_3dnow_transform_points4_perspective
.hidden _mesa_3dnow_transform_points4_perspective
_mesa_3dnow_transform_points4_perspective:
-
+ _CET_ENDBR
movl V4F_COUNT(%rdx), %ecx /* count */
movzbl V4F_STRIDE(%rdx), %eax /* stride */
@@ -358,7 +365,7 @@ p4_perspective_done:
.globl _mesa_3dnow_transform_points4_2d_no_rot
.hidden _mesa_3dnow_transform_points4_2d_no_rot
_mesa_3dnow_transform_points4_2d_no_rot:
-
+ _CET_ENDBR
movl V4F_COUNT(%rdx), %ecx /* count */
movzbl V4F_STRIDE(%rdx), %eax /* stride */
@@ -414,7 +421,7 @@ p4_2d_no_rot_done:
.globl _mesa_3dnow_transform_points4_2d
.hidden _mesa_3dnow_transform_points4_2d
_mesa_3dnow_transform_points4_2d:
-
+ _CET_ENDBR
movl V4F_COUNT(%rdx), %ecx /* count */
movzbl V4F_STRIDE(%rdx), %eax /* stride */
diff -up mesa-19.1.4/src/mesa/x86/assyntax.h.cet mesa-19.1.4/src/mesa/x86/assyntax.h
--- mesa-19.1.4/src/mesa/x86/assyntax.h.cet 2019-08-08 02:39:17.000000000 +1000
+++ mesa-19.1.4/src/mesa/x86/assyntax.h 2019-08-09 15:31:35.384426355 +1000
@@ -1736,4 +1736,11 @@
# define HIDDEN(x)
#endif
+/* Control flow enforcement support */
+#ifdef HAVE_CET_H
+#include <cet.h>
+#else
+#define _CET_ENDBR
+#endif
+
#endif /* __ASSYNTAX_H__ */
diff -up mesa-19.1.4/src/mesa/x86/common_x86_asm.S.cet mesa-19.1.4/src/mesa/x86/common_x86_asm.S
--- mesa-19.1.4/src/mesa/x86/common_x86_asm.S.cet 2019-08-08 02:39:17.000000000 +1000
+++ mesa-19.1.4/src/mesa/x86/common_x86_asm.S 2019-08-09 15:31:35.385426365 +1000
@@ -49,7 +49,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_x86_has_cpuid)
HIDDEN(_mesa_x86_has_cpuid)
GLNAME(_mesa_x86_has_cpuid):
-
+ _CET_ENDBR
/* Test for the CPUID command. If the ID Flag bit in EFLAGS
* (bit 21) is writable, the CPUID command is present */
PUSHF_L
@@ -73,7 +73,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_x86_cpuid)
HIDDEN(_mesa_x86_cpuid)
GLNAME(_mesa_x86_cpuid):
-
+ _CET_ENDBR
MOV_L (REGOFF(4, ESP), EAX) /* cpuid op */
PUSH_L (EDI)
PUSH_L (EBX)
@@ -97,7 +97,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_x86_cpuid_eax)
HIDDEN(_mesa_x86_cpuid_eax)
GLNAME(_mesa_x86_cpuid_eax):
-
+ _CET_ENDBR
MOV_L (REGOFF(4, ESP), EAX) /* cpuid op */
PUSH_L (EBX)
@@ -110,7 +110,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_x86_cpuid_ebx)
HIDDEN(_mesa_x86_cpuid_ebx)
GLNAME(_mesa_x86_cpuid_ebx):
-
+ _CET_ENDBR
MOV_L (REGOFF(4, ESP), EAX) /* cpuid op */
PUSH_L (EBX)
@@ -124,7 +124,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_x86_cpuid_ecx)
HIDDEN(_mesa_x86_cpuid_ecx)
GLNAME(_mesa_x86_cpuid_ecx):
-
+ _CET_ENDBR
MOV_L (REGOFF(4, ESP), EAX) /* cpuid op */
PUSH_L (EBX)
@@ -138,7 +138,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_x86_cpuid_edx)
HIDDEN(_mesa_x86_cpuid_edx)
GLNAME(_mesa_x86_cpuid_edx):
-
+ _CET_ENDBR
MOV_L (REGOFF(4, ESP), EAX) /* cpuid op */
PUSH_L (EBX)
@@ -164,7 +164,7 @@ ALIGNTEXT4
GLOBL GLNAME( _mesa_test_os_sse_support )
HIDDEN(_mesa_test_os_sse_support)
GLNAME( _mesa_test_os_sse_support ):
-
+ _CET_ENDBR
XORPS ( XMM0, XMM0 )
RET
@@ -179,7 +179,7 @@ ALIGNTEXT4
GLOBL GLNAME( _mesa_test_os_sse_exception_support )
HIDDEN(_mesa_test_os_sse_exception_support)
GLNAME( _mesa_test_os_sse_exception_support ):
-
+ _CET_ENDBR
PUSH_L ( EBP )
MOV_L ( ESP, EBP )
SUB_L ( CONST( 8 ), ESP )
diff -up mesa-19.1.4/src/mesa/x86/mmx_blendtmp.h.cet mesa-19.1.4/src/mesa/x86/mmx_blendtmp.h
--- mesa-19.1.4/src/mesa/x86/mmx_blendtmp.h.cet 2019-08-08 02:39:17.000000000 +1000
+++ mesa-19.1.4/src/mesa/x86/mmx_blendtmp.h 2019-08-09 15:31:35.385426365 +1000
@@ -15,7 +15,7 @@ ALIGNTEXT16
GLOBL GLNAME( TAG(_mesa_mmx_blend) )
HIDDEN( TAG(_mesa_mmx_blend) )
GLNAME( TAG(_mesa_mmx_blend) ):
-
+ _CET_ENDBR
PUSH_L ( EBP )
MOV_L ( ESP, EBP )
PUSH_L ( ESI )
diff -up mesa-19.1.4/src/mesa/x86/read_rgba_span_x86.S.cet mesa-19.1.4/src/mesa/x86/read_rgba_span_x86.S
--- mesa-19.1.4/src/mesa/x86/read_rgba_span_x86.S.cet 2019-08-08 02:39:17.000000000 +1000
+++ mesa-19.1.4/src/mesa/x86/read_rgba_span_x86.S 2019-08-09 15:32:08.817778784 +1000
@@ -29,7 +29,12 @@
*
* \author Ian Romanick <idr@us.ibm.com>
*/
-
+/* Control flow enforcement support */
+#ifdef HAVE_CET_H
+#include <cet.h>
+#else
+#define _CET_ENDBR
+#endif
.file "read_rgba_span_x86.S"
#if !defined(__MINGW32__) && !defined(__APPLE__) /* this one cries for assyntax.h */
/* Kevin F. Quinn 2nd July 2006
@@ -80,6 +85,7 @@
.hidden _generic_read_RGBA_span_BGRA8888_REV_MMX
.type _generic_read_RGBA_span_BGRA8888_REV_MMX, @function
_generic_read_RGBA_span_BGRA8888_REV_MMX:
+ _CET_ENDBR
pushl %ebx
#ifdef USE_INNER_EMMS
@@ -175,6 +181,7 @@ _generic_read_RGBA_span_BGRA8888_REV_MMX
.hidden _generic_read_RGBA_span_BGRA8888_REV_SSE
.type _generic_read_RGBA_span_BGRA8888_REV_SSE, @function
_generic_read_RGBA_span_BGRA8888_REV_SSE:
+ _CET_ENDBR
pushl %esi
pushl %ebx
pushl %ebp
@@ -338,6 +345,7 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE
.hidden _generic_read_RGBA_span_BGRA8888_REV_SSE2
.type _generic_read_RGBA_span_BGRA8888_REV_SSE2, @function
_generic_read_RGBA_span_BGRA8888_REV_SSE2:
+ _CET_ENDBR
pushl %esi
pushl %ebx
@@ -498,7 +506,7 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE
.type _generic_read_RGBA_span_RGB565_MMX, @function
_generic_read_RGBA_span_RGB565_MMX:
-
+ _CET_ENDBR
#ifdef USE_INNER_EMMS
emms
#endif
diff -up mesa-19.1.4/src/mesa/x86/sse_normal.S.cet mesa-19.1.4/src/mesa/x86/sse_normal.S
--- mesa-19.1.4/src/mesa/x86/sse_normal.S.cet 2019-08-08 02:39:17.000000000 +1000
+++ mesa-19.1.4/src/mesa/x86/sse_normal.S 2019-08-09 15:31:35.386426376 +1000
@@ -47,7 +47,7 @@ ALIGNTEXT16
GLOBL GLNAME(_mesa_sse_transform_rescale_normals_no_rot)
HIDDEN(_mesa_sse_transform_rescale_normals_no_rot)
GLNAME(_mesa_sse_transform_rescale_normals_no_rot):
-
+ _CET_ENDBR
#define FRAME_OFFSET 8
PUSH_L ( ESI )
PUSH_L ( EDI )
@@ -109,7 +109,7 @@ ALIGNTEXT16
GLOBL GLNAME(_mesa_sse_transform_rescale_normals)
HIDDEN(_mesa_sse_transform_rescale_normals)
GLNAME(_mesa_sse_transform_rescale_normals):
-
+ _CET_ENDBR
#define FRAME_OFFSET 8
PUSH_L ( ESI )
PUSH_L ( EDI )
@@ -202,7 +202,7 @@ ALIGNTEXT16
GLOBL GLNAME(_mesa_sse_transform_normals_no_rot)
HIDDEN(_mesa_sse_transform_normals_no_rot)
GLNAME(_mesa_sse_transform_normals_no_rot):
-
+ _CET_ENDBR
#define FRAME_OFFSET 8
PUSH_L ( ESI )
PUSH_L ( EDI )
diff -up mesa-19.1.4/src/mesa/x86/sse_xform1.S.cet mesa-19.1.4/src/mesa/x86/sse_xform1.S
--- mesa-19.1.4/src/mesa/x86/sse_xform1.S.cet 2019-08-08 02:39:17.000000000 +1000
+++ mesa-19.1.4/src/mesa/x86/sse_xform1.S 2019-08-09 15:31:35.386426376 +1000
@@ -46,7 +46,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_sse_transform_points1_general)
HIDDEN( _mesa_sse_transform_points1_general )
GLNAME( _mesa_sse_transform_points1_general ):
-
+ _CET_ENDBR
#define FRAME_OFFSET 8
PUSH_L ( ESI )
PUSH_L ( EDI )
@@ -103,7 +103,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_sse_transform_points1_identity)
HIDDEN(_mesa_sse_transform_points1_identity)
GLNAME( _mesa_sse_transform_points1_identity ):
-
+ _CET_ENDBR
#define FRAME_OFFSET 8
PUSH_L ( ESI )
PUSH_L ( EDI )
@@ -155,7 +155,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_sse_transform_points1_3d_no_rot)
HIDDEN(_mesa_sse_transform_points1_3d_no_rot)
GLNAME(_mesa_sse_transform_points1_3d_no_rot):
-
+ _CET_ENDBR
#define FRAME_OFFSET 8
PUSH_L( ESI )
PUSH_L( EDI )
@@ -216,7 +216,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_sse_transform_points1_perspective)
HIDDEN(_mesa_sse_transform_points1_perspective)
GLNAME(_mesa_sse_transform_points1_perspective):
-
+ _CET_ENDBR
#define FRAME_OFFSET 8
PUSH_L ( ESI )
PUSH_L ( EDI )
@@ -275,7 +275,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_sse_transform_points1_2d)
HIDDEN(_mesa_sse_transform_points1_2d)
GLNAME(_mesa_sse_transform_points1_2d):
-
+ _CET_ENDBR
#define FRAME_OFFSET 8
PUSH_L( ESI )
PUSH_L( EDI )
@@ -330,7 +330,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_sse_transform_points1_2d_no_rot)
HIDDEN(_mesa_sse_transform_points1_2d_no_rot)
GLNAME(_mesa_sse_transform_points1_2d_no_rot):
-
+ _CET_ENDBR
#define FRAME_OFFSET 8
PUSH_L( ESI )
PUSH_L( EDI )
@@ -387,7 +387,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_sse_transform_points1_3d)
HIDDEN(_mesa_sse_transform_points1_3d)
GLNAME(_mesa_sse_transform_points1_3d):
-
+ _CET_ENDBR
#define FRAME_OFFSET 8
PUSH_L( ESI )
PUSH_L( EDI )
diff -up mesa-19.1.4/src/mesa/x86/sse_xform2.S.cet mesa-19.1.4/src/mesa/x86/sse_xform2.S
--- mesa-19.1.4/src/mesa/x86/sse_xform2.S.cet 2019-08-08 02:39:17.000000000 +1000
+++ mesa-19.1.4/src/mesa/x86/sse_xform2.S 2019-08-09 15:31:35.387426386 +1000
@@ -46,7 +46,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_sse_transform_points2_general)
HIDDEN (_mesa_sse_transform_points2_general)
GLNAME( _mesa_sse_transform_points2_general ):
-
+ _CET_ENDBR
#define FRAME_OFFSET 8
PUSH_L ( ESI )
PUSH_L ( EDI )
@@ -107,7 +107,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_sse_transform_points2_identity)
HIDDEN(_mesa_sse_transform_points2_identity)
GLNAME( _mesa_sse_transform_points2_identity ):
-
+ _CET_ENDBR
#define FRAME_OFFSET 8
PUSH_L ( ESI )
PUSH_L ( EDI )
@@ -160,7 +160,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_sse_transform_points2_3d_no_rot)
HIDDEN(_mesa_sse_transform_points2_3d_no_rot)
GLNAME(_mesa_sse_transform_points2_3d_no_rot):
-
+ _CET_ENDBR
#define FRAME_OFFSET 8
PUSH_L( ESI )
PUSH_L( EDI )
@@ -221,7 +221,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_sse_transform_points2_perspective)
HIDDEN(_mesa_sse_transform_points2_perspective)
GLNAME(_mesa_sse_transform_points2_perspective):
-
+ _CET_ENDBR
#define FRAME_OFFSET 8
PUSH_L ( ESI )
PUSH_L ( EDI )
@@ -280,7 +280,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_sse_transform_points2_2d)
HIDDEN(_mesa_sse_transform_points2_2d)
GLNAME(_mesa_sse_transform_points2_2d):
-
+ _CET_ENDBR
#define FRAME_OFFSET 8
PUSH_L( ESI )
PUSH_L( EDI )
@@ -343,7 +343,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_sse_transform_points2_2d_no_rot)
HIDDEN(_mesa_sse_transform_points2_2d_no_rot)
GLNAME(_mesa_sse_transform_points2_2d_no_rot):
-
+ _CET_ENDBR
#define FRAME_OFFSET 8
PUSH_L( ESI )
PUSH_L( EDI )
@@ -400,7 +400,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_sse_transform_points2_3d)
HIDDEN(_mesa_sse_transform_points2_3d)
GLNAME(_mesa_sse_transform_points2_3d):
-
+ _CET_ENDBR
#define FRAME_OFFSET 8
PUSH_L( ESI )
PUSH_L( EDI )
diff -up mesa-19.1.4/src/mesa/x86/sse_xform3.S.cet mesa-19.1.4/src/mesa/x86/sse_xform3.S
--- mesa-19.1.4/src/mesa/x86/sse_xform3.S.cet 2019-08-08 02:39:17.000000000 +1000
+++ mesa-19.1.4/src/mesa/x86/sse_xform3.S 2019-08-09 15:31:35.388426397 +1000
@@ -46,7 +46,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_sse_transform_points3_general)
HIDDEN(_mesa_sse_transform_points3_general)
GLNAME( _mesa_sse_transform_points3_general ):
-
+ _CET_ENDBR
#define FRAME_OFFSET 8
PUSH_L ( ESI )
PUSH_L ( EDI )
@@ -116,7 +116,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_sse_transform_points3_identity)
HIDDEN(_mesa_sse_transform_points3_identity)
GLNAME( _mesa_sse_transform_points3_identity ):
-
+ _CET_ENDBR
#define FRAME_OFFSET 8
PUSH_L ( ESI )
PUSH_L ( EDI )
@@ -171,7 +171,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_sse_transform_points3_3d_no_rot)
HIDDEN(_mesa_sse_transform_points3_3d_no_rot)
GLNAME(_mesa_sse_transform_points3_3d_no_rot):
-
+ _CET_ENDBR
#define FRAME_OFFSET 8
PUSH_L( ESI )
PUSH_L( EDI )
@@ -239,7 +239,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_sse_transform_points3_perspective)
HIDDEN(_mesa_sse_transform_points3_perspective)
GLNAME(_mesa_sse_transform_points3_perspective):
-
+ _CET_ENDBR
#define FRAME_OFFSET 8
PUSH_L ( ESI )
PUSH_L ( EDI )
@@ -312,7 +312,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_sse_transform_points3_2d)
HIDDEN(_mesa_sse_transform_points3_2d)
GLNAME(_mesa_sse_transform_points3_2d):
-
+ _CET_ENDBR
#define FRAME_OFFSET 8
PUSH_L( ESI )
PUSH_L( EDI )
@@ -377,7 +377,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_sse_transform_points3_2d_no_rot)
HIDDEN(_mesa_sse_transform_points3_2d_no_rot)
GLNAME(_mesa_sse_transform_points3_2d_no_rot):
-
+ _CET_ENDBR
#define FRAME_OFFSET 8
PUSH_L( ESI )
PUSH_L( EDI )
@@ -438,7 +438,7 @@ ALIGNTEXT4
GLOBL GLNAME(_mesa_sse_transform_points3_3d)
HIDDEN(_mesa_sse_transform_points3_3d)
GLNAME(_mesa_sse_transform_points3_3d):
-
+ _CET_ENDBR
#define FRAME_OFFSET 8
PUSH_L( ESI )
PUSH_L( EDI )
diff -up mesa-19.1.4/src/mesa/x86/sse_xform4.S.cet mesa-19.1.4/src/mesa/x86/sse_xform4.S
--- mesa-19.1.4/src/mesa/x86/sse_xform4.S.cet 2019-08-08 02:39:17.000000000 +1000
+++ mesa-19.1.4/src/mesa/x86/sse_xform4.S 2019-08-09 15:31:35.388426397 +1000
@@ -43,7 +43,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_sse_transform_points4_general )
HIDDEN(_mesa_sse_transform_points4_general)
GLNAME( _mesa_sse_transform_points4_general ):
-
+ _CET_ENDBR
PUSH_L( ESI )
PUSH_L( EDI )
@@ -115,7 +115,7 @@ ALIGNTEXT4
GLOBL GLNAME( _mesa_sse_transform_points4_3d )
HIDDEN(_mesa_sse_transform_points4_3d)
GLNAME( _mesa_sse_transform_points4_3d ):
-
+ _CET_ENDBR
PUSH_L( ESI )
PUSH_L( EDI )
@@ -187,7 +187,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_sse_transform_points4_identity )
HIDDEN(_mesa_sse_transform_points4_identity)
GLNAME( _mesa_sse_transform_points4_identity ):
-
+ _CET_ENDBR
PUSH_L( ESI )
PUSH_L( EDI )
diff -up mesa-19.1.4/src/mesa/x86/x86_cliptest.S.cet mesa-19.1.4/src/mesa/x86/x86_cliptest.S
--- mesa-19.1.4/src/mesa/x86/x86_cliptest.S.cet 2019-08-08 02:39:17.000000000 +1000
+++ mesa-19.1.4/src/mesa/x86/x86_cliptest.S 2019-08-09 15:31:35.388426397 +1000
@@ -103,7 +103,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_x86_cliptest_points4 )
HIDDEN(_mesa_x86_cliptest_points4)
GLNAME( _mesa_x86_cliptest_points4 ):
-
+ _CET_ENDBR
#ifdef ELFPIC
#define FRAME_OFFSET 20
#else
@@ -278,7 +278,7 @@ ALIGNTEXT16
GLOBL GLNAME( _mesa_x86_cliptest_points4_np )
HIDDEN(_mesa_x86_cliptest_points4_np)
GLNAME( _mesa_x86_cliptest_points4_np ):
-
+ _CET_ENDBR
#ifdef ELFPIC
#define FRAME_OFFSET 20
#else

View File

@ -0,0 +1,77 @@
From 74e4f90deeae466ed19d2a31d8f62f6fc5e1709b Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Fri, 14 Feb 2020 15:03:24 +1000
Subject: [PATCH 2/2] glx: add getImageShm2 path
If the glx side shmid is -1 (because the X server failed to attach)
then we should let the caller know to fallback.
Fixes: 02c3dad0f3b4 ("Call shmget() with permission 0600 instead of 0777")
---
src/glx/drisw_glx.c | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index 069f64d5216..dfa3218d759 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -288,10 +288,10 @@ swrastGetImage(__DRIdrawable * read,
swrastGetImage2(read, x, y, w, h, 0, data, loaderPrivate);
}
-static void
-swrastGetImageShm(__DRIdrawable * read,
- int x, int y, int w, int h,
- int shmid, void *loaderPrivate)
+static GLboolean
+swrastGetImageShm2(__DRIdrawable * read,
+ int x, int y, int w, int h,
+ int shmid, void *loaderPrivate)
{
struct drisw_drawable *prp = loaderPrivate;
__GLXDRIdrawable *pread = &(prp->base);
@@ -301,8 +301,11 @@ swrastGetImageShm(__DRIdrawable * read,
if (!prp->ximage || shmid != prp->shminfo.shmid) {
if (!XCreateDrawable(prp, shmid, dpy))
- return;
+ return GL_FALSE;
}
+
+ if (prp->shminfo.shmid == -1)
+ return GL_FALSE;
readable = pread->xDrawable;
ximage = prp->ximage;
@@ -312,10 +315,19 @@ swrastGetImageShm(__DRIdrawable * read,
ximage->bytes_per_line = bytes_per_line(w * ximage->bits_per_pixel, 32);
XShmGetImage(dpy, readable, ximage, x, y, ~0L);
+ return GL_TRUE;
+}
+
+static void
+swrastGetImageShm(__DRIdrawable * read,
+ int x, int y, int w, int h,
+ int shmid, void *loaderPrivate)
+{
+ swrastGetImageShm2(read, x, y, w, h, shmid, loaderPrivate);
}
static const __DRIswrastLoaderExtension swrastLoaderExtension_shm = {
- .base = {__DRI_SWRAST_LOADER, 5 },
+ .base = {__DRI_SWRAST_LOADER, 6 },
.getDrawableInfo = swrastGetDrawableInfo,
.putImage = swrastPutImage,
@@ -325,6 +337,7 @@ static const __DRIswrastLoaderExtension swrastLoaderExtension_shm = {
.putImageShm = swrastPutImageShm,
.getImageShm = swrastGetImageShm,
.putImageShm2 = swrastPutImageShm2,
+ .getImageShm2 = swrastGetImageShm2,
};
static const __DRIextension *loader_extensions_shm[] = {
--
2.21.1

View File

@ -1,4 +1,4 @@
VERSION ?= 19.1.4
VERSION ?= 19.3.4
SANITIZE ?= 1
DIRNAME = mesa-${VERSION}

View File

@ -0,0 +1,12 @@
diff -up mesa-19.3.3/src/glx/drisw_glx.c.dma mesa-19.3.3/src/glx/drisw_glx.c
--- mesa-19.3.3/src/glx/drisw_glx.c.dma 2020-02-14 12:37:42.551008273 +1000
+++ mesa-19.3.3/src/glx/drisw_glx.c 2020-02-14 12:37:49.683081406 +1000
@@ -199,7 +199,7 @@ swrastXPutImage(__DRIdrawable * draw, in
XShmPutImage(dpy, drawable, gc, ximage, srcx, srcy, x, y, w, h, False);
XSync(dpy, False);
} else {
- ximage->width = w;
+ ximage->width = ximage->bytes_per_line / ((ximage->bits_per_pixel + 7)/ 8);
ximage->height = h;
XPutImage(dpy, drawable, gc, ximage, srcx, srcy, x, y, w, h);
}

View File

@ -1,10 +0,0 @@
prefix=/usr
libdir=${prefix}/lib64
includedir=${prefix}/include
Name: glesv2
Description: Mesa OpenGL ES 2.0 library
Version: 19.1.0
Libs: -L${libdir} -lGLESv2
Libs.private: -lpthread -pthread -lm -ldl
Cflags: -I${includedir}

View File

@ -36,12 +36,12 @@
%global sanitize 0
#global rctag rc5
#global rctag rc4
Name: mesa
Summary: Mesa graphics libraries
Version: 19.1.4
Release: 3%{?rctag:.%{rctag}}%{?dist}
Version: 19.3.4
Release: 2%{?rctag:.%{rctag}}%{?dist}
License: MIT
URL: http://www.mesa3d.org
@ -55,10 +55,12 @@ Source3: Makefile
# Fedora opts to ignore the optional part of clause 2 and treat that code as 2 clause BSD.
Source4: Mesa-MLAA-License-Clarification-Email.txt
Source5: glesv2.pc
# fix for shm black images with Xephyr (#1798702)
# upstream in 19.3.5 most likely
Patch0: 0001-dri-add-another-get-shm-variant.patch
Patch1: 0002-glx-add-getImageShm2-path.patch
Patch2: dri-shm-fix-put-image.patch
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++
@ -108,7 +110,7 @@ BuildRequires: python3-mako
%ifarch %{valgrind_arches}
BuildRequires: pkgconfig(valgrind)
%endif
BuildRequires: pkgconfig(libglvnd) >= 0.2.0
BuildRequires: pkgconfig(libglvnd) >= 1.2.0
%if 0%{?rhel} == 7
BuildRequires: llvm-toolset-7-runtime
@ -121,31 +123,24 @@ BuildRequires: llvm-toolset-7-runtime
%package filesystem
Summary: Mesa driver filesystem
Provides: mesa-dri-filesystem = %{?epoch:%{epoch}}%{version}-%{release}
Obsoletes: mesa-dri-filesystem < %{?epoch:%{epoch}}%{version}-%{release}
Provides: mesa-dri-filesystem = %{?epoch:%{epoch}:}%{version}-%{release}
Obsoletes: mesa-dri-filesystem < %{?epoch:%{epoch}:}%{version}-%{release}
%description filesystem
%{summary}.
%package khr-devel
Summary: Mesa Khronos development headers
%description khr-devel
%{summary}.
%package libGL
Summary: Mesa libGL runtime libraries
Requires: %{name}-libglapi%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
Requires: libglvnd-glx%{?_isa} >= 1:1.0.1-0.8
Requires: %{name}-libglapi%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: libglvnd-glx%{?_isa} >= 1:1.2.0-1
%description libGL
%{summary}.
%package libGL-devel
Summary: Mesa libGL development package
Requires: %{name}-libGL%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
Requires: libglvnd-devel%{?_isa}
Requires: %{name}-khr-devel%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: %{name}-libGL%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: libglvnd-devel%{?_isa} >= 1:1.2.0-1
Provides: libGL-devel
Provides: libGL-devel%{?_isa}
@ -154,44 +149,24 @@ Provides: libGL-devel%{?_isa}
%package libEGL
Summary: Mesa libEGL runtime libraries
Requires: libglvnd-egl%{?_isa}
Requires: libglvnd-egl%{?_isa} >= 1:1.2.0-1
%description libEGL
%{summary}.
%package libEGL-devel
Summary: Mesa libEGL development package
Requires: %{name}-libEGL%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
Requires: libglvnd-devel%{?_isa}
Requires: %{name}-khr-devel%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: %{name}-libEGL%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: libglvnd-devel%{?_isa} >= 1:1.2.0-1
Provides: libEGL-devel
Provides: libEGL-devel%{?_isa}
%description libEGL-devel
%{summary}.
%package libGLES
Summary: Mesa libGLES runtime libraries
Requires: %{name}-libglapi%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
Requires: libglvnd-gles%{?_isa}
%description libGLES
%{summary}.
%package libGLES-devel
Summary: Mesa libGLES development package
Requires: %{name}-libGLES%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
Requires: libglvnd-devel%{?_isa}
Requires: %{name}-khr-devel%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: libGLES-devel
Provides: libGLES-devel%{?_isa}
%description libGLES-devel
%{summary}.
%package dri-drivers
Summary: Mesa-based DRI drivers
Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%description dri-drivers
%{summary}.
@ -199,7 +174,7 @@ Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}}%{version}-%{rele
%if 0%{?with_omx}
%package omx-drivers
Summary: Mesa-based OMX drivers
Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%description omx-drivers
%{summary}.
@ -208,7 +183,7 @@ Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}}%{version}-%{rele
%if 0%{?with_vdpau}
%package vdpau-drivers
Summary: Mesa-based VDPAU drivers
Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%description vdpau-drivers
%{summary}.
@ -216,7 +191,7 @@ Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}}%{version}-%{rele
%package libOSMesa
Summary: Mesa offscreen rendering libraries
Requires: %{name}-libglapi%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
Requires: %{name}-libglapi%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: libOSMesa
Provides: libOSMesa%{?_isa}
@ -225,7 +200,7 @@ Provides: libOSMesa%{?_isa}
%package libOSMesa-devel
Summary: Mesa offscreen rendering development package
Requires: %{name}-libOSMesa%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
Requires: %{name}-libOSMesa%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%description libOSMesa-devel
%{summary}.
@ -240,7 +215,7 @@ Provides: libgbm%{?_isa}
%package libgbm-devel
Summary: Mesa libgbm development package
Requires: %{name}-libgbm%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
Requires: %{name}-libgbm%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Provides: libgbm-devel
Provides: libgbm-devel%{?_isa}
@ -279,7 +254,7 @@ Provides: libglapi%{?_isa}
Summary: Mesa OpenCL runtime library
Requires: ocl-icd%{?_isa}
Requires: libclc%{?_isa}
Requires: %{name}-libgbm%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
Requires: %{name}-libgbm%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: opencl-filesystem
%description libOpenCL
@ -287,7 +262,7 @@ Requires: opencl-filesystem
%package libOpenCL-devel
Summary: Mesa OpenCL development package
Requires: %{name}-libOpenCL%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
Requires: %{name}-libOpenCL%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%description libOpenCL-devel
%{summary}.
@ -302,7 +277,7 @@ Summary: Mesa Direct3D9 state tracker
%package libd3d-devel
Summary: Mesa Direct3D9 state tracker development package
Requires: %{name}-libd3d%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
Requires: %{name}-libd3d%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%description libd3d-devel
%{summary}.
@ -318,7 +293,7 @@ The drivers with support for the Vulkan API.
%package vulkan-devel
Summary: Mesa Vulkan development files
Requires: %{name}-vulkan-drivers%{?_isa} = %{?epoch:%{epoch}}%{version}-%{release}
Requires: %{name}-vulkan-drivers%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: vulkan-devel
%description vulkan-devel
@ -338,7 +313,6 @@ Headers for development with the Vulkan API.
%endif
cp %{SOURCE4} docs/
cp %{SOURCE5} .
pathfix.py -i %{__python3} -pn bin/*.py src/egl/generate/*.py \
src/gallium/tools/trace/*.py \
@ -348,7 +322,7 @@ pathfix.py -i %{__python3} -pn bin/*.py src/egl/generate/*.py \
%build
export ASFLAGS="--generate-missing-build-notes=yes"
%meson -Dcpp_std=gnu++11 \
%meson -Dcpp_std=gnu++14 \
-Db_ndebug=true \
-Dplatforms=x11,wayland,drm,surfaceless \
-Ddri3=true \
@ -387,15 +361,13 @@ export ASFLAGS="--generate-missing-build-notes=yes"
%install
%meson_install
install glesv2.pc %{buildroot}%{_libdir}/pkgconfig/
# libvdpau opens the versioned name, don't bother including the unversioned
rm -f %{buildroot}%{_libdir}/vdpau/*.so
rm -vf %{buildroot}%{_libdir}/vdpau/*.so
# likewise glvnd
rm -f %{buildroot}%{_libdir}/libGLX_mesa.so
rm -f %{buildroot}%{_libdir}/libEGL_mesa.so
rm -vf %{buildroot}%{_libdir}/libGLX_mesa.so
rm -vf %{buildroot}%{_libdir}/libEGL_mesa.so
# XXX can we just not build this
rm -f %{buildroot}%{_libdir}/libGLES*
rm -vf %{buildroot}%{_libdir}/libGLES*
# glvnd needs a default provider for indirect rendering where it cannot
# determine the vendor
@ -426,53 +398,22 @@ done
%endif
%endif
%files khr-devel
%dir %{_includedir}/KHR
%{_includedir}/KHR/khrplatform.h
%files libGL
%{_libdir}/libGLX_mesa.so.0*
%{_libdir}/libGLX_system.so.0*
%files libGL-devel
%{_includedir}/GL/gl.h
%{_includedir}/GL/gl_mangle.h
%{_includedir}/GL/glext.h
%{_includedir}/GL/glx.h
%{_includedir}/GL/glx_mangle.h
%{_includedir}/GL/glxext.h
%{_includedir}/GL/glcorearb.h
%dir %{_includedir}/GL/internal
%{_includedir}/GL/internal/dri_interface.h
%{_libdir}/pkgconfig/dri.pc
%{_libdir}/libglapi.so
%{_libdir}/pkgconfig/gl.pc
%files libEGL
%{_datadir}/glvnd/egl_vendor.d/50_mesa.json
%{_libdir}/libEGL_mesa.so.0*
%files libEGL-devel
%dir %{_includedir}/EGL
%{_includedir}/EGL/eglext.h
%{_includedir}/EGL/egl.h
%{_includedir}/EGL/eglmesaext.h
%{_includedir}/EGL/eglplatform.h
%{_includedir}/EGL/eglextchromium.h
%{_libdir}/pkgconfig/egl.pc
%files libGLES
# No files, all provided by libglvnd
%files libGLES-devel
%dir %{_includedir}/GLES2
%{_includedir}/GLES2/gl2platform.h
%{_includedir}/GLES2/gl2.h
%{_includedir}/GLES2/gl2ext.h
%dir %{_includedir}/GLES3
%{_includedir}/GLES3/gl3platform.h
%{_includedir}/GLES3/gl3.h
%{_includedir}/GLES3/gl3ext.h
%{_includedir}/GLES3/gl31.h
%{_includedir}/GLES3/gl32.h
%{_libdir}/pkgconfig/glesv2.pc
%post libglapi -p /sbin/ldconfig
%postun libglapi -p /sbin/ldconfig
@ -602,8 +543,23 @@ 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
* Thu Feb 20 2020 Dave Airlie <airlied@redhat.com> - 19.3.4-2
- Fix put image shm fallback path.
* Sat Feb 15 2020 Dave Airlie <airlied@redhat.com> - 19.3.4-1
- Update to 19.3.4 release (s390x fix)
* Thu Jan 30 2020 Dave Airlie <airlied@redhat.com> - 19.3.3-1
- Update to 19.3.3 release
* Mon Nov 25 2019 Dave Airlie <airlied@redhat.com> - 19.3.0-3
- drop khr-devel subpackage from here
* Fri Nov 22 2019 Dave Airlie <airlied@redhat.com> - 19.3.0-2
- sort out libglvnd requires
* Thu Nov 21 2019 Dave Airlie <airlied@redhat.com> - 19.3.0-1
- mesa-19.3.0-rc4
* Fri Aug 09 2019 Dave Airlie <airlied@redhat.com> - 19.1.4-2
- Add CET support to asm files