diff options
-rw-r--r-- | graphics/mesa-devel/Makefile | 2 | ||||
-rw-r--r-- | graphics/mesa-devel/files/patch-cache_line | 51 |
2 files changed, 52 insertions, 1 deletions
diff --git a/graphics/mesa-devel/Makefile b/graphics/mesa-devel/Makefile index e48d219fdb85..a8d9062e35aa 100644 --- a/graphics/mesa-devel/Makefile +++ b/graphics/mesa-devel/Makefile @@ -1,7 +1,7 @@ PORTNAME= mesa DISTVERSION= 25.1-branchpoint-362 DISTVERSIONSUFFIX= -gd31172d092f -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics PKGNAMESUFFIX= -devel diff --git a/graphics/mesa-devel/files/patch-cache_line b/graphics/mesa-devel/files/patch-cache_line new file mode 100644 index 000000000000..f9dd96a31056 --- /dev/null +++ b/graphics/mesa-devel/files/patch-cache_line @@ -0,0 +1,51 @@ +https://gitlab.freedesktop.org/mesa/mesa/-/issues/5737 + +--- src/gallium/winsys/amdgpu/drm/amdgpu_bo.c.orig 2025-04-21 22:23:33 UTC ++++ src/gallium/winsys/amdgpu/drm/amdgpu_bo.c +@@ -833,7 +833,7 @@ struct pb_slab *amdgpu_bo_slab_alloc(void *priv, unsig + slab_bo->slab.group_index = group_index; + slab_bo->slab.entry_size = entry_size; + slab_bo->entries = os_malloc_aligned(slab_bo->slab.num_entries * sizeof(*slab_bo->entries), +- CACHE_LINE_SIZE); ++ MESA_CACHE_LINE_SIZE); + if (!slab_bo->entries) + goto fail; + +--- src/util/u_memory.h.orig 2025-04-21 22:23:33 UTC ++++ src/util/u_memory.h +@@ -84,7 +84,7 @@ mem_dup(const void *src, size_t size) + } + + /* TODO: this could be different on non-x86 architectures. */ +-#define CACHE_LINE_SIZE 64 ++#define MESA_CACHE_LINE_SIZE 64 + + /** + * Declare a variable on its own cache line. +@@ -101,12 +101,12 @@ mem_dup(const void *src, size_t size) + * aligned, but we only want to align the field. + */ + #define EXCLUSIVE_CACHELINE(decl) \ +- union { char __cl_space[CACHE_LINE_SIZE]; \ ++ union { char __cl_space[MESA_CACHE_LINE_SIZE]; \ + decl; } + + /* Allocate a structure aligned to a cache line. (used to make atomic ops faster) */ +-#define MALLOC_STRUCT_CL(T) (struct T *)align_malloc(sizeof(struct T), CACHE_LINE_SIZE) +-#define CALLOC_STRUCT_CL(T) (struct T *)align_calloc(sizeof(struct T), CACHE_LINE_SIZE) ++#define MALLOC_STRUCT_CL(T) (struct T *)align_malloc(sizeof(struct T), MESA_CACHE_LINE_SIZE) ++#define CALLOC_STRUCT_CL(T) (struct T *)align_calloc(sizeof(struct T), MESA_CACHE_LINE_SIZE) + #define FREE_CL(ptr) align_free(ptr) + + #ifdef __cplusplus +--- src/vulkan/vram-report-limit-layer/vram_report_limit_layer.c.orig 2025-04-21 22:23:33 UTC ++++ src/vulkan/vram-report-limit-layer/vram_report_limit_layer.c +@@ -447,7 +447,7 @@ vram_report_limit_CreateInstance(const VkInstanceCreat + struct vram_report_limit_instance_data *instance_data = os_malloc_aligned( + sizeof(*instance_data) + sizeof(instance_data->active_pdevices_array[0]) * + active_pdevices_count, +- CACHE_LINE_SIZE); ++ MESA_CACHE_LINE_SIZE); + if (instance_data == NULL) { + result = VK_ERROR_OUT_OF_HOST_MEMORY; + goto err_free_is_pdevice_active_array; |