Compare commits

...

3 Commits
c8 ... c10

Author SHA1 Message Date
7801f0c855 import UBI mesa-25.0.7-6.el10_1 2025-11-11 22:15:23 +00:00
69649967dc import UBI mesa-24.2.8-3.el10_0 2025-08-12 17:04:19 +00:00
12de98b955 import UBI mesa-24.2.8-2.el10_0 2025-05-14 15:09:46 +00:00
23 changed files with 2369 additions and 1793 deletions

6
.gitignore vendored
View File

@ -1,3 +1,3 @@
SOURCES/dataclasses-0.8.tar.gz
SOURCES/mesa-23.1.4.tar.xz
SOURCES/meson-0.61.4.tar.gz
libclc-20.1.3.src.tar.xz
mesa-25.0.7.tar.xz
spirv-llvm-translator-834db1a.tar.gz

View File

@ -1,3 +0,0 @@
ef25d3e9e2523805baa314a4adcb915ae901740e SOURCES/dataclasses-0.8.tar.gz
8a48c0e1fbda2c9563ddcf95b05012ab00a8a692 SOURCES/mesa-23.1.4.tar.xz
b0ab169abd8ec87ce773a02b2c7d6a8664b8db00 SOURCES/meson-0.61.4.tar.gz

View File

@ -0,0 +1,88 @@
From 870b8717b25eceadac8dd653debe8346826227cb Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Mon, 9 Jun 2025 09:19:28 +1000
Subject: [PATCH] Revert "hasvk/elk: stop turning load_push_constants into
load_uniform"
This reverts commit b036d2ded2de32e81730ec8ce37c803bad112efa.
This seems to break gtk4 and other stuff.
Cc: mesa-stable
(taking ack from Lionel saying we should revert)
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35407>
---
src/intel/compiler/elk/elk_fs_nir.cpp | 4 ++--
src/intel/vulkan_hasvk/anv_nir_apply_pipeline_layout.c | 6 +++---
src/intel/vulkan_hasvk/anv_nir_compute_push_layout.c | 3 +--
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/intel/compiler/elk/elk_fs_nir.cpp b/src/intel/compiler/elk/elk_fs_nir.cpp
index 459e2d966b7..6b78d6cf9f8 100644
--- a/src/intel/compiler/elk/elk_fs_nir.cpp
+++ b/src/intel/compiler/elk/elk_fs_nir.cpp
@@ -4969,8 +4969,7 @@ fs_nir_emit_intrinsic(nir_to_elk_state &ntb,
break;
}
- case nir_intrinsic_load_uniform:
- case nir_intrinsic_load_push_constant: {
+ case nir_intrinsic_load_uniform: {
/* Offsets are in bytes but they should always aligned to
* the type size
*/
@@ -7058,3 +7057,4 @@ nir_to_elk(elk_fs_visitor *s)
ralloc_free(ntb.mem_ctx);
}
+
diff --git a/src/intel/vulkan_hasvk/anv_nir_apply_pipeline_layout.c b/src/intel/vulkan_hasvk/anv_nir_apply_pipeline_layout.c
index 2bedf9017ed..1c613a9ebe7 100644
--- a/src/intel/vulkan_hasvk/anv_nir_apply_pipeline_layout.c
+++ b/src/intel/vulkan_hasvk/anv_nir_apply_pipeline_layout.c
@@ -463,9 +463,9 @@ build_buffer_addr_for_res_index(nir_builder *b,
nir_iadd(b, res.dyn_offset_base, res.array_index);
nir_def *dyn_load =
- nir_load_uniform(b, 1, 32, nir_imul_imm(b, dyn_offset_idx, 4),
- .base = offsetof(struct anv_push_constants, dynamic_offsets),
- .range = MAX_DYNAMIC_BUFFERS * 4);
+ nir_load_push_constant(b, 1, 32, nir_imul_imm(b, dyn_offset_idx, 4),
+ .base = offsetof(struct anv_push_constants, dynamic_offsets),
+ .range = MAX_DYNAMIC_BUFFERS * 4);
nir_def *dynamic_offset =
nir_bcsel(b, nir_ieq_imm(b, res.dyn_offset_base, 0xff),
diff --git a/src/intel/vulkan_hasvk/anv_nir_compute_push_layout.c b/src/intel/vulkan_hasvk/anv_nir_compute_push_layout.c
index ed314af8b98..8a3f83f2c26 100644
--- a/src/intel/vulkan_hasvk/anv_nir_compute_push_layout.c
+++ b/src/intel/vulkan_hasvk/anv_nir_compute_push_layout.c
@@ -55,7 +55,6 @@ anv_nir_compute_push_layout(nir_shader *nir,
has_const_ubo = true;
break;
- case nir_intrinsic_load_uniform:
case nir_intrinsic_load_push_constant: {
unsigned base = nir_intrinsic_base(intrin);
unsigned range = nir_intrinsic_range(intrin);
@@ -132,7 +131,6 @@ anv_nir_compute_push_layout(nir_shader *nir,
nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr);
switch (intrin->intrinsic) {
- case nir_intrinsic_load_uniform:
case nir_intrinsic_load_push_constant: {
/* With bindless shaders we load uniforms with SEND
* messages. All the push constants are located after the
@@ -141,6 +139,7 @@ anv_nir_compute_push_layout(nir_shader *nir,
* elk_nir_lower_rt_intrinsics.c).
*/
unsigned base_offset = push_start;
+ intrin->intrinsic = nir_intrinsic_load_uniform;
nir_intrinsic_set_base(intrin,
nir_intrinsic_base(intrin) -
base_offset);
--
2.49.0

View File

@ -0,0 +1,46 @@
From 24f85c06c28736b73c14208a0ffa6657d2aee9cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= <jexposit@redhat.com>
Date: Mon, 21 Apr 2025 13:52:14 +0200
Subject: [PATCH] Revert "kopper: Explicitly choose zink"
On QEMU (virtio driver), without 3D acceleration enabled and without
mesa-vulkan-drivers installed, this commit prevents Mutter to start.
This reverts commit c0bc957c5d8c7edd57626284b712dd6ea1e375fc.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=2360851
Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13009
---
.pick_status.json | 2 +-
src/gallium/frontends/dri/kopper.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 99df2fb30c2..cdf3965678c 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -16204,7 +16204,7 @@
"description": "kopper: Explicitly choose zink",
"nominated": false,
"nomination_type": 0,
- "resolution": 1,
+ "resolution": 4,
"main_sha": null,
"because_sha": null,
"notes": null
diff --git a/src/gallium/frontends/dri/kopper.c b/src/gallium/frontends/dri/kopper.c
index a1d7dcb79b4..3bdb56022a9 100644
--- a/src/gallium/frontends/dri/kopper.c
+++ b/src/gallium/frontends/dri/kopper.c
@@ -73,7 +73,7 @@ kopper_init_screen(struct dri_screen *screen, bool driver_name_is_inferred)
bool success;
#ifdef HAVE_LIBDRM
if (screen->fd != -1)
- success = pipe_loader_drm_probe_fd(&screen->dev, screen->fd, true);
+ success = pipe_loader_drm_probe_fd(&screen->dev, screen->fd, false);
else
success = pipe_loader_vk_probe_dri(&screen->dev);
#else
--
2.49.0

View File

@ -0,0 +1,16 @@
diff -up mesa-25.0.7/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c.dma mesa-25.0.7/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c
--- mesa-25.0.7/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c.dma 2025-05-29 01:20:23.000000000 +1000
+++ mesa-25.0.7/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c 2025-09-26 12:32:52.240568901 +1000
@@ -1321,8 +1321,10 @@ emit_load_const(struct lp_build_nir_cont
for (unsigned i = 0; i < instr->def.num_components; i++) {
outval[i] = lp_build_const_int_vec(bld_base->base.gallivm, int_bld->type,
- bits == 32 ? instr->value[i].u32
- : instr->value[i].u64);
+ bits == 8 ? instr->value[i].u8 :
+ bits == 16 ? instr->value[i].u16 :
+ bits == 32 ? instr->value[i].u32 :
+ instr->value[i].u64);
}
for (unsigned i = instr->def.num_components; i < NIR_MAX_VEC_COMPONENTS; i++) {
outval[i] = NULL;

88
32886.patch Normal file
View File

@ -0,0 +1,88 @@
From 023db569e8f7bf325fba86a1fa4ba984026a532c Mon Sep 17 00:00:00 2001
From: Benjamin ROBIN <dev@benjarobin.fr>
Date: Sun, 5 Jan 2025 17:03:52 +0100
Subject: [PATCH 2/2] docs: Update MESA_SHADER_CACHE_DIR env variable behavior
Update documentation to match implementation of
disk_cache_generate_cache_dir().
Signed-off-by: Benjamin ROBIN <dev@benjarobin.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32886>
---
docs/envvars.rst | 21 ++++++++++++---------
src/util/disk_cache_os.c | 13 +++++++++----
2 files changed, 21 insertions(+), 13 deletions(-)
diff --git a/docs/envvars.rst b/docs/envvars.rst
index 7247158cc5073..e812b9280777a 100644
--- a/docs/envvars.rst
+++ b/docs/envvars.rst
@@ -200,10 +200,11 @@ Core Mesa environment variables
.. envvar:: MESA_SHADER_CACHE_DIR
if set, determines the directory to be used for the on-disk cache of
- compiled shader programs. If this variable is not set, then the cache
- will be stored in ``$XDG_CACHE_HOME/mesa_shader_cache_db`` (if that
- variable is set), or else within ``.cache/mesa_shader_cache_db`` within
- the user's home directory.
+ compiled shader programs. If set then the cache will be stored in
+ ``$MESA_SHADER_CACHE_DIR/mesa_shader_cache_db``. If this variable is not
+ set, then the cache will be stored in
+ ``$XDG_CACHE_HOME/mesa_shader_cache_db`` (if that variable is set), or else
+ within ``.cache/mesa_shader_cache_db`` within the user's home directory.
.. envvar:: MESA_SHADER_CACHE_SHOW_STATS
@@ -218,9 +219,10 @@ Core Mesa environment variables
cache DBs via :envvar:`MESA_DISK_CACHE_READ_ONLY_FOZ_DBS` or
:envvar:`MESA_DISK_CACHE_READ_ONLY_FOZ_DBS_DYNAMIC_LIST`. This
implementation does not support cache size limits via
- :envvar:`MESA_SHADER_CACHE_MAX_SIZE`. If
- :envvar:`MESA_SHADER_CACHE_DIR` is not set, the cache will be stored
- in ``$XDG_CACHE_HOME/mesa_shader_cache_sf`` (if that variable is set)
+ :envvar:`MESA_SHADER_CACHE_MAX_SIZE`. If :envvar:`MESA_SHADER_CACHE_DIR`
+ is set, the cache will be stored in
+ ``$MESA_SHADER_CACHE_DIR/mesa_shader_cache_sf``, or else within
+ ``$XDG_CACHE_HOME/mesa_shader_cache_sf`` (if that variable is set)
or else within ``.cache/mesa_shader_cache_sf`` within the user's home
directory.
@@ -229,8 +231,9 @@ Core Mesa environment variables
if set to 1, enables the multi file on-disk shader cache implementation
instead of the default Mesa-DB cache implementation.
This implementation increases the overall disk usage.
- If :envvar:`MESA_SHADER_CACHE_DIR` is not set, the cache will be stored
- in ``$XDG_CACHE_HOME/mesa_shader_cache`` (if that variable is set)
+ If :envvar:`MESA_SHADER_CACHE_DIR` is set, the cache will be stored in
+ ``$MESA_SHADER_CACHE_DIR/mesa_shader_cache``, or else within
+ ``$XDG_CACHE_HOME/mesa_shader_cache`` (if that variable is set)
or else within ``.cache/mesa_shader_cache`` within the user's home
directory.
diff --git a/src/util/disk_cache_os.c b/src/util/disk_cache_os.c
index 8d6ce428c1823..09051491d332f 100644
--- a/src/util/disk_cache_os.c
+++ b/src/util/disk_cache_os.c
@@ -873,10 +873,15 @@ disk_cache_write_item_to_disk(struct disk_cache_put_job *dc_job,
/* Determine path for cache based on the first defined name as follows:
*
- * $MESA_SHADER_CACHE_DIR
- * $XDG_CACHE_HOME/mesa_shader_cache
- * $HOME/.cache/mesa_shader_cache
- * <pwd.pw_dir>/.cache/mesa_shader_cache
+ * $MESA_SHADER_CACHE_DIR/mesa_shader_cache*
+ * $XDG_CACHE_HOME/mesa_shader_cache*
+ * $HOME/.cache/mesa_shader_cache*
+ * <pwd.pw_dir>/.cache/mesa_shader_cache*
+ *
+ * The directory 'mesa_shader_cache*' is named depending of cache type:
+ * - For DISK_CACHE_MULTI_FILE: mesa_shader_cache
+ * - For DISK_CACHE_SINGLE_FILE: mesa_shader_cache_sf
+ * - For DISK_CACHE_DATABASE: mesa_shader_cache_db
*/
char *
disk_cache_generate_cache_dir(void *mem_ctx, const char *gpu_name,
--
GitLab

View File

@ -1,127 +0,0 @@
From 2d4fe5f229791fde52846b3f583c12508b5109d6 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Fri, 25 Aug 2023 12:43:44 +1000
Subject: [PATCH] clover/llvm: move to modern pass manager.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This seems like it should work, but I haven't tested it yet.
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24879>
---
.../frontends/clover/llvm/invocation.cpp | 64 +++++++++++++++----
1 file changed, 51 insertions(+), 13 deletions(-)
diff --git a/src/gallium/frontends/clover/llvm/invocation.cpp b/src/gallium/frontends/clover/llvm/invocation.cpp
index 7a50fea3323..43d26fe1abb 100644
--- a/src/gallium/frontends/clover/llvm/invocation.cpp
+++ b/src/gallium/frontends/clover/llvm/invocation.cpp
@@ -27,13 +27,17 @@
#include <llvm/IR/DiagnosticPrinter.h>
#include <llvm/IR/DiagnosticInfo.h>
#include <llvm/IR/LLVMContext.h>
+#include <llvm/IR/Module.h>
#include <llvm/Support/raw_ostream.h>
-#include <llvm/Transforms/IPO/PassManagerBuilder.h>
+#include <llvm/Transforms/IPO/Internalize.h>
#include <llvm-c/Target.h>
#ifdef HAVE_CLOVER_SPIRV
#include <LLVMSPIRVLib/LLVMSPIRVLib.h>
#endif
+#include <llvm-c/TargetMachine.h>
+#include <llvm-c/Transforms/PassBuilder.h>
+#include <llvm/Support/CBindingWrapping.h>
#include <clang/CodeGen/CodeGenAction.h>
#include <clang/Lex/PreprocessorOptions.h>
#include <clang/Frontend/TextDiagnosticBuffer.h>
@@ -439,10 +443,10 @@ clover::llvm::compile_program(const std::string &source,
namespace {
void
- optimize(Module &mod, unsigned optimization_level,
+ optimize(Module &mod,
+ const std::string& ir_target,
+ unsigned optimization_level,
bool internalize_symbols) {
- ::llvm::legacy::PassManager pm;
-
// By default, the function internalizer pass will look for a function
// called "main" and then mark all other functions as internal. Marking
// functions as internal enables the optimizer to perform optimizations
@@ -458,19 +462,53 @@ namespace {
if (internalize_symbols) {
std::vector<std::string> names =
map(std::mem_fn(&Function::getName), get_kernels(mod));
- pm.add(::llvm::createInternalizePass(
+ internalizeModule(mod,
[=](const ::llvm::GlobalValue &gv) {
return std::find(names.begin(), names.end(),
gv.getName()) != names.end();
- }));
+ });
}
- ::llvm::PassManagerBuilder pmb;
- pmb.OptLevel = optimization_level;
- pmb.LibraryInfo = new ::llvm::TargetLibraryInfoImpl(
- ::llvm::Triple(mod.getTargetTriple()));
- pmb.populateModulePassManager(pm);
- pm.run(mod);
+
+ const char *opt_str = NULL;
+ LLVMCodeGenOptLevel level;
+ switch (optimization_level) {
+ case 0:
+ default:
+ opt_str = "default<O0>";
+ level = LLVMCodeGenLevelNone;
+ break;
+ case 1:
+ opt_str = "default<O1>";
+ level = LLVMCodeGenLevelLess;
+ break;
+ case 2:
+ opt_str = "default<O2>";
+ level = LLVMCodeGenLevelDefault;
+ break;
+ case 3:
+ opt_str = "default<O3>";
+ level = LLVMCodeGenLevelAggressive;
+ break;
+ }
+
+ const target &target = ir_target;
+ LLVMTargetRef targ;
+ char *err_message;
+
+ if (LLVMGetTargetFromTriple(target.triple.c_str(), &targ, &err_message))
+ return;
+ LLVMTargetMachineRef tm =
+ LLVMCreateTargetMachine(targ, target.triple.c_str(),
+ target.cpu.c_str(), "", level,
+ LLVMRelocDefault, LLVMCodeModelDefault);
+
+ if (!tm)
+ return;
+ LLVMPassBuilderOptionsRef opts = LLVMCreatePassBuilderOptions();
+ LLVMRunPasses(wrap(&mod), opt_str, tm, opts);
+
+ LLVMDisposeTargetMachine(tm);
}
std::unique_ptr<Module>
@@ -500,7 +538,7 @@ clover::llvm::link_program(const std::vector<binary> &binaries,
auto c = create_compiler_instance(dev, dev.ir_target(), options, r_log);
auto mod = link(*ctx, *c, binaries, r_log);
- optimize(*mod, c->getCodeGenOpts().OptimizationLevel, !create_library);
+ optimize(*mod, dev.ir_target(), c->getCodeGenOpts().OptimizationLevel, !create_library);
static std::atomic_uint seq(0);
const std::string id = "." + mod->getModuleIdentifier() + "-" +
--
2.42.0

View File

@ -1,41 +0,0 @@
From 9ba416cdc67073cdda9a73fe9d37304b82bdd526 Mon Sep 17 00:00:00 2001
From: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Date: Fri, 12 May 2023 09:58:26 +0200
Subject: [PATCH] llvmpipe: only include old Transform includes when needed
This fixes building with recent LLVM where these 2 .h files
were removed.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8671
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22980>
---
src/gallium/auxiliary/gallivm/lp_bld_init.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
index 24d082398e9..9e0d6a5f643 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
@@ -42,14 +42,14 @@
#include <llvm/Config/llvm-config.h>
#include <llvm-c/Analysis.h>
-#include <llvm-c/Transforms/Scalar.h>
-#if LLVM_VERSION_MAJOR >= 7
-#include <llvm-c/Transforms/Utils.h>
-#endif
#include <llvm-c/BitWriter.h>
#if GALLIVM_USE_NEW_PASS == 1
#include <llvm-c/Transforms/PassBuilder.h>
#elif GALLIVM_HAVE_CORO == 1
+#include <llvm-c/Transforms/Scalar.h>
+#if LLVM_VERSION_MAJOR >= 7
+#include <llvm-c/Transforms/Utils.h>
+#endif
#if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64)
#include <llvm-c/Transforms/IPO.h>
#endif
--
2.42.0

View File

@ -1,28 +0,0 @@
From 460d2c46a903fed295a1528c8b6273dd6b0e0d19 Mon Sep 17 00:00:00 2001
From: thfrwn <11335318+rfht@users.noreply.github.com>
Date: Fri, 9 Feb 2024 17:00:55 -0500
Subject: [PATCH] mesa: fix off-by-one for newblock allocation in dlist_alloc
Cc: mesa-stable
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27556>
---
src/mesa/main/dlist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index b0184a24e20..9213641699a 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -1220,7 +1220,7 @@ dlist_alloc(struct gl_context *ctx, OpCode opcode, GLuint bytes, bool align8)
ctx->ListState.CurrentPos++;
}
- if (ctx->ListState.CurrentPos + numNodes + contNodes > BLOCK_SIZE) {
+ if (ctx->ListState.CurrentPos + numNodes + contNodes >= BLOCK_SIZE) {
/* This block is full. Allocate a new block and chain to it */
Node *newblock;
Node *n = ctx->ListState.CurrentBlock + ctx->ListState.CurrentPos;
--
2.45.2

View File

@ -1,37 +0,0 @@
From f7434d7576032cf97e3c74ef09912f59617a4bad Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Fri, 14 Jun 2024 12:22:58 +1000
Subject: [PATCH] nouveau/nvc0: increase overallocation on shader bo to 2K
I've been seeing a bunch of read page faults at the end of the
shader allocation, nvk uses a full page at the end to overallocate
so align with that and see if it goes away.
ahulliet and skeggsb both said 2k was used.
Cc: mesa-stable
Reviewed-by: Arthur Huillet <ahuillet@nvidia.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29722>
---
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff -up mesa-23.1.4/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c.dma mesa-23.1.4/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
--- mesa-23.1.4/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c.dma 2023-07-21 22:42:42.000000000 +1000
+++ mesa-23.1.4/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c 2024-08-16 12:49:13.532998512 +1000
@@ -886,10 +886,11 @@ nvc0_screen_resize_text_area(struct nvc0
nouveau_heap_free(&screen->lib_code);
nouveau_heap_destroy(&screen->text_heap);
- /* XXX: getting a page fault at the end of the code buffer every few
- * launches, don't use the last 256 bytes to work around them - prefetch ?
+ /*
+ * Shader storage needs a 2K (from NVIDIA) overallocations at the end
+ * to avoid prefetch bugs.
*/
- nouveau_heap_init(&screen->text_heap, 0, size - 0x100);
+ nouveau_heap_init(&screen->text_heap, 0, size - 0x800);
/* update the code segment setup */
if (screen->eng3d->oclass < GV100_3D_CLASS) {

View File

@ -1,23 +0,0 @@
VERSION ?= 23.1.4
SANITIZE ?= 1
DIRNAME = mesa-${VERSION}
all: archive
clean:
rm -rf $(DIRNAME)/
rm -f mesa-${VERSION}.tar.xz
clone: clean
curl -O https://archive.mesa3d.org/mesa-${VERSION}.tar.xz
tar xf mesa-${VERSION}.tar.xz
sanitize: clone vl_mpeg12_decoder.c vl_decoder.c
ifdef SANITIZE
cat < vl_mpeg12_decoder.c > $(DIRNAME)/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
cat < vl_decoder.c > $(DIRNAME)/src/gallium/auxiliary/vl/vl_decoder.c
endif
archive: clone sanitize
tar caf ${DIRNAME}.tar.xz ${DIRNAME}

View File

@ -1,12 +0,0 @@
diff -up mesa-23.1.4/meson.build.dma mesa-23.1.4/meson.build
--- mesa-23.1.4/meson.build.dma 2023-07-28 10:15:41.807945483 +1000
+++ mesa-23.1.4/meson.build 2023-07-28 10:15:46.465030794 +1000
@@ -835,7 +835,7 @@ if get_option('allow-kcmp') \
pre_args += '-DALLOW_KCMP'
endif
-prog_python = import('python').find_installation('python3')
+prog_python = import('python').find_installation('python3.6')
has_mako = run_command(
prog_python, '-c',
'''

View File

@ -1,13 +0,0 @@
diff -up mesa-21.3.0/src/gallium/frontends/lavapipe/lvp_device.cdma mesa-21.3.0/src/gallium/frontends/lavapipe/lvp_device.c
--- mesa-21.3.0/src/gallium/frontends/lavapipe/lvp_device.cdma 2021-11-18 06:16:20.000000000 +1000
+++ mesa-21.3.0/src/gallium/frontends/lavapipe/lvp_device.c 2021-11-18 07:03:17.652283186 +1000
@@ -213,6 +213,9 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_Creat
if (pAllocator == NULL)
pAllocator = vk_default_allocator();
+ if (!getenv("RH_SW_VULKAN"))
+ return VK_ERROR_INITIALIZATION_FAILED;
+
instance = vk_zalloc(pAllocator, sizeof(*instance), 8,
VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
if (!instance)

View File

@ -1,30 +0,0 @@
diff -up mesa-23.1.4/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c.da mesa-23.1.4/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c
--- mesa-23.1.4/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c.da 2025-01-10 13:14:31.119630821 +1000
+++ mesa-23.1.4/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c 2025-01-10 13:15:11.917433170 +1000
@@ -149,6 +149,7 @@ nvc0_validate_fb(struct nvc0_context *nv
unsigned ms_mode = NVC0_3D_MULTISAMPLE_MODE_MS1;
unsigned nr_cbufs = fb->nr_cbufs;
bool serialize = false;
+ bool cbuf_is_linear = false;
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_3D_FB);
@@ -203,8 +204,7 @@ nvc0_validate_fb(struct nvc0_context *nv
PUSH_DATA(push, 0);
nvc0_resource_fence(nvc0, res, NOUVEAU_BO_WR);
-
- assert(!fb->zsbuf);
+ cbuf_is_linear = true;
}
if (res->status & NOUVEAU_BUFFER_STATUS_GPU_READING)
@@ -216,7 +216,7 @@ nvc0_validate_fb(struct nvc0_context *nv
BCTX_REFN(nvc0->bufctx_3d, 3D_FB, res, WR);
}
- if (fb->zsbuf) {
+ if (fb->zsbuf && !cbuf_is_linear) {
struct nv50_miptree *mt = nv50_miptree(fb->zsbuf->texture);
struct nv50_surface *sf = nv50_surface(fb->zsbuf);
int unk = mt->base.base.target == PIPE_TEXTURE_2D;

View File

@ -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(true)
DRI_CONF_SECTION_END
DRI_CONF_SECTION_DEBUG

View File

@ -1,20 +0,0 @@
#include "vl_decoder.h"
bool
vl_profile_supported(struct pipe_screen *screen, enum pipe_video_profile profile,
enum pipe_video_entrypoint entrypoint)
{
return false;
}
int
vl_level_supported(struct pipe_screen *screen, enum pipe_video_profile profile)
{
return 0;
}
struct pipe_video_codec *
vl_create_decoder(struct pipe_context *pipe,
const struct pipe_video_codec *templat)
{
return NULL;
}

View File

@ -1,7 +0,0 @@
#include "vl_mpeg12_decoder.h"
struct pipe_video_codec *
vl_create_mpeg12_decoder(struct pipe_context *context,
const struct pipe_video_codec *templat)
{
return NULL;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,144 @@
From e4eb5e80c316c0af3fff310ca89e1175d81556c1 Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov@redhat.com>
Date: Thu, 27 Feb 2025 15:44:27 +0100
Subject: [PATCH] clover: Don't include libclc headers
Per https://github.com/llvm/llvm-project/issues/119967 these
headers are internal implementation details of libclc and were
never supposed to be installed. They are not available anymore
since LLVM 20. Instead opencl-c.h should be used.
There already ise a code path for including opencl-c.h, so always
use it.
This didn't work for me out of the box, because the build system
currently hardcodes the clang resource directory, which is incorrect
for Fedora at least. Fix this by using GetResourcePath +
CLANG_RESOURCE_DIR provided by clang instead. This is basically
the same as what is done in clc_helper.c
I've still retained the old behavior as a fallback just in case
(e.g. if clang is linked statically?)
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33805>
---
.../frontends/clover/llvm/invocation.cpp | 53 +++++++++++++------
src/gallium/frontends/clover/meson.build | 5 +-
2 files changed, 39 insertions(+), 19 deletions(-)
diff --git a/src/gallium/frontends/clover/llvm/invocation.cpp b/src/gallium/frontends/clover/llvm/invocation.cpp
index 3cbb05baecf67..ca030b404d791 100644
--- a/src/gallium/frontends/clover/llvm/invocation.cpp
+++ b/src/gallium/frontends/clover/llvm/invocation.cpp
@@ -24,6 +24,8 @@
// OTHER DEALINGS IN THE SOFTWARE.
//
+#include <dlfcn.h>
+
#include <llvm/IR/DiagnosticPrinter.h>
#include <llvm/IR/DiagnosticInfo.h>
#include <llvm/IR/LLVMContext.h>
@@ -39,6 +41,8 @@
#include <clang/Frontend/TextDiagnosticBuffer.h>
#include <clang/Frontend/TextDiagnosticPrinter.h>
#include <clang/Basic/TargetInfo.h>
+#include <clang/Config/config.h>
+#include <clang/Driver/Driver.h>
#if LLVM_VERSION_MAJOR >= 20
#include <llvm/Support/VirtualFileSystem.h>
@@ -323,6 +327,30 @@ namespace {
return c;
}
+ std::string getResourceDirectory() {
+ Dl_info info;
+ if (dladdr((void *)clang::CompilerInvocation::CreateFromArgs, &info) == 0) {
+ return FALLBACK_CLANG_RESOURCE_DIR;
+ }
+
+ char *libclang_path = realpath(info.dli_fname, NULL);
+ if (libclang_path == nullptr) {
+ return FALLBACK_CLANG_RESOURCE_DIR;
+ }
+
+ // GetResourcePath is a way to retrieve the actual libclang resource dir based on a given
+ // binary or library.
+ std::string clang_resource_dir =
+#if LLVM_VERSION_MAJOR >= 20
+ clang::driver::Driver::GetResourcesPath(std::string(libclang_path));
+#else
+ clang::driver::Driver::GetResourcesPath(std::string(libclang_path), CLANG_RESOURCE_DIR);
+#endif
+ free(libclang_path);
+
+ return clang_resource_dir;
+ }
+
std::unique_ptr<Module>
compile(LLVMContext &ctx, clang::CompilerInstance &c,
const std::string &name, const std::string &source,
@@ -331,25 +359,18 @@ namespace {
c.getFrontendOpts().ProgramAction = clang::frontend::EmitLLVMOnly;
c.getHeaderSearchOpts().UseBuiltinIncludes = true;
c.getHeaderSearchOpts().UseStandardSystemIncludes = true;
- c.getHeaderSearchOpts().ResourceDir = CLANG_RESOURCE_DIR;
- if (use_libclc) {
- // Add libclc generic search path
- c.getHeaderSearchOpts().AddPath(LIBCLC_INCLUDEDIR,
- clang::frontend::Angled,
- false, false);
+ std::string clang_resource_dir = getResourceDirectory();
+ c.getHeaderSearchOpts().ResourceDir = clang_resource_dir;
- // Add libclc include
- c.getPreprocessorOpts().Includes.push_back("clc/clc.h");
- } else {
- // Add opencl-c generic search path
- c.getHeaderSearchOpts().AddPath(CLANG_RESOURCE_DIR,
- clang::frontend::Angled,
- false, false);
+ // Add opencl-c generic search path
+ std::string clang_include_path = clang_resource_dir + "/include";
+ c.getHeaderSearchOpts().AddPath(clang_include_path,
+ clang::frontend::Angled,
+ false, false);
- // Add opencl include
- c.getPreprocessorOpts().Includes.push_back("opencl-c.h");
- }
+ // Add opencl include
+ c.getPreprocessorOpts().Includes.push_back("opencl-c.h");
// Add definition for the OpenCL version
const auto dev_version = dev.device_version();
diff --git a/src/gallium/frontends/clover/meson.build b/src/gallium/frontends/clover/meson.build
index e569b86a1bea7..56a9894f0dbb1 100644
--- a/src/gallium/frontends/clover/meson.build
+++ b/src/gallium/frontends/clover/meson.build
@@ -10,7 +10,6 @@ clover_opencl_cpp_args = [
'-DCL_USE_DEPRECATED_OPENCL_2_0_APIS',
'-DCL_USE_DEPRECATED_OPENCL_2_1_APIS',
'-DCL_USE_DEPRECATED_OPENCL_2_2_APIS',
- '-DLIBCLC_INCLUDEDIR="@0@/"'.format(dep_clc.get_variable(pkgconfig : 'includedir')),
'-DLIBCLC_LIBEXECDIR="@0@/"'.format(dep_clc.get_variable(pkgconfig : 'libexecdir'))
]
clover_incs = [inc_include, inc_src, inc_gallium, inc_gallium_aux]
@@ -43,9 +42,9 @@ libclllvm = static_library(
cpp_args : [
clover_cpp_args,
clover_opencl_cpp_args,
- '-DCLANG_RESOURCE_DIR="@0@"'.format(join_paths(
+ '-DFALLBACK_CLANG_RESOURCE_DIR="@0@"'.format(join_paths(
dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir'), 'clang',
- dep_llvm.version(), 'include',
+ dep_llvm.version()
)),
],
gnu_symbol_visibility : 'hidden',
--
GitLab

1981
mesa.spec Normal file

File diff suppressed because it is too large Load Diff

3
sources Normal file
View File

@ -0,0 +1,3 @@
SHA512 (libclc-20.1.3.src.tar.xz) = ab6fb0dd0250ab9087b84cf6ec253473cdbcf473e24b626509f1aca1893718608ba31902fa6925ec99f64b1b06d60d49fecb2138c72c8aec433c124c57efad57
SHA512 (mesa-25.0.7.tar.xz) = 825bbd8bc5507de147488519786c0200afacf97dae621c80ead24b2c5dd55c5a442757ac8452698ae611e9344025465080795cf8f2dc4eb7ce07b5cc521b2b5c
SHA512 (spirv-llvm-translator-834db1a.tar.gz) = 4fb522087728a76204d1db9fb782afbe9475e57135d56d4b694d111aa1092febebd829fe42007d2e15e2c9bd1222bab6c48e89181fc5bdae7f3628fdf7ad74ac