Commit graph

210043 commits

Author SHA1 Message Date
Kenneth Graunke
e2022017ce brw: Drop uniform pull constant load virtual opcode from is_send()
The logical send lowering already resolves sources when constructing
the send payload, so prior to that lowering, we don't need to apply
any special restrictions here.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34040>
2025-08-08 22:12:10 +00:00
Kenneth Graunke
9d5cd03ea8 brw: Drop interlock and memory fence logical opcodes from is_send()
The logical send lowering already resolves sources when constructing
the send payload, so prior to that lowering, we don't need to apply
any special restrictions here.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34040>
2025-08-08 22:12:09 +00:00
Kenneth Graunke
342ff81df0 brw: Drop INTERPOLATE_AT_* opcodes from is_send()
The goal here was to avoid propagating source modifiers, unusual
regions, and other things that couldn't be used as a send source.

A few patches ago ("brw: Properly resolve non-sendable sources in a few
logical opcodes") we fixed the logical send lowering to handle these
by resolving them when constructing the send payload.  So now prior
to lowering, we don't need to treat these opcodes specially.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34040>
2025-08-08 22:12:08 +00:00
Kenneth Graunke
47fe9d28e7 brw: Enumerate SHADER_OPCODE_SEND sources and standardize how many
This introduces enums for SHADER_OPCODE_SEND[_GATHER] sources, similar
similar to what we've done for most of the newer logical opcodes.  This
allows us to use actual names for sources rather than remembering their
order, or leaving ourselves comments like /* ex_desc */ all over.  It
will also make it easier to add or reorder sources in the future.

While we're at it, we also standardize on the number of sources.
Previously, we allowed SHADER_OPCODE_SEND to have either 3 (monosend) or
4 (split send) sources, but this is mostly for haphazard historical
reasons.  We now specify all sources every time, eliminating the need
for careful inst->source checks before accessing the last source.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34040>
2025-08-08 22:12:08 +00:00
Kenneth Graunke
00d38b980d brw: Properly resolve non-sendable sources in a few logical opcodes
Sources decorated with source modifiers, immediates, or particular
stride combinations may not be directly usable as SEND operands.  We
have to resolve them to an ordinary VGRF first.

Most opcodes do this as part of broader payload construction, but these
send directly because the messages are very simple.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34040>
2025-08-08 22:12:06 +00:00
Kenneth Graunke
b848fa4595 brw: Rename is_send_from_grf to is_send, replace other is_send() helper
The is_send() helper is just a wrapper around inst->is_send_from_grf()
now, so we can combine the two.  Trim the name from is_send_from_grf()
to is_send(), as it's shorter, and also matches is_math().

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34040>
2025-08-08 22:12:05 +00:00
Kenneth Graunke
e7d20bc86a brw: Drop inst->mlen check from is_send()
We used to have inst->mlen set on various virtual opcodes, but these
days the only instructions that should have inst->mlen set are
SHADER_OPCODE_SEND and SHADER_OPCODE_SEND_GATHER, which are already
covered in inst->is_send_from_grf().  So we don't need to check for mlen
specifically.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34040>
2025-08-08 22:12:05 +00:00
Kenneth Graunke
3c455c3532 brw: Stop using is_send_from_grf() in CSE pass
Explicitly list FS_OPCODE_INTERPOLATE_AT_* as allowed, as they were
already allowed by the default case.  Interlock, memory fence, and
barrier were disallowed and remain so.  Uniform pull constant load
was allowed and remains so.  SHADER_OPCODE_SEND and SEND_GATHER get
explicit handling.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34040>
2025-08-08 22:12:05 +00:00
Kenneth Graunke
e5ed6f64d9 brw: Stop checking inst->is_send_from_grf() for g127 register hack
Every case but SHADER_OPCODE_SEND and SHADER_OPCODE_BARRIER will be
lowered to SEND before register allocation happens.  And the barrier
send has a null destination, so the restriction doesn't apply.

Note that this hack is for Gfx9 only, so we don't need to worry about
Xe3's SHADER_OPCODE_SEND_GATHER feature.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34040>
2025-08-08 22:12:05 +00:00
Kenneth Graunke
b0eb90ddb1 brw: Assert that EOT is always SHADER_OPCODE_SEND on pre-Xe3
We used to have other opcodes as well, but we've since transitioned
entirely to logical send lowering prior to register allocation.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34040>
2025-08-08 22:12:05 +00:00
Kenneth Graunke
90dbbc69bb brw: Use BAD_FILE instead of ARF null for second send payload
A number of places emit monolithic sends, where the second payload is
empty.  Some places were using a BAD_FILE register, while others were
specifying the hardware ARF null register.  Switch to BAD_FILE for
consistency - this is usually what we do for "source isn't present".

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34040>
2025-08-08 22:12:04 +00:00
Aleksi Sapon
9366968b40 meson: add missing x11 dependency on libloader_x11
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36683>
2025-08-08 21:45:59 +00:00
Eric Engestrom
05446eee25 lavapipe/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36684>
2025-08-08 21:27:46 +00:00
Eric Engestrom
33eff12590 llvmpipe/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36684>
2025-08-08 21:27:46 +00:00
Eric Engestrom
fc1a56161e llvmpipe/ci: document fixed test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36684>
2025-08-08 21:27:46 +00:00
Eric Engestrom
622257f4b9 zink+radv/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36684>
2025-08-08 21:27:46 +00:00
Eric Engestrom
a1636dad43 radv/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36684>
2025-08-08 21:27:45 +00:00
Eric Engestrom
d5473d0f19 radeonsi/ci: document recent flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36684>
2025-08-08 21:27:45 +00:00
Eric Engestrom
fb42ec3163 broadcom/ci: fix another slow & flaky CL test on rpi4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36684>
2025-08-08 21:27:45 +00:00
Eric Engestrom
5a4780e44a turnip/ci: document regression in 0a12ff6f...8fe0a347
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36684>
2025-08-08 21:27:45 +00:00
Eric Engestrom
c64872ad56 r300/ci: document fixes tests and one regression in c64c6a0c...bf8ebb6a
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36684>
2025-08-08 21:27:45 +00:00
Eric Engestrom
6019ba7ee6 radeonsi/ci: document fixes test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36684>
2025-08-08 21:27:45 +00:00
Alyssa Rosenzweig
9d7aaaa072 agx: drop bounds check optimize pass
It doesn't work properly and nobody's gonna fix it.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36649>
2025-08-08 20:51:05 +00:00
Alyssa Rosenzweig
2610d2afaf asahi: implement KHR_shader_subgroup
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36649>
2025-08-08 20:51:03 +00:00
Alyssa Rosenzweig
70e3234570 agx: lower fmin/fmax scans
for GL.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36649>
2025-08-08 20:51:03 +00:00
Alyssa Rosenzweig
61db1470a6 glsl: lower fp64 subgroup ops
This has to happen before lowering doubles, we can't do this in the backend.
Otherwise the backend's own vote_feq lower will result in an unlowered 64-bit
feq operation which it can't consume and can't lower. On GL drivers without
native fp64, this fixes tests like:

KHR-Single-GL46.subgroups.vote.graphics.subgroupallequal_double

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36649>
2025-08-08 20:51:03 +00:00
Alyssa Rosenzweig
8566a566e6 nir: plumb ballot options
glsl needs to plumb this from the backend. we should clean up
nir_lower_subgroups to use this later but I don't have time to churn everything
right now.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36649>
2025-08-08 20:51:03 +00:00
Alyssa Rosenzweig
1af0897452 nir/lower_subgroups: add lower_fp64 option
This is needed for doubles lowering to do the right thing.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36649>
2025-08-08 20:51:03 +00:00
Yonggang Luo
8f88991024 util: Remove usage of WIN32 macro for DETECT_OS_WINDOWS
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
As we use _WIN32 in many place, and WIN32 usage are depends on windows.h that defined in minwindef.h.
So do not use it at all, after this change, DETECT_OS_WINDOWS and _WIN32 will have the same effect.
This is for avoid confusion when DETECT_OS_WINDOWS and _WIN32 are mixed used.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36654>
2025-08-08 19:38:54 +00:00
Yonggang Luo
5b51dc3bf2 renderdoc: Upgrade to v1.5
This is for avoid invalid use `defined(WIN32)`

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36654>
2025-08-08 19:38:54 +00:00
Yonggang Luo
070bf8986c util: Upgrade xxhash.h to v0.8.3
Download with:
curl https://raw.githubusercontent.com/Cyan4973/xxHash/refs/tags/v0.8.3/xxhash.h -o src/util/xxhash.h

This is for avoid invalid use `defined(WIN32)`

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36654>
2025-08-08 19:38:54 +00:00
Yonggang Luo
2a6ac3a79c util: Add namespace over float16_t in half_float.h
As float16_t may comes from arm_neon.h:
arm_neon.h:74:16: error: conflicting declaration 'typedef __fp16 float16_t'
   74 | typedef __fp16 float16_t;

Also it is std::float16_t from <stdfloat> as part of C++23

So place it under namespace mesa to avoid conflict when upgrading xxhash.h to v0.8.3

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36654>
2025-08-08 19:38:54 +00:00
Roland Scheidegger
37ee226869 llvmpipe: Fix wrong pixel shader invocation count with discard
We did not count invocations when a shader discarded fragments.
Can just move this to before running the shader so the exec mask
still includes them.

Reviewed-by: Brian Paul <brian.paul@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36678>
2025-08-08 18:14:51 +00:00
Yiwei Zhang
5b1104476f vulkan/wsi/headless: drop redundant chain struct members
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Janne Grunau <j@jannau.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36658>
2025-08-08 16:34:26 +00:00
Yiwei Zhang
24cb071d47 vulkan/wsi/headless: allow explicit modifiers
When wsi device has modifier support, simply allow all driver supported
modifiers for the requested format.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12534
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13636
Reviewed-by: Janne Grunau <j@jannau.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36658>
2025-08-08 16:34:26 +00:00
Yiwei Zhang
7b59d09299 venus: drop vn_trace_init
No longer needed.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36655>
2025-08-08 16:02:31 +00:00
Yiwei Zhang
e74516dbc7 util/perf: amend missing atrace_init
When perfetto isn't enabled, atrace can still be used freely on Android.
All trace micros have accounted for that, but the init is missed.

Cc: mesa-stable
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36655>
2025-08-08 16:02:30 +00:00
Rob Clark
8c59aacc10 freedreno/layout: Don't align explicit layouts to page size
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This could cause importing buffers, in particular multiplanar YUV, since
when the offset of the plane is added, the aligned size could be beyond
the end of the buffer.

Fixes: 27b0f64b3e ("freedreno/a6xx: Use handle for explicit layout")
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36656>
2025-08-08 14:45:31 +00:00
Lionel Landwerlin
4838b85d6c anv: move 3DSTATE_TE::TessellationDistributionMode to dynamic path
Again another field that depends on shaders bound.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36665>
2025-08-08 14:07:01 +00:00
Lionel Landwerlin
ca0a509b6b anv: move 3DSTATE_VFG emission to dynamic path
A bunch of fields are fixed and other depends on what stages are
bound.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36665>
2025-08-08 14:07:01 +00:00
Lionel Landwerlin
5a8e295a97 anv: move 3DSTATE_CLIP emission to dynamic path
This instruction has a bunch of fixed fields and the rest depends on
the shader stages enabled. With the pipeline object going away, we
can't keep this on the pipeline.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36665>
2025-08-08 14:07:00 +00:00
Lionel Landwerlin
c8305dfe0e anv: move SBE emission to dynamic path
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36665>
2025-08-08 14:07:00 +00:00
Lionel Landwerlin
33abaf2d0e anv: simplify SBE emission
Using 3DSTATE_SBE_SWIZ for providing the implicit PrimitiveID value
(when not written by the previous stage) seems to be the legacy way of
doing things on Gfx7 and prior.

On Gfx8+ we got this new
3DSTATE_SBE::PrimitiveIDOverrideAttributeSelect to get the HW to write
the value wherever we want.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36665>
2025-08-08 14:06:59 +00:00
Lionel Landwerlin
7b8a6af222 anv: move 3DSTATE_SF dynamic emission path
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36665>
2025-08-08 14:06:59 +00:00
Lionel Landwerlin
20721419e5 anv: move primitive_replication emission to dynamic path
The pipeline object going away, we won't have a place to keep this. We
can make the diff/emission efficient enough that it won't matter much.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36665>
2025-08-08 14:06:58 +00:00
Lionel Landwerlin
6d863fda2d anv/brw: move sample_shading_enable to wm_prog_data
The vulkan runtime doesn´t store this parameter in the dynamic state
(since it's not a dynamic state). Just capture it at compile time and
leave on the wm_prog_data.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36665>
2025-08-08 14:06:58 +00:00
Lionel Landwerlin
f2696b441d anv/brw: store min_sample_shading on wm_prog_data
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36665>
2025-08-08 14:06:57 +00:00
Julia Zhang
3fa212c4f5 virgl: Small fix of converting format
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Convert pipe format to virgl format since virglrenderer will convert it
back from virgl format to pip format when create pipe_resource.

According to the call stack, only if vflags include flag:
PIPE_RESOURCE_FLAG_MAP_PERSISTENT or PIPE_RESOURCE_FLAG_MAP_COHERENT
will make it call into virgl_drm_winsys_resource_create_blob() so here
remove redundant if condition in virgl_drm_winsys_resource_create_blob().

Signed-off-by: Julia Zhang <julia.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36672>
2025-08-08 13:47:03 +00:00
Rob Clark
a8b27a125b drm/drm-shim: Add a702
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36644>
2025-08-08 13:04:35 +00:00
Rob Clark
69f9a805ae freedreno/drm-shim: Fix nr_rings/priorities
Since drm/sched conversion, the kernel will report at least 3.  And
rusticl seems to depend on this.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36644>
2025-08-08 13:04:35 +00:00