diff --git a/Mesa-22.2.3-revert-glx-fix-drawable-refcounting-for-naked-windows.patch b/Mesa-22.2.3-revert-glx-fix-drawable-refcounting-for-naked-windows.patch deleted file mode 100644 index 5060829..0000000 --- a/Mesa-22.2.3-revert-glx-fix-drawable-refcounting-for-naked-windows.patch +++ /dev/null @@ -1,281 +0,0 @@ -From 768238fdc06eed3dce36da3baf811cb70db42b5c Mon Sep 17 00:00:00 2001 -From: Adam Jackson -Date: Mon, 11 Jul 2022 19:30:05 -0400 -Subject: [PATCH] glx: Fix drawable refcounting for naked Windows - -driFetchDrawable is only ever called from the MakeCurrent path, which -means it has to handle the case of pre-GLX-1.3 Windows being named as -the drawable. When it finds the drawable in the hash, it increments its -refcount before returning it, so for a GLXWindow it would be 2 on first -return, one from glXCreateWindow and one from glXMakeCurrent. But when -it does not find the drawable and creates one for the naked Window, the -reference count on first return would only be 1. As a result, if this -context was then ever bound to a different drawable, the old Window's -DRI drawable state (like the back buffer) would be destroyed. - -Fixes piglit's glx-multi-window-single-context and glx-make-current for -a variety of drivers. - -Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6713 -Reviewed-by: Emma Anholt -Part-of: ---- - src/broadcom/ci/broadcom-rpi3-fails.txt | 1 - - src/broadcom/ci/broadcom-rpi3-flakes.txt | 1 - - src/broadcom/ci/broadcom-rpi4-fails.txt | 2 -- - src/freedreno/ci/freedreno-a307-fails.txt | 2 -- - src/freedreno/ci/freedreno-a420-fails.txt | 2 -- - src/freedreno/ci/freedreno-a530-fails.txt | 2 -- - src/freedreno/ci/freedreno-a630-fails.txt | 2 -- - src/gallium/drivers/llvmpipe/ci/llvmpipe-fails.txt | 7 ------- - src/gallium/drivers/radeonsi/ci/gfx10-navi10-fail.csv | 2 -- - src/gallium/drivers/radeonsi/ci/gfx10_3-navi21-fail.csv | 2 -- - src/gallium/drivers/radeonsi/ci/gfx8-polaris11-fail.csv | 2 -- - src/gallium/drivers/radeonsi/ci/gfx9-raven-fail.csv | 2 -- - src/gallium/drivers/radeonsi/ci/gfx9-vega20-fail.csv | 2 -- - src/gallium/drivers/softpipe/ci/softpipe-fails.txt | 6 ------ - src/gallium/drivers/virgl/ci/virpipe-gl-fails.txt | 2 -- - src/gallium/drivers/zink/ci/zink-lvp-flakes.txt | 1 - - src/gallium/drivers/zink/ci/zink-lvp-skips.txt | 1 - - src/gallium/drivers/zink/ci/zink-radv-fails.txt | 2 -- - src/glx/dri_common.c | 9 ++++++++- - src/intel/ci/iris-kbl-fails.txt | 9 --------- - src/panfrost/ci/panfrost-g52-fails.txt | 2 -- - 21 files changed, 8 insertions(+), 53 deletions(-) - -diff --git a/src/broadcom/ci/broadcom-rpi3-fails.txt b/src/broadcom/ci/broadcom-rpi3-fails.txt -index a73fb13fd0f9..0a8edaeb1908 100644 ---- a/src/broadcom/ci/broadcom-rpi3-fails.txt -+++ b/src/broadcom/ci/broadcom-rpi3-fails.txt -@@ -102,7 +102,6 @@ spec@glsl-1.20@execution@tex-miplevel-selection gl2:textureproj 3d,Fail - spec@glsl-1.20@execution@tex-miplevel-selection gl2:textureproj(bias) 3d,Fail - spec@khr_texture_compression_astc@basic-gl,Fail - --glx@glx-make-current,Crash - glx@glx-multithread-buffer,Fail - glx@glx-swap-pixmap-bad,Fail - glx@glx-visuals-depth -pixmap,Fail -diff --git a/src/broadcom/ci/broadcom-rpi3-flakes.txt b/src/broadcom/ci/broadcom-rpi3-flakes.txt -index bfb660b52f4f..caf706ea0221 100644 ---- a/src/broadcom/ci/broadcom-rpi3-flakes.txt -+++ b/src/broadcom/ci/broadcom-rpi3-flakes.txt -@@ -5,7 +5,6 @@ dEQP-GLES2.functional.clipping.triangle_vertex.clip_three.clip_pos_x_and_neg_x_n - dEQP-GLES2.functional.draw.random.51 - dEQP-GLES2.functional.texture.size.cube.256x256_rgb888 - --glx@glx-multi-window-single-context - shaders@glsl-vs-loop - shaders@glsl-vs-loop-nested - spec@arb_framebuffer_srgb@blit renderbuffer srgb single_sampled enabled clear -diff --git a/src/broadcom/ci/broadcom-rpi4-fails.txt b/src/broadcom/ci/broadcom-rpi4-fails.txt -index f5d0d54eb84e..fb623584ba2f 100644 ---- a/src/broadcom/ci/broadcom-rpi4-fails.txt -+++ b/src/broadcom/ci/broadcom-rpi4-fails.txt -@@ -1,5 +1,3 @@ --glx@glx-make-current,Crash --glx@glx-multi-window-single-context,Fail - glx@glx-multithread-buffer,Fail - glx@glx-swap-pixmap-bad,Fail - glx@glx-visuals-depth -pixmap,Crash -diff --git a/src/freedreno/ci/freedreno-a307-fails.txt b/src/freedreno/ci/freedreno-a307-fails.txt -index 90218ee89eff..4e957b749bd8 100644 ---- a/src/freedreno/ci/freedreno-a307-fails.txt -+++ b/src/freedreno/ci/freedreno-a307-fails.txt -@@ -156,8 +156,6 @@ spec@glsl-1.30@execution@interpolation@interpolation-noperspective-gl_frontsecon - spec@glsl-1.30@execution@interpolation@interpolation-noperspective-other-flat-fixed,Fail - spec@glsl-1.30@execution@interpolation@interpolation-noperspective-other-smooth-fixed,Fail - --glx@glx-make-current,Crash --glx@glx-multi-window-single-context,Fail - glx@glx-swap-pixmap-bad,Fail - glx@glx-visuals-depth -pixmap,Crash - glx@glx-visuals-stencil -pixmap,Crash -diff --git a/src/freedreno/ci/freedreno-a420-fails.txt b/src/freedreno/ci/freedreno-a420-fails.txt -index 7a9e26daf5e0..3d5169297c4f 100644 ---- a/src/freedreno/ci/freedreno-a420-fails.txt -+++ b/src/freedreno/ci/freedreno-a420-fails.txt -@@ -291,8 +291,6 @@ spec@!opengl 2.1@polygon-stipple-fs,Fail - spec@ext_packed_float@query-rgba-signed-components,Fail - - # Uncategorized piglit failures --glx@glx-make-current,Crash --glx@glx-multi-window-single-context,Fail - glx@glx-query-drawable-glx_fbconfig_id-window,Fail - glx@glx-swap-pixmap-bad,Fail - glx@glx-visuals-depth -pixmap,Crash -diff --git a/src/freedreno/ci/freedreno-a530-fails.txt b/src/freedreno/ci/freedreno-a530-fails.txt -index 2e02d92b9906..5be444966b58 100644 ---- a/src/freedreno/ci/freedreno-a530-fails.txt -+++ b/src/freedreno/ci/freedreno-a530-fails.txt -@@ -596,8 +596,6 @@ KHR-GLES3.texture_repeat_mode.rgba32ui_49x23_2_mirrored_repeat,Fail - KHR-GLES3.texture_repeat_mode.rgba32ui_49x23_2_repeat,Fail - - glx@glx-multithread-buffer,Fail --glx@glx-make-current,Crash --glx@glx-multi-window-single-context,Fail - glx@glx-swap-pixmap-bad,Fail - glx@glx-tfp,Fail - glx@glx-visuals-depth -pixmap,Crash -diff --git a/src/freedreno/ci/freedreno-a630-fails.txt b/src/freedreno/ci/freedreno-a630-fails.txt -index a5344d0b9dbf..d21fdb48fa23 100644 ---- a/src/freedreno/ci/freedreno-a630-fails.txt -+++ b/src/freedreno/ci/freedreno-a630-fails.txt -@@ -47,8 +47,6 @@ glx@glx_ext_import_context@imported context has same context id,Fail - glx@glx_ext_import_context@make current- multi process,Fail - glx@glx_ext_import_context@make current- single process,Fail - glx@glx_ext_import_context@query context info,Fail --glx@glx-make-current,Crash --glx@glx-multi-window-single-context,Fail - glx@glx-swap-pixmap-bad,Fail - glx@glx-visuals-depth -pixmap,Crash - glx@glx-visuals-stencil -pixmap,Crash -diff --git a/src/gallium/drivers/llvmpipe/ci/llvmpipe-fails.txt b/src/gallium/drivers/llvmpipe/ci/llvmpipe-fails.txt -index d165affe0ef9..db891e55930c 100644 ---- a/src/gallium/drivers/llvmpipe/ci/llvmpipe-fails.txt -+++ b/src/gallium/drivers/llvmpipe/ci/llvmpipe-fails.txt -@@ -29,13 +29,6 @@ spec@oes_shader_io_blocks@compiler@layout-location-aliasing.vert,Fail - glx@glx-copy-sub-buffer,Fail - glx@glx-copy-sub-buffer samples=2,Fail - glx@glx-copy-sub-buffer samples=4,Fail -- --# X Error of failed request: BadMatch (invalid parameter attributes) --# Major opcode of failed request: 150 (GLX) --# Minor opcode of failed request: 11 (X_GLXSwapBuffers) --glx@glx-make-current,Crash -- --glx@glx-multi-window-single-context,Fail - glx@glx-swap-copy,Fail - glx@glx-swap-pixmap-bad,Fail - -diff --git a/src/gallium/drivers/softpipe/ci/softpipe-fails.txt b/src/gallium/drivers/softpipe/ci/softpipe-fails.txt -index 95257ca3113a..258b5c5601b4 100644 ---- a/src/gallium/drivers/softpipe/ci/softpipe-fails.txt -+++ b/src/gallium/drivers/softpipe/ci/softpipe-fails.txt -@@ -908,14 +908,8 @@ KHR-GLES31.core.texture_storage_multisample.GLCoverage.gl_tex_parameter_handlers - - fast_color_clear@fcc-front-buffer-distraction,Fail - --# X Error of failed request: BadMatch (invalid parameter attributes) --# Major opcode of failed request: 150 (GLX) --# Minor opcode of failed request: 11 (X_GLXSwapBuffers) --glx@glx-make-current,Crash -- - - glx@glx-multi-context-front,Fail --glx@glx-multi-window-single-context,Fail - glx@glx-swap-copy,Fail - glx@glx-swap-pixmap-bad,Fail - -diff --git a/src/gallium/drivers/virgl/ci/virpipe-gl-fails.txt b/src/gallium/drivers/virgl/ci/virpipe-gl-fails.txt -index e3732a59883c..78d50b466aa8 100644 ---- a/src/gallium/drivers/virgl/ci/virpipe-gl-fails.txt -+++ b/src/gallium/drivers/virgl/ci/virpipe-gl-fails.txt -@@ -72,8 +72,6 @@ KHR-GL43.transform_feedback_overflow_query_ARB.basic-single-stream-separate-attr - KHR-GL43.transform_feedback_overflow_query_ARB.multiple-streams-multiple-buffers-per-stream,Fail - KHR-GL43.transform_feedback_overflow_query_ARB.multiple-streams-one-buffer-per-stream,Fail - --glx@glx-make-current,Crash --glx@glx-multi-window-single-context,Fail - glx@glx-multithread-clearbuffer,Crash - glx@glx-multithread-texture,Crash - glx@glx-swap-copy,Fail -diff --git a/src/gallium/drivers/zink/ci/zink-lvp-flakes.txt b/src/gallium/drivers/zink/ci/zink-lvp-flakes.txt -index d47d2f3ba1b0..21d8420a7469 100644 ---- a/src/gallium/drivers/zink/ci/zink-lvp-flakes.txt -+++ b/src/gallium/drivers/zink/ci/zink-lvp-flakes.txt -@@ -1,6 +1,5 @@ - dEQP-GLES2.functional.texture.filtering.cube.nearest_linear_mirror_l8_pot - spec@khr_debug@push-pop-group_gl.* --glx@glx-multi-window-single-context - - # "Pending expose event- rerunning." - # exit status: signal: 11" -diff --git a/src/gallium/drivers/zink/ci/zink-lvp-skips.txt b/src/gallium/drivers/zink/ci/zink-lvp-skips.txt -index e6aa12bc0c0e..3d10830dea18 100644 ---- a/src/gallium/drivers/zink/ci/zink-lvp-skips.txt -+++ b/src/gallium/drivers/zink/ci/zink-lvp-skips.txt -@@ -6,7 +6,6 @@ KHR-GL32.texture_size_promotion.functional - - # ignores copied from the old runner script - spec@arb_map_buffer_alignment@arb_map_buffer_alignment-map-invalidate-range --glx@glx-make-current - spec@arb_timer_query.* - spec@arb_sample_shading@builtin-gl-sample-mask - spec@glsl-1.30@execution@tex-miplevel-selection.* -diff --git a/src/gallium/drivers/zink/ci/zink-radv-fails.txt b/src/gallium/drivers/zink/ci/zink-radv-fails.txt -index 62c4b383a6be..d4d0fbad54fb 100644 ---- a/src/gallium/drivers/zink/ci/zink-radv-fails.txt -+++ b/src/gallium/drivers/zink/ci/zink-radv-fails.txt -@@ -7,7 +7,6 @@ dEQP-GLES3.functional.shaders.texture_functions.textureprojlodoffset.sampler2dsh - dEQP-GLES3.functional.shaders.texture_functions.textureprojoffset.sampler2dshadow_vertex,Fail - - # kopper --glx@glx-multi-window-single-context,Crash - spec@ext_image_dma_buf_import@ext_image_dma_buf_import-export-tex,Crash - spec@egl_chromium_sync_control@conformance@eglGetSyncValuesCHROMIUM_ust_test,Fail - -@@ -36,7 +35,6 @@ glx@glx_ext_import_context@imported context has same context id,Fail - glx@glx_ext_import_context@make current- multi process,Fail - glx@glx_ext_import_context@make current- single process,Fail - glx@glx_ext_import_context@query context info,Fail --glx@glx-make-current,Crash - glx@glx-swap-copy,Fail - glx@glx-swap-pixmap-bad,Fail - glx@glx-visuals-depth,Crash -diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c -index 632506dabbd5..16f1613013ea 100644 ---- a/src/glx/dri_common.c -+++ b/src/glx/dri_common.c -@@ -417,7 +417,14 @@ driFetchDrawable(struct glx_context *gc, GLXDrawable glxDrawable) - (*pdraw->destroyDrawable) (pdraw); - return NULL; - } -- pdraw->refcount = 1; -+ /* This sure does look suspicious, doesn't it? We're on this path because -+ * this is a naked Window. GLX 1.3 drawables have an explicit creation -+ * step (setting refcount to 1), and those we would have found in the -+ * hash lookup above, bumped their refcount for the bind_context we're -+ * being called for, and then returned. But since we just created the -+ * internal naked-Window state, we need to account for both here. -+ */ -+ pdraw->refcount = 2; - - return pdraw; - } -diff --git a/src/intel/ci/iris-kbl-fails.txt b/src/intel/ci/iris-kbl-fails.txt -index adbaf54618af..7b83e9e70ae0 100644 ---- a/src/intel/ci/iris-kbl-fails.txt -+++ b/src/intel/ci/iris-kbl-fails.txt -@@ -13,15 +13,6 @@ dEQP-GLES3.functional.texture.compressed.astc.void_extent_ldr.8x5,Fail - dEQP-GLES3.functional.texture.compressed.astc.void_extent_ldr.8x6,Fail - dEQP-GLES3.functional.texture.compressed.astc.void_extent_ldr.8x8,Fail - --# X Error of failed request: BadMatch (invalid parameter attributes) --# Major opcode of failed request: 151 (GLX) --# Minor opcode of failed request: 11 (X_GLXSwapBuffers) --# Serial number of failed request: 79 --# Current serial number in output stream: 80 --glx@glx-make-current,Crash -- --glx@glx-multi-window-single-context,Fail -- - glx@glx-swap-pixmap-bad,Fail - - # failed to create drawable -diff --git a/src/panfrost/ci/panfrost-g52-fails.txt b/src/panfrost/ci/panfrost-g52-fails.txt -index bfdec49b2107..e23ae08030f1 100644 ---- a/src/panfrost/ci/panfrost-g52-fails.txt -+++ b/src/panfrost/ci/panfrost-g52-fails.txt -@@ -10,9 +10,7 @@ glx@glx_ext_import_context@imported context has same context id,Fail - glx@glx_ext_import_context@make current- multi process,Fail - glx@glx_ext_import_context@make current- single process,Fail - glx@glx_ext_import_context@query context info,Fail --glx@glx-make-current,Crash - glx@glx-multithread-clearbuffer,Crash --glx@glx-multi-window-single-context,Fail - glx@glx-swap-pixmap-bad,Fail - glx@glx-visuals-depth -pixmap,Crash - glx@glx-visuals-stencil -pixmap,Crash --- -GitLab - diff --git a/Mesa-22.2.4-revert-glx-fix-drawable-refounting-for-naked-windows.patch b/Mesa-22.2.4-revert-glx-fix-drawable-refounting-for-naked-windows.patch new file mode 100644 index 0000000..8f02a34 --- /dev/null +++ b/Mesa-22.2.4-revert-glx-fix-drawable-refounting-for-naked-windows.patch @@ -0,0 +1,81 @@ +diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c +index eb49ac5ea1bcf557d912b7fc9ce373b25e121ccb..1ce47832c627f9266f7fdf529a00ac6eb49ea88f 100644 +--- a/src/glx/dri2_glx.c ++++ b/src/glx/dri2_glx.c +@@ -121,7 +121,7 @@ dri2_bind_context(struct glx_context *context, struct glx_context *old, + pdraw = (struct dri2_drawable *) driFetchDrawable(context, draw); + pread = (struct dri2_drawable *) driFetchDrawable(context, read); + +- driReleaseDrawables(old); ++ driReleaseDrawables(context); + + if (pdraw) + dri_draw = pdraw->driDrawable; +diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c +index abec1ce6baf368193757a4be71b385bfc16e0351..e8996dd5e2775268101e2b44fbc9175e51190295 100644 +--- a/src/glx/dri3_glx.c ++++ b/src/glx/dri3_glx.c +@@ -192,7 +192,7 @@ dri3_bind_context(struct glx_context *context, struct glx_context *old, + pdraw = (struct dri3_drawable *) driFetchDrawable(context, draw); + pread = (struct dri3_drawable *) driFetchDrawable(context, read); + +- driReleaseDrawables(old); ++ driReleaseDrawables(context); + + if (pdraw) + dri_draw = pdraw->loader_drawable.dri_drawable; +diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c +index d806d8cab41bd5e2431a66262798156ecc037f82..94e264cc07feb295741646ba6a83467819718379 100644 +--- a/src/glx/dri_common.c ++++ b/src/glx/dri_common.c +@@ -416,14 +416,7 @@ driFetchDrawable(struct glx_context *gc, GLXDrawable glxDrawable) + (*pdraw->destroyDrawable) (pdraw); + return NULL; + } +- /* This sure does look suspicious, doesn't it? We're on this path because +- * this is a naked Window. GLX 1.3 drawables have an explicit creation +- * step (setting refcount to 1), and those we would have found in the +- * hash lookup above, bumped their refcount for the bind_context we're +- * being called for, and then returned. But since we just created the +- * internal naked-Window state, we need to account for both here. +- */ +- pdraw->refcount = 2; ++ pdraw->refcount = 1; + + return pdraw; + } +@@ -497,7 +490,7 @@ releaseDrawable(const struct glx_display *priv, GLXDrawable drawable) + _X_HIDDEN void + driReleaseDrawables(struct glx_context *gc) + { +- const struct glx_display *priv = (gc && gc->psc) ? gc->psc->display : NULL; ++ const struct glx_display *priv = gc->psc->display; + + if (priv == NULL) + return; +diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c +index a459ec863e7fe2397a86f933d79296c9466d5cc0..e90f4efbab4081f346073e2b66ece5850ab43214 100644 +--- a/src/glx/drisw_glx.c ++++ b/src/glx/drisw_glx.c +@@ -440,7 +440,7 @@ drisw_bind_context(struct glx_context *context, struct glx_context *old, + pdraw = (struct drisw_drawable *) driFetchDrawable(context, draw); + pread = (struct drisw_drawable *) driFetchDrawable(context, read); + +- driReleaseDrawables(old); ++ driReleaseDrawables(context); + + if (!psc->core->bindContext(context->driContext, + pdraw ? pdraw->driDrawable : NULL, +diff --git a/src/glx/driwindows_glx.c b/src/glx/driwindows_glx.c +index 8c21c5ee58a8dc0bb97973e5fb2f10d82beef792..3eb961dae3d27a3ffd3f743be1ef27dd762f54cc 100644 +--- a/src/glx/driwindows_glx.c ++++ b/src/glx/driwindows_glx.c +@@ -88,7 +88,7 @@ driwindows_bind_context(struct glx_context *context, struct glx_context *old, + pdraw = (struct driwindows_drawable *) driFetchDrawable(context, draw); + pread = (struct driwindows_drawable *) driFetchDrawable(context, read); + +- driReleaseDrawables(old); ++ driReleaseDrawables(&pcp->base); + + if (pdraw == NULL || pread == NULL) + return GLXBadDrawable; diff --git a/Mesa.spec b/Mesa.spec index 8b6fdca..58549c2 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -1,7 +1,7 @@ Name: Mesa Epoch: 1 Version: 22.2.4 -Release: 1mamba +Release: 3mamba Summary: A 3-D graphics library with an API which is very similar to that of OpenGL Group: System/Libraries Vendor: openmamba @@ -16,7 +16,7 @@ Patch3: Mesa-10.2.7-llvm-3.5.patch Patch4: Mesa-21.2.5-llvm-13-patch1.patch Patch5: Mesa-21.2.5-llvm-13-patch2.patch Patch6: Mesa-21.2.5-aarch64-rip-out-VC4-forced-NEON.patch -Patch7: Mesa-22.2.3-revert-glx-fix-drawable-refcounting-for-naked-windows.patch +Patch7: Mesa-22.2.4-revert-glx-fix-drawable-refounting-for-naked-windows.patch License: MIT ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -43,8 +43,8 @@ BuildRequires: libxshmfence-devel BuildRequires: libz-devel BuildRequires: libzstd-devel ## AUTOBUILDREQ-END +BuildRequires: libclang-devel >= 0:15.0.5-1mamba BuildRequires: libllvm-devel >= 14.0.3 -BuildRequires: libclang-devel >= 14.0.3 BuildRequires: xproto-devel >= 7.1 BuildRequires: dri2proto-devel BuildRequires: glproto-devel @@ -129,9 +129,10 @@ Common files and tools for the Mesa GL libraries. %prep %setup -q -n mesa-%{version} +%define _default_patch_fuzz 2 #%patch4 -p1 #%patch5 -p1 -%patch7 -R -p1 +%patch7 -p1 %build #%ifnarch arm @@ -291,6 +292,12 @@ ln -s libGLX_mesa.so.0 %{buildroot}%{_libdir}/libGLX_indirect.so.0 %{_libdir}/pkgconfig/xatracker.pc %changelog +* Sun Nov 27 2022 Silvan Calarco 22.2.4-3mamba +- apply upstream merge to revert commits causing KDE crash ( https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19972 ) + +* Sun Nov 27 2022 Silvan Calarco 22.2.4-2mamba +- rebuilt by autoport with build requirements: libclang-devel>=0:15.0.5-1mamba + * Thu Nov 17 2022 Automatic Build System 22.2.4-1mamba - automatic version update by autodist