Commit graph

189224 commits

Author SHA1 Message Date
Rhys Perry
4b0da5b51f aco: rename is_opy_only to can_be_opx
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34246>
2025-04-17 14:00:29 +00:00
Rhys Perry
408fa33c09 aco/gfx12: don't use second VALU for VOPD's OPX if there is a WaR
fossil-db (gfx1201):
Totals from 38908 (49.02% of 79377) affected shaders:
Instrs: 30268107 -> 30268131 (+0.00%); split: -0.00%, +0.00%
CodeSize: 180843648 -> 180843640 (-0.00%); split: -0.00%, +0.00%
Latency: 224905962 -> 224906072 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 44322988 -> 44323004 (+0.00%)
VALU: 15124145 -> 15124167 (+0.00%)
VOPD: 4018504 -> 4018482 (-0.00%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 25.0
Backport-to: 25.1
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34246>
2025-04-17 14:00:29 +00:00
Tomeu Vizoso
a9fde960e6 etnaviv/ml: Support FullyConnected with signed weights
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34545>
2025-04-17 13:30:21 +00:00
Tomeu Vizoso
9615d44d6e teflon: Skip unsupported FullyConvolution operations
Drivers don't support these combinations yet.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34545>
2025-04-17 13:30:21 +00:00
Tomeu Vizoso
9409595c32 etnaviv/ml: All tensors are now 4D, adapt to it
After "teflon: Set unused dimensions to 1", all tensors have 4
dimensions, so change the dim index accordingly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34498>
2025-04-17 13:13:09 +00:00
Tomeu Vizoso
c728e73d65 etnaviv/ml: Track memory layout of tensors
Improve the decision on when to add transpose and detranspose jobs by
tracking the memory layout that a tensor is in.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34498>
2025-04-17 13:13:09 +00:00
Tomeu Vizoso
c4a5f8d665 teflon: Set unused dimensions to 1
So drivers don't need to superfluously watch out for zeroes when
multiplying among dimensions.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34498>
2025-04-17 13:13:09 +00:00
Tomeu Vizoso
23ae1c3bff teflon: Actually accept concatenations with different number of channels
It is supported now by Etnaviv.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34498>
2025-04-17 13:13:09 +00:00
Tomeu Vizoso
bde0e69bcd etnaviv/ml: Consolidate transpose/detranspose
To simplify things, state that all operations as implemented expect
their input tensors to be in the channel order that the hardware
supports, and that the output tensors will be in that same order as
well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34498>
2025-04-17 13:13:09 +00:00
Tomeu Vizoso
e06265ed3a teflon: Only mark integers as signed
As these are the types that need special handling, eg. not
kTfLiteFloat32.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34498>
2025-04-17 13:13:09 +00:00
Samuel Pitoiset
209a0ede98 radv: add a function to emit meshlet registers on GFX11+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34518>
2025-04-17 12:49:47 +00:00
Samuel Pitoiset
836757bec3 radv: tidy up radv_emit_ps_epilog_state()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34518>
2025-04-17 12:49:47 +00:00
Samuel Pitoiset
dca35b7226 radv: tidy up radv_emit_geometry_shader()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34518>
2025-04-17 12:49:47 +00:00
Samuel Pitoiset
d999afeb7a radv: tidy up radv_emit_vertex_shader()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34518>
2025-04-17 12:49:47 +00:00
Samuel Pitoiset
85fdf69027 radv: simplify combining TES/VS+GS config registers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34518>
2025-04-17 12:49:47 +00:00
Samuel Pitoiset
0dd9833348 radv: remove redundant assertion when emitting PS epilog state
It's already checked by radv_emit_32bit_pointer().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34518>
2025-04-17 12:49:47 +00:00
Samuel Pitoiset
a230d2daa3 radv: use radeon_set_sh_reg() for only 1 DWORD
It's just shorter to write.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34518>
2025-04-17 12:49:47 +00:00
Antonio Ospite
4dabc7776f ci/android: show how to add more Android CTS test cases
Show how to add more Android CTS tests cases, using --include-filters

Only CtsNativeHardwareTestCases and CtsSkQPTestCases are actually
enabled for now, because the android-angle-lavapipe-cts job is part of
the pre-merge pipeline and these modules would not be too expensive to
run.

The container size increases by about 60Mb and the test time from 4m to
7 min on a local system, so it's an acceptable compromise to show how
multiple modules can be tested.

A similar mechanism will be used to add CtsDeqpTestCases tests in the
future, probably in nightly or weekly jobs, because that would require
more space in the containers and a lot more time to run the tests.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34479>
2025-04-17 11:50:07 +00:00
Samuel Pitoiset
11e8a96495 radv: use common scratch tmpring size programming
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
No logical changes.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34549>
2025-04-17 10:35:40 +00:00
Samuel Pitoiset
710d7ea8b8 radv: compute the optimal scratch wavesize
This might increase the scratch BO sizes but it's supposed to be
faster because scratch waves would be distributed among memory channels.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34549>
2025-04-17 10:35:40 +00:00
Samuel Pitoiset
e433a57650 ac,radeonsi: rework computing scratch wavesize and tmpring register
To be re-used by RADV.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34549>
2025-04-17 10:35:40 +00:00
Samuel Pitoiset
d94f8b4460 ac/gpu_info,radv: add scratch_wavesize_granularity info
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34549>
2025-04-17 10:35:40 +00:00
Icenowy Zheng
82dda21806 zink: Do not use demote on IMG blobs
The implementation of demote in IMG blobs seems to be a piece of hack,
and the current use of it in Zink leads to assertion failure with
information "Uniflex does not support demote and terminate in the same
shader".

Disable usage of demote for IMG blobs.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33051>
2025-04-17 10:14:45 +00:00
Daniel Stone
8d08cde667 ci/piglit: Use structured tagging for Piglit
Structured tagging (cf. mesa/mesa!33421) captures a checksum of the
thing we think we're building, and verifies this through the chain.

When we run container builds, we check that the tag we've captured in
the CI variables matches the calculated checksum, to make sure the
declared tags are consistent and we always have traceability.

When we run tests, we check the tags again between what was declared in
the CI variables and what we're actually running from the test
container. This makes sure that we're always testing what we think we're
testing.

As a side advantage, the rule inheritance we need to make this work
means that we can start doing more optional downloads via overlays,
instead of pulling a whole container full of stuff we might not ever
use.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34539>
2025-04-17 09:22:39 +00:00
Samuel Pitoiset
e616761fb2 radv: re-introduce the compute vs CP DMA heuristic for copy/fill operations
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This caused a -5% performance regression in Control because using
compute always eats resources.

This new approach introduces a flag called RADV_COPY_FLAGS_DEVICE_LOCAL
which can be used to indicate if the underlying memory is device local.
This should also help for future work.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12639
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34556>
2025-04-17 08:59:58 +00:00
Samuel Pitoiset
5e2508e7c4 radv: simplify radv_fill_xxx() helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34556>
2025-04-17 08:59:58 +00:00
Samuel Pitoiset
8ba94d8263 radv: add radv_fill_image() helper
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34556>
2025-04-17 08:59:58 +00:00
Samuel Pitoiset
0fa43b5bfb radv: use radv_fill_memory() in the accel struct path
It's now possible to remove the NULL BO check.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34556>
2025-04-17 08:59:58 +00:00
Tapani Pälli
6d70ec449f iris: make sure to not mix compressed vs non-compressed
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This commit implements the following requirement:

   "Keep any UMD-recycling of compression-enabled/disabled
    memory separate."

As additional info there are 2 related wa's for the issue:

   Wa_14018443005
   Wa_18038669374

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34499>
2025-04-17 06:17:53 +00:00
Tapani Pälli
c2a4657862 iris: force reallocate on eglCreateImage with GFX >= 20
Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34499>
2025-04-17 06:17:53 +00:00
Tomeu Vizoso
aa73767f5e etnaviv/ml: Support per-channel quantized weights
Dequantize the weights, calculate new quantization values based on the
minimum and maximum values and requantize again.

This causes a loss of accuracy when compared to proper per-axis
quantization as we don't have the original data from training any more.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34497>
2025-04-17 05:25:49 +00:00
Philipp Zabel
ce9030740a teflon: Allow per-axis quantization
Allow per-axis quantization in the output channel dimension.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34497>
2025-04-17 05:25:49 +00:00
Tomeu Vizoso
7dfcca9007 etnaviv/ml: Fix zero point values for signedness
Take into account the signedness for FullyConnected.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34497>
2025-04-17 05:25:49 +00:00
Tomeu Vizoso
d88f0b8f3c etnaviv/ml: Reorder dimensions in convolutions
The blob does this, and doesn't seem to just be for performance as I see
some tests being fixed by it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34497>
2025-04-17 05:25:49 +00:00
Thomas H.P. Andersen
d55a69e769 nak: make is_fneg_zero detect -rZ
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
fold_imm starts with this check:
        let SrcRef::Imm32(mut u) = self.src_ref else {
            return *self;
        };

For -rZ we thus return early and the matching in is_fneg_zero does not
find it. This MR adds a match for SrcRef::Zero + SrcMod::FNeg.

This lets copy propagation fold this:

r3  = shfl.bfly r2 0x2 0x1c03
r3  = fswzadd.ftz r3 r2 [sub, sub, subr, subr]
r3  = fadd.ftz -rZ |r3|
r16 = shfl.bfly r2 0x1 0x1c03
r16 = fswzadd.ftz r16 r2 [sub, subr, sub, subr]
r16 = fadd.ftz -rZ |r16|
r3  = fadd.ftz r16 r3

into:

r3  = shfl.bfly r2 0x2 0x1c03
r3  = fswzadd.ftz r3 r2 [sub, sub, subr, subr]
r16 = shfl.bfly r2 0x1 0x1c03
r16 = fswzadd.ftz r16 r2 [sub, subr, sub, subr]
r3  = fadd.ftz |r16| |r3|

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12480
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33107>
2025-04-17 02:22:02 +00:00
Faith Ekstrand
47fc468944 nak/sm70: Fix the bit74_75_ar_mod assert
It's used for src2, not src0.

Fixes: 40422927dc ("nak: Pass has_mod to all form of src2 requiring it")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33107>
2025-04-17 02:22:02 +00:00
Faith Ekstrand
328112c6bc nak/legalize: Take a RegFile in copy_alu_src_and_lower_ineg()
Fixes: af6093a712 ("nak/legalize: Add a helper for lowering ineg")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33107>
2025-04-17 02:22:02 +00:00
Faith Ekstrand
22a30bfa4f nak/legalize: Take a RegFile in copy_alu_src_and_lower_fmod
Otherwise, we'll screw up uniform GPRs.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33107>
2025-04-17 02:22:02 +00:00
Caio Oliveira
d5ad798140 spirv, radv, intel: Add NIR intrinsic for cmat conversion
A cooperative matrix conversion operation was represented in NIR by the
cmat_unary_op intrinsic with an nir_alu_op as extra parameter,
that was already lowered to a specific conversion operation
based on the matrix types.

Instead of that, add a new intrinsic `cmat_convert` that is specific
for that conversion.  In addition to the src/dst matrix descriptions
already available, also include the signedness information in the
intrinsic (reuse nir_cmat_signed for that).  This is needed because
different Convert operations define different interpretations for
integers, regardless their original type.

In this patch, both radv and intel were changed to use the same logic
that was previously used to pick the lowered ALU op.

This change will help represent cmat conversions involving BFloat16,
because it avoids having to create new NIR ALU ops for all the
combinations involving BFloat16.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34511>
2025-04-16 23:13:36 +00:00
Valentine Burley
2f02fa5db4 intel/ci: Start using the new 6.14 kernel on JSL
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The new 6.14 kernel in gfx-ci linux is now stable on Jasper Lake, so drop
the kernel override from the anv-jsl-vk job.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34553>
2025-04-16 22:13:19 +00:00
Patrick Lerda
60a31156b0 mesa_interface: fix legacy dri2 compatibility
These values are shared with xcb/dri2.h, and can't be changed
without breaking the legacy dri2 compatibility. This change
reverses partially the update done by 3b603d1646.

For instance this issue is triggered on dri2 i915 with
"piglit/bin/glx-copy-sub-buffer -auto" or
"piglit/bin/hiz-depth-read-window-stencil0 -auto".

Fixes: 3b603d1646 ("mesa_interface: remove unused stuff")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34561>
2025-04-16 20:19:14 +00:00
Mike Blumenkrantz
de6efc01c1 zink: verify that surface exists when adding implicit feedback loop
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
this can be null if multiple contexts are in use

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34557>
2025-04-16 18:26:32 +00:00
Tomeu Vizoso
251d1e2551 etnaviv/ml: Use etna_buffer_resource instead of etna_resource
Otherwise we hit an assert in newly added code.

Fixes: d738b3ea2b ("etnaviv: split PIPE_BUFFER resources from other types of resources")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34481>
2025-04-16 17:53:39 +00:00
Tomeu Vizoso
1f5bc6ddbf etnaviv/tests: Add comment on why the SSDLite MobileDet test fails
So we don't waste time debugging it again.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34481>
2025-04-16 17:53:39 +00:00
Tomeu Vizoso
0213eef3b3 teflon/tests: Dump output buffers to disk
It can be convenient to compare the outputs from the CPU, proprietary
driver and Mesa to check for convergence.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34481>
2025-04-16 17:53:39 +00:00
Tomeu Vizoso
80e09e9b1f teflon/tests: Divide the tolerance level by a constant
A final tolerance of 0.6 seems to be about right for big models with
per-channel quantization.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34481>
2025-04-16 17:53:39 +00:00
Tomeu Vizoso
15a8c49ad5 teflon/tests: Print shorter negative INT8s
As we know that only the last 8 bits are relevant.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34481>
2025-04-16 17:53:39 +00:00
Tomeu Vizoso
554fb8af11 teflon/tests: Take into account signedness when checking the output tensors
Otherwise, it won't be able to apply the tolerance in all cases.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34481>
2025-04-16 17:53:39 +00:00
Tomeu Vizoso
b3746305ea teflon/tests: Test all models in /models
It was becoming quite tedious to add models to testing.

This will also make it easier to locally test with non-redistributable
models.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34481>
2025-04-16 17:53:39 +00:00
Tomeu Vizoso
68200ac961 teflon/tests: Use a single tolerance value
We have improved our accuracy and can use just a tolerance of 2 for all
the tests we currently have.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34481>
2025-04-16 17:53:39 +00:00