Commit graph

222779 commits

Author SHA1 Message Date
Eric Engestrom
6450c00aa8 docs: update calendar for 26.1.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41686>
2026-05-19 22:09:24 +00:00
Danylo Piliaiev
617da94f82 u_trace: Lazy init ut->linear_alloc
We don't want to waste memory when u_trace isn't used.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41271>
2026-05-19 20:27:59 +00:00
Konstantin Seurer
7b2301f06d util/u_trace: Print tracepoints with indentation
Thjis patch adds u_tracepoint_type to mark begin/end tracepoints.
Tracepoints inside a begin/end range will be printed with an
indentation.

Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41271>
2026-05-19 20:27:59 +00:00
Konstantin Seurer
690d9b0d00 util/u_trace: Rework resource management
Stops allocating events in chunks. u_trace_event is allocated using a
linear allocator which has minimal overhead. Buffers for timestamps are
allocated using a custom allocator.

As a sideeffect, it is possible to deduplicate consecutive tracepoints.

Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41271>
2026-05-19 20:27:59 +00:00
Konstantin Seurer
98c1abd342 util/u_trace: Add an option to emit additional code
radv will generate additional wrapper functions for the tracepoints.

Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41271>
2026-05-19 20:27:58 +00:00
Samuel Pitoiset
54b71e9e77 util: pass a struct to driParseConfigFiles()
It would be easier to add more functionalities like shader hashes etc.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41657>
2026-05-19 19:51:45 +00:00
José Roberto de Souza
180d8cb544 intel/brw: Fix nir_intrinsic_load_inline_data_intel register offset calculation
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
In case of nir_intrinsic_load_inline_data_intel it was not using base_offset to
create the uniform, instead it was using only the special BRW_INLINE_PARAM_REG
value that later will be replaced by the inline_data fixed register.

So here using base_offset for both intrinsics, adding BRW_INLINE_PARAM_REG if
nir_intrinsic_load_inline_data_intel and then in brw_shader::assign_curb_setup
checking for inst->src[i].nr >= BRW_INLINE_PARAM_REG and adjusting brw_reg by
the remaining of the subtraction with BRW_INLINE_PARAM_REG.

Fixes: 7f19814414 ("brw/nir: handle inline_data_intel more like push_data_intel")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41607>
2026-05-19 19:30:18 +00:00
Alyssa Rosenzweig
92b50b25d6 pan/mdg: make clang warning quiet
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41602>
2026-05-19 19:13:54 +00:00
Mike Blumenkrantz
5de476e64c vulkan: move vk_shader_stages_from_bind_point() to vk_util
this is a util function

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41603>
2026-05-19 18:44:46 +00:00
Karol Herbst
2868b57abe ci/windows: add dEQP-VK.glsl.builtin.precision_double.mix.compute.vec3 fail
According to Jesse it's a bug inside Warp.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:42 +00:00
Karol Herbst
4f5e2e34d3 ci: update traces due to ffma rework
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:42 +00:00
Karol Herbst
e9c1cce35f nir: remove ffma_old
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:42 +00:00
Karol Herbst
099e876a38 vtn_bindgen2: keep ffma_weak
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:42 +00:00
Karol Herbst
a140781aec vtn/opencl: map mad to ffma_weak and fma to ffma
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:42 +00:00
Karol Herbst
09d50cc7a3 vtn: use ffma_weak
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:42 +00:00
Karol Herbst
d534a2057f vtn: handle OpFmaKHR
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:42 +00:00
Karol Herbst
3e158b713c vtn/glsl: translate fma as ffma_weak
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:41 +00:00
Karol Herbst
ac679a8504 glsl: translate fma as fma_weak
Our glsl compiler only supports OpenGL GLSL and there ffma is not
guaranteed to be fused.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:41 +00:00
Karol Herbst
5160d6f806 tgsi_to_nir: translate MAD as ffma_weak
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:41 +00:00
Karol Herbst
16d47c246d vulkan/meta: use nir_op_ffma_weak
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:41 +00:00
Karol Herbst
f3e8a5adda mesa: use ffma_weak
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:41 +00:00
Karol Herbst
e1aaaf4ed0 nir: make lowering use new ffma opcodes
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:41 +00:00
Karol Herbst
109d93dd98 nir: update ffma helpers to use new opcodes
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:41 +00:00
Karol Herbst
aeea2e7c1f nir: add fmad_or_ffma helpers and use it in lower_double_ops
We skip emitting ffma_weak here, because otherwise we'd require a lowering
loop with opt_algebraic and lower_double_ops and this way it's also
cheaper.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:40 +00:00
Karol Herbst
eb817b1f63 virgl: advertise new muladd options
The "old" nir_to_tgsi_compiler_options enabled fusing for 32 and 64 bit,
and virglrenderer implements TGSI's MAD as an mul+add. But because virgl
also lowered it for 32 bits, we just enable fmad for 64 bit.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:40 +00:00
Karol Herbst
323a3716a6 svga: use weak_ffma
The compiler supports the TGSI MAD instruction which maps to ffma_weak.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:39 +00:00
Karol Herbst
1a0a329598 lima: support nir_op_fmad
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:39 +00:00
Karol Herbst
85c2023ee4 pvr: use ffma_weak for lowering
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:39 +00:00
Karol Herbst
5404b382fb pco: port over to nir_op_ffma
It says fmad, but it's actually ffma.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:39 +00:00
Karol Herbst
255811703f etnaviv: port over to nir_op_fmad
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:39 +00:00
Karol Herbst
1d359cc677 d3d12: use nir_op_ffma_weak
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:39 +00:00
Karol Herbst
9bbb92a7cb microsoft/compiler: support nir_op_ffma
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:38 +00:00
Karol Herbst
536ff644fa bitfrost: support nir_op_ffma
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:38 +00:00
Karol Herbst
d823512442 kk: support nir_op_ffma
Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:38 +00:00
Karol Herbst
59d994c8ca agx: port over to nir_op_ffma
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:38 +00:00
Karol Herbst
5eb7d7d63b r300: port over to nir_op_fmad
r300 doesn't advertise any fp64 support, so let's not set float_mul_add64
despite fuse_ffma64 being set.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:37 +00:00
Karol Herbst
89868d37ce r600,sfn: support new multadd opcodes
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:37 +00:00
Karol Herbst
eec83fd9f6 radeonsi: advertize new float multadd options
ac already handles advertizing fmad and ffma support, so simply decide
when nir should fuse, because radeonsi contrary to radv doesn't let aco do
all the fusing itself.

Also unset splitting for force_use_fma32 handling.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:37 +00:00
Karol Herbst
6cf3cba68c radv: use nir_op_ffma_weak
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:36 +00:00
Karol Herbst
3e334ea0d3 aco: support new multadd opcodes
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:36 +00:00
Karol Herbst
04696f9bf9 ac/llvm: support new multadd opcodes
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:35 +00:00
Karol Herbst
a80e254fd4 ac: use nir_op_ffma_weak
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:35 +00:00
Karol Herbst
570bfe1ee0 ac: handle new float multadd opcodes
This advertizes both ffma and fmad on a couple of chipsets to support
VK_KHR_shader_fma and to improve OpenCL fma performance, where fma is not
optional and the emulation is more expensive than slow fma.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:35 +00:00
Karol Herbst
0082745b0a tu: use nir_op_ffma_weak in lowering
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:35 +00:00
Karol Herbst
c473a76e1e freedreno/ir2: use nir_op_fmad
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:35 +00:00
Karol Herbst
acad18d97e ir3: port to nir_op_fmad
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:34 +00:00
Karol Herbst
d2f4b2d8e9 zink: port over to nir_op_ffma_weak
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:34 +00:00
Karol Herbst
4307f42b9e nak: port over to nir_op_ffma
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:34 +00:00
Karol Herbst
55596204e4 nv30: advertize new float multadd options
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:34 +00:00
Karol Herbst
a140624691 nv50/ir: port over to new multadd opcodes
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:33 +00:00