Commit Graph

210113 Commits

Author SHA1 Message Date
Erik Faye-Lund
fe42a3d0eb meson/util: properly detect sysconf
There's two functions that use sysconf(), and they don't seem to agree
on what combination of platforms supports the function. Let's perform
proper function detection instead.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36621>
2025-08-11 12:30:23 +00:00
Erik Faye-Lund
e636991c78 prefer _SC_PAGESIZE over _SC_PAGE_SIZE
The POSIX spec says that_SC_PAGE_SIZE is a synonym for _SC_PAGESIZE, and
both will have the same value. Let's be consistent in which one we use,
and let's use the one that points directly to the authoritative
documentation.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36621>
2025-08-11 12:30:23 +00:00
Erik Faye-Lund
590ad7fd42 winsys/radeon: use util_get_cpu_caps()-helper
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36621>
2025-08-11 12:30:22 +00:00
Erik Faye-Lund
91232524bf winsys/radeon: use os_get_page_size and error-check
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36621>
2025-08-11 12:30:22 +00:00
Erik Faye-Lund
ad3445b6df panfrost: use os_get_page_size()
We have an abstraction for this, let's use it to try and keep the code
as portable as possible.

Reviewed-by: John Anthony <john.anthony@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36621>
2025-08-11 12:30:22 +00:00
Erik Faye-Lund
44bc8557ae iris: use os_get_total_physical_memory instead of open-coding
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36621>
2025-08-11 12:30:22 +00:00
Erik Faye-Lund
2213a76c0a crocus: use os_get_total_physical_memory instead of open-coding
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36621>
2025-08-11 12:30:22 +00:00
Mary Guillemard
c5c196e6d5 pan/bi: Revamp bi_optimize_nir
This reorder things a bit, ensure we attempt more agressive vectorisation,
attempt to optimize cf and more.

Inspiration from NAK's optimize_nir function.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36629>
2025-08-11 11:38:57 +00:00
Mary Guillemard
ef7095c85b pan/bi: Handle needless conversions in nir_lower_bool_to_bitsize
We can end up with conversion instructions to the same type of integer
with nir_lower_bool_to_bitsize so let's make
bifrost_nir_lower_algebraic_late handle those cases.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36629>
2025-08-11 11:38:57 +00:00
Mary Guillemard
9ec1bb0111 pan/bi: Vectorize UBOs load/store
We can benifit from it, let's allow it when we aren't forced to follow
robustness2.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36629>
2025-08-11 11:38:57 +00:00
Mary Guillemard
b4ce8998d7 pan/bi: Switch to nir_lower_alu_width
Embrace modernity and consistency between alu and vectorization passes.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36629>
2025-08-11 11:38:57 +00:00
Mary Guillemard
0c7aaa7aad panvk: Call nir_opt_access
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36629>
2025-08-11 11:38:56 +00:00
Lionel Landwerlin
3d85580779 anv: subclass vk_pipeline
We'll have to handle RT pipelines inside of Anv because the runtime
doesn't have support for that.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36711>
2025-08-11 11:14:53 +00:00
Lionel Landwerlin
44aaf88425 anv: rework gfx state emission (again)
Previously we had 2 stages :

  runtime -> precomputed values -> packing/emission

With this change we use 3 stages :

   runtime -> precomputed values -> packing -> emission

Now blorp & other changes to the pipeline should not retrigger
repacking of instructions.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36711>
2025-08-11 11:14:53 +00:00
Lionel Landwerlin
5a2fb0da32 anv: actually use the COMPUTE_WALKER_BODY prepacked field
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36711>
2025-08-11 11:14:52 +00:00
Lionel Landwerlin
9c8571794a anv: use a local variable for batch
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36711>
2025-08-11 11:14:52 +00:00
Lionel Landwerlin
f2eea4ec6d anv: remove pipeline_stage unused field
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36711>
2025-08-11 11:14:52 +00:00
Lionel Landwerlin
e7aeed1f09 anv: pass active stages to push descriptor flushing
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36711>
2025-08-11 11:14:51 +00:00
Eric Engestrom
e551ca1318 ci: track changes to new src/x11/ folder
Since 4095fac72b ("loader: move some common dri3 functions out
of dri3 loader") the new folder has been created, and since
950dac6e6c ("x11: Add an x11_xlib_display_is_thread_safe()
helper") it's also used by vulkan x11, so adding it to the core rules.

Fixes: 4095fac72b ("loader: move some common dri3 functions out of dri3 loader")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36705>
2025-08-11 10:41:06 +00:00
Lars-Ivar Hesselberg Simonsen
efab2205fa panvk: Add utrace tracepoints in queue_submit
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36519>
2025-08-11 10:12:30 +00:00
Lars-Ivar Hesselberg Simonsen
856daf4ce2 panvk/utrace: Add flush_cache support
Also pulls flush_cache information out of the barrier tracepoint.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36519>
2025-08-11 10:12:30 +00:00
Lars-Ivar Hesselberg Simonsen
2c8d77b94a panvk/utrace: Add sync32/64_add support
Add the ability to capture sync32/64_add during tracing.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36519>
2025-08-11 10:12:30 +00:00
Lars-Ivar Hesselberg Simonsen
4709dcaf52 panvk/utrace: Add sync32/64_wait support
Add support for capturing sync32/64_wait including the addresses and
values they wait for.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36519>
2025-08-11 10:12:30 +00:00
Lars-Ivar Hesselberg Simonsen
5d71bf46a7 panvk/utrace: Add support for storing registers
Add the ability to store specific register values during tracing by
using the indirect capture capability.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36519>
2025-08-11 10:12:29 +00:00
Lars-Ivar Hesselberg Simonsen
c2e0ce16fb panvk/utrace: Make indirect capture wait optional
Unless the command we're tracing produces the data we want to capture,
there is no need to wait for its timestamp write.

Currently, there is no such case, so make it the responsibility of the
caller instead of implicitly adding the wait.

Also remove and unnecessary wait for the LS scoreboard after the copy
buffer store.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36519>
2025-08-11 10:12:29 +00:00
Lars-Ivar Hesselberg Simonsen
abffb96c46 panvk/utrace: Pass async_op instead of mask
This is needed to trace cs_defer_indirect.

Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36519>
2025-08-11 10:12:29 +00:00
Lars-Ivar Hesselberg Simonsen
db4bcd48d7 panvk: Fix IUB decode
The buffer is only an IUB if it's within the size of the resource entry.
Otherwise, it might just be a buffer that landed just after the
descriptor allocation.

Fixes: fb38f10240 ("panvk: Handle IUBs in decoder")
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36519>
2025-08-11 10:12:29 +00:00
Lars-Ivar Hesselberg Simonsen
e5b828e808 panvk: Fix instrumentation on v12+
Ensure we stay within the maximum tuple size when copying.

Fixes: 172dead3df ("panvk: Increase CSF scratch limits on v12+")
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36519>
2025-08-11 10:12:29 +00:00
Lars-Ivar Hesselberg Simonsen
78ca5ef87f u_trace: Indirect capture fixes
Fixes a missing sizeof parenthesis.
Fixes multiple indirects writing to the same address.

Fixes: 0a17035b5c ("u_trace: add support for indirect data")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36519>
2025-08-11 10:12:29 +00:00
Samuel Pitoiset
4580293ab2 radv: implement RB+ depth-only rendering for better perf
For RB+ depth-only, the following registers must be configured like:

 - CB_COLOR_CONTROL.MODE = CB_DISABLE
 - CB_COLOR0_INFO.FORMAT = COLOR_32
 - CB_COLOR0_INFO.NUMBER_TYPE = NUMBER_FLOAT
 - SPI_SHADER_COL_FORMAT.COL0_EXPORT_FORMAT = SPI_SHADER_32_R
 - SX_PS_DOWNCONVERT.MRT0 = SX_RT_EXPORT_32_R

This might increase performance for depth-only rendering passes on
GFX9+.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28590>
2025-08-11 09:45:15 +00:00
David Rosca
26d98d283b radv: Fix alignment for linear video decode dst images
OPTIMAL is actually linear for VCN4 and older, so this needs to check
the surface flags instead.

Fixes: 2d06b43292 ("radv: Enable tiling for video images on VCN5")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36669>
2025-08-11 09:25:18 +00:00
Samuel Pitoiset
9648d256db radv: remove cs parameter for gfx12 push SH reg helpers
It's also much cleaner now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36679>
2025-08-11 08:30:42 +00:00
Samuel Pitoiset
2c943b9bf8 radv: remove cs parameter for all opt context emit helpers
radeon_begin takes a radv_cmd_stream, so it's much cleaner now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36679>
2025-08-11 08:30:42 +00:00
Samuel Pitoiset
80678c7722 radv: cleanup some redundant cmd_buffer->cs occurrences
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36679>
2025-08-11 08:30:42 +00:00
Samuel Pitoiset
69a8972ce1 radv/ci: uprev kernel to 6.15.9
This contains the zerovram fix (not the one that affects performance
yet though).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36675>
2025-08-11 07:48:05 +00:00
Pavel Ondračka
c8ef472ae2 i915/ci: update CI expectations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36703>
2025-08-11 06:32:18 +00:00
Valentine Burley
2e58cc8941 zink/ci: Document more flakes on ANV
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36671>
2025-08-11 06:14:16 +00:00
Valentine Burley
e4bce65037 zink/ci: Add a prefix for X11 dEQP-EGL on ANV
Makes things clearer.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36671>
2025-08-11 06:14:16 +00:00
Qiang Yu
bfd7f498a5 nir/opt_varying: remove assert for mesh shader crash
This assert is not true when mesh shader.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36596>
2025-08-11 01:44:45 +00:00
Qiang Yu
980e125e31 mesa: add mesh shader extension state
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36596>
2025-08-11 01:44:45 +00:00
Qiang Yu
e24082cfe0 mesa: count mesh shader when init limits
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36596>
2025-08-11 01:44:45 +00:00
Qiang Yu
13312c12fb mesa: set a more accurate value for combined limits
Program can only contain either graphics shaders or compute
shader. So these limits should use a MAX2 for different
shader pipeline.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36596>
2025-08-11 01:44:44 +00:00
Qiang Yu
5f1983f346 glsl,gallium,mesa: replace MESA_SHADER_STAGES with MESA_SHADER_MESH_STAGES
Prepare for mesh shader support, change all shared code to
use MESA_SHADER_MESH_STAGES.

Use command:
  find src/gallium/auxiliary/ -type f -not -path '*/.git/*' -exec sed -i 's/\bMESA_SHADER_STAGES\b/MESA_SHADER_MESH_STAGES/g' {} +
  find src/compiler -type f -not -path '*/.git/*' -exec sed -i 's/\bMESA_SHADER_STAGES\b/MESA_SHADER_MESH_STAGES/g' {} +
  find src/mesa -type f -not -path '*/.git/*' -exec sed -i 's/\bMESA_SHADER_STAGES\b/MESA_SHADER_MESH_STAGES/g' {} +

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36596>
2025-08-11 01:44:44 +00:00
Qiang Yu
fba8bddc4f mesa: init program constants for mesh shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36596>
2025-08-11 01:44:43 +00:00
Qiang Yu
4ce6448f2a mesa: enlarge the shader resourse limits for mesh shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36596>
2025-08-11 01:44:43 +00:00
Qiang Yu
4b8c63e211 gallium/dd: enlarge shader string for mesh shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36596>
2025-08-11 01:44:42 +00:00
Qiang Yu
4aa2510bc0 radeonsi: do not init nir_options for mesh shader
nir_options array include mesh shader, radeonsi does not
support mesh shader at this point.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36596>
2025-08-11 01:44:42 +00:00
Qiang Yu
d42936c6a7 compiler: adjust comments for mesa_shader_stage
We're going to support mesh shader in GL, the stage order
is not sorted as comment described.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36596>
2025-08-11 01:44:42 +00:00
Qiang Yu
08b643f244 mesa/st: use shader_caps.max_instructions to check shader present
It's documented cap for shader presentation.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36596>
2025-08-11 01:44:42 +00:00
Qiang Yu
e697b9119e mesa,gallium: remove tgsi_processor_to_shader_stage
It just pass though the input.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36596>
2025-08-11 01:44:42 +00:00