Commit graph

207692 commits

Author SHA1 Message Date
Matt Turner
41cd196886 brw: Implement convert_cmat_intel intrinsic
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35616>
2025-06-27 01:26:22 +00:00
Matt Turner
102d7409ef nir: Add convert_cmat_intel intrinsic
This intrinsic will be used to implement matrix type and layout
conversions in the backend compiler.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35616>
2025-06-27 01:26:22 +00:00
Matt Turner
1215845b5b intel: Increase size of cooperative_matrix_configurations[] to 16
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35616>
2025-06-27 01:26:21 +00:00
Guilherme Gallo
d06f8cfb19 ci/android: Add dEQP module for CML cuttlefish test
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Add only those tests for initial coverage:
  * `dEQP-VK.wsi.android.*`
  * `dEQP-VK.api.external.memory.android_hardware_buffer.*`

This increases the job execution time to almost 1h, so move this job to
nightly.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35706>
2025-06-26 23:21:12 +00:00
Guilherme Gallo
545727f97c ci/android: Move ANDROID_CTS_MODULES to build script
Rely on the include files (-android-cts-include.txt) to filter both
tests and modules from Android CTS during test time.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35706>
2025-06-26 23:21:12 +00:00
Guilherme Gallo
655cd186ee ci/android: Add a job to run CTS on Intel CML
Like we do with `android-angle-lavapipe`, let's include the Android CTS
testing alongside the vkcts one.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35706>
2025-06-26 23:21:12 +00:00
Connor Abbott
630380349b tu: Give renderpass events a separate trace buffer
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Before this we tried hard to optimize for the sysmem case by emitting
the events for the renderpass inline and only discarding them in the
gmem case. However this won't work if we need to emit the
render_pass_start event after the binning IB, because we don't know
whether the binning IB will be emitted until the RP end time. The old
system also required a ton of confusing code to keep track of the
start/end pointers with suspending and resuming renderpasses. All of
that goes away if we use a separate u_trace for renderpass events and
just copy it to the main trace buffer for sysmem.

With this, the previous method of using the space between trace_rp_start
and trace_rp_drawcalls_start to keep track of the renderpass_start event
and disable it when emitting a split dynamic renderpass at submit time
doesn't work anymore. Just move trace_renderpass_start() to
tu_cmd_render() time after the draw calls have been recorded, which is
now safe to do.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35751>
2025-06-26 22:51:29 +00:00
Connor Abbott
7791b5286c util/u_trace: Add u_trace_move()
Destructively copy trace contents to another trace, transfering
ownership of resources. This will be useful for turnip.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35751>
2025-06-26 22:51:29 +00:00
James Price
10ae673368 spirv: Fix cooperative matrix in OpVariable initializer
Check for cooperative matrix types first in the
nir_lower_variable_initializers pass, since they are also considered
to be scalar types.

Fixes: 7e6cd395c7 ("nir: Handle cmat types in lower_variable_initializers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13388
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35668>
2025-06-26 22:24:31 +00:00
Nicolas Dufresne
4008300672 build: Include panfrost to the tools 'all' list
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35775>
2025-06-26 21:55:17 +00:00
Nicolas Dufresne
3ce37fcbb5 build: Sort the tools 'all' list
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35775>
2025-06-26 21:55:17 +00:00
Dave Airlie
5c99599060 nvk/nak: handle sm100 lod mode encoding.
The lod mode encoding has changed on blackwell.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35773>
2025-06-26 21:12:47 +00:00
Faith Ekstrand
cfc0be2454 nil: Use set_field2() for a few descriptor cases
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35773>
2025-06-26 21:12:47 +00:00
Faith Ekstrand
046b6435bc nak: Use the new set_field2() helper for a few things
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35773>
2025-06-26 21:12:47 +00:00
Faith Ekstrand
ff944106fc nvk/bitview: Add a set_field2() trait and method
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35773>
2025-06-26 21:12:46 +00:00
Faith Ekstrand
125da7e341 nvk/bitview: Add a new ToFieldBits trait
This makes the implementation of SetField itself more generic

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35773>
2025-06-26 21:12:46 +00:00
Konstantin Seurer
131b917246 lavapipe: Suspend conditional rendering around ray tracing dispatches
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
cc: mesa-stable

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35754>
2025-06-26 20:52:29 +00:00
Konstantin Seurer
e1acffbfc0 ci: Update trace checksums
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33003>
2025-06-26 20:12:14 +00:00
Konstantin Seurer
5f3c956f49 gallivm/nir/soa: Call lp_build_opt_nir
Makes sure that everything is lowered and optimized.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33003>
2025-06-26 20:12:14 +00:00
Konstantin Seurer
9f98ded348 gallivm/nir/soa: Cast divergent->uniform at the consumer
The exec mask can change between the producer and the consumer. Casting
at the consumer makes sure that we end up with a valid value.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33003>
2025-06-26 20:12:14 +00:00
Konstantin Seurer
1fba5739c4 gallivm/nir/soa: Include helper invocations in first_active_invocation
So it returns a valid element if the exec mask is 0 for all active
invocations but -1 for helper invocations.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33003>
2025-06-26 20:12:13 +00:00
Konstantin Seurer
405378f042 gallivm/nir/soa: Fix typo
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33003>
2025-06-26 20:12:13 +00:00
Konstantin Seurer
fe601b9293 gallivm: Implement demote and lower terminate in nir
The current implementation does not work for terminate since loads need
to ignore the mask because of helper invocations. This can lead to
crashes.

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33003>
2025-06-26 20:12:12 +00:00
Konstantin Seurer
aacfc663cb nir: Add nir_lower_halt_to_return
This is a lowering pass that was implemented by multiple drivers.

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33003>
2025-06-26 20:12:12 +00:00
mojyack
db383ceb64 mesa: reorder mesa format corresponding to GL_BGRA
current `st_ChooseTextureFormat(..., internalFormat=GL_BGRA8, ...)`
returns `PIPE_FORMAT_R8G8B8A8_UNORM`.
this causes significant performance loss in apps that use BGRA texture
format(e.g. firefox) when transferring textures because of format
conversions, if the driver doesn't support PIPE_TEXTURE_TRANSFER_BLIT.
fix this by modifying the texture format mapping.

See Also: https://community.mnt.re/t/poor-browser-performance/2042/30

Signed-off-by: mojyack <mojyack@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Backport-to: 25.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35678>
2025-06-26 19:36:09 +00:00
Dave Airlie
f972affd9d nvk/hopper: set texture header version
Taken from open-gpu-kernel-modules.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:56 +00:00
Dave Airlie
c387c9fde8 nouveau/headers: generate c56f host methods.
The newer host methods would be nice to have in dumps.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:56 +00:00
Dave Airlie
1b654dc198 nouveau/winsys: Add blackwell support
This adds Blackwell support to sm_for_chipset() and
max_warps_per_mp_for_sm()

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:56 +00:00
Dave Airlie
f310b3fa6f nvk/qmd: fix shared memory size calcs for blackwell.
I'm still not 100% happy with these, nvidia does appear to use 26
as the max/target values, which corresponds to + 7 not +1
but let's dig a bit more.

Fixes: 6c052d87b7 ("nak/qmd: Add QMD version 5.0 for Blackwell+")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:56 +00:00
Dave Airlie
ec3232691b nvk/sm90: fix su atom vs atom encoding
The suatom is encoded different to atom.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:56 +00:00
Dave Airlie
59015f1c64 nak/sm70: fix imnmx on blackwell.
The encoding was slightly wrong, this passes the hw_tests.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:56 +00:00
Faith Ekstrand
9c354cd47f nak/hw_tests: Align the shared memory window to 4GB on Hopper+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:56 +00:00
Dave Airlie
50a312ef24 nvk: Add hopper shared memory window alignment
This changes to need 4GB alignment on hopper and later.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:56 +00:00
Dave Airlie
46c72f69f9 nvk: invalidate raster cache after setting shading rate
on blackwell fix:
dEQP-VK.fragment_shading_rate.renderpass2.monolithic.attachment_rate.misc.two_subpass

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:56 +00:00
Dave Airlie
a2518c817f nvk: SET_REFERENCE is not legal anymore.
replace with WFI, this is possibly overkill

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:55 +00:00
Dave Airlie
6fa078c0be nvk: handle hopper invalidate sequence for memory barrier
This changed on hopper to need a MEM_OP memory barrier emitted.

Use the new headers to send the correct sequence, this is taken
from the open-gpu-kernel-modules repo, but it might be a too
large hammer.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:55 +00:00
Dave Airlie
cdd01c416c nvk: add clc86f class for hopper host methods.
This is taken from open-gpu-kernel-modules, and provides
the host interface on hopper and newer.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:54 +00:00
Dave Airlie
153dc0f406 nouveau/headers: add a single field to skip parsing headers.
Newer headers have 2 fields at 0 for one value, just ignore one
for now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:54 +00:00
Dave Airlie
337fcd31e4 nvk/nil: Use PTE_KIND_GENERIC_MEMORY for everything on Blackwell+
This has been confirmed for current blackwell hardware, look
out in future for changes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:54 +00:00
Dave Airlie
f6b22a54e4 nvk/nil: add texture header v2 support for hopper/blackwell
The texture header got redefined and some fields got reworked,
deriving it from the old info doesn't seem trivial, so introduce
a second column to handle the v2 header info.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35484>
2025-06-26 19:21:54 +00:00
Marek Olšák
1754507d49 nir: rename nir_lower_io_to_temporaries -> nir_lower_io_vars_to_temporaries
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>
2025-06-26 18:20:54 +00:00
Marek Olšák
1e03827c77 nir: rename nir_lower_io_arrays_to_elements -> nir_lower_io_array_vars_to_elements
same for *_no_indirects

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>
2025-06-26 18:20:54 +00:00
Marek Olšák
3713e2d580 nir: rename nir_lower_clip_cull_distance_arrays -> nir_lower_clip_cull_distance_array_vars
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>
2025-06-26 18:20:53 +00:00
Marek Olšák
adb17a8609 nir: move nir_recompute_io_bases into its own file
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>
2025-06-26 18:20:53 +00:00
Marek Olšák
97743980ce nir: remove unused nir_force_mediump_io & nir_unpack_16bit_varying_slots
I think I added these.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>
2025-06-26 18:20:52 +00:00
Marek Olšák
aefea49dad nir: move lots of code from nir_lower_io.c into new nir_lower_explicit_io.c
nir_lower_io is just for regular inputs/outputs.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>
2025-06-26 18:20:52 +00:00
Marek Olšák
5bd3e0c08c nir: move nir_assign_var_locations to freedreno (its only use)
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>
2025-06-26 18:20:52 +00:00
Marek Olšák
c8cda0dc1a nir: move nir_io_add_const_offset_to_base into its own file
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>
2025-06-26 18:20:51 +00:00
Marek Olšák
d78070ded5 nir: move nir_io_add_intrinsic_xfb_info into its own file
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>
2025-06-26 18:20:51 +00:00
Marek Olšák
12df9b3def nir: rename nir_vectorize_tess_levels -> nir_lower_tess_level_array_vars_to_vec
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>
2025-06-26 18:20:50 +00:00