Commit graph

192442 commits

Author SHA1 Message Date
Karol Herbst
aae84eccfa rusticl/platform: add perf debug option
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30324>
2024-07-24 11:07:52 +00:00
Mary Guillemard
b3cd3b0ed4 panvk: Implement CmdBindDescriptorSets2KHR, CmdPushConstants2KHR and CmdPushDescriptorSet2KHR
Those are part of maintenance6.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30293>
2024-07-24 10:46:00 +00:00
Mary Guillemard
0329070233 panvk: Emit viewport when state is NULL
When rasterizerDiscardEnable is active, it is allowed to have viewport
and scissor disabled.

In case we don't have any viewport defined we now define an empty one.

This is required for
"dEQP-VK.api.pipeline.pipeline_invalid_pointers_unused_structs.graphics"
as it never set any viewports and cause fault on IDVS jobs as a result.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30293>
2024-07-24 10:46:00 +00:00
Mary Guillemard
cec45cac84 panvk: Fix image support in vertex jobs
There were various bugs causing images access to fault.

This fixes
"dEQP-VK.memory.pipeline_barrier.host_write_storage_buffer.*" and
possibly other tests.

Fixes: 7bea6f8612 ("panvk: Overhaul the Bifrost descriptor set implementation")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30293>
2024-07-24 10:46:00 +00:00
Mary Guillemard
3b1b672849 panvk: Implement CmdPushDescriptorSetWithTemplate2KHR
We don't support maintenance6 yet but this is needed for
"dEQP-VK.binding_model.shader_access.secondary_cmd_buf.bind.with_push_template.*".

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30293>
2024-07-24 10:46:00 +00:00
Mary Guillemard
6b9db2108d docs: Add panvk in VK_EXT_private_data to features.txt
Was missing from the commit enabling it.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30293>
2024-07-24 10:46:00 +00:00
Mary Guillemard
af998eb2bf panvk: Update CI fails
Found with a full run without fraction, seems to have been present for a
while.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30293>
2024-07-24 10:46:00 +00:00
Eric Engestrom
e634acaf88 docs: add stub header for u_format_gen.h
Warning, treated as error:
docs/isl/aux-surf-comp.rst:51:docs/../src/util/format/u_formats.h:33: 'util/format/u_format_gen.h' file not found

Fixes: e05415a82e ("format: Generate endian-independent format aliases")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30339>
2024-07-24 11:26:39 +02:00
Juan A. Suarez Romero
c30e5d44b1 v3d/ci: add new flakes
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30337>
2024-07-24 09:19:05 +02:00
Icenowy Zheng
e16a74c023 llvmpipe: add LoongArch support in ORCJIT
LoongArch is an architecture too new to have MCJIT support.

Add its support to ORCJIT code.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30197>
2024-07-24 00:59:23 +00:00
Icenowy Zheng
979c364018 gallivm: add LoongArch support to the mattrs setting code
Currently the mattrs is set according to the softdev convention, with
LSX explicitly disabled because it's troublesome at least on LLVM 17.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30197>
2024-07-24 00:59:23 +00:00
Icenowy Zheng
08425d9aaf util: detect LoongArch architecture
Only 64-bit is considered now because 32-bit LoongArch Linux support
doesn't exist in upstream yet.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30197>
2024-07-24 00:59:23 +00:00
Faith Ekstrand
fd83fc4bfb nak: Don't emit barrier ops for shared memory pre-Volta
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28084>
2024-07-23 21:12:04 +00:00
Faith Ekstrand
25eb6c8206 nak: Disable opt_jump_thread pre-Volta
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28084>
2024-07-23 21:12:04 +00:00
Faith Ekstrand
9acacccff7 nak/sm50: Emit sync instructions for control-flow
Whenever we can, we emit the sync instruction instead of a branch.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28084>
2024-07-23 21:12:04 +00:00
Faith Ekstrand
87fa8a788c nak: Add more NIR wrappers for walking the NIR CFG
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28084>
2024-07-23 21:12:04 +00:00
Faith Ekstrand
97d2187f48 nak/sm50: Add control-flow sync ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28084>
2024-07-23 21:12:04 +00:00
Faith Ekstrand
d6de61cb7e nak: Drop the old encode_sm*.rs files
I don't know how these didn't get dropped earlier.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28084>
2024-07-23 21:12:04 +00:00
Faith Ekstrand
8bf3213a54 nak/spill_values: Don't assume no trivial phis
Thanks to LCSSA, we can absolutely have phis with only one source and we
need to handle those in spilling.  Fortunately, there's nothing really
special about that case.  I was just prematurely optimizing.

Fixes: bcad2add47 ("nak: Add a spilling pass")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28084>
2024-07-23 21:12:04 +00:00
Christian Gmeiner
305bf503e7 dri: fix driver names
All the driver reports itself with a hyphen here, so they all stopped
loading completely after 50fc7cc290. Check each of them with the latest
kernel sources.

Fixes: 50fc7cc290 ("glx: directly link to gallium")

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30330>
2024-07-23 22:32:07 +02:00
Erico Nunes
0bdc2f180f dri: fix sun4i-drm driver name
The driver reports itself as sun4i-drm with a hyphen here, so
it stopped loading completely after 50fc7cc290.

Fixes: 50fc7cc290 ("glx: directly link to gallium")
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30326>
2024-07-23 19:27:25 +00:00
Karol Herbst
3b6867f53a nak: fix clippy::if_same_then_else error
Fixes: 9321a785cf ("nak: Implement Foldable for OpShf")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30323>
2024-07-23 18:21:18 +00:00
Karol Herbst
526a572233 nak: allow clippy::not_unsafe_ptr_arg_deref lints
Clippy errors on this, so just allow it here.

Fixes: b9c0e3c1ab ("nak: Add helpers for filling QMDs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30323>
2024-07-23 18:21:18 +00:00
Yiwei Zhang
6d0273f67a anv: improve vma usage for descriptor buffer
The dynamic visible memory type (or the prior descriptor buffer memory
type) doesn't need special aux-tt alignment or additional ccs space.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30317>
2024-07-23 17:56:20 +00:00
Ruijing Dong
8a5ef9413b radeonsi/vcn: add HDR metadata obu in av1enc
Enable HDR metadata obu in av1 encoder for
both vcn4/5.

Reviewed-by: David Rosca <david.rosca@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30237>
2024-07-23 17:16:21 +00:00
Ruijing Dong
fc4abbe27d frontends/va: rework VAConfigAttribEncPackedHeaders query
to make it easy to add new values.
enable av1 meta data as the input packed header

Reviewed-by: David Rosca <david.rosca@amd.com>
Signed-off-by: David Rosca <david.rosca@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30237>
2024-07-23 17:16:21 +00:00
Ruijing Dong
aa86c3a235 radeonsi/vcn: input av1 hdr metadata
get av1 hdr metadata from frontends.

Reviewed-by: David Rosca <david.rosca@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30237>
2024-07-23 17:16:21 +00:00
Ruijing Dong
8ea977ca5e frontends/va: check av1 enc hdr metadata
Decode packed header HDR metadata
for av1 encoding.

Reviewed-by: David Rosca <david.rosca@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30237>
2024-07-23 17:16:21 +00:00
Ruijing Dong
35e4d0db9c radeonsi/vcn: add new function for obu_header
add a function for av1_obu_header.

Reviewed-by: David Rosca <david.rosca@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30237>
2024-07-23 17:16:21 +00:00
Ruijing Dong
94d881e621 radeonsi/vcn: correct a typo in a variable
from spliting to splitting

Reviewed-by: David Rosca <david.rosca@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30237>
2024-07-23 17:16:21 +00:00
Juan A. Suarez Romero
559eaaf0e6 v3d/ci: add failures from piglit all profile
While we don't run this profile in the CI, our expected lists already
have some tests from old days when we run the all profile.

So let's update the list with new failures from this all profile,
allowing us to have a more comprehensive list of failing tests for our
drivers.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30318>
2024-07-23 16:52:13 +00:00
Marek Olšák
d90080b51b nir/opt_vectorize_io: optionally don't vectorize IO with different types
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11443

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29895>
2024-07-23 16:13:17 +00:00
Marek Olšák
07ef1a8124 ac,radeonsi: set 16-bit flags in io_options optimally
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29895>
2024-07-23 16:13:17 +00:00
Marek Olšák
709ebd8293 amd: expose nir_io_mix_convergent_flat_with_interpolated
The drivers need to invert how they gather flat inputs.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29895>
2024-07-23 16:13:17 +00:00
Marek Olšák
9bfea3183a nir/opt_varyings: improve convergent input handling to fix data corruption
Backward inter-shader code motion can move any code into the previous
shader if it only uses convergent inputs. The problem is the final input
type can end up being integer or FP64, which is incompatible with
the assumption that convergent inputs can always be interpolated.

If such a case occurs and the type is integer or FP64, either don't
do any code motion, or if the driver exposes the new flag, rewrite
convergent  loads to use load_input.

If the new flag is supported, all convergent loads are rewritten to use
load_input, and flat varyings are allowed to be classified as convergent,
which means they are packed into interpolated vec4 slots if there are
unused components.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29895>
2024-07-23 16:13:16 +00:00
Marek Olšák
b2d32ae246 nir: add nir_intrinsic_load_per_primitive_input, split from io_semantics flag
Instead of having 1 bit in nir_io_semantics indicating a per-primitive
FS input, add a dedicated intrinsic for it.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29895>
2024-07-23 16:13:16 +00:00
Marek Olšák
ecfefe823e nir/opt_algebraic: use fmulz for fpow lowering to fix incorrect rendering
The original implementation in all radeon drivers had this behavior.

Fixes: 9bc1fb4c07 - ac/llvm,radeonsi: lower nir_fpow for aco and llvm
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11464

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30069>
2024-07-23 15:23:27 +00:00
Ganesh Belgur Ramachandra
ec4e5ef0f7 amd/common: skip lane size determination for chips without image opcodes (e.g. gfx940)
This fixes VAAPI decode performance issues.

Fixes: 5b3e1a0532 ("radeonsi: change the compute blit to clear/blit multiple pixels per lane")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30273>
2024-07-23 14:50:37 +00:00
Ganesh Belgur Ramachandra
0cb3ace969 radeonsi: fix eptich on chips without image opcodes (e.g. gfx940)
This fixes VAAPI decode corruption issues.

Fixes: 26cd3a1718 ("ac,radv,radeonsi: add a helper to set mutable tex desc fields")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30273>
2024-07-23 14:50:37 +00:00
Rhys Perry
cccfbe6141 aco: move s_setprio to before NGG exec initialization
fossil-db (gfx1150):
Totals from 32 (0.04% of 79395) affected shaders:
Instrs: 17397 -> 17365 (-0.18%)
CodeSize: 83700 -> 83580 (-0.14%)
Latency: 59006 -> 58974 (-0.05%)

fossil-db (navi21):
Totals from 4 (0.01% of 79395) affected shaders:

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/30241>
2024-07-23 13:14:52 +00:00
Rhys Perry
4574cd9fae aco: form export clauses
This is useful for the export priority workaround. It also moves
copy/conversion instructions up from in-between exports.

fossil-db (gfx1150):
Totals from 9974 (12.56% of 79395) affected shaders:
Instrs: 7038168 -> 6949186 (-1.26%)
CodeSize: 37988148 -> 37632220 (-0.94%)
Latency: 44759046 -> 44324922 (-0.97%); split: -0.97%, +0.00%
InvThroughput: 8213681 -> 8201222 (-0.15%); split: -0.15%, +0.00%

fossil-db (navi21):
Totals from 16785 (21.14% of 79395) affected shaders:
Instrs: 9282414 -> 9282302 (-0.00%)
CodeSize: 50252480 -> 50252032 (-0.00%)
Latency: 59716988 -> 59610334 (-0.18%); split: -0.18%, +0.00%
InvThroughput: 12681965 -> 12680380 (-0.01%); split: -0.01%, +0.00%

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/30241>
2024-07-23 13:14:52 +00:00
Rhys Perry
08a4853ffd aco: add export instructions to should_form_clause
fossil-db (gfx1150):
Totals from 1 (0.00% of 79395) affected shaders:
Instrs: 906 -> 901 (-0.55%)
CodeSize: 4692 -> 4672 (-0.43%)
Latency: 1582 -> 1561 (-1.33%)

fossil-db (navi21):
Totals from 9917 (12.49% of 79395) affected shaders:
Instrs: 6120530 -> 6116252 (-0.07%)
CodeSize: 31808916 -> 31791804 (-0.05%)
Latency: 23854892 -> 23866438 (+0.05%); split: -0.01%, +0.06%
InvThroughput: 4655278 -> 4655490 (+0.00%); split: -0.00%, +0.01%

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/30241>
2024-07-23 13:14:52 +00:00
Rhys Perry
3b732340ec aco/gfx11.5: skip dealloc_vgprs for stages with exports
fossil-db (gfx1150):
Totals from 72997 (91.94% of 79395) affected shaders:
Instrs: 35047397 -> 34679136 (-1.05%)
CodeSize: 182414292 -> 180934440 (-0.81%)
Latency: 225452700 -> 225045411 (-0.18%)
InvThroughput: 40416910 -> 40395608 (-0.05%); split: -0.06%, +0.00%
Branches: 604968 -> 601660 (-0.55%)

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/30241>
2024-07-23 13:14:52 +00:00
Rhys Perry
492d99fc6a aco: add tests for export priority issue
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/30241>
2024-07-23 13:14:51 +00:00
Rhys Perry
0919ce1ac4 aco/gfx11.5: workaround export priority issue
https://github.com/llvm/llvm-project/pull/99273

fossil-db (gfx1150):
Totals from 73996 (93.20% of 79395) affected shaders:
Instrs: 36015357 -> 36807177 (+2.20%)
CodeSize: 189072544 -> 192238748 (+1.67%)
Latency: 245845181 -> 246790550 (+0.38%); split: -0.00%, +0.38%
InvThroughput: 45068018 -> 45116177 (+0.11%); split: -0.00%, +0.11%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Backport-to: 24.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30241>
2024-07-23 13:14:51 +00:00
Dylan Baker
55158bed7f util/glsl2spirv: only copy the input file if we're going to change it
Should make the build slightly faster by only copying when we actually
need to, and otherwise pointing at the original source

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30132>
2024-07-23 11:07:04 +00:00
Dylan Baker
36160c967c util/glsl2spirv: fixup the generated depfile when copying sources
So that the depfile contains a reference to the original source rather
than the copied one. This is necessary to avoid ninja not finding the
copy and causing spurious rebuilds when the copy has been removed, as
well as correctly tracking changes to the input files.

fixes: 46644ba371

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30132>
2024-07-23 11:07:03 +00:00
Vlad Schiller
848c7c9560 pvr: Handle VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO
This commit silences a debug message, which can get quite spammy.

Fixes: a2e0701 ("pvr: Enable KHR_image_format_list")
Signed-off-by: Vlad Schiller <vlad-radu.schiller@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30222>
2024-07-23 10:44:21 +00:00
Vlad Schiller
eda77bf79d pvr: Handle VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO
This commit silences a debug message, which can get quite spammy.

Fixes: 8991e64 ("pvr: Add a Vulkan driver for Imagination Technologies PowerVR Rogue GPUs")
Signed-off-by: Vlad Schiller <vlad-radu.schiller@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30222>
2024-07-23 10:44:21 +00:00
Eric Engestrom
aed5a974e9 meson: xcb & xcb-randr are needed by the loader whenever x11 is built
Specifically, `src/loader/loader_dri_helper.c` needs them.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11536
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30292>
2024-07-23 09:16:55 +00:00