parent
1ed4bc86e8
commit
354f8f09df
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@ results_mesa/
|
||||
mesa-*/
|
||||
/libclc-*.tar.xz
|
||||
/spirv-llvm-translator-*.tar.gz
|
||||
/python3-pyyaml-*.tar.gz
|
||||
|
@ -1,153 +0,0 @@
|
||||
From fddf49504e1bebb7efc52c1a0516300c0f217f18 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
|
||||
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
|
||||
|
@ -1,41 +0,0 @@
|
||||
From 1f3ea20998329788f6a14166d8ba9b3948b7e864 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= <jexposit@redhat.com>
|
||||
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 <max_formats> is 0, no formats are returned, but the total number
|
||||
of formats is returned in <num_formats>, 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 <jexposit@redhat.com>
|
||||
---
|
||||
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
|
||||
|
39
0001-pyyaml-731.patch
Normal file
39
0001-pyyaml-731.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From 17dc5b6cd96dcfe64fd71789c771ca9b96d260e5 Mon Sep 17 00:00:00 2001
|
||||
From: "Andrew J. Hesford" <ajh@sideband.org>
|
||||
Date: Fri, 21 Jul 2023 09:50:00 -0400
|
||||
Subject: [PATCH] Fix builds with Cython 3
|
||||
|
||||
This is a *de minimis* fix for building with Cython 3. Recent Cython<3
|
||||
releases provided `Cython.Distutils.build_ext` as an alias to
|
||||
`Cython.Distutils.old_build_ext.old_build_ext`; Cython 3 drops this
|
||||
alias and instead uses a wholly new `Cython.Distutils.build_ext` that
|
||||
does not provide the `cython_sources` function used in `setup.py`.
|
||||
|
||||
Explicitly importing `old_build_ext` preserves the existing behavior for
|
||||
recent Cython<3 and uses the correct behavior for Cython 3. Should the
|
||||
import fail (*e.g.*, because the version of Cython available predates
|
||||
the availability of `old_build_ext`), the import falls back to just
|
||||
`Cython.Distutils.build_ext`.
|
||||
|
||||
Signed-off-by: Andrew J. Hesford <ajh@sideband.org>
|
||||
---
|
||||
setup.py | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 944e7fa2..462b1e95 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -82,7 +82,11 @@
|
||||
with_cython = True
|
||||
try:
|
||||
from Cython.Distutils.extension import Extension as _Extension
|
||||
- from Cython.Distutils import build_ext as _build_ext
|
||||
+ try:
|
||||
+ from Cython.Distutils.old_build_ext import old_build_ext as _build_ext
|
||||
+ except ImportError:
|
||||
+ from Cython.Distutils import build_ext as _build_ext
|
||||
+
|
||||
with_cython = True
|
||||
except ImportError:
|
||||
if with_cython:
|
@ -1,131 +0,0 @@
|
||||
From 5ca85d75c05de9df7c3170122dfdb04bc795b43a Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Stone <daniels@collabora.com>
|
||||
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 <daniels@collabora.com>
|
||||
Fixes: ad0edea53a73 ("st/dri: Check format properties from format helpers")
|
||||
Closes: mesa/mesa#11360
|
||||
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29837>
|
||||
---
|
||||
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 <daniels@collabora.com>
|
||||
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 <daniels@collabora.com>
|
||||
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29837>
|
||||
---
|
||||
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 <daniels@collabora.com>
|
||||
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 <daniels@collabora.com>
|
||||
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29837>
|
||||
---
|
||||
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
|
||||
|
97
mesa.spec
97
mesa.spec
@ -9,11 +9,12 @@
|
||||
%global with_r300 1
|
||||
%global with_r600 1
|
||||
%global with_nine 1
|
||||
%global with_nvk %{with vulkan_hw}
|
||||
%global with_omx 1
|
||||
%if 0%{?with_vulkan_hw}
|
||||
%global with_nvk %{with_vulkan_hw}
|
||||
%endif
|
||||
%global with_opencl 1
|
||||
%endif
|
||||
%global base_vulkan ,amd
|
||||
%global base_vulkan %{?with_vulkan_hw:,amd}%{!?with_vulkan_hw:%{nil}}
|
||||
%endif
|
||||
|
||||
%ifnarch %{ix86}
|
||||
@ -24,15 +25,16 @@
|
||||
|
||||
%ifarch %{ix86} x86_64
|
||||
%global with_iris 1
|
||||
%global with_crocus 1
|
||||
%global with_vmware 1
|
||||
%global with_crocus 1
|
||||
%global with_xa 1
|
||||
%global with_intel_clc 1
|
||||
%global intel_platform_vulkan ,intel,intel_hasvk
|
||||
%global intel_platform_vulkan %{?with_vulkan_hw:,intel,intel_hasvk}%{!?with_vulkan_hw:%{nil}}
|
||||
%endif
|
||||
%ifarch x86_64
|
||||
%if !0%{?with_vulkan_hw}
|
||||
%global with_intel_vk_rt 1
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%ifarch aarch64 x86_64 %{ix86}
|
||||
%if !0%{?rhel}
|
||||
@ -46,7 +48,7 @@
|
||||
%global with_kmsro 1
|
||||
%global with_panfrost 1
|
||||
%global with_xa 1
|
||||
%global extra_platform_vulkan ,broadcom,freedreno,panfrost,imagination-experimental
|
||||
%global extra_platform_vulkan %{?with_vulkan_hw:,broadcom,freedreno,panfrost,imagination-experimental}%{!?with_vulkan_hw:%{nil}}
|
||||
%endif
|
||||
|
||||
%if !0%{?rhel}
|
||||
@ -64,7 +66,7 @@
|
||||
|
||||
Name: mesa
|
||||
Summary: Mesa graphics libraries
|
||||
%global ver 24.1.2
|
||||
%global ver 24.2.6
|
||||
Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)}
|
||||
Release: %autorelease
|
||||
License: MIT AND BSD-3-Clause AND SGI-B-2.0
|
||||
@ -76,9 +78,9 @@ Source0: https://archive.mesa3d.org/mesa-%{ver}.tar.xz
|
||||
# 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
|
||||
|
||||
# libclc is not available in RHEL 9 but it is required for Intel drivers since
|
||||
# libclc is not available in RHEL but it is required for Intel drivers since
|
||||
# mesa >= 24.1.0
|
||||
%global libclc_version 18.1.2
|
||||
%global libclc_version 19.1.1
|
||||
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}
|
||||
@ -86,8 +88,8 @@ BuildRequires: clang-devel >= %{libclc_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_ver 19.1.1
|
||||
%global spirv_llvm_trans_commit 90a976491d3847657396456e0e94d7dc48d35996
|
||||
%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
|
||||
@ -97,14 +99,18 @@ BuildRequires: spirv-headers-devel
|
||||
BuildRequires: spirv-tools-devel
|
||||
BuildRequires: zlib-devel
|
||||
|
||||
# python3-pyyaml is not available in RHEL
|
||||
%global pyyaml_version 6.0.1
|
||||
Source5: https://github.com/yaml/pyyaml/archive/%{pyyaml_version}.tar.gz#/python3-pyyaml-%{pyyaml_version}.tar.gz
|
||||
BuildRequires: libyaml-devel
|
||||
BuildRequires: python3-cython
|
||||
|
||||
# Mesa patches (< 100)
|
||||
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
|
||||
# python3-pyyaml patches (>= 500 && < 600)
|
||||
Patch500: 0001-pyyaml-731.patch
|
||||
|
||||
# Build our own version but keep the dependency for the RPM macros
|
||||
BuildRequires: meson
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
@ -115,7 +121,7 @@ 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.119
|
||||
BuildRequires: pkgconfig(libdrm) >= 2.4.121
|
||||
%if 0%{?with_libunwind}
|
||||
BuildRequires: pkgconfig(libunwind)
|
||||
%endif
|
||||
@ -157,9 +163,6 @@ BuildRequires: pkgconfig(vdpau) >= 1.1
|
||||
%if 0%{?with_va}
|
||||
BuildRequires: pkgconfig(libva) >= 0.38.0
|
||||
%endif
|
||||
%if 0%{?with_omx}
|
||||
BuildRequires: pkgconfig(libomxil-bellagio)
|
||||
%endif
|
||||
BuildRequires: pkgconfig(libelf)
|
||||
BuildRequires: pkgconfig(libglvnd) >= 1.3.2
|
||||
BuildRequires: llvm-devel >= %{libclc_version}
|
||||
@ -196,6 +199,8 @@ BuildRequires: python3-mako
|
||||
BuildRequires: python3-ply
|
||||
%endif
|
||||
BuildRequires: python3-pycparser
|
||||
# Build our own version
|
||||
# BuildRequires: python3-pyyaml
|
||||
BuildRequires: vulkan-headers
|
||||
BuildRequires: glslang
|
||||
%if 0%{?with_vulkan_hw}
|
||||
@ -208,6 +213,7 @@ BuildRequires: pkgconfig(vulkan)
|
||||
%package filesystem
|
||||
Summary: Mesa driver filesystem
|
||||
Provides: mesa-dri-filesystem = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Obsoletes: mesa-omx-drivers < %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
|
||||
%description filesystem
|
||||
%{summary}.
|
||||
@ -264,15 +270,6 @@ Recommends: %{name}-va-drivers%{?_isa}
|
||||
%description dri-drivers
|
||||
%{summary}.
|
||||
|
||||
%if 0%{?with_omx}
|
||||
%package omx-drivers
|
||||
Summary: Mesa-based OMX drivers
|
||||
Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
|
||||
%description omx-drivers
|
||||
%{summary}.
|
||||
%endif
|
||||
|
||||
%if 0%{?with_va}
|
||||
%package va-drivers
|
||||
Summary: Mesa-based VA-API video acceleration drivers
|
||||
@ -406,6 +403,7 @@ Requires: %{name}-libd3d%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release
|
||||
%package vulkan-drivers
|
||||
Summary: Mesa Vulkan drivers
|
||||
Requires: vulkan%{_isa}
|
||||
Requires: %{name}-filesystem%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Obsoletes: mesa-vulkan-devel < %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
|
||||
%description vulkan-drivers
|
||||
@ -414,9 +412,6 @@ The drivers with support for the Vulkan API.
|
||||
%prep
|
||||
%autosetup -n %{name}-%{ver} -N
|
||||
%autopatch -p1 -M 99
|
||||
%ifarch s390x
|
||||
%autopatch -p1 -m 100
|
||||
%endif
|
||||
cp %{SOURCE1} docs/
|
||||
|
||||
# Extract libclc
|
||||
@ -425,6 +420,15 @@ tar -xvf %{SOURCE3}
|
||||
# Extract spirv-llvm-translator
|
||||
tar -xvf %{SOURCE4}
|
||||
|
||||
# Extract python3-pyyaml
|
||||
tar -xvf %{SOURCE5}
|
||||
cd pyyaml-%{pyyaml_version}
|
||||
%autopatch -p1 -m 500 -M 599
|
||||
sed -i 's/Cython<3.0/Cython/' pyproject.toml
|
||||
chmod a-x examples/yaml-highlight/yaml_hl.py
|
||||
rm -rf ext/_yaml.c
|
||||
cd -
|
||||
|
||||
%build
|
||||
# Build spirv-llvm-translator
|
||||
cd SPIRV-LLVM-Translator-%{spirv_llvm_trans_commit}
|
||||
@ -463,6 +467,13 @@ export CFLAGS="%{build_cflags} -D__extern_always_inline=inline"
|
||||
cd -
|
||||
sed -e "s!libexecdir=!libexecdir=\/%{buildroot}!" -i %{buildroot}%{_libdir}/pkgconfig/libclc.pc
|
||||
|
||||
# Build python3-pyyaml
|
||||
cd pyyaml-%{pyyaml_version}
|
||||
%py3_build
|
||||
%py3_install
|
||||
cd -
|
||||
export PYTHONPATH=%{buildroot}%{_libdir}/python%{python3_version}/site-packages
|
||||
|
||||
# ensure standard Rust compiler flags are set
|
||||
export RUSTFLAGS="%build_rustflags"
|
||||
|
||||
@ -489,12 +500,11 @@ export MESON_PACKAGE_CACHE_DIR="%{cargo_registry}/"
|
||||
-Ddri3=enabled \
|
||||
-Dosmesa=true \
|
||||
%if 0%{?with_hardware}
|
||||
-Dgallium-drivers=swrast,virgl,nouveau%{?with_r300:,r300}%{?with_crocus:,crocus}%{?with_iris:,iris}%{?with_vmware:,svga}%{?with_radeonsi:,radeonsi}%{?with_r600:,r600}%{?with_freedreno:,freedreno}%{?with_etnaviv:,etnaviv}%{?with_tegra:,tegra}%{?with_vc4:,vc4}%{?with_v3d:,v3d}%{?with_kmsro:,kmsro}%{?with_lima:,lima}%{?with_panfrost:,panfrost}%{?with_vulkan_hw:,zink} \
|
||||
-Dgallium-drivers=swrast,virgl,nouveau%{?with_r300:,r300}%{?with_crocus:,crocus}%{?with_iris:,iris}%{?with_vmware:,svga}%{?with_radeonsi:,radeonsi}%{?with_r600:,r600}%{?with_freedreno:,freedreno}%{?with_etnaviv:,etnaviv}%{?with_tegra:,tegra}%{?with_vc4:,vc4}%{?with_v3d:,v3d}%{?with_lima:,lima}%{?with_panfrost:,panfrost}%{?with_vulkan_hw:,zink} \
|
||||
%else
|
||||
-Dgallium-drivers=swrast,virgl \
|
||||
%endif
|
||||
-Dgallium-vdpau=%{?with_vdpau:enabled}%{!?with_vdpau:disabled} \
|
||||
-Dgallium-omx=%{?with_omx:bellagio}%{!?with_omx: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} \
|
||||
@ -572,16 +582,13 @@ popd
|
||||
%files filesystem
|
||||
%doc docs/Mesa-MLAA-License-Clarification-Email.txt
|
||||
%dir %{_libdir}/dri
|
||||
%if 0%{?with_hardware}
|
||||
%if 0%{?with_vdpau}
|
||||
%dir %{_libdir}/vdpau
|
||||
%endif
|
||||
%endif
|
||||
%dir %{_datadir}/drirc.d
|
||||
|
||||
%files libGL
|
||||
%{_libdir}/libGLX_mesa.so.0*
|
||||
%{_libdir}/libGLX_system.so.0*
|
||||
%files libGL-devel
|
||||
%dir %{_includedir}/GL
|
||||
%dir %{_includedir}/GL/internal
|
||||
%{_includedir}/GL/internal/dri_interface.h
|
||||
%{_libdir}/pkgconfig/dri.pc
|
||||
@ -661,9 +668,10 @@ popd
|
||||
%endif
|
||||
|
||||
%files dri-drivers
|
||||
%dir %{_datadir}/drirc.d
|
||||
%{_datadir}/drirc.d/00-mesa-defaults.conf
|
||||
%{_libdir}/libgallium-*.so
|
||||
%{_libdir}/dri/kms_swrast_dri.so
|
||||
%{_libdir}/dri/libdril_dri.so
|
||||
%{_libdir}/dri/swrast_dri.so
|
||||
%{_libdir}/dri/virtio_gpu_dri.so
|
||||
|
||||
@ -750,17 +758,13 @@ popd
|
||||
%{_libdir}/dri/sti_dri.so
|
||||
%{_libdir}/dri/sun4i-drm_dri.so
|
||||
%{_libdir}/dri/udl_dri.so
|
||||
%{_libdir}/dri/vkms_dri.so
|
||||
%{_libdir}/dri/zynqmp-dpsub_dri.so
|
||||
%endif
|
||||
%if 0%{?with_vulkan_hw}
|
||||
%{_libdir}/dri/zink_dri.so
|
||||
%endif
|
||||
|
||||
%if 0%{?with_omx}
|
||||
%files omx-drivers
|
||||
%{_libdir}/bellagio/libomx_mesa.so
|
||||
%endif
|
||||
|
||||
%if 0%{?with_va}
|
||||
%files va-drivers
|
||||
%{_libdir}/dri/nouveau_drv_video.so
|
||||
@ -775,6 +779,7 @@ popd
|
||||
|
||||
%if 0%{?with_vdpau}
|
||||
%files vdpau-drivers
|
||||
%dir %{_libdir}/vdpau
|
||||
%{_libdir}/vdpau/libvdpau_nouveau.so.1*
|
||||
%if 0%{?with_r600}
|
||||
%{_libdir}/vdpau/libvdpau_r600.so.1*
|
||||
|
7
sources
7
sources
@ -1,3 +1,4 @@
|
||||
SHA512 (libclc-18.1.2.src.tar.xz) = 1a6ac7ff487e54183600ee6b0307ad46d3d4d295e21bb5206958bd303be6734249f42303fb5b528885d0e409174fe22c271267c692488b306a46cc617ff73346
|
||||
SHA512 (mesa-24.1.2.tar.xz) = ea28540552f9f28200c22423afcf9d9bb961557eae0dc11416c5ef60788c3e7f6d2b841c6bdbe2827d1339ea9d854623c1a0e08d4f1fd79d304fcdd52f790637
|
||||
SHA512 (spirv-llvm-translator-259f72c.tar.gz) = b5cb5be767f679c22eaf35c4fcf875855277b684bb3a5edbd687c4df6621386e5f769a599b582a0020cdcfc87d9a3e0122c1c14cd67987f77546b5acd1891d68
|
||||
SHA512 (libclc-19.1.1.src.tar.xz) = 41ba80e2ed8f874d79c40cfbb1de89ad9e1ecc3709519e697617c14bc2583b2f8cdb8ca20bd2095b436afcc69144a6d88d4334de1e152d78ef3a19ec14c0733d
|
||||
SHA512 (mesa-24.2.6.tar.xz) = 830a40d38200ff8b2a6bd949e1ac3bf4edc887a10d9aa92285007d138079e1fafb3568f658e777e7894e95b5ce75d2bd6836b0473fa70d32270005e482b1a2da
|
||||
SHA512 (python3-pyyaml-6.0.1.tar.gz) = 1c74a92a4ad7d47854dc7bcb2e89b3c8e0b14fa815c7dbfbc22b24480dbba6c81e971c77ee384c494a960914b95f06edf943d7431925a5ed674a0ba830d258e0
|
||||
SHA512 (spirv-llvm-translator-90a9764.tar.gz) = c0be7326fa76927f9900a9d91ced0035aeee66cdab35baa9c708b27c5d5e423f4819f148d17c3b7b812d1e8991e1057d71d52c22df2de37efdd72f1c20dcf05e
|
||||
|
Loading…
Reference in New Issue
Block a user