diff --git a/.gitignore b/.gitignore index 77288c6..98c5e86 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,5 @@ -SOURCES/mesa-23.3.3.tar.xz +SOURCES/libclc-18.1.2.src.tar.xz +SOURCES/mesa-24.1.2.tar.xz +SOURCES/meson-1.3.0.tar.gz +SOURCES/spirv-llvm-translator-259f72c.tar.gz +SOURCES/wayland-protocols-1.34.tar.xz diff --git a/.mesa.metadata b/.mesa.metadata index 8c04bec..9146caf 100644 --- a/.mesa.metadata +++ b/.mesa.metadata @@ -1 +1,5 @@ -13b0767105f93a5b2d3c2b620e2f3cd7ce67c0f5 SOURCES/mesa-23.3.3.tar.xz +fd59e738537ad513a715d5080682d9a690480ebe SOURCES/libclc-18.1.2.src.tar.xz +5cdb8437b70ba4c384d602052b7396aab2018363 SOURCES/mesa-24.1.2.tar.xz +6e2c98cccd1b85d5fe8716e7b0f6f080acd77f37 SOURCES/meson-1.3.0.tar.gz +d86613dcde6eb304e204df4e4d466edbc45f7c13 SOURCES/spirv-llvm-translator-259f72c.tar.gz +9e2df4b15428c0b0ce7d9256d4f469b70daab524 SOURCES/wayland-protocols-1.34.tar.xz diff --git a/SOURCES/0001-Revert-ac-radeonsi-remove-has_syncobj-has_fence_to_h.patch b/SOURCES/0001-Revert-ac-radeonsi-remove-has_syncobj-has_fence_to_h.patch new file mode 100644 index 0000000..2460001 --- /dev/null +++ b/SOURCES/0001-Revert-ac-radeonsi-remove-has_syncobj-has_fence_to_h.patch @@ -0,0 +1,153 @@ +From fddf49504e1bebb7efc52c1a0516300c0f217f18 Mon Sep 17 00:00:00 2001 +From: Pierre-Eric Pelloux-Prayer +Date: Wed, 26 Jun 2024 12:11:48 +0200 +Subject: [PATCH] Revert "ac, radeonsi: remove has_syncobj, + has_fence_to_handle" + +This reverts commit 02fe3c32cdfc3cf48cd691d6321978b8d4c3e61b. + +Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11352 +--- + src/amd/common/ac_gpu_info.c | 12 ++++++++++++ + src/amd/common/ac_gpu_info.h | 2 ++ + src/gallium/drivers/r600/r600_pipe_common.c | 1 + + src/gallium/drivers/radeonsi/si_fence.c | 10 ++++++++++ + src/gallium/drivers/radeonsi/si_get.c | 8 ++++++-- + 5 files changed, 31 insertions(+), 2 deletions(-) + +diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c +index 78febf796b4..3f711bd45ec 100644 +--- a/src/amd/common/ac_gpu_info.c ++++ b/src/amd/common/ac_gpu_info.c +@@ -355,6 +355,14 @@ static intptr_t readlink(const char *path, char *buf, size_t bufsiz) + + #define CIK_TILE_MODE_COLOR_2D 14 + ++static bool has_syncobj(int fd) ++{ ++ uint64_t value; ++ if (drmGetCap(fd, DRM_CAP_SYNCOBJ, &value)) ++ return false; ++ return value ? true : false; ++} ++ + static bool has_timeline_syncobj(int fd) + { + uint64_t value; +@@ -1068,7 +1076,9 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info, + info->memory_freq_mhz_effective *= ac_memory_ops_per_clock(info->vram_type); + + info->has_userptr = true; ++ info->has_syncobj = has_syncobj(fd); + info->has_timeline_syncobj = has_timeline_syncobj(fd); ++ info->has_fence_to_handle = info->has_syncobj; + info->has_local_buffers = true; + info->has_bo_metadata = true; + info->has_eqaa_surface_allocator = info->gfx_level < GFX11; +@@ -1974,7 +1984,9 @@ void ac_print_gpu_info(const struct radeon_info *info, FILE *f) + fprintf(f, "Kernel & winsys capabilities:\n"); + fprintf(f, " drm = %i.%i.%i\n", info->drm_major, info->drm_minor, info->drm_patchlevel); + fprintf(f, " has_userptr = %i\n", info->has_userptr); ++ fprintf(f, " has_syncobj = %u\n", info->has_syncobj); + fprintf(f, " has_timeline_syncobj = %u\n", info->has_timeline_syncobj); ++ fprintf(f, " has_fence_to_handle = %u\n", info->has_fence_to_handle); + fprintf(f, " has_local_buffers = %u\n", info->has_local_buffers); + fprintf(f, " has_bo_metadata = %u\n", info->has_bo_metadata); + fprintf(f, " has_eqaa_surface_allocator = %u\n", info->has_eqaa_surface_allocator); +diff --git a/src/amd/common/ac_gpu_info.h b/src/amd/common/ac_gpu_info.h +index 68fbe909a97..40670d87770 100644 +--- a/src/amd/common/ac_gpu_info.h ++++ b/src/amd/common/ac_gpu_info.h +@@ -218,7 +218,9 @@ struct radeon_info { + uint32_t max_submitted_ibs[AMD_NUM_IP_TYPES]; + bool is_amdgpu; + bool has_userptr; ++ bool has_syncobj; + bool has_timeline_syncobj; ++ bool has_fence_to_handle; + bool has_local_buffers; + bool has_bo_metadata; + bool has_eqaa_surface_allocator; +diff --git a/src/gallium/drivers/r600/r600_pipe_common.c b/src/gallium/drivers/r600/r600_pipe_common.c +index aaa171a07ed..5a10aad5907 100644 +--- a/src/gallium/drivers/r600/r600_pipe_common.c ++++ b/src/gallium/drivers/r600/r600_pipe_common.c +@@ -1338,6 +1338,7 @@ bool r600_common_screen_init(struct r600_common_screen *rscreen, + printf("drm = %i.%i.%i\n", rscreen->info.drm_major, + rscreen->info.drm_minor, rscreen->info.drm_patchlevel); + printf("has_userptr = %i\n", rscreen->info.has_userptr); ++ printf("has_syncobj = %u\n", rscreen->info.has_syncobj); + + printf("r600_max_quad_pipes = %i\n", rscreen->info.r600_max_quad_pipes); + printf("max_gpu_freq_mhz = %i\n", rscreen->info.max_gpu_freq_mhz); +diff --git a/src/gallium/drivers/radeonsi/si_fence.c b/src/gallium/drivers/radeonsi/si_fence.c +index a1ae9125e00..1d2406df9fd 100644 +--- a/src/gallium/drivers/radeonsi/si_fence.c ++++ b/src/gallium/drivers/radeonsi/si_fence.c +@@ -374,10 +374,16 @@ static void si_create_fence_fd(struct pipe_context *ctx, struct pipe_fence_handl + + switch (type) { + case PIPE_FD_TYPE_NATIVE_SYNC: ++ if (!sscreen->info.has_fence_to_handle) ++ goto finish; ++ + sfence->gfx = ws->fence_import_sync_file(ws, fd); + break; + + case PIPE_FD_TYPE_SYNCOBJ: ++ if (!sscreen->info.has_syncobj) ++ goto finish; ++ + sfence->gfx = ws->fence_import_syncobj(ws, fd); + break; + +@@ -385,6 +391,7 @@ static void si_create_fence_fd(struct pipe_context *ctx, struct pipe_fence_handl + unreachable("bad fence fd type when importing"); + } + ++finish: + if (!sfence->gfx) { + FREE(sfence); + return; +@@ -400,6 +407,9 @@ static int si_fence_get_fd(struct pipe_screen *screen, struct pipe_fence_handle + struct si_fence *sfence = (struct si_fence *)fence; + int gfx_fd = -1; + ++ if (!sscreen->info.has_fence_to_handle) ++ return -1; ++ + util_queue_fence_wait(&sfence->ready); + + /* Deferred fences aren't supported. */ +diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c +index a9ac90dca52..3c8a75e9583 100644 +--- a/src/gallium/drivers/radeonsi/si_get.c ++++ b/src/gallium/drivers/radeonsi/si_get.c +@@ -168,8 +168,6 @@ static int si_get_param(struct pipe_screen *pscreen, enum pipe_cap param) + case PIPE_CAP_ALLOW_GLTHREAD_BUFFER_SUBDATA_OPT: /* TODO: remove if it's slow */ + case PIPE_CAP_NULL_TEXTURES: + case PIPE_CAP_HAS_CONST_BW: +- case PIPE_CAP_FENCE_SIGNAL: +- case PIPE_CAP_NATIVE_FENCE_FD: + case PIPE_CAP_CL_GL_SHARING: + return 1; + +@@ -287,9 +285,15 @@ static int si_get_param(struct pipe_screen *pscreen, enum pipe_cap param) + PIPE_CONTEXT_PRIORITY_MEDIUM | + PIPE_CONTEXT_PRIORITY_HIGH; + ++ case PIPE_CAP_FENCE_SIGNAL: ++ return sscreen->info.has_syncobj; ++ + case PIPE_CAP_CONSTBUF0_FLAGS: + return SI_RESOURCE_FLAG_32BIT; + ++ case PIPE_CAP_NATIVE_FENCE_FD: ++ return sscreen->info.has_fence_to_handle; ++ + case PIPE_CAP_DRAW_PARAMETERS: + case PIPE_CAP_MULTI_DRAW_INDIRECT: + case PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS: +-- +2.45.2 + diff --git a/SOURCES/0001-Revert-egl-add-automatic-zink-fallback-loading-betwe.patch b/SOURCES/0001-Revert-egl-add-automatic-zink-fallback-loading-betwe.patch deleted file mode 100644 index e6217ad..0000000 --- a/SOURCES/0001-Revert-egl-add-automatic-zink-fallback-loading-betwe.patch +++ /dev/null @@ -1,40 +0,0 @@ -From b673271710047acb1976002e4b84d06b7cefd3d7 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= -Date: Wed, 17 Jan 2024 13:20:49 +0100 -Subject: [PATCH 1/2] Revert "egl: add automatic zink fallback loading between - hw and sw drivers" - -This reverts commit 8cd44b8843877a2f7d559d123eb3694841f16fdc. ---- - src/egl/main/eglapi.c | 15 ++++----------- - 1 file changed, 4 insertions(+), 11 deletions(-) - -diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c -index d50be23e871..b1a48668b76 100644 ---- a/src/egl/main/eglapi.c -+++ b/src/egl/main/eglapi.c -@@ -695,17 +695,10 @@ eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) - if (disp->Options.ForceSoftware) - RETURN_EGL_ERROR(disp, EGL_NOT_INITIALIZED, EGL_FALSE); - else { -- bool success = false; -- if (!disp->Options.Zink && !getenv("GALLIUM_DRIVER")) { -- disp->Options.Zink = EGL_TRUE; -- success = _eglDriver.Initialize(disp); -- } -- if (!success) { -- disp->Options.Zink = EGL_FALSE; -- disp->Options.ForceSoftware = EGL_TRUE; -- if (!_eglDriver.Initialize(disp)) -- RETURN_EGL_ERROR(disp, EGL_NOT_INITIALIZED, EGL_FALSE); -- } -+ disp->Options.Zink = EGL_FALSE; -+ disp->Options.ForceSoftware = EGL_TRUE; -+ if (!_eglDriver.Initialize(disp)) -+ RETURN_EGL_ERROR(disp, EGL_NOT_INITIALIZED, EGL_FALSE); - } - } - --- -2.43.0 - diff --git a/SOURCES/0001-llvmpipe-Init-eglQueryDmaBufModifiersEXT-num_modifie.patch b/SOURCES/0001-llvmpipe-Init-eglQueryDmaBufModifiersEXT-num_modifie.patch new file mode 100644 index 0000000..ba224c2 --- /dev/null +++ b/SOURCES/0001-llvmpipe-Init-eglQueryDmaBufModifiersEXT-num_modifie.patch @@ -0,0 +1,41 @@ +From 1f3ea20998329788f6a14166d8ba9b3948b7e864 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= +Date: Thu, 27 Jun 2024 13:07:11 +0200 +Subject: [PATCH] llvmpipe: Init eglQueryDmaBufModifiersEXT num_modifiers +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Initialize the number of modifiers when `max` is 0 as documented [1]: + + If is 0, no formats are returned, but the total number + of formats is returned in , and no error is generated. + +[1] https://registry.khronos.org/EGL/extensions/EXT/EGL_EXT_image_dma_buf_import_modifiers.txt +Fixes: d74ea2c117fe ("llvmpipe: Implement dmabuf handling") +Signed-off-by: José Expósito +--- + src/gallium/drivers/llvmpipe/lp_texture.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c +index 0044e689aab..30d5057cf9f 100644 +--- a/src/gallium/drivers/llvmpipe/lp_texture.c ++++ b/src/gallium/drivers/llvmpipe/lp_texture.c +@@ -1724,10 +1724,10 @@ llvmpipe_resource_get_param(struct pipe_screen *screen, + static void + llvmpipe_query_dmabuf_modifiers(struct pipe_screen *pscreen, enum pipe_format format, int max, uint64_t *modifiers, unsigned int *external_only, int *count) + { +- if (max) { +- *count = 1; ++ *count = 1; ++ ++ if (max) + *modifiers = DRM_FORMAT_MOD_LINEAR; +- } + } + + static bool +-- +2.45.2 + diff --git a/SOURCES/0002-Revert-glx-add-automatic-zink-fallback-loading-betwe.patch b/SOURCES/0002-Revert-glx-add-automatic-zink-fallback-loading-betwe.patch deleted file mode 100644 index dc8452d..0000000 --- a/SOURCES/0002-Revert-glx-add-automatic-zink-fallback-loading-betwe.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 9b9d225931b69532aa1b43abdaf29c826bc47b26 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= -Date: Wed, 17 Jan 2024 13:21:08 +0100 -Subject: [PATCH 2/2] Revert "glx: add automatic zink fallback loading between - hw and sw drivers" - -This reverts commit 7d9ea77b4598e23d4415b529924f1cbdca6e33bd. ---- - src/glx/glxext.c | 33 ++++++++------------------------- - 1 file changed, 8 insertions(+), 25 deletions(-) - -diff --git a/src/glx/glxext.c b/src/glx/glxext.c -index 39d5f08bdcf..5036fd137c1 100644 ---- a/src/glx/glxext.c -+++ b/src/glx/glxext.c -@@ -763,11 +763,10 @@ glx_screen_cleanup(struct glx_screen *psc) - ** If that works then fetch the per screen configs data. - */ - static Bool --AllocAndFetchScreenConfigs(Display * dpy, struct glx_display * priv, Bool zink) -+AllocAndFetchScreenConfigs(Display * dpy, struct glx_display * priv) - { - struct glx_screen *psc; - GLint i, screens; -- unsigned screen_count = 0; - - /* - ** First allocate memory for the array of per screen configs. -@@ -804,21 +803,17 @@ AllocAndFetchScreenConfigs(Display * dpy, struct glx_display * priv, Bool zink) - if (psc == NULL) - psc = applegl_create_screen(i, priv); - #else -- if (psc == NULL && !zink) -+ if (psc == NULL) - { - psc = indirect_create_screen(i, priv); - indirect = true; - } - #endif - priv->screens[i] = psc; -- if (psc) -- screen_count++; - - if(indirect) /* Load extensions required only for indirect glx */ - glxSendClientInfo(priv, i); - } -- if (zink && !screen_count) -- return GL_FALSE; - SyncHandle(); - return GL_TRUE; - } -@@ -880,9 +875,9 @@ __glXInitialize(Display * dpy) - #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) - Bool glx_direct = !debug_get_bool_option("LIBGL_ALWAYS_INDIRECT", false); - Bool glx_accel = !debug_get_bool_option("LIBGL_ALWAYS_SOFTWARE", false); -+ Bool zink; - const char *env = getenv("MESA_LOADER_DRIVER_OVERRIDE"); -- Bool zink = env && !strcmp(env, "zink"); -- Bool try_zink = False; -+ zink = env && !strcmp(env, "zink"); - - dpyPriv->drawHash = __glxHashCreate(); - -@@ -904,13 +899,10 @@ __glXInitialize(Display * dpy) - #endif /* HAVE_DRI3 */ - if (!debug_get_bool_option("LIBGL_DRI2_DISABLE", false)) - dpyPriv->dri2Display = dri2CreateDisplay(dpy); -- if (!dpyPriv->dri3Display && !dpyPriv->dri2Display) -- try_zink = !debug_get_bool_option("LIBGL_KOPPER_DISABLE", false) && -- !getenv("GALLIUM_DRIVER"); - } - #endif /* GLX_USE_DRM */ - if (glx_direct) -- dpyPriv->driswDisplay = driswCreateDisplay(dpy, zink | try_zink); -+ dpyPriv->driswDisplay = driswCreateDisplay(dpy, zink); - - #ifdef GLX_USE_WINDOWSGL - if (glx_direct && glx_accel) -@@ -925,18 +917,9 @@ __glXInitialize(Display * dpy) - } - #endif - -- if (!AllocAndFetchScreenConfigs(dpy, dpyPriv, zink | try_zink)) { -- Bool fail = True; -- if (try_zink) { -- free(dpyPriv->screens); -- dpyPriv->driswDisplay->destroyDisplay(dpyPriv->driswDisplay); -- dpyPriv->driswDisplay = driswCreateDisplay(dpy, false); -- fail = !AllocAndFetchScreenConfigs(dpy, dpyPriv, False); -- } -- if (fail) { -- free(dpyPriv); -- return NULL; -- } -+ if (!AllocAndFetchScreenConfigs(dpy, dpyPriv)) { -+ free(dpyPriv); -+ return NULL; - } - - glxSendClientInfo(dpyPriv, -1); --- -2.43.0 - diff --git a/SOURCES/fix-egl-on-s390x.patch b/SOURCES/fix-egl-on-s390x.patch new file mode 100644 index 0000000..38b8362 --- /dev/null +++ b/SOURCES/fix-egl-on-s390x.patch @@ -0,0 +1,131 @@ +From 5ca85d75c05de9df7c3170122dfdb04bc795b43a Mon Sep 17 00:00:00 2001 +From: Daniel Stone +Date: Fri, 21 Jun 2024 11:24:31 +0100 +Subject: [PATCH 1/3] dri: Fix BGR format exclusion + +The check we had for BGR vs. RGB formats was testing completely the +wrong thing. Fix it so we can restore the previous set of configs we +expose to the frontend, which also fixes surfaceless platform on s390x. + +Signed-off-by: Daniel Stone +Fixes: ad0edea53a73 ("st/dri: Check format properties from format helpers") +Closes: mesa/mesa#11360 +Part-of: +--- + src/gallium/frontends/dri/dri_screen.c | 20 ++++++++++++-------- + 1 file changed, 12 insertions(+), 8 deletions(-) + +diff --git a/src/gallium/frontends/dri/dri_screen.c b/src/gallium/frontends/dri/dri_screen.c +index 97d11f324ee0b..2e9ce01147a89 100644 +--- a/src/gallium/frontends/dri/dri_screen.c ++++ b/src/gallium/frontends/dri/dri_screen.c +@@ -386,17 +386,21 @@ dri_fill_in_modes(struct dri_screen *screen) + uint8_t msaa_modes[MSAA_VISUAL_MAX_SAMPLES]; + + /* Expose only BGRA ordering if the loader doesn't support RGBA ordering. */ +- if (!allow_rgba_ordering && +- util_format_get_component_shift(pipe_formats[f], +- UTIL_FORMAT_COLORSPACE_RGB, 0) ++ if (!allow_rgba_ordering) { ++ unsigned sh_ax = util_format_get_component_shift(pipe_formats[f], UTIL_FORMAT_COLORSPACE_RGB, 3); ++ unsigned sh_b = util_format_get_component_shift(pipe_formats[f], UTIL_FORMAT_COLORSPACE_RGB, 2); + #if UTIL_ARCH_BIG_ENDIAN +- > ++ unsigned sz_b = util_format_get_component_bits(pipe_formats[f], UTIL_FORMAT_COLORSPACE_RGB, 2); ++ ++ if (sz_b + sh_b == sh_ax) ++ continue; + #else +- < ++ unsigned sz_ax = util_format_get_component_bits(pipe_formats[f], UTIL_FORMAT_COLORSPACE_RGB, 3); ++ ++ if (sz_ax + sh_ax == sh_b) ++ continue; + #endif +- util_format_get_component_shift(pipe_formats[f], +- UTIL_FORMAT_COLORSPACE_RGB, 2)) +- continue; ++ } + + if (!allow_rgb10 && + util_format_get_component_bits(pipe_formats[f], +-- +GitLab + + +From 94e15d0f64a3a5ca6b86a3e02343cac0d453aed6 Mon Sep 17 00:00:00 2001 +From: Daniel Stone +Date: Fri, 21 Jun 2024 14:19:06 +0100 +Subject: [PATCH 2/3] egl/surfaceless: Enable RGBA configs + +Doing this is harmless since we operate on an allowlist of pipe_configs +anyway. + +Signed-off-by: Daniel Stone +Part-of: +--- + src/egl/drivers/dri2/platform_surfaceless.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/egl/drivers/dri2/platform_surfaceless.c b/src/egl/drivers/dri2/platform_surfaceless.c +index 0668ec9285ff3..4b69874d3f60a 100644 +--- a/src/egl/drivers/dri2/platform_surfaceless.c ++++ b/src/egl/drivers/dri2/platform_surfaceless.c +@@ -190,6 +190,8 @@ surfaceless_get_capability(void *loaderPrivate, enum dri_loader_cap cap) + switch (cap) { + case DRI_LOADER_CAP_FP16: + return 1; ++ case DRI_LOADER_CAP_RGBA_ORDERING: ++ return 1; + default: + return 0; + } +-- +GitLab + + +From 9eeaa4618f8a7bc8215ac3f195ced7f8eae4342e Mon Sep 17 00:00:00 2001 +From: Daniel Stone +Date: Fri, 21 Jun 2024 14:19:06 +0100 +Subject: [PATCH 3/3] egl/gbm: Enable RGBA configs + +Doing this is harmless since we operate on an allowlist of pipe_configs +anyway. + +Signed-off-by: Daniel Stone +Part-of: +--- + src/gallium/drivers/lima/ci/lima-fails.txt | 2 -- + src/gbm/backends/dri/gbm_dri.c | 2 ++ + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/gallium/drivers/lima/ci/lima-fails.txt b/src/gallium/drivers/lima/ci/lima-fails.txt +index d6c4edbb5ef5e..155498dbb5679 100644 +--- a/src/gallium/drivers/lima/ci/lima-fails.txt ++++ b/src/gallium/drivers/lima/ci/lima-fails.txt +@@ -55,9 +55,7 @@ wayland-dEQP-EGL.functional.wide_color.window_888_colorspace_srgb,Fail + + x11-dEQP-EGL.functional.create_context.no_config,Fail + x11-dEQP-EGL.functional.image.modify.renderbuffer_depth16_renderbuffer_clear_depth,Fail +-x11-dEQP-EGL.functional.render.multi_context.gles2.rgb888_window,Fail + x11-dEQP-EGL.functional.render.multi_context.gles2.rgba8888_pbuffer,Fail +-x11-dEQP-EGL.functional.render.multi_thread.gles2.rgb888_window,Fail + x11-dEQP-EGL.functional.render.multi_thread.gles2.rgba8888_pbuffer,Fail + x11-dEQP-EGL.functional.wide_color.pbuffer_8888_colorspace_srgb,Fail + x11-dEQP-EGL.functional.wide_color.window_8888_colorspace_srgb,Fail +diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c +index 0526f4f8dc16f..6cc2d5d8197f5 100644 +--- a/src/gbm/backends/dri/gbm_dri.c ++++ b/src/gbm/backends/dri/gbm_dri.c +@@ -108,6 +108,8 @@ dri_get_capability(void *loaderPrivate, enum dri_loader_cap cap) + switch (cap) { + case DRI_LOADER_CAP_FP16: + return 1; ++ case DRI_LOADER_CAP_RGBA_ORDERING: ++ return 1; + default: + return 0; + } +-- +GitLab + diff --git a/SOURCES/mesa-meson-c99.patch b/SOURCES/mesa-meson-c99.patch deleted file mode 100644 index 6cbb053..0000000 --- a/SOURCES/mesa-meson-c99.patch +++ /dev/null @@ -1,42 +0,0 @@ -meson: C type error in strtod_l/strtof_l probe - -Future compilers will fail compilation due to the C type error: - -…/testfile.c: In function 'main': -…/testfile.c:12:30: error: passing argument 2 of 'strtod_l' from incompatible pointer type - 12 | double d = strtod_l(s, end, loc); - | ^~~ - | | - | char * -/usr/include/stdlib.h:416:43: note: expected 'char ** restrict' but argument is of type 'char *' - 416 | char **__restrict __endptr, locale_t __loc) - | ~~~~~~~~~~~~~~~~~~^~~~~~~~ -…/testfile.c:13:29: error: passing argument 2 of 'strtof_l' from incompatible pointer type - 13 | float f = strtof_l(s, end, loc); - | ^~~ - | | - | char * -/usr/include/stdlib.h:420:42: note: expected 'char ** restrict' but argument is of type 'char *' - 420 | char **__restrict __endptr, locale_t __loc) - | ~~~~~~~~~~~~~~~~~~^~~~~~~~ - -This means that the probe no longer tests is objective and always -fails. - -Submitted upstream: - -diff --git a/meson.build b/meson.build -index 35cc5f1cd5fd9079..1a5d2ba492be0b31 100644 ---- a/meson.build -+++ b/meson.build -@@ -1425,8 +1425,8 @@ if cc.links(''' - locale_t loc = newlocale(LC_CTYPE_MASK, "C", NULL); - const char *s = "1.0"; - char *end; -- double d = strtod_l(s, end, loc); -- float f = strtof_l(s, end, loc); -+ double d = strtod_l(s, &end, loc); -+ float f = strtof_l(s, &end, loc); - freelocale(loc); - return 0; - }''', diff --git a/SOURCES/radeonsi-turn-off-glthread.patch b/SOURCES/radeonsi-turn-off-glthread.patch deleted file mode 100644 index 94f8a34..0000000 --- a/SOURCES/radeonsi-turn-off-glthread.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up mesa-22.3.3/src/gallium/drivers/radeonsi/driinfo_radeonsi.h.dma mesa-22.3.3/src/gallium/drivers/radeonsi/driinfo_radeonsi.h ---- mesa-22.3.3/src/gallium/drivers/radeonsi/driinfo_radeonsi.h.dma 2023-01-25 06:17:54.993167334 +1000 -+++ mesa-22.3.3/src/gallium/drivers/radeonsi/driinfo_radeonsi.h 2023-01-25 06:17:57.363203425 +1000 -@@ -1,7 +1,6 @@ - // DriConf options specific to radeonsi - DRI_CONF_SECTION_PERFORMANCE - DRI_CONF_ADAPTIVE_SYNC(true) --DRI_CONF_MESA_GLTHREAD_DRIVER(true) - DRI_CONF_SECTION_END - - DRI_CONF_SECTION_DEBUG diff --git a/SOURCES/zink-fix-resizable-bar-detection-logic.patch b/SOURCES/zink-fix-resizable-bar-detection-logic.patch deleted file mode 100644 index 4a5e916..0000000 --- a/SOURCES/zink-fix-resizable-bar-detection-logic.patch +++ /dev/null @@ -1,39 +0,0 @@ -From a077c14f150f1c4f670dce381ac2eb548f1a4ac2 Mon Sep 17 00:00:00 2001 -From: Alessandro Astone -Date: Wed, 10 Jan 2024 17:24:30 +0100 -Subject: [PATCH] zink: Fix resizable BAR detection logic - -This was broken in two ways: -* When looking for the MAX biggest_ram it was actually comparing - a candidate against biggest_vis_ram - -* mem_props.memoryTypes[] should be accessed with the memory type - index as found in heap_map - -Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10341 -Cc: 23.3 -Part-of: ---- - src/gallium/drivers/zink/zink_screen.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c -index 5a6d17cb4fa3..6697d7ab938c 100644 ---- a/src/gallium/drivers/zink/zink_screen.c -+++ b/src/gallium/drivers/zink/zink_screen.c -@@ -3258,10 +3258,10 @@ zink_internal_create_screen(const struct pipe_screen_config *config, int64_t dev - { - uint64_t biggest_vis_vram = 0; - for (unsigned i = 0; i < screen->heap_count[ZINK_HEAP_DEVICE_LOCAL_VISIBLE]; i++) -- biggest_vis_vram = MAX2(biggest_vis_vram, screen->info.mem_props.memoryHeaps[screen->info.mem_props.memoryTypes[i].heapIndex].size); -+ biggest_vis_vram = MAX2(biggest_vis_vram, screen->info.mem_props.memoryHeaps[screen->info.mem_props.memoryTypes[screen->heap_map[ZINK_HEAP_DEVICE_LOCAL_VISIBLE][i]].heapIndex].size); - uint64_t biggest_vram = 0; - for (unsigned i = 0; i < screen->heap_count[ZINK_HEAP_DEVICE_LOCAL]; i++) -- biggest_vram = MAX2(biggest_vis_vram, screen->info.mem_props.memoryHeaps[screen->info.mem_props.memoryTypes[i].heapIndex].size); -+ biggest_vram = MAX2(biggest_vram, screen->info.mem_props.memoryHeaps[screen->info.mem_props.memoryTypes[screen->heap_map[ZINK_HEAP_DEVICE_LOCAL][i]].heapIndex].size); - /* determine if vis vram is roughly equal to total vram */ - if (biggest_vis_vram > biggest_vram * 0.9) - screen->resizable_bar = true; --- -GitLab - diff --git a/SPECS/mesa.spec b/SPECS/mesa.spec index 0ce4d6d..c0df241 100644 --- a/SPECS/mesa.spec +++ b/SPECS/mesa.spec @@ -2,21 +2,32 @@ %global with_hardware 1 %global with_vulkan_hw 1 %global with_vdpau 1 -%global with_vaapi 1 +%global with_va 1 %if !0%{?rhel} %global with_nine 1 +%global with_nvk %{with vulkan_hw} %global with_omx 1 %global with_opencl 1 %endif %global base_vulkan ,amd %endif +%ifnarch %{ix86} +%if !0%{?rhel} +%global with_teflon 1 +%endif +%endif + %ifarch %{ix86} x86_64 %global with_iris 1 %global with_crocus 1 %global with_vmware 1 %global with_xa 1 -%global platform_vulkan ,intel,intel_hasvk +%global with_intel_clc 1 +%global intel_platform_vulkan ,intel,intel_hasvk +%endif +%ifarch x86_64 +%global with_intel_vk_rt 1 %endif %ifarch %{arm} aarch64 @@ -31,7 +42,7 @@ %global with_panfrost 1 %global with_tegra 1 %global with_xa 1 -%global platform_vulkan ,broadcom,freedreno +%global extra_platform_vulkan ,broadcom,freedreno %endif %ifnarch %{arm} s390x @@ -42,39 +53,73 @@ %global with_radeonsi 1 %endif +%if !0%{?rhel} +%global with_libunwind 1 +%global with_lmsensors 1 +%endif + %ifarch %{valgrind_arches} %bcond_without valgrind %else %bcond_with valgrind %endif -%global vulkan_drivers swrast%{?base_vulkan}%{?platform_vulkan} +%global vulkan_drivers swrast%{?base_vulkan}%{?intel_platform_vulkan}%{?extra_platform_vulkan}%{?with_nvk:,nouveau} Name: mesa Summary: Mesa graphics libraries -%global ver 23.3.3 +%global ver 24.1.2 Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)} -Release: 1%{?dist} -License: MIT +Release: 3%{?dist} +License: MIT AND BSD-3-Clause AND SGI-B-2.0 URL: http://www.mesa3d.org -Source0: https://mesa.freedesktop.org/archive/%{name}-%{ver}.tar.xz +Source0: https://archive.mesa3d.org/mesa-%{ver}.tar.xz # src/gallium/auxiliary/postprocess/pp_mlaa* have an ... interestingly worded license. # Source1 contains email correspondence clarifying the license terms. # Fedora opts to ignore the optional part of clause 2 and treat that code as 2 clause BSD. Source1: Mesa-MLAA-License-Clarification-Email.txt -Patch10: gnome-shell-glthread-disable.patch -Patch12: radeonsi-turn-off-glthread.patch -Patch13: zink-fix-resizable-bar-detection-logic.patch -Patch14: mesa-meson-c99.patch -# Temporary disabling Zink as a fallback between HW and SW drivers due to -# multiple regression caused by this change during the 23.3.X development cycle. -# Remove these 2 patches if updating to 24.X.X: -Patch15: 0001-Revert-egl-add-automatic-zink-fallback-loading-betwe.patch -Patch16: 0002-Revert-glx-add-automatic-zink-fallback-loading-betwe.patch +# meson >= 1.3.0 is required +%global meson_ver 1.3.0 +Source2: https://github.com/mesonbuild/meson/releases/download/%{meson_ver}/meson-%{meson_ver}.tar.gz -BuildRequires: meson >= 0.45 +# libclc is not available in RHEL 9 but it is required for Intel drivers since +# mesa >= 24.1.0 +%global libclc_version 18.1.2 +Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{libclc_version}/libclc-%{libclc_version}.src.tar.xz +BuildRequires: libedit-devel +BuildRequires: clang-devel >= %{libclc_version} +# Build our own version +# BuildRequires: spirv-llvm-translator-tools + +# spirv-llvm-translator is a dependency of libclc +%global spirv_llvm_trans_ver 18.1.0 +%global spirv_llvm_trans_commit 259f72c06ce9dff3867f842aaeb1e414c97066a5 +%global spirv_llvm_trans_shortcommit %(c=%{spirv_llvm_trans_commit}; echo ${c:0:7}) +Source4: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/%{spirv_llvm_trans_commit}/spirv-llvm-translator-%{spirv_llvm_trans_shortcommit}.tar.gz +BuildRequires: cmake +BuildRequires: ninja-build +BuildRequires: llvm-static +BuildRequires: spirv-headers-devel +BuildRequires: spirv-tools-devel +BuildRequires: zlib-devel + +# wayland-protocols >= 1.34 is required +%global wayland_protocols_ver 1.34 +Source5: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/%{wayland_protocols_ver}/downloads/wayland-protocols-%{wayland_protocols_ver}.tar.xz +BuildRequires: wayland-devel + +# mesa patches (< 10000) +Patch10: gnome-shell-glthread-disable.patch +Patch11: 0001-llvmpipe-Init-eglQueryDmaBufModifiersEXT-num_modifie.patch +Patch12: 0001-Revert-ac-radeonsi-remove-has_syncobj-has_fence_to_h.patch + +# s390x only +Patch100: fix-egl-on-s390x.patch + +# Build our own version but keep the dependency for the RPM macros +BuildRequires: meson BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: gettext @@ -84,12 +129,17 @@ BuildRequires: kernel-headers # We only check for the minimum version of pkgconfig(libdrm) needed so that the # SRPMs for each arch still have the same build dependencies. See: # https://bugzilla.redhat.com/show_bug.cgi?id=1859515 -BuildRequires: pkgconfig(libdrm) >= 2.4.97 +BuildRequires: pkgconfig(libdrm) >= 2.4.119 +%if 0%{?with_libunwind} +BuildRequires: pkgconfig(libunwind) +%endif BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(zlib) >= 1.2.3 +BuildRequires: pkgconfig(libzstd) BuildRequires: pkgconfig(libselinux) BuildRequires: pkgconfig(wayland-scanner) -BuildRequires: pkgconfig(wayland-protocols) >= 1.8 +# Build our own version +# BuildRequires: pkgconfig(wayland-protocols) >= 1.34 BuildRequires: pkgconfig(wayland-client) >= 1.11 BuildRequires: pkgconfig(wayland-server) >= 1.11 BuildRequires: pkgconfig(wayland-egl-backend) >= 3 @@ -113,10 +163,13 @@ BuildRequires: pkgconfig(xcb-randr) BuildRequires: pkgconfig(xrandr) >= 1.3 BuildRequires: bison BuildRequires: flex +%if 0%{?with_lmsensors} +BuildRequires: lm_sensors-devel +%endif %if 0%{?with_vdpau} BuildRequires: pkgconfig(vdpau) >= 1.1 %endif -%if 0%{?with_vaapi} +%if 0%{?with_va} BuildRequires: pkgconfig(libva) >= 0.38.0 %endif %if 0%{?with_omx} @@ -124,16 +177,40 @@ BuildRequires: pkgconfig(libomxil-bellagio) %endif BuildRequires: pkgconfig(libelf) BuildRequires: pkgconfig(libglvnd) >= 1.3.2 -BuildRequires: llvm-devel >= 7.0.0 -%if 0%{?with_opencl} +BuildRequires: llvm-devel >= %{libclc_version} +%if 0%{?with_teflon} +BuildRequires: flatbuffers-devel +BuildRequires: flatbuffers-compiler +BuildRequires: xtensor-devel +%endif +%if 0%{?with_opencl} || 0%{?with_nvk} || 0%{?with_intel_clc} BuildRequires: clang-devel -BuildRequires: pkgconfig(libclc) +# Build our own version +# BuildRequires: pkgconfig(libclc) +# BuildRequires: pkgconfig(LLVMSPIRVLib) +BuildRequires: pkgconfig(SPIRV-Tools) +%endif +%if 0%{?with_opencl} || 0%{?with_nvk} +BuildRequires: bindgen +BuildRequires: rust-packaging +%endif +%if 0%{?with_nvk} +BuildRequires: cbindgen +BuildRequires: (crate(paste) >= 1.0.14 with crate(paste) < 2) +BuildRequires: (crate(proc-macro2) >= 1.0.56 with crate(proc-macro2) < 2) +BuildRequires: (crate(quote) >= 1.0.25 with crate(quote) < 2) +BuildRequires: (crate(syn/clone-impls) >= 2.0.15 with crate(syn/clone-impls) < 3) +BuildRequires: (crate(unicode-ident) >= 1.0.6 with crate(unicode-ident) < 2) %endif %if %{with valgrind} BuildRequires: pkgconfig(valgrind) %endif BuildRequires: python3-devel BuildRequires: python3-mako +%if 0%{?with_intel_clc} +BuildRequires: python3-ply +%endif +BuildRequires: python3-pycparser BuildRequires: vulkan-headers BuildRequires: glslang %if 0%{?with_vulkan_hw} @@ -146,7 +223,6 @@ BuildRequires: pkgconfig(vulkan) %package filesystem Summary: Mesa driver filesystem Provides: mesa-dri-filesystem = %{?epoch:%{epoch}:}%{version}-%{release} -Obsoletes: mesa-dri-filesystem < %{?epoch:%{epoch}:}%{version}-%{release} %description filesystem %{summary}. @@ -155,6 +231,7 @@ Obsoletes: mesa-dri-filesystem < %{?epoch:%{epoch}:}%{version}-%{release} Summary: Mesa libGL runtime libraries Requires: %{name}-libglapi%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: libglvnd-glx%{?_isa} >= 1:1.3.2 +Recommends: %{name}-dri-drivers%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} %description libGL %{summary}. @@ -173,6 +250,9 @@ Recommends: gl-manpages %package libEGL Summary: Mesa libEGL runtime libraries Requires: libglvnd-egl%{?_isa} >= 1:1.3.2 +Requires: %{name}-libgbm%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: %{name}-libglapi%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +Recommends: %{name}-dri-drivers%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} %description libEGL %{summary}. @@ -191,6 +271,14 @@ Provides: libEGL-devel%{?_isa} %package dri-drivers Summary: Mesa-based DRI drivers Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: %{name}-libglapi%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +%if 0%{?with_va} +Recommends: %{name}-va-drivers%{?_isa} +%endif +# If mesa-libEGL is installed, it must match in version. This is here to prevent using +# mesa-libEGL < 23.0.3-1 (frozen in the 'fedora' repo) which didn't have strong enough +# inter-dependencies. See https://bugzilla.redhat.com/show_bug.cgi?id=2193135 . +Requires: (%{name}-libEGL%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} if %{name}-libEGL%{?_isa}) %description dri-drivers %{summary}. @@ -204,6 +292,16 @@ Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{rel %{summary}. %endif +%if 0%{?with_va} +%package va-drivers +Summary: Mesa-based VA-API video acceleration drivers +Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +Obsoletes: %{name}-vaapi-drivers < 22.2.0-5 + +%description va-drivers +%{summary}. +%endif + %if 0%{?with_vdpau} %package vdpau-drivers Summary: Mesa-based VDPAU drivers @@ -233,6 +331,11 @@ Requires: %{name}-libOSMesa%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{rele Summary: Mesa gbm runtime library Provides: libgbm Provides: libgbm%{?_isa} +Recommends: %{name}-dri-drivers%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +# If mesa-dri-drivers are installed, they must match in version. This is here to prevent using +# older mesa-dri-drivers together with a newer mesa-libgbm and its dependants. +# See https://bugzilla.redhat.com/show_bug.cgi?id=2193135 . +Requires: (%{name}-dri-drivers%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} if %{name}-dri-drivers%{?_isa}) %description libgbm %{summary}. @@ -269,6 +372,10 @@ Provides: libxatracker-devel%{?_isa} Summary: Mesa shared glapi Provides: libglapi Provides: libglapi%{?_isa} +# If mesa-dri-drivers are installed, they must match in version. This is here to prevent using +# older mesa-dri-drivers together with a newer mesa-libglapi or its dependants. +# See https://bugzilla.redhat.com/show_bug.cgi?id=2193135 . +Requires: (%{name}-dri-drivers%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} if %{name}-dri-drivers%{?_isa}) %description libglapi %{summary}. @@ -292,6 +399,14 @@ Requires: %{name}-libOpenCL%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{rele %{summary}. %endif +%if 0%{?with_teflon} +%package libTeflon +Summary: Mesa TensorFlow Lite delegate + +%description libTeflon +%{summary}. +%endif + %if 0%{?with_nine} %package libd3d Summary: Mesa Direct3D9 state tracker @@ -310,15 +425,100 @@ Requires: %{name}-libd3d%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release %package vulkan-drivers Summary: Mesa Vulkan drivers Requires: vulkan%{_isa} +Obsoletes: mesa-vulkan-devel < %{?epoch:%{epoch}:}%{version}-%{release} %description vulkan-drivers The drivers with support for the Vulkan API. %prep -%autosetup -n %{name}-%{ver} -p1 +%autosetup -n %{name}-%{ver} -N +%autopatch -p1 -M 99 +%ifarch s390x +%autopatch -p1 -m 100 +%endif cp %{SOURCE1} docs/ +# Extract meson +tar -xvf %{SOURCE2} + +# Extract libclc +tar -xvf %{SOURCE3} + +# Extract spirv-llvm-translator +tar -xvf %{SOURCE4} + +# Extract wayland-protocols +tar -xvf %{SOURCE5} + %build +# Build meson +cd meson-%{meson_ver} +%py3_build +%py3_install +%global __meson %{buildroot}%{_bindir}/meson +export PYTHONPATH=%{buildroot}%{python3_sitelib}:%{python3_sitelib} +cd - + +# Build spirv-llvm-translator +cd SPIRV-LLVM-Translator-%{spirv_llvm_trans_commit} +%cmake -GNinja \ + -DLLVM_BUILD_TOOLS=ON \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_RPATH:BOOL=";" \ + -DLLVM_DIR="/usr/lib64/cmake/llvm/" \ +%if 0%{?__isa_bits} == 64 + -DLLVM_LIBDIR_SUFFIX=64 \ +%else + -DLLVM_LIBDIR_SUFFIX= \ +%endif + -DLLVM_EXTERNAL_PROJECTS="SPIRV-Headers" \ + -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR="/usr/include/spirv/" +%cmake_build +%cmake_install +cd - + +export LIBRARY_PATH=%{buildroot}%{_libdir}:$LIBRARY_PATH +export LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH +export XDG_DATA_DIRS=%{buildroot}%{_datadir}:$XDG_DATA_DIRS +export CPATH=%{buildroot}%{_includedir}:$CPATH +export PKG_CONFIG_PATH=%{buildroot}%{_libdir}/pkgconfig:%{buildroot}%{_datadir}/pkgconfig:$PKG_CONFIG_PATH +export PATH=%{buildroot}%{_bindir}:$PATH + +# Build libclc +cd libclc-%{libclc_version}.src +export CFLAGS="%{build_cflags} -D__extern_always_inline=inline" +%cmake -GNinja \ + -DCMAKE_INSTALL_DATADIR:PATH=%{_lib} \ + -DLIBCLC_TARGETS_TO_BUILD="spirv-mesa3d-;spirv64-mesa3d-" \ + -DLLVM_SPIRV=%{buildroot}%{_bindir}/llvm-spirv +%cmake_build +%cmake_install +cd - +sed -e "s!libexecdir=!libexecdir=\/%{buildroot}!" -i %{buildroot}%{_libdir}/pkgconfig/libclc.pc + +# Build wayland-protocols +cd wayland-protocols-%{wayland_protocols_ver} +%meson --prefix=%{buildroot} +%meson_build +%meson_install +cd - + +# ensure standard Rust compiler flags are set +export RUSTFLAGS="%build_rustflags" + +%if 0%{?with_nvk} +export MESON_PACKAGE_CACHE_DIR="%{cargo_registry}/" +# So... Meson can't actually find them without tweaks +%define inst_crate_nameversion() %(basename %{cargo_registry}/%{1}-*) +%define rewrite_wrap_file() sed -e "/source.*/d" -e "s/%{1}-.*/%{inst_crate_nameversion %{1}}/" -i subprojects/%{1}.wrap + +%rewrite_wrap_file proc-macro2 +%rewrite_wrap_file quote +%rewrite_wrap_file syn +%rewrite_wrap_file unicode-ident +%rewrite_wrap_file paste +%endif + # We've gotten a report that enabling LTO for mesa breaks some games. See # https://bugzilla.redhat.com/show_bug.cgi?id=1862771 for details. # Disable LTO for now @@ -334,12 +534,15 @@ cp %{SOURCE1} docs/ -Dgallium-drivers=swrast,virgl \ %endif -Dgallium-vdpau=%{?with_vdpau:enabled}%{!?with_vdpau:disabled} \ - -Dgallium-xvmc=disabled \ -Dgallium-omx=%{?with_omx:bellagio}%{!?with_omx:disabled} \ - -Dgallium-va=%{?with_vaapi:enabled}%{!?with_vaapi:disabled} \ + -Dgallium-va=%{?with_va:enabled}%{!?with_va:disabled} \ -Dgallium-xa=%{?with_xa:enabled}%{!?with_xa:disabled} \ -Dgallium-nine=%{?with_nine:true}%{!?with_nine:false} \ + -Dteflon=%{?with_teflon:true}%{!?with_teflon:false} \ -Dgallium-opencl=%{?with_opencl:icd}%{!?with_opencl:disabled} \ +%if 0%{?with_opencl} + -Dgallium-rusticl=true \ +%endif -Dvulkan-drivers=%{?vulkan_drivers} \ -Dvulkan-layers=device-select \ -Dshared-glapi=enabled \ @@ -349,15 +552,23 @@ cp %{SOURCE1} docs/ -Dgbm=enabled \ -Dglx=dri \ -Degl=enabled \ - -Dglvnd=true \ + -Dglvnd=enabled \ +%if 0%{?with_intel_clc} + -Dintel-clc=enabled \ +%endif + -Dintel-rt=%{?with_intel_vk_rt:enabled}%{!?with_intel_vk_rt:disabled} \ -Dmicrosoft-clc=disabled \ -Dllvm=enabled \ -Dshared-llvm=enabled \ -Dvalgrind=%{?with_valgrind:enabled}%{!?with_valgrind:disabled} \ -Dbuild-tests=false \ -Dselinux=true \ +%if !0%{?with_libunwind} -Dlibunwind=disabled \ +%endif +%if !0%{?with_lmsensors} -Dlmsensors=disabled \ +%endif -Dandroid-libbacktrace=disabled \ %ifarch %{ix86} -Dglx-read-only-text=true \ @@ -366,8 +577,37 @@ cp %{SOURCE1} docs/ %meson_build %install +cd meson-%{meson_ver} +%py3_install +%global __meson %{buildroot}%{_bindir}/meson +export PYTHONPATH=%{buildroot}%{python3_sitelib}:%{python3_sitelib} +cd - + %meson_install +# Delete files installed by meson +rm -f %{buildroot}%{_bindir}/meson +rm -rf %{buildroot}%{_mandir}/man1/meson.1* +rm -f %{buildroot}%{_datadir}/polkit-1/actions/com.mesonbuild.install.policy +rm -f %{buildroot}%{_datadir}/bash-completion/completions/meson +rm -f %{buildroot}%{_datadir}/zsh/site-functions/_meson +rm -rf %{buildroot}%{python3_sitelib} + +# Delete files installed by libclc +rm -fr %{buildroot}%{_libdir}/clc +rm -f %{buildroot}%{_libdir}/pkgconfig/libclc.pc + +# Delete files installed by spirv-llvm-translator +rm -f %{buildroot}%{_bindir}/llvm-spirv +rm -fr %{buildroot}%{_includedir}/LLVMSPIRVLib +rm -f %{buildroot}%{_libdir}/libLLVMSPIRVLib.so +rm -f %{buildroot}%{_libdir}/libLLVMSPIRVLib.so.* +rm -f %{buildroot}%{_libdir}/pkgconfig/LLVMSPIRVLib.pc + +# Delete files installed by wayland-protocols +rm -f %{buildroot}%{_datadir}/pkgconfig/wayland-protocols.pc +rm -fr %{buildroot}%{_datadir}/wayland-protocols/ + # libvdpau opens the versioned name, don't bother including the unversioned rm -vf %{buildroot}%{_libdir}/vdpau/*.so # likewise glvnd @@ -410,15 +650,13 @@ popd %{_libdir}/libEGL_mesa.so.0* %files libEGL-devel %dir %{_includedir}/EGL -%{_includedir}/EGL/eglmesaext.h %{_includedir}/EGL/eglext_angle.h +%{_includedir}/EGL/eglmesaext.h -%ldconfig_scriptlets libglapi %files libglapi %{_libdir}/libglapi.so.0 %{_libdir}/libglapi.so.0.* -%ldconfig_scriptlets libOSMesa %files libOSMesa %{_libdir}/libOSMesa.so.8* %files libOSMesa-devel @@ -427,7 +665,6 @@ popd %{_libdir}/libOSMesa.so %{_libdir}/pkgconfig/osmesa.pc -%ldconfig_scriptlets libgbm %files libgbm %{_libdir}/libgbm.so.1 %{_libdir}/libgbm.so.1.* @@ -437,7 +674,6 @@ popd %{_libdir}/pkgconfig/gbm.pc %if 0%{?with_xa} -%ldconfig_scriptlets libxatracker %files libxatracker %if 0%{?with_hardware} %{_libdir}/libxatracker.so.2 @@ -454,13 +690,21 @@ popd %endif %endif +%if 0%{?with_teflon} +%files libTeflon +%{_libdir}/libteflon.so +%endif + %if 0%{?with_opencl} -%ldconfig_scriptlets libOpenCL %files libOpenCL %{_libdir}/libMesaOpenCL.so.* +%{_libdir}/libRusticlOpenCL.so.* %{_sysconfdir}/OpenCL/vendors/mesa.icd +%{_sysconfdir}/OpenCL/vendors/rusticl.icd + %files libOpenCL-devel %{_libdir}/libMesaOpenCL.so +%{_libdir}/libRusticlOpenCL.so %endif %if 0%{?with_nine} @@ -482,11 +726,6 @@ popd %{_libdir}/dri/virtio_gpu_dri.so %if 0%{?with_hardware} -%if !0%{?rhel} -%{_libdir}/dri/radeon_dri.so -%{_libdir}/dri/r200_dri.so -%{_libdir}/dri/nouveau_vieux_dri.so -%endif %if 0%{?with_r300} %{_libdir}/dri/r300_dri.so %endif @@ -504,8 +743,12 @@ popd %{_libdir}/dri/ingenic-drm_dri.so %{_libdir}/dri/imx-drm_dri.so %{_libdir}/dri/imx-lcdif_dri.so +%{_libdir}/dri/kirin_dri.so +%{_libdir}/dri/komeda_dri.so +%{_libdir}/dri/mali-dp_dri.so %{_libdir}/dri/mcde_dri.so %{_libdir}/dri/mxsfb-drm_dri.so +%{_libdir}/dri/rcar-du_dri.so %{_libdir}/dri/stm_dri.so %endif %if 0%{?with_vc4} @@ -529,19 +772,12 @@ popd %endif %if 0%{?with_panfrost} %{_libdir}/dri/panfrost_dri.so +%{_libdir}/dri/panthor_dri.so %endif %{_libdir}/dri/nouveau_dri.so %if 0%{?with_vmware} %{_libdir}/dri/vmwgfx_dri.so %endif -%{_libdir}/dri/nouveau_drv_video.so -%if 0%{?with_r600} -%{_libdir}/dri/r600_drv_video.so -%endif -%if 0%{?with_radeonsi} -%{_libdir}/dri/radeonsi_drv_video.so -%endif -%{_libdir}/dri/virtio_gpu_drv_video.so %endif %if 0%{?with_opencl} %dir %{_libdir}/gallium-pipe @@ -550,24 +786,29 @@ popd %if 0%{?with_kmsro} %{_libdir}/dri/armada-drm_dri.so %{_libdir}/dri/exynos_dri.so +%{_libdir}/dri/gm12u320_dri.so %{_libdir}/dri/hdlcd_dri.so %{_libdir}/dri/hx8357d_dri.so +%{_libdir}/dri/ili9163_dri.so %{_libdir}/dri/ili9225_dri.so %{_libdir}/dri/ili9341_dri.so +%{_libdir}/dri/ili9486_dri.so %{_libdir}/dri/imx-dcss_dri.so -%{_libdir}/dri/kirin_dri.so -%{_libdir}/dri/komeda_dri.so -%{_libdir}/dri/mali-dp_dri.so %{_libdir}/dri/mediatek_dri.so %{_libdir}/dri/meson_dri.so %{_libdir}/dri/mi0283qt_dri.so +%{_libdir}/dri/panel-mipi-dbi_dri.so %{_libdir}/dri/pl111_dri.so -%{_libdir}/dri/rcar-du_dri.so %{_libdir}/dri/repaper_dri.so %{_libdir}/dri/rockchip_dri.so +%{_libdir}/dri/rzg2l-du_dri.so +%{_libdir}/dri/ssd130x_dri.so %{_libdir}/dri/st7586_dri.so %{_libdir}/dri/st7735r_dri.so +%{_libdir}/dri/sti_dri.so %{_libdir}/dri/sun4i-drm_dri.so +%{_libdir}/dri/udl_dri.so +%{_libdir}/dri/zynqmp-dpsub_dri.so %endif %if 0%{?with_vulkan_hw} %{_libdir}/dri/zink_dri.so @@ -577,19 +818,29 @@ popd %files omx-drivers %{_libdir}/bellagio/libomx_mesa.so %endif + +%if 0%{?with_va} +%files va-drivers +%{_libdir}/dri/nouveau_drv_video.so +%if 0%{?with_r600} +%{_libdir}/dri/r600_drv_video.so +%endif +%if 0%{?with_radeonsi} +%{_libdir}/dri/radeonsi_drv_video.so +%endif +%{_libdir}/dri/virtio_gpu_drv_video.so +%endif + %if 0%{?with_vdpau} %files vdpau-drivers %{_libdir}/vdpau/libvdpau_nouveau.so.1* -%{_libdir}/vdpau/libvdpau_virtio_gpu.so.1* -%if 0%{?with_r300} -%{_libdir}/vdpau/libvdpau_r300.so.1* -%endif %if 0%{?with_r600} %{_libdir}/vdpau/libvdpau_r600.so.1* %endif %if 0%{?with_radeonsi} %{_libdir}/vdpau/libvdpau_radeonsi.so.1* %endif +%{_libdir}/vdpau/libvdpau_virtio_gpu.so.1* %endif %files vulkan-drivers @@ -598,9 +849,13 @@ popd %{_libdir}/libVkLayer_MESA_device_select.so %{_datadir}/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json %if 0%{?with_vulkan_hw} -%{_datadir}/drirc.d/00-radv-defaults.conf %{_libdir}/libvulkan_radeon.so +%{_datadir}/drirc.d/00-radv-defaults.conf %{_datadir}/vulkan/icd.d/radeon_icd.*.json +%if 0%{?with_nvk} +%{_libdir}/libvulkan_nouveau.so +%{_datadir}/vulkan/icd.d/nouveau_icd.*.json +%endif %ifarch %{ix86} x86_64 %{_libdir}/libvulkan_intel.so %{_datadir}/vulkan/icd.d/intel_icd.*.json @@ -616,6 +871,28 @@ popd %endif %changelog +* Mon Aug 26 2024 José Expósito - 24.1.2-3 +- Match mesa-libEGL version + Cherry-picked from: https://src.fedoraproject.org/rpms/mesa/pull-request/24 + Resolves: https://issues.redhat.com/browse/RHEL-50229 + +* Wed Jul 03 2024 José Expósito - 24.1.2-2 +- Rebuild mesa with LLVM 18 + Resolves: https://issues.redhat.com/browse/RHEL-28682 + +* Fri Jun 28 2024 José Expósito - 24.1.2-1 +- Update to mesa 24.1.2 + +* Wed Jun 26 2024 José Expósito - 24.1.0-3 +- Fix egl on s390x + Resolves: https://issues.redhat.com/browse/RHEL-44948 + +* Mon Jun 10 2024 José Expósito - 24.1.0-2 +- spirv-llvm-translator: Fix compilation with new spirv-headers + +* Thu May 30 2024 José Expósito - 24.1.0-1 +- Update to mesa 24.1.0 + * Wed Jan 17 2024 José Expósito - 23.3.3-1 - Update to mesa 23.3.3