Mike Blumenkrantz
7b17dbd0c0
util/dynarray: add util_dynarray_resize_zero()
...
convenience function(s) to zero the new allocation and avoid bugs
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34654 >
2025-04-22 15:29:34 +00:00
Tomeu Vizoso
a99e5be446
teflon: Release the arrays of tensors in operations
...
We were leaking the arrays themselves. Also reorder the dereferencing of
the tensors to get the lifecycle right.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34627 >
2025-04-22 14:58:34 +00:00
Tomeu Vizoso
63251d43ae
etnaviv: Release screen->dummy_desc_reloc.bo
...
We are currently trying to release twice the same dummy BO, while
leaking the other one.
Fixes: bca5ef70a4 ("etnaviv: split dummy RT backing store from reloc")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34627 >
2025-04-22 14:58:34 +00:00
Tomeu Vizoso
113143a470
teflon/tests: Read model data with mmap, for speed
...
It was being a bit uncomfortable testing big models otherwise.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34627 >
2025-04-22 14:58:34 +00:00
Tomeu Vizoso
baafa9172a
etnaviv/ml: Rework tensor addition on V8
...
Though the V7 approach works most of the time on V8, there are some
situations in which we generate incorrect instructions but we don't know
why it doesn't work on V8.
This commit brings this driver's behavior more in line with the
proprietary driver's behavior and fixes those instances.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34627 >
2025-04-22 14:58:34 +00:00
Tomeu Vizoso
104309ede3
etnaviv/ml: Support padding the channels dimension
...
Extend the TP job for padding.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34627 >
2025-04-22 14:58:34 +00:00
Tomeu Vizoso
4a951a73e7
teflon: Support more Pad configurations
...
Add support for padding along the channels dimension.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34627 >
2025-04-22 14:58:34 +00:00
Tomeu Vizoso
c31ce2d71f
etnaviv/ml: Fix depthwise convolutions
...
Those with padding, stride and input smaller than the kernel size.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34627 >
2025-04-22 14:58:34 +00:00
Georg Lehmann
3e26fc4498
nir/opt_algebraic: disable fsat(a + 1.0) opt if a can be NaN
...
Foz-DB Navi21:
Totals from 9 (0.01% of 79789) affected shaders:
Instrs: 6782 -> 6796 (+0.21%); split: -0.03%, +0.24%
CodeSize: 40020 -> 40108 (+0.22%); split: -0.04%, +0.26%
Latency: 23764 -> 23758 (-0.03%)
InvThroughput: 6424 -> 6431 (+0.11%); split: -0.08%, +0.19%
SClause: 273 -> 275 (+0.73%)
Copies: 338 -> 339 (+0.30%)
VALU: 5138 -> 5147 (+0.18%); split: -0.06%, +0.23%
SALU: 349 -> 350 (+0.29%)
SMEM: 498 -> 500 (+0.40%)
Fixes: a4a3487aae ("nir/opt_algebraic: optimize patterns from Skia")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34125 >
2025-04-22 14:23:05 +00:00
Georg Lehmann
a60d61cce8
nir: improve fadd is_a_number analysis by using the range
...
Foz-DB Navi21:
Totals from 145 (0.18% of 79789) affected shaders:
Instrs: 168553 -> 168391 (-0.10%); split: -0.10%, +0.00%
CodeSize: 926708 -> 926684 (-0.00%)
Latency: 2210456 -> 2210329 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 545992 -> 545768 (-0.04%)
SClause: 3084 -> 3085 (+0.03%)
VALU: 129521 -> 129360 (-0.12%)
SALU: 13085 -> 13084 (-0.01%)
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34125 >
2025-04-22 14:23:05 +00:00
Georg Lehmann
a6fd9f488a
nir: add is_a_number analysis for ffma
...
Foz-DB Navi21:
Totals from 508 (0.64% of 79789) affected shaders:
Instrs: 796183 -> 795838 (-0.04%)
CodeSize: 4303420 -> 4303384 (-0.00%); split: -0.00%, +0.00%
Latency: 7806095 -> 7805458 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 1377028 -> 1376824 (-0.01%); split: -0.01%, +0.00%
Copies: 63297 -> 63299 (+0.00%); split: -0.00%, +0.00%
PreVGPRs: 29818 -> 29819 (+0.00%)
VALU: 562067 -> 561885 (-0.03%); split: -0.03%, +0.00%
SALU: 89896 -> 89733 (-0.18%)
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34125 >
2025-04-22 14:23:05 +00:00
Georg Lehmann
cb6d035925
nir: add range analysis for ffmaz
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34125 >
2025-04-22 14:23:05 +00:00
Georg Lehmann
8ad695195e
nir/opt_algebraic: turn exact fmin(1.0, a) into fsat if a is not NaN and not negative
...
Foz-DB Navi21:
Totals from 2456 (3.08% of 79789) affected shaders:
Instrs: 3415398 -> 3413352 (-0.06%); split: -0.06%, +0.00%
CodeSize: 18781096 -> 18776092 (-0.03%); split: -0.03%, +0.00%
VGPRs: 158512 -> 158528 (+0.01%)
Latency: 39528900 -> 39526687 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 10612237 -> 10609296 (-0.03%); split: -0.03%, +0.00%
VClause: 71028 -> 71034 (+0.01%)
SClause: 93971 -> 93975 (+0.00%); split: -0.00%, +0.01%
Copies: 257525 -> 257521 (-0.00%); split: -0.01%, +0.01%
VALU: 2483374 -> 2481325 (-0.08%); split: -0.09%, +0.00%
SALU: 348207 -> 348211 (+0.00%)
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34125 >
2025-04-22 14:23:04 +00:00
Georg Lehmann
18a0de1834
nir/opt_algebraic: optimize fmax(ffma(a, b, c), 0.0) to fsat
...
Foz-DB Navi21:
Totals from 2621 (3.28% of 79789) affected shaders:
MaxWaves: 55744 -> 55736 (-0.01%)
Instrs: 2840180 -> 2832647 (-0.27%); split: -0.27%, +0.00%
CodeSize: 15497364 -> 15464692 (-0.21%); split: -0.21%, +0.00%
VGPRs: 138448 -> 138456 (+0.01%)
Latency: 22319512 -> 22307018 (-0.06%); split: -0.06%, +0.01%
InvThroughput: 5745108 -> 5729197 (-0.28%); split: -0.28%, +0.00%
Copies: 110279 -> 110268 (-0.01%); split: -0.04%, +0.03%
VALU: 2210578 -> 2203211 (-0.33%); split: -0.33%, +0.00%
SALU: 169014 -> 168841 (-0.10%)
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34125 >
2025-04-22 14:23:04 +00:00
Georg Lehmann
f71fc26393
nir/opt_algebraic: generalize fmax(fadd(a, b), 0.0) to fsat by not requiring fneg
...
Not a large effect, but it's positive and makes the pattern simpler.
Foz-DB Navi21:
Totals from 1 (0.00% of 79789) affected shaders:
Instrs: 145 -> 138 (-4.83%)
CodeSize: 784 -> 756 (-3.57%)
Latency: 1495 -> 1487 (-0.54%)
InvThroughput: 210 -> 196 (-6.67%)
VALU: 103 -> 96 (-6.80%)
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34125 >
2025-04-22 14:23:04 +00:00
Alyssa Rosenzweig
1050c69833
libagx: drop libagx_sub_sat
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
should optimize in nir if needed.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34638 >
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
bfc18b6fb1
libagx: drop libagx_popcount
...
use the common
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34638 >
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
9c4660d1a6
libagx: use #pragma once in geometry.h
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34638 >
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
63a2831967
agx/nir_lower_tess: drop dead todo
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34638 >
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
41960652e1
agx/nir_lower_tess: drop pointless helpers
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34638 >
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
2a065fc446
agx/nir_lower_gs: use common nir_verts_in_output_prim
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34638 >
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
ea209c98fc
agx/nir_lower_gs: drop silly fwd decl
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34638 >
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
ba9f86df51
agx/nir_lower_gs: privatize lower_output_to_var_state
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34638 >
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
d42a92fd93
agx/nir_lower_gs: clean up more state->info
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34638 >
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
470f226ed8
agx/nir_lower_gs: remove silly comment
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34638 >
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
1017095c5a
agx/nir_lower_gs: clean up state/info duplication
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34638 >
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
753e3ba55b
asahi,hk: use indirect-local dispatches for GS
...
this gets us good workgroup sizes even for indirect draws with GS.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34638 >
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
70c805d863
hk: bump wg sizes for geometry shader
...
match GL driver, should help perf.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34638 >
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
164fc8a158
agx/nir_lower_gs: clean comment
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34638 >
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
b9b6828fda
agx/nir_lower_gs: optimize static topologies
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34638 >
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
3da8939197
libagx: factor out _libagx_end_primitive
...
so we can use from the cpu.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34638 >
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
d2cc7f38d3
asahi: optimize out empty dispatches
...
this occurs with GS lowering.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34638 >
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
b916c38c76
hk: optimize out empty dispatches
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34638 >
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
f6ee36a437
agx: add agx_is_shader_empty helper
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34638 >
2025-04-22 12:47:54 +00:00
Alyssa Rosenzweig
f1aeb46a34
nir: factor out nir_verts_in_output_prim helper
...
very useful for geometry shader lowering code.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34638 >
2025-04-22 12:47:54 +00:00
Vignesh Raman
6c33b1e8c1
ci: replace s3_upload wrapper with ci-fairy s3cp
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Now that ci-fairy s3cp works, replace the s3_upload curl wrapper with
ci-fairy s3cp command.
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34550 >
2025-04-22 11:17:16 +00:00
Vignesh Raman
4b3b3d4c70
ci: use MESA_TEMPLATES_COMMIT for ci-fairy install
...
Use MESA_TEMPLATES_COMMIT instead of hard-coding the commit hash in
pip install ci-fairy.
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34550 >
2025-04-22 11:17:16 +00:00
Vignesh Raman
c4aeef02e2
ci: bump ci-templates
...
This is required for ci-fairy s3cp to work.
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34550 >
2025-04-22 11:17:16 +00:00
Jayanth Vutukuri
ba64e92641
Add libzstd static library.
...
From AOSP 15, getting linking error as
"ld.lld: error: undefined symbol: ZSTD_*" during compilation.
libzstd will link as static library to libelf and this libelf
is being included in mesa3d.
https://android-review.googlesource.com/c/platform/external/elfutils/+/2826411
is the patch from AOSP which is causing build issue.
Signed-off-by: Jayanth Vutukuri <Jayanth.Vutukuri@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34522 >
2025-04-22 11:08:10 +00:00
Boris Brezillon
de78a75f13
panvk: Set .pushDescriptor=true
...
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We already claim support for VK_KHR_push_descriptor, so we de-facto
support pushDescriptor.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Olivia Lee <benjamin.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34640 >
2025-04-22 09:09:57 +02:00
Boris Brezillon
5b7e5db149
panvk: Advertise support for VK_EXT_vertex_input_dynamic_state
...
This is already supported, nothing to do here.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Olivia Lee <benjamin.lee@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34640 >
2025-04-22 09:09:48 +02:00
Yinjie Yao
2b5ca87927
gallium/pipe: Increase hevc max slice to 600
...
According to the spec, increase max supported slices of hevc to 600.
Cc: mesa-stable
Signed-off-by: Yinjie Yao <yinjie.yao@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34632 >
2025-04-22 06:14:21 +00:00
Mel Henning
0f65c858ea
nak: Add test for lea disasm.
...
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/34334 >
2025-04-21 23:42:55 +00:00
Mel Henning
5f5cb088a9
nak: Disable cbuf textures on blackwell
...
There are bound texture forms on blackwell, but they don't correspond
directly to the cbuf textures we have on sm70. Switch to only bindless
for now.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34334 >
2025-04-21 23:42:55 +00:00
Mel Henning
fd90b072f1
nak: sm100+ texture encodings
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34334 >
2025-04-21 23:42:55 +00:00
Mel Henning
f70b7d10c2
nak: Fix sm90+ atomg/redg encoding
...
and add a test for ld, st, atom
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34334 >
2025-04-21 23:42:55 +00:00
Mel Henning
869452aaf0
nak: Remove range parameter from set_atom_type
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34334 >
2025-04-21 23:42:55 +00:00
Mel Henning
2b82184250
nak: Add nvdisasm_tests
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34334 >
2025-04-21 23:42:55 +00:00
Mel Henning
d31172d092
nvk: Remove dead function nvk_meta_init_render
...
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/34644 >
2025-04-21 22:23:33 +00:00
Mel Henning
2fc4c98aaf
nvk: Override render enable for blits and resolves
...
Fixes cts tests:
dEQP-VK.conditional_rendering.conditional_ignore.blit_image
dEQP-VK.conditional_rendering.conditional_ignore.blit_image_inverted
dEQP-VK.conditional_rendering.conditional_ignore.resolve_image
dEQP-VK.conditional_rendering.conditional_ignore.resolve_image_inverted
which were introduced in vk-gl-cts commit 4aa277c300
Fixes: 32f2317223 ("nvk: Use meta for doing blits with the 3D hardware")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34644 >
2025-04-21 22:23:33 +00:00