From 928187c20c9e3bfc6bac9387a2a2d56c0774e7e0 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 05 2019 19:36:33 +0000 Subject: import mesa-19.1.4-2.el8 --- diff --git a/.gitignore b/.gitignore index 1322f5d..79c08ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/mesa-18.3.1.tar.xz +SOURCES/mesa-19.1.4.tar.xz diff --git a/.mesa.metadata b/.mesa.metadata index 822da05..b5b0fdb 100644 --- a/.mesa.metadata +++ b/.mesa.metadata @@ -1 +1 @@ -f82a1f168abe2a02c26325a8501a174d9fcc7c50 SOURCES/mesa-18.3.1.tar.xz +75602d642c3d92fff29d7c50a8afd61577adf3b8 SOURCES/mesa-19.1.4.tar.xz diff --git a/SOURCES/0001-glx-fix-shared-memory-leak-in-X11.patch b/SOURCES/0001-glx-fix-shared-memory-leak-in-X11.patch deleted file mode 100644 index 4cb6895..0000000 --- a/SOURCES/0001-glx-fix-shared-memory-leak-in-X11.patch +++ /dev/null @@ -1,31 +0,0 @@ -From b344e32cdf7064a1f2ff7ef37027edda6589404f Mon Sep 17 00:00:00 2001 -From: Ray Zhang -Date: Wed, 27 Feb 2019 06:54:05 +0000 -Subject: [PATCH] glx: fix shared memory leak in X11 - -call XShmDetach to allow X server to free shared memory - -Fixes: bcd80be49a8260c2233d "drisw/glx: use XShm if possible" -Signed-off-by: Ray Zhang -Reviewed-by: Dave Airlie ---- - src/glx/drisw_glx.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c -index 00c7fa100ab..48c03ca42e0 100644 ---- a/src/glx/drisw_glx.c -+++ b/src/glx/drisw_glx.c -@@ -147,6 +147,9 @@ XDestroyDrawable(struct drisw_drawable * pdp, Display * dpy, XID drawable) - if (pdp->ximage) - XDestroyImage(pdp->ximage); - -+ if (pdp->shminfo.shmid > 0) -+ XShmDetach(dpy, &pdp->shminfo); -+ - free(pdp->visinfo); - - XFreeGC(dpy, pdp->gc); --- -2.20.1 - diff --git a/SOURCES/0001-llvm-SONAME-without-version.patch b/SOURCES/0001-llvm-SONAME-without-version.patch deleted file mode 100644 index cb91094..0000000 --- a/SOURCES/0001-llvm-SONAME-without-version.patch +++ /dev/null @@ -1,26 +0,0 @@ -From c2b4d93a5e4796ca53361c61d7e31edc24241932 Mon Sep 17 00:00:00 2001 -From: Igor Gnatenko -Date: Sun, 20 Mar 2016 13:26:25 +0100 -Subject: [PATCH 1/4] llvm SONAME without version - -Signed-off-by: Igor Gnatenko ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 5f75c60..d77f907 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -2645,7 +2645,7 @@ - dnl ourselves. - dnl (See https://llvm.org/bugs/show_bug.cgi?id=6823) - dnl We can't use $LLVM_VERSION because it has 'svn' stripped out, -- LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version` -+ LLVM_SO_NAME=LLVM - AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.$IMP_LIB_EXT"], [llvm_have_one_so=yes]) - - if test "x$llvm_have_one_so" = xyes; then --- -2.7.4 - diff --git a/SOURCES/0001-mesa-add-support-for-CET-to-x86-x86-64-asm-files.patch b/SOURCES/0001-mesa-add-support-for-CET-to-x86-x86-64-asm-files.patch new file mode 100644 index 0000000..3ad4cbf --- /dev/null +++ b/SOURCES/0001-mesa-add-support-for-CET-to-x86-x86-64-asm-files.patch @@ -0,0 +1,794 @@ +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 ++#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 ++#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 + */ +- ++/* Control flow enforcement support */ ++#ifdef HAVE_CET_H ++#include ++#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 diff --git a/SOURCES/0003-evergreen-big-endian.patch b/SOURCES/0003-evergreen-big-endian.patch deleted file mode 100644 index ccf1717..0000000 --- a/SOURCES/0003-evergreen-big-endian.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0ec3bdb2264b491fd3f5dc4e638b4c12611ef219 Mon Sep 17 00:00:00 2001 -From: Igor Gnatenko -Date: Sun, 20 Mar 2016 13:27:45 +0100 -Subject: [PATCH 3/4] evergreen big endian - -Signed-off-by: Igor Gnatenko ---- - src/gallium/drivers/r600/r600_state_common.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c -index cac240e..4b620a1 100644 ---- a/src/gallium/drivers/r600/r600_state_common.c -+++ b/src/gallium/drivers/r600/r600_state_common.c -@@ -2716,7 +2716,7 @@ uint32_t r600_translate_colorformat(enum chip_class chip, enum pipe_format forma - - uint32_t r600_colorformat_endian_swap(uint32_t colorformat, bool do_endian_swap) - { -- if (R600_BIG_ENDIAN) { -+ if (0 && R600_BIG_ENDIAN) { - switch(colorformat) { - /* 8-bit buffers. */ - case V_0280A0_COLOR_4_4: --- -2.7.4 - diff --git a/SOURCES/Makefile b/SOURCES/Makefile index a2d9817..f0899d7 100644 --- a/SOURCES/Makefile +++ b/SOURCES/Makefile @@ -1,4 +1,4 @@ -VERSION ?= 18.3.1 +VERSION ?= 19.1.4 SANITIZE ?= 1 DIRNAME = mesa-${VERSION} diff --git a/SOURCES/fix-llvmpipe-remote-shm.patch b/SOURCES/fix-llvmpipe-remote-shm.patch deleted file mode 100644 index b03ae67..0000000 --- a/SOURCES/fix-llvmpipe-remote-shm.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 607a59f2922b1261920bae94efe4dc87da18d576 Mon Sep 17 00:00:00 2001 -From: Adam Jackson -Date: Tue, 5 Mar 2019 15:31:51 -0500 -Subject: [PATCH] drisw: Try harder to probe whether MIT-SHM works - -XQueryExtension merely tells you whether the extension exists, it -doesn't tell you whether you're local enough for it to work. -XShmQueryVersion is not enough to discover this either, you need to -provoke the server to do actual work, and if it thinks you're remote it -will throw BadRequest at you. So send an invalid ShmDetach and use the -error code to distinguish local from remote. - -Signed-off-by: Adam Jackson ---- - src/glx/drisw_glx.c | 26 ++++++++++++++++++++++---- - 1 file changed, 22 insertions(+), 4 deletions(-) - -diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c -index c63b097a71a..67698d1c450 100644 ---- a/src/glx/drisw_glx.c -+++ b/src/glx/drisw_glx.c -@@ -73,11 +73,10 @@ handle_xerror(Display *dpy, XErrorEvent *event) - (void) dpy; - - assert(xshm_opcode != -1); -- if (event->request_code != xshm_opcode || -- event->minor_code != X_ShmAttach) -+ if (event->request_code != xshm_opcode) - return 0; - -- xshm_error = 1; -+ xshm_error = event->error_code; - return 0; - } - -@@ -826,9 +825,28 @@ driswBindExtensions(struct drisw_screen *psc, const __DRIextension **extensions) - static int - check_xshm(Display *dpy) - { -+ int (*old_handler)(Display *, XErrorEvent *); -+ - int ignore; -+ XShmSegmentInfo info = { 0, }; -+ -+ if (!XQueryExtension(dpy, "MIT-SHM", &xshm_opcode, &ignore, &ignore)) -+ return False; -+ -+ old_handler = XSetErrorHandler(handle_xerror); -+ XShmDetach(dpy, &info); -+ XSync(dpy, False); -+ (void) XSetErrorHandler(old_handler); - -- return XQueryExtension(dpy, "MIT-SHM", &xshm_opcode, &ignore, &ignore); -+ /* BadRequest means we're a remote client. If we were local we'd -+ * expect BadValue since 'info' has an invalid segment name. -+ */ -+ if (xshm_error == BadRequest) -+ return False; -+ -+ /* reset this as others read it later */ -+ xshm_error = 0; -+ return True; - } - - static struct glx_screen * --- -2.20.1 - diff --git a/SOURCES/glesv2.pc b/SOURCES/glesv2.pc new file mode 100644 index 0000000..7af1555 --- /dev/null +++ b/SOURCES/glesv2.pc @@ -0,0 +1,10 @@ +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} diff --git a/SOURCES/glvnd-fix-gl-dot-pc.patch b/SOURCES/glvnd-fix-gl-dot-pc.patch deleted file mode 100644 index b723734..0000000 --- a/SOURCES/glvnd-fix-gl-dot-pc.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up mesa-12.0.3/src/mesa/gl.pc.in.jx mesa-12.0.3/src/mesa/gl.pc.in ---- mesa-12.0.3/src/mesa/gl.pc.in.jx 2016-01-18 02:39:26.000000000 -0500 -+++ mesa-12.0.3/src/mesa/gl.pc.in 2016-10-25 13:06:44.013159358 -0400 -@@ -7,7 +7,7 @@ Name: gl - Description: Mesa OpenGL library - Requires.private: @GL_PC_REQ_PRIV@ - Version: @PACKAGE_VERSION@ --Libs: -L${libdir} -l@GL_PKGCONF_LIB@ -+Libs: -L${libdir} -lGL - Libs.private: @GL_PC_LIB_PRIV@ - Cflags: -I${includedir} @GL_PC_CFLAGS@ - glx_tls: @GLX_TLS@ diff --git a/SOURCES/mesa-18.0.2-gallium-osmesa.patch b/SOURCES/mesa-18.0.2-gallium-osmesa.patch deleted file mode 100644 index f29043b..0000000 --- a/SOURCES/mesa-18.0.2-gallium-osmesa.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up mesa-18.0.2/src/gallium/auxiliary/Makefile.am.jx mesa-18.0.2/src/gallium/auxiliary/Makefile.am ---- mesa-18.0.2/src/gallium/auxiliary/Makefile.am.jx 2018-04-28 12:25:16.000000000 -0400 -+++ mesa-18.0.2/src/gallium/auxiliary/Makefile.am 2018-05-29 11:41:23.429180991 -0400 -@@ -29,6 +29,8 @@ AM_CFLAGS += \ - libgallium_la_SOURCES += \ - $(RENDERONLY_SOURCES) - -+libgallium_la_LIBADD = $(LIBDRM_LIBS) -+ - endif - - if HAVE_GALLIUM_LLVM diff --git a/SOURCES/shmfix.patch b/SOURCES/shmfix.patch deleted file mode 100644 index cec7f06..0000000 --- a/SOURCES/shmfix.patch +++ /dev/null @@ -1,220 +0,0 @@ -diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h -index 6f9c2c8b8cf..c1c15013a58 100644 ---- a/include/GL/internal/dri_interface.h -+++ b/include/GL/internal/dri_interface.h -@@ -589,7 +589,7 @@ struct __DRIdamageExtensionRec { - * SWRast Loader extension. - */ - #define __DRI_SWRAST_LOADER "DRI_SWRastLoader" --#define __DRI_SWRAST_LOADER_VERSION 4 -+#define __DRI_SWRAST_LOADER_VERSION 5 - struct __DRIswrastLoaderExtensionRec { - __DRIextension base; - -@@ -649,6 +649,23 @@ struct __DRIswrastLoaderExtensionRec { - void (*getImageShm)(__DRIdrawable *readable, - int x, int y, int width, int height, - int shmid, void *loaderPrivate); -+ -+ /** -+ * Put shm image to drawable (v2) -+ * -+ * The original version fixes srcx/y to 0, and expected -+ * the offset to be adjusted. This version allows src x,y -+ * to not be included in the offset. This is needed to -+ * avoid certain overflow checks in the X server, that -+ * result in lost rendering. -+ * -+ * \since 5 -+ */ -+ void (*putImageShm2)(__DRIdrawable *drawable, int op, -+ int x, int y, -+ int width, int height, int stride, -+ int shmid, char *shmaddr, unsigned offset, -+ void *loaderPrivate); - }; - - /** -diff --git a/src/gallium/include/state_tracker/drisw_api.h b/src/gallium/include/state_tracker/drisw_api.h -index e365ab81f18..4b5d36c1797 100644 ---- a/src/gallium/include/state_tracker/drisw_api.h -+++ b/src/gallium/include/state_tracker/drisw_api.h -@@ -20,7 +20,7 @@ struct drisw_loader_funcs - void (*put_image2) (struct dri_drawable *dri_drawable, - void *data, int x, int y, unsigned width, unsigned height, unsigned stride); - void (*put_image_shm) (struct dri_drawable *dri_drawable, -- int shmid, char *shmaddr, unsigned offset, -+ int shmid, char *shmaddr, unsigned offset, unsigned offset_x, - int x, int y, unsigned width, unsigned height, unsigned stride); - }; - -diff --git a/src/gallium/state_trackers/dri/drisw.c b/src/gallium/state_trackers/dri/drisw.c -index 5a0d2e1354d..927ac39ce65 100644 ---- a/src/gallium/state_trackers/dri/drisw.c -+++ b/src/gallium/state_trackers/dri/drisw.c -@@ -79,15 +79,21 @@ put_image2(__DRIdrawable *dPriv, void *data, int x, int y, - - static inline void - put_image_shm(__DRIdrawable *dPriv, int shmid, char *shmaddr, -- unsigned offset, int x, int y, -+ unsigned offset, unsigned offset_x, int x, int y, - unsigned width, unsigned height, unsigned stride) - { - __DRIscreen *sPriv = dPriv->driScreenPriv; - const __DRIswrastLoaderExtension *loader = sPriv->swrast_loader; - -- loader->putImageShm(dPriv, __DRI_SWRAST_IMAGE_OP_SWAP, -- x, y, width, height, stride, -- shmid, shmaddr, offset, dPriv->loaderPrivate); -+ /* if we have the newer interface, don't have to add the offset_x here. */ -+ if (loader->base.version > 4 && loader->putImageShm2) -+ loader->putImageShm2(dPriv, __DRI_SWRAST_IMAGE_OP_SWAP, -+ x, y, width, height, stride, -+ shmid, shmaddr, offset, dPriv->loaderPrivate); -+ else -+ loader->putImageShm(dPriv, __DRI_SWRAST_IMAGE_OP_SWAP, -+ x, y, width, height, stride, -+ shmid, shmaddr, offset + offset_x, dPriv->loaderPrivate); - } - - static inline void -@@ -179,12 +185,13 @@ drisw_put_image2(struct dri_drawable *drawable, - static inline void - drisw_put_image_shm(struct dri_drawable *drawable, - int shmid, char *shmaddr, unsigned offset, -+ unsigned offset_x, - int x, int y, unsigned width, unsigned height, - unsigned stride) - { - __DRIdrawable *dPriv = drawable->dPriv; - -- put_image_shm(dPriv, shmid, shmaddr, offset, x, y, width, height, stride); -+ put_image_shm(dPriv, shmid, shmaddr, offset, offset_x, x, y, width, height, stride); - } - - static inline void -diff --git a/src/gallium/winsys/sw/dri/dri_sw_winsys.c b/src/gallium/winsys/sw/dri/dri_sw_winsys.c -index cd44b036c6f..c0200f939b6 100644 ---- a/src/gallium/winsys/sw/dri/dri_sw_winsys.c -+++ b/src/gallium/winsys/sw/dri/dri_sw_winsys.c -@@ -244,15 +244,20 @@ dri_sw_displaytarget_display(struct sw_winsys *ws, - unsigned width, height, x = 0, y = 0; - unsigned blsize = util_format_get_blocksize(dri_sw_dt->format); - unsigned offset = 0; -+ unsigned offset_x = 0; - char *data = dri_sw_dt->data; -- -+ bool is_shm = dri_sw_dt->shmid != -1; - /* Set the width to 'stride / cpp'. - * - * PutImage correctly clips to the width of the dst drawable. - */ - if (box) { -- offset = (dri_sw_dt->stride * box->y) + box->x * blsize; -+ offset = dri_sw_dt->stride * box->y; -+ offset_x = box->x * blsize; - data += offset; -+ /* don't add x offset for shm, the put_image_shm will deal with it */ -+ if (!is_shm) -+ data += offset_x; - x = box->x; - y = box->y; - width = box->width; -@@ -262,8 +267,8 @@ dri_sw_displaytarget_display(struct sw_winsys *ws, - height = dri_sw_dt->height; - } - -- if (dri_sw_dt->shmid != -1) { -- dri_sw_ws->lf->put_image_shm(dri_drawable, dri_sw_dt->shmid, dri_sw_dt->data, offset, -+ if (is_shm) { -+ dri_sw_ws->lf->put_image_shm(dri_drawable, dri_sw_dt->shmid, dri_sw_dt->data, offset, offset_x, - x, y, width, height, dri_sw_dt->stride); - return; - } -diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c -index a2777100a32..fa0f0d7bf6f 100644 ---- a/src/glx/drisw_glx.c -+++ b/src/glx/drisw_glx.c -@@ -201,7 +201,8 @@ bytes_per_line(unsigned pitch_bits, unsigned mul) - - static void - swrastXPutImage(__DRIdrawable * draw, int op, -- int x, int y, int w, int h, int stride, -+ int srcx, int srcy, int x, int y, -+ int w, int h, int stride, - int shmid, char *data, void *loaderPrivate) - { - struct drisw_drawable *pdp = loaderPrivate; -@@ -235,12 +236,12 @@ swrastXPutImage(__DRIdrawable * draw, int op, - if (pdp->shminfo.shmid >= 0) { - ximage->width = ximage->bytes_per_line / ((ximage->bits_per_pixel + 7)/ 8); - ximage->height = h; -- XShmPutImage(dpy, drawable, gc, ximage, 0, 0, x, y, w, h, False); -+ XShmPutImage(dpy, drawable, gc, ximage, srcx, srcy, x, y, w, h, False); - XSync(dpy, False); - } else { - ximage->width = w; - ximage->height = h; -- XPutImage(dpy, drawable, gc, ximage, 0, 0, x, y, w, h); -+ XPutImage(dpy, drawable, gc, ximage, srcx, srcy, x, y, w, h); - } - ximage->data = NULL; - } -@@ -254,7 +255,21 @@ swrastPutImageShm(__DRIdrawable * draw, int op, - struct drisw_drawable *pdp = loaderPrivate; - - pdp->shminfo.shmaddr = shmaddr; -- swrastXPutImage(draw, op, x, y, w, h, stride, shmid, -+ swrastXPutImage(draw, op, 0, 0, x, y, w, h, stride, shmid, -+ shmaddr + offset, loaderPrivate); -+} -+ -+static void -+swrastPutImageShm2(__DRIdrawable * draw, int op, -+ int x, int y, -+ int w, int h, int stride, -+ int shmid, char *shmaddr, unsigned offset, -+ void *loaderPrivate) -+{ -+ struct drisw_drawable *pdp = loaderPrivate; -+ -+ pdp->shminfo.shmaddr = shmaddr; -+ swrastXPutImage(draw, op, x, 0, x, y, w, h, stride, shmid, - shmaddr + offset, loaderPrivate); - } - -@@ -263,7 +278,7 @@ swrastPutImage2(__DRIdrawable * draw, int op, - int x, int y, int w, int h, int stride, - char *data, void *loaderPrivate) - { -- swrastXPutImage(draw, op, x, y, w, h, stride, -1, -+ swrastXPutImage(draw, op, 0, 0, x, y, w, h, stride, -1, - data, loaderPrivate); - } - -@@ -272,7 +287,7 @@ swrastPutImage(__DRIdrawable * draw, int op, - int x, int y, int w, int h, - char *data, void *loaderPrivate) - { -- swrastXPutImage(draw, op, x, y, w, h, 0, -1, -+ swrastXPutImage(draw, op, 0, 0, x, y, w, h, 0, -1, - data, loaderPrivate); - } - -@@ -340,7 +355,7 @@ swrastGetImageShm(__DRIdrawable * read, - } - - static const __DRIswrastLoaderExtension swrastLoaderExtension_shm = { -- .base = {__DRI_SWRAST_LOADER, 4 }, -+ .base = {__DRI_SWRAST_LOADER, 5 }, - - .getDrawableInfo = swrastGetDrawableInfo, - .putImage = swrastPutImage, -@@ -349,6 +364,7 @@ static const __DRIswrastLoaderExtension swrastLoaderExtension_shm = { - .getImage2 = swrastGetImage2, - .putImageShm = swrastPutImageShm, - .getImageShm = swrastGetImageShm, -+ .putImageShm2 = swrastPutImageShm2, - }; - - static const __DRIextension *loader_extensions_shm[] = { diff --git a/SPECS/mesa.spec b/SPECS/mesa.spec index 442f6fd..f39f4b4 100644 --- a/SPECS/mesa.spec +++ b/SPECS/mesa.spec @@ -3,21 +3,15 @@ %ifarch s390x %define with_hardware 0 -%define base_drivers swrast %else %define with_hardware 1 %define with_vdpau 1 -# XXX maybe wrong... -%define with_vaapi 0 -%define with_nine 0 -%define base_drivers swrast %endif %ifarch %{ix86} x86_64 %define platform_drivers ,i965 %define with_vmware 1 %define with_xa 1 -%define with_omx 0 %endif %ifarch %{ix86} x86_64 @@ -26,32 +20,28 @@ %define with_vulkan 0 %endif -%ifarch aarch64 %{ix86} x86_64 -%define with_opencl 0 -%endif - %ifarch %{arm} aarch64 -#define with_etnaviv 0 -#define with_freedreno 0 -%define with_omx 0 -#define with_vc4 0 %define with_xa 1 %endif -%define dri_drivers --with-dri-drivers=%{?base_drivers}%{?platform_drivers} +%ifnarch %{x86} +%global with_asm 1 +%endif + +%global dri_drivers %{?platform_drivers} %if 0%{?with_vulkan} -%define vulkan_drivers --with-vulkan-drivers=intel,radeon +%define vulkan_drivers intel,amd %endif %global sanitize 0 -#global rctag rc2 +#global rctag rc5 Name: mesa Summary: Mesa graphics libraries -Version: 18.3.1 -Release: 5%{?rctag:.%{rctag}}%{?dist} +Version: 19.1.4 +Release: 2%{?rctag:.%{rctag}}%{?dist} License: MIT URL: http://www.mesa3d.org @@ -65,20 +55,13 @@ 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 -Patch1: 0001-llvm-SONAME-without-version.patch -Patch3: 0003-evergreen-big-endian.patch -Patch10: glvnd-fix-gl-dot-pc.patch -Patch21: mesa-18.0.2-gallium-osmesa.patch -Patch30: shmfix.patch -Patch31: 0001-glx-fix-shared-memory-leak-in-X11.patch -Patch32: fix-llvmpipe-remote-shm.patch +Source5: glesv2.pc +Patch0: 0001-mesa-add-support-for-CET-to-x86-x86-64-asm-files.patch BuildRequires: gcc BuildRequires: gcc-c++ -BuildRequires: automake -BuildRequires: autoconf -BuildRequires: libtool +BuildRequires: meson >= 0.45 %if %{with_hardware} BuildRequires: kernel-headers %endif @@ -120,9 +103,6 @@ BuildRequires: libomxil-bellagio-devel %if 0%{?with_opencl} BuildRequires: libclc-devel opencl-filesystem %endif -%if 0%{?with_vulkan} -BuildRequires: vulkan-devel -%endif BuildRequires: python3-mako %ifarch %{valgrind_arches} BuildRequires: pkgconfig(valgrind) @@ -357,6 +337,7 @@ 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 \ @@ -364,50 +345,48 @@ pathfix.py -i %{__python3} -pn bin/*.py src/egl/generate/*.py \ src/compiler/glsl/glcpp/tests/*.py %build -autoreconf -vfi -%ifarch %{ix86} -%global asm_flags --disable-asm -%endif export ASFLAGS="--generate-missing-build-notes=yes" -%configure \ - %{?asm_flags} \ - --enable-libglvnd \ - --enable-selinux \ - --enable-gallium-osmesa \ - --with-dri-driverdir=%{_libdir}/dri \ - --enable-egl \ - --disable-gles1 \ - --enable-gles2 \ - --disable-xvmc \ - %{?with_vdpau:--enable-vdpau} \ - --disable-va \ - --with-platforms=x11,drm,surfaceless,wayland \ - --enable-shared-glapi \ - --enable-gbm \ - --disable-omx-bellagio \ - --disable-opencl \ - --enable-glx-tls \ - --enable-texture-float=yes \ -%if %{with_vulkan} - %{?vulkan_drivers} \ -%endif - --enable-llvm \ - --enable-llvm-shared-libs \ - --enable-dri \ -%if %{with_hardware} - %{?with_xa:--enable-xa} \ - --disable-nine \ - --with-gallium-drivers=%{?with_vmware:svga,}radeonsi,swrast,r600,%{?with_freedreno:freedreno,}%{?with_etnaviv:etnaviv,imx,}%{?with_vc4:vc4,}virgl,nouveau \ +%meson -Dcpp_std=gnu++11 \ + -Db_ndebug=true \ + -Dplatforms=x11,wayland,drm,surfaceless \ + -Ddri3=true \ + -Ddri-drivers=%{?dri_drivers} \ +%if 0%{?with_hardware} + -Dgallium-drivers=swrast,virgl,nouveau%{?with_vmware:,svga},radeonsi,r600%{?with_freedreno:,freedreno}%{?with_etnaviv:,etnaviv}%{?with_tegra:,tegra}%{?with_vc4:,vc4}%{?with_kmsro:,kmsro} \ %else - --with-gallium-drivers=swrast,virgl \ + -Dgallium-drivers=swrast,virgl \ %endif - %{?dri_drivers} - -%make_build MKDEP=/bin/true V=1 + -Dgallium-vdpau=%{?with_vdpau:true}%{!?with_vdpau:false} \ + -Dgallium-xvmc=false \ + -Dgallium-omx=%{?with_omx:bellagio}%{!?with_omx:disabled} \ + -Dgallium-va=%{?with_vaapi:true}%{!?with_vaapi:false} \ + -Dgallium-xa=%{?with_xa:true}%{!?with_xa:false} \ + -Dgallium-nine=%{?with_nine:true}%{!?with_nine:false} \ + -Dgallium-opencl=%{?with_opencl:icd}%{!?with_opencl:disabled} \ + -Dvulkan-drivers=%{?vulkan_drivers} \ + -Dshared-glapi=true \ + -Dgles1=false \ + -Dgles2=true \ + -Dopengl=true \ + -Dgbm=true \ + -Dglx=dri \ + -Degl=true \ + -Dglvnd=true \ + -Dasm=%{?with_asm:true}%{!?with_asm:false} \ + -Dllvm=true \ + -Dshared-llvm=true \ + -Dvalgrind=%{?with_valgrind:true}%{!?with_valgrind:false} \ + -Dbuild-tests=false \ + -Dselinux=true \ + -Dosmesa=gallium \ + %{nil} +%meson_build %install -%make_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 @@ -622,6 +601,29 @@ done %endif %changelog +* Fri Aug 09 2019 Dave Airlie - 19.1.4-2 +- Add CET support to asm files + +* Mon Aug 05 2019 Dave Airlie - 19.1.4-1 +- mesa-19.1.4 + +* Thu Jun 06 2019 Dave Airlie - 19.1.0-0.5 +- mesa-19.1.0-rc5 + +* Thu May 30 2019 Dave Airlie - 19.1.0-0.4 +- mesa-19.1.0-rc4 + +* Wed May 22 2019 Dave Airlie - 19.1.0-0.3 +- mesa-19.1.0-rc3 +- disable asserts explicitly + +* Thu May 16 2019 Dave Airlie - 19.1.0-0.2 +- mesa 19.1.0-rc2 +- bring back glesv2.pc + +* Fri May 10 2019 Dave Airlie - 19.1.0-0.1 +- mesa 19.1.0-rc1 + * Thu Apr 04 2019 Dave Airlie - 18.3.1-5 - Fix remote shm detection again