mirror of
https://github.com/andersrh/copr-andersrh.git
synced 2026-05-17 13:58:01 +00:00
Mesa: fix gtk corruption on haswell
This commit is contained in:
parent
ad6202ef66
commit
710a9d0cf1
2 changed files with 92 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ Name: mesa
|
|||
Summary: Mesa graphics libraries
|
||||
%global ver 25.0.7
|
||||
Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)}
|
||||
Release: 10.clang.skylake%{?dist}
|
||||
Release: 11.clang.skylake%{?dist}
|
||||
License: MIT AND BSD-3-Clause AND SGI-B-2.0
|
||||
URL: http://www.mesa3d.org
|
||||
|
||||
|
|
@ -114,6 +114,9 @@ Patch32: 0001-vulkan-wsi-wayland-make-needs_color_surface_old_check_if.pa
|
|||
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/13009
|
||||
Patch40: 0001-Revert-kopper-Explicitly-choose-zink.patch
|
||||
|
||||
# Upstream revert for gtk corruption on haswell
|
||||
Patch50: 0001-Revert-hasvk-elk-stop-turning-load_push_constants-in.patch
|
||||
|
||||
BuildRequires: meson >= 1.3.0
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue