Commit graph

223851 commits

Author SHA1 Message Date
Gert Wollny
7bab7c95f3 r600/sfn: Fix typo with AssemberVisitor
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:57 +00:00
Gert Wollny
8496727a74 r600/sfn: refactor CopyPropBackVisitor::visit(AluInstr*)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:57 +00:00
Gert Wollny
dc726457e2 r600/sfn: extract logging from CopyPropFwdVisitor::visit(AluInstr*)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:57 +00:00
Gert Wollny
5bef7e168a r600/sfn: refactor CopyPropFwdVisitor::visit(AluInsr*)
v2: drop now unused local variable

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:57 +00:00
Gert Wollny
8dbf11c501 r600/sfn: refactor CopyPropFwdVisitor::propagate_to
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:57 +00:00
Gert Wollny
00801796ae r600/sfn: deduplicate fixpoint loop for optimizers
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:57 +00:00
Gert Wollny
0f97e4aa79 r600/sfn: deduplicate optimizer logging code
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:57 +00:00
Gert Wollny
1b6526da17 r600/sfn: deduplicate some code in DCE
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:57 +00:00
Gert Wollny
4c21894460 r600/sfn: extract check and report for unscheduled instructions
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:57 +00:00
Gert Wollny
6d681cdb98 r600/sfn: Move exports emission to helper
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:57 +00:00
Gert Wollny
bdcc1afd80 r600/sfn: refactor BlockScheduler::schedule_block
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:57 +00:00
Gert Wollny
8de22efe5c r600/sfn: extract kcache check out of schedule_alu_to_group_vec
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:57 +00:00
Gert Wollny
3fcd2f106a r600/sfn: Move tracking of kcache reservation to AluScheduleContext
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:57 +00:00
Gert Wollny
39d7251568 r600/sfn: move tracking of kcache reservation failure to scheduler
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:57 +00:00
Gert Wollny
dfb0e209e9 r600/sfn: make try_kcache_reservation const
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:57 +00:00
Gert Wollny
141e06caca r600/sfn: split kcache evaluation into try and commit
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:57 +00:00
Gert Wollny
81d359de55 r600/sfn: simplify ALU scheduling failure handling
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:57 +00:00
Gert Wollny
033dd489de r600/sfn: collaps no_schedule and scheduled
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:57 +00:00
Gert Wollny
4698c17b9d r600/sfn: make ALU scheduling return values more meaningful
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:57 +00:00
Gert Wollny
b4efcadbb8 r600/sfn: extract idx load state handling in scheduler
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:57 +00:00
Gert Wollny
100061cdcf r600/sfn: extract t-slot allocation when filling ALU groups
Also replace the magic number 0x10 with AluOp::t to make it easier to
understand what is tested.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:57 +00:00
Gert Wollny
e083a06bf5 r600/sfn: Extract group fill failure handling
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:57 +00:00
Gert Wollny
2e9f035060 r600/sfn: pass reference to group when possible
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:57 +00:00
Gert Wollny
d654241931 r600/sfn: extract fill_alu_group
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:56 +00:00
Gert Wollny
b7cd79ae3f r600/sfn: Extract schedule alu groups first
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:56 +00:00
Gert Wollny
ba7d7cd108 r600/sfn: don't use return parameters in extracted method
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:56 +00:00
Gert Wollny
7268a696d5 r600/sfn: Extract some helpers from schedule_alu
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Assisted-by: Copilot (auto mode)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41945>
2026-06-07 21:36:56 +00:00
Mike Blumenkrantz
6094bed5a4 llvmpipe: create a zeroed payload for use without task shaders
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
this is never accessed, but spec requires that mesh shaders
can declare it (which implicitly accesses it because llvm branching)

fixes dEQP-VK.mesh_shader.ext.misc.payload_not_accessed

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41963>
2026-06-07 19:30:41 +00:00
Vinson Lee
3515c52e8c ethosu/mlw_codec: silence -Wunused-const-variable in vendored encoder
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Compiling with clang produces a -Wunused-const-variable warning in the
weight codec vendored from Arm's Regor compiler:

  src/gallium/drivers/ethosu/mlw_codec/source/mlw_decode.cpp:313:15:
  warning: unused variable 'INITIAL_BLOCKS' [-Wunused-const-variable]

This warning is emitted only by clang, not by GCC, in the same vendored
mlw_codec sources whose other warnings are already suppressed at the
build-config level. Extend the existing cpp_args with
-Wno-unused-const-variable rather than patching the imported source, so
the files stay pristine for clean re-vendoring.

Fixes: d66d2c05d3 ("ethosu: Switch to the weight encoder from Regor")
Assisted-by: Claude Code (Claude Opus 4.8)
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42070>
2026-06-06 21:44:50 -07:00
Christian Gmeiner
b9c763454e etnaviv: Use integer texture formats for R32/RG32 integer textures
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
R32_SINT/UINT and R32G32_SINT/UINT are sampled as float, so a missing
channel is filled with a float default. A channel-expanding integer blit
then gets a float 1.0 alpha instead of integer 1, which fails 8 cases of
dEQP-GLES3.functional.fbo.blit.conversion such as rg32i_to_rgba8i.

The hardware support for integer texturing is unclear from RE and the
feature databases, so enable it on halti5 GPUs as a conservative
starting point.

Fixes: 64c7cdcae5 ("etnaviv: add missing formats")
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41884>
2026-06-06 22:20:56 +00:00
Christian Gmeiner
7089c6710a etnaviv: Use the full 64-bit clear value for 64bpp render targets
A 64bpp color render target that is fast-cleared and then partially rendered
came back with its high 32-bit word wrong - the low clear word was duplicated
into both halves.

TS was never told the render target is 64bpp, so its fast-clear filled tiles
from a 32-bit clear value.

Helps with at least the following CTS:
 - dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgba16f_nearest_scale_blit_from_default
 - dEQP-GLES3.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.7

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41909>
2026-06-06 22:02:04 +00:00
Christian Gmeiner
5080dddf2b etnaviv: Update headers from rnndb
Update to rnndb commit 7a829b97fc59

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41909>
2026-06-06 22:02:04 +00:00
LingMan
e92c7efa21 rusticl: Drop custom addr implementation
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It's been stabilized in Rust 1.84.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42065>
2026-06-06 17:17:11 +02:00
Vinson Lee
25930dbc34 ethosu/mlw_codec: silence warnings in the vendored Regor encoder
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
gcc reports two warnings in the weight encoder vendored from Arm's
Regor compiler (Ethos-U Vela):

  src/gallium/drivers/ethosu/mlw_codec/source/mlw_encode.cpp:224:9:
  warning: variable 'common_val' set but not used
  [-Wunused-but-set-variable]

  src/gallium/drivers/ethosu/mlw_codec/source/mlw_encode.cpp:426:33:
  warning: comparison of integer expressions of different signedness:
  'int' and 'long unsigned int' [-Wsign-compare]

These files are imported verbatim from upstream, so rather than patch
the vendored source (which would diverge from upstream and be lost on
the next re-import) silence the two known warnings at build-config
level via cpp_args on the mlw_codec static library. The suppression is
kept narrow so that any other warning introduced by a future re-vendor
still surfaces.

Fixes: d66d2c05d3 ("ethosu: Switch to the weight encoder from Regor")
Assisted-by: Claude Code (Claude Opus 4.8)
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42064>
2026-06-06 08:56:12 +00:00
Vinson Lee
bd402153af mesa/main: cast GLhandleARB to unsigned int in api trace
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The generated api_trace.c passes GLhandleARB arguments to _mesa_debug()
with a "%u" conversion. On macOS GLhandleARB is unsigned long, so this
triggers -Werror=format and breaks the build:

  api_trace.c:5307:52: error: format specifies type 'unsigned int' but
  the argument has type 'GLhandleARB' (aka 'unsigned long')

Cast the value to unsigned int to match the "%u" conversion on all
platforms. GL handles fit in 32 bits, and on Linux GLhandleARB is
already unsigned int, so behavior is unchanged.

Fixes: 9f7f5a27a7 ("mesa/main: Auto-generate MESA_VERBOSE=api trace dispatch")
Assisted-by: Claude Code (Claude Opus 4.8)
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42059>
2026-06-05 23:43:49 -07:00
Connor Abbott
31db17f653 ir3: Implement round-robin workaround
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
On later a6xx and a7xx, round-robin does not work properly when there
are more than 8 active waves from the same dispatch in the same uSP. We
have to clamp the register usage to a minimum to guarantee there aren't
more waves. There is a problem for very large workgroups, which will
have to be solved the same way as the problem with deep control flow,
through implementing ReuseGPRMode.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41562>
2026-06-05 23:43:11 +00:00
Connor Abbott
25f7765d21 freedreno: Add round_robin_errata to device info
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41562>
2026-06-05 23:43:11 +00:00
Connor Abbott
3dc789215d tu: Add TU_DEBUG=computeroundrobin
This will be useful to check if games are hanging due to scheduler
fairness.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41562>
2026-06-05 23:43:11 +00:00
Connor Abbott
8a67ad65ae ir3, tu, freedreno: Plumb through round-robin mode
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41562>
2026-06-05 23:43:11 +00:00
Connor Abbott
61b0130291 freedreno: Document SP_CS_CNTL_0::COMPUTERRMODEEN
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41562>
2026-06-05 23:43:09 +00:00
Connor Abbott
c4165ef390 spirv: Implement concurrent workgroup hint from vkd3d-proton
This will signal shaders that require concurrent workgroup dispatch,
until we get a proper Vulkan extension.

Reviewed-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Danylo Piliaiev <danylo.piliaiev@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41562>
2026-06-05 23:43:09 +00:00
Connor Abbott
e6fc75c23d spirv: Use correct opcode in non-semantic OpExtInst handling
It seems we weren't actually using the opcode, but be consistent with
the other place we call OpExtInst handlers.

Reviewed-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Danylo Piliaiev <danylo.piliaiev@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41562>
2026-06-05 23:43:09 +00:00
Connor Abbott
1f7520680c spirv: Remove redundant OpExtInst handling
According to the SPIR-V spec OpExtInst cannot appear before types,
constants, and global variable declarations. We were handling it anyway,
which is wrong.

Reviewed-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Danylo Piliaiev <danylo.piliaiev@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41562>
2026-06-05 23:43:08 +00:00
Connor Abbott
a013713e3e compiler/shader_info: Introduce occupancy_bounded_workgroup_fairness
This encapsulates the forward progress guarantee required by PRAGMATA,
the so-called "occupancy bounded execution" over workgroups. On
Adreno we need to be aware of this and compile the shader differently.
There isn't yet a Vulkan extension for this, so we will set this via a
hack in coordination with vkd3d-proton.

Reviewed-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Danylo Piliaiev <danylo.piliaiev@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41562>
2026-06-05 23:43:06 +00:00
Gert Wollny
a9b8c4b5cc r600/sfn: run additional optimization only after successful address split
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Otherwise the shader was already fully optimized, so no need for further
optimization.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41907>
2026-06-05 22:41:05 +00:00
Gert Wollny
ff73701b12 r600/sfn: signal progress when splitting address loads
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41907>
2026-06-05 22:41:04 +00:00
Valentine Burley
1d829f3a89 panfrost/ci: Switch traces over to gpu-trace-perf
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Convert the two nightly panfrost trace replay jobs to @anholt's new GPU
trace snapshot comparison tool.

This allows running a few traces on t860 that couldn't be replayed
before.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42018>
2026-06-05 17:35:35 +00:00
Valentine Burley
0a65376b2e turnip/ci: Update ANGLE trace checksum
This changed with https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41419.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42042>
2026-06-05 17:06:35 +00:00
Natalie Vock
6a16319133 radv/rt: Cache stack sizes of ahit/isec shaders from imported NIR
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We need to save the stack size here separately, because the library
doesn't have the ahit/isec shader that uses stack.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42050>
2026-06-05 15:13:09 +00:00
Samuel Pitoiset
0ec4cc9cd5 vulkan: Update spec to 1.4.353
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42039>
2026-06-05 16:11:45 +02:00