Commit Graph

207687 Commits

Author SHA1 Message Date
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
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
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
Marek Olšák 2aa94caf82 nir: rename nir_lower_io_to_vector -> nir_opt_vectorize_io_vars
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
Marek Olšák 944f8f6db2 nir: move nir_lower_io_vars_to_scalar 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:49 +00:00
Marek Olšák 439d805291 nir: rename nir_lower_io_to_scalar_early -> nir_lower_io_vars_to_scalar
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35760>
2025-06-26 18:20:49 +00:00
Ian Romanick b83f618fb2 brw: Fully write temporary destinations
Consider an innocuous instruction like:

    and(1) v250:UD, g0.3<0,1,0>:UD, 4294967264u NoMask group0

If register allocation decides to spill v250, it will see this
instruction and say, "Oh no! The other components of v250 aren't set, so
I'd better add a fill before that instruction!"

But it gets even worse than that... if register coalesce decided to
merge two of these, the live range gets massively extended because the
writes don't fully initialize the value. This causes the need to spill
these registers in the first place.

Changing that instruction to SIMD16 on Xe2 or SIMD8 on other platforms
alleviates these issues.

shader-db:

Lunar Lake
total instructions in shared programs: 17118324 -> 17113191 (-0.03%)
instructions in affected programs: 93701 -> 88568 (-5.48%)
helped: 42 / HURT: 6

total cycles in shared programs: 895422566 -> 895079488 (-0.04%)
cycles in affected programs: 30111338 -> 29768260 (-1.14%)
helped: 35 / HURT: 40

total spills in shared programs: 3588 -> 3304 (-7.92%)
spills in affected programs: 285 -> 1 (-99.65%)
helped: 10 / HURT: 0

total fills in shared programs: 2218 -> 1663 (-25.02%)
fills in affected programs: 556 -> 1 (-99.82%)
helped: 10 / HURT: 0

Meteor Lake, DG2, Tiger Lake, and Ice Lake had similar results.  (Meteor Lake shown)
total instructions in shared programs: 20059218 -> 20053563 (-0.03%)
instructions in affected programs: 96938 -> 91283 (-5.83%)
helped: 43 / HURT: 6

total cycles in shared programs: 884174588 -> 883536475 (-0.07%)
cycles in affected programs: 22105268 -> 21467155 (-2.89%)
helped: 35 / HURT: 27

total spills in shared programs: 5032 -> 4679 (-7.02%)
spills in affected programs: 355 -> 2 (-99.44%)
helped: 12 / HURT: 0

total fills in shared programs: 4782 -> 4113 (-13.99%)
fills in affected programs: 671 -> 2 (-99.70%)
helped: 12 / HURT: 0

Skylake
total instructions in shared programs: 19097658 -> 19097665 (<.01%)
instructions in affected programs: 14202 -> 14209 (0.05%)
helped: 0 / HURT: 5

total cycles in shared programs: 862058109 -> 862058267 (<.01%)
cycles in affected programs: 3450244 -> 3450402 (<.01%)
helped: 7 / HURT: 11

fossil-db:

Lunar Lake
Totals:
Cycle count: 31439652246 -> 31439652272 (+0.00%)

Totals from 2 (0.00% of 707091) affected shaders:
Cycle count: 2602 -> 2628 (+1.00%)

No other Intel platforms had any fossil-db changes.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35721>
2025-06-26 17:59:47 +00:00
Gurchetan Singh 8a2f43c9bd util: rust: update to rustix 1.0.7
Latest tagged release.  Fedora uses it, and for it to
work on Android we'll need to latest release so a pure
libc backend can be used.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35768>
2025-06-26 17:11:41 +00:00