Commit graph

184878 commits

Author SHA1 Message Date
Joshua Ashton
735fe243a7 android: Use system = 'android' in crossfile
Fixes the following libarchive error when building with the libarchive wrap subproject:

In file included from ../subprojects/libarchive-3.7.2/libarchive/archive_write_open_memory.c:33:
../subprojects/libarchive-3.7.2/libarchive/archive.h:101:10: fatal error: 'android_lf.h' file not found

This also removes the version suffixes from the .so's that are referenced
in the mesa3d_cross.mk file as those are not present on the Android target.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27648>
2024-02-19 08:42:26 +00:00
Samuel Pitoiset
10b8e52780 radv: disable conditional rendering if enabled when preprocessing DGC
vkCmdPreprocessGeneratedCommandsNV() shouldn't be affected by
conditional rendering. Confirmed with Ricardo after writing some
tests against NVIDIA.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27658>
2024-02-19 08:07:41 +01:00
Samuel Pitoiset
5b0e4dd6e8 radv: stop using conditional rendering internally when preprocessing DGC
Preprocess and execute can be executed on different queue families. If
preprocess is executed on GFX and the indirect count optimization is
enabled, this will generate an empty cmdbuf. Expect GPU hangs if this
DGC IB is then executed on ACE.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27658>
2024-02-19 08:05:13 +01:00
Mike Blumenkrantz
893780b362 mesa: check driver format support for certain GetInternalformativ queries
according to spec, these should return NONE if the format is
not supported for a given texture target, but mesa was incorrectly
returning a hardcoded value for all cases without checking the driver

instead, check whether the driver can create a texture for a given
format to correctly handle this non-support case

cc: mesa-stable

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27621>
2024-02-17 16:27:20 +00:00
Bas Nieuwenhuizen
c7b2ac3377 radv: Remove ray_launch_size_addr_amd system value.
Not used anymore, so clean it up.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27664>
2024-02-17 11:08:16 +00:00
Marek Olšák
f933536517 winsys/amdgpu: enable unlimited number of parallel queues for VCN
This fixes a VCN performance regression introduced by the new BO fence
tracking mechanism.

VCN can have many queues. The current BO fence tracking mechanism only
supports 1 queue per IP, and there is an interest to use all VCN queues via
VAAPI. This introduces an alternative BO fence tracking mechanism that is
only enabled for VCN, supports unlimited parallel queues, is similar to
the previous system, can co-exist with the current queue system, and has no
negative impact on CPU overhead as long as it's only used by VCN.

Since we want an unlimited number of queues, we can't generate our own
sequence numbers for those queues. Instead, each buffer will have a new
field "alt_fence", which means an alternative fence. This fence is the last
use of that buffer on any VCN queue. If any other queue wants to use that
buffer, it has to insert alt_fence as a dependency, and replace alt_fence
with the new submitted fence, so that it's always equal to the last use.

Only VCN uses and updates alt_fence when an IB is submitted. Other IPs only
use alt_fence as a fence dependency. alt_fence is NULL when VCN isn't used,
so there is no negative impact on CPU overhead in that case.

It uses a C++ template for amdgpu_cs_submit_ib due to different BO loop
bodies between normal queues and VCN. Those loop bodies execute for every
BO, so they shouldn't have extra code for alt_fence if the queue doesn't
update it.

Acked-and-Tested-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27627>
2024-02-17 03:06:32 +00:00
Marek Olšák
3e118c6d2f winsys/amdgpu: convert amdgpu_cs.c to .cpp
it will use a C++ template

Acked-and-Tested-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27627>
2024-02-17 03:06:32 +00:00
José Roberto de Souza
7475b105d2 docs/anv: Add recommended GuC firmware version
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27657>
2024-02-17 01:34:27 +00:00
Yiwei Zhang
0ec231cb51 venus: simplify feedback types tracking during submission
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27649>
2024-02-16 23:51:22 +00:00
Yiwei Zhang
c320203f4c venus: misc cleanups for queue submission
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27649>
2024-02-16 23:51:22 +00:00
Yiwei Zhang
7a6979f937 venus: use vn_cached_storage for vn_queue_submission allocs
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27649>
2024-02-16 23:51:22 +00:00
Yiwei Zhang
1e122861da venus: refactor to add vn_cached_storage
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27649>
2024-02-16 23:51:22 +00:00
Yiwei Zhang
0973590579 venus: rewrite fence feedback interception to minimize batches
Previously we always put fence feedback cmd in a new batch appended,
which ends up with a separate execbuf for most drivers. This change
updates to avoid that separate eb except for empty submission with just
a feedback fence.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27649>
2024-02-16 23:51:22 +00:00
Yiwei Zhang
55224006b7 venus: fix the cmd stride used for qfb recording
Not a real issue since the dispatchable handle size is the same.

Fixes: d2a626787e ("venus: track/recycle appended query feedback cmds")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27649>
2024-02-16 23:51:22 +00:00
Echo J
017818a8bf nvk: Implement the VR-related display extensions
xrgears in Monado direct mode seems to work (I haven't tried running
CTS tests though)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27654>
2024-02-16 22:58:58 +00:00
Caio Oliveira
5feb326d80 intel/isl: Include compiler generic header
Instead of including a brw-specific one.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27644>
2024-02-16 22:35:05 +00:00
Caio Oliveira
ae50ac46d1 intel: Remove brw_ prefix from process debug function
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27644>
2024-02-16 22:35:05 +00:00
Caio Oliveira
c773898f39 intel/compiler: Rename brw_gfx_ver_enum.h to intel_gfx_ver_enum.h
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27644>
2024-02-16 22:35:05 +00:00
Caio Oliveira
d8f9a05f32 intel/compiler: Rename the passes and files related to intel_nir.h
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27644>
2024-02-16 22:35:05 +00:00
Caio Oliveira
dc76cfc781 intel/compiler: Collect NIR-only passes in intel_nir.h
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27644>
2024-02-16 22:35:05 +00:00
Sagar Ghuge
24db040a49 anv: Drop warnings for engine initialization failure
We don't have to spit out warnings for the end users. For compute if we
fail to initialize, we are falling back to render for compute operation,

Anyway end-user applications can query what the engines/queues are
supported based on that they can choose to use a specific queue.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27660>
2024-02-16 20:48:17 +00:00
Dylan Baker
876db91350 meson: rework intel-rt option to be a feature
This allows intel-rt to be turned on in cases where we're on x86_64 and
we're building anv, but otherwise default to off, while still giving
users the power to ignore those defaults if they want to.

Because of the use of `feature.disable_if` this bumps the Meson
requirement to 1.1. I can get rid of that, but it just makes for a lot
more code than using the helper methods

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27645>
2024-02-16 18:28:58 +00:00
Dylan Baker
6a126b75e0 meson: drop intel-cl deprecation of 'false'
It maps to `disabled`, which isn't actually an option.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27645>
2024-02-16 18:28:58 +00:00
Faith Ekstrand
19cd3bb721 nvk: Implement VK_EXT_map_memory_placed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27599>
2024-02-16 17:31:04 +00:00
Faith Ekstrand
4092685057 nouveau/winsys: Add a fixed_addr to nouveau_ws_bo_map
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27599>
2024-02-16 17:31:04 +00:00
Faith Ekstrand
be9685e4e7 nvk: Use nouveau_ws_bo_new_mapped() for descriptors
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27599>
2024-02-16 17:31:04 +00:00
Faith Ekstrand
08d13a55e4 vulkan: Update XML and headers to 1.3.278
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27599>
2024-02-16 17:31:04 +00:00
Chia-I Wu
ec5d0ffb04 radv: fix pipeline stats mask
Left-shifting by 11*8 or 14*8 is undefined.  This fixes many
dEQP-VK.query_pool.statistics_query.* failures (but not pre-existing
flakes) for release builds using clang.

Fixes: 48aabaf225 ("radv: do not harcode the pipeline stats mask for query resolves")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27651>
2024-02-16 17:04:30 +00:00
Caio Oliveira
805d45e916 intel/decoder: Move decoder to a separate module
Depends on both intel/common and intel/compiler.  Breaks circular
dependency between these two modules.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27647>
2024-02-16 16:37:31 +00:00
Samuel Pitoiset
7009f00ae0 radv: re-enable GS_FAST_LAUNCH=2 by default on GFX11
The performance issue is fixed. This adds RADV_DEBUG=nogsfastlaunch2
to disable it in case users still report issues with it.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27636>
2024-02-16 15:58:31 +00:00
Samuel Pitoiset
3713f27260 radv: only configure {XYZ_DIM,DRAW_INDEX}_REG for mesh shaders if enabled
This seems to be the root cause of the huge performance issue with
GS_FAST_LAUNCH=2 on RDNA3 dGPUs. Probably a firmware bug, but on dGPUs
only, because on RDNA3 APUs this is just working...

With that GS_FAST_LAUNCH=2 can be re-enabled by default on GFX11.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27636>
2024-02-16 15:58:31 +00:00
Boyuan Zhang
0db2d13af1 radeonsi/vcn: only use multi slices reflist when available
Some frontends interface doesn't provide ref pic lists for HEVC. Therefore
ONLY enabling multislices reflist for frontends that support direct ref pic
list by checking the flag.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10599
Cc: mesa-stable

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27642>
2024-02-16 14:34:09 +00:00
Martin Roukala (né Peres)
dce2069054 radv/ci: switch vkcts-polaris10 from mupuf to KWS' farm
The DUT that currently hosts the Polaris10 will be used for NVK
testing, so let's move the polaris10 job to another farm.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27652>
2024-02-16 14:08:33 +00:00
José Roberto de Souza
19439624d9 anv: Use DRM_XE_VM_BIND_OP_UNMAP_ALL to unbind whole bos
For non-sparse usage there is no difference between
DRM_XE_VM_BIND_OP_UNMAP_ALL and DRM_XE_VM_BIND_OP_UNMAP but for sparse
the same bo can be bound to more than one virtual address.

Then in a case like:
img = vkCreateImage()
mem = vkAllocateMemory()
vkQueueBindSparse(img, mem)
vkFreeMemory(mem)

Note that the sparse VMA bind still points to the closed bo(done in
vkFreeMemory()), but with DRM_XE_VM_BIND_OP_UNMAP_ALL all VMAs
over the bos are removed.

Access to a unbound VMA has a defined behavior(page fault) while
access to a bound VMA without backing gem/bo don't have defined
behavior.

Suggested-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27601>
2024-02-16 13:43:45 +00:00
Eric Engestrom
3acb00290d ci_run_n_monitor: allow detached heads as well
When running on a detached head (eg. checkout of a tag or a specific
commit), there is no active branch, so we can't perform this check; just
skip it and assume the user knows what they're doing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27578>
2024-02-16 11:39:50 +00:00
Eric Engestrom
ef744fa589 ci_run_n_monitor: explain why/when there might be no tracked remote
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27578>
2024-02-16 11:39:50 +00:00
Karol Herbst
a4f77ce2d4 rusticl/program: fix CL_PROGRAM_BINARIES for devs with no builds
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10611
Fixes: e028baa177 ("rusticl/program: implement clCreateProgramWithBinary")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27633>
2024-02-16 10:08:17 +00:00
Samuel Pitoiset
6894692d27 radv: enable GS_FAST_LAUNCH=2 by default for RDNA3 APUs (Phoenix)
GS_FAST_LAUNCH=1 shouldn't be used on GFX11 but it's still needed for
dGPUs (eg. NAVI31) because it destroys performance for unknown reasons.

On RDNA3 APUs, GS_FAST_LAUNCH=2 seems to be required for working
mesh shaders and performance is fine. There is possibly a firmware bug
on APUs that would explain why GS_FAST_LAUNCH=1 doesn't work on Phoenix.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10583
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10397
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27618>
2024-02-16 07:32:18 +00:00
Samuel Pitoiset
0c2213cbbd radv: fix setting the rasterized primitive for ESO
This was missing.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27479>
2024-02-16 07:08:36 +00:00
Samuel Pitoiset
b199aa1bda radv: fix selecting shader variants with ESO
The shader BO for variants (like as LS) wasn't added to the BO list.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27479>
2024-02-16 07:08:36 +00:00
Samuel Pitoiset
a47de04ff3 radv: make sure to reset the GS copy shader with ESO
It should be NULL when not used. This is also slightly more optimal
than doing it in the loop.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27479>
2024-02-16 07:08:36 +00:00
Samuel Pitoiset
b1d4a7a95e radv: fix re-emitting DB_RENDER_CONTROL when resetting gfx pipeline state
This is only used by internal operations but the state wasn't
re-emitted.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27479>
2024-02-16 07:08:36 +00:00
Samuel Pitoiset
64e18b04d9 radv: clear the custom blend mode when resetting gfx pipeline state
This custom blend mode is only used by internal operations and they
don't use shader objects.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27479>
2024-02-16 07:08:35 +00:00
Samuel Pitoiset
b0a31a62e4 radv: clear RADV_CMD_DIRTY_SHADERS when resetting the shader object state
Binding a pipeline resets the shader object state and it's more optimal
to clear this flag here.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27479>
2024-02-16 07:08:35 +00:00
Mike Blumenkrantz
5e813a15f8 zink: update vvl expectations
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27358>
2024-02-15 22:35:01 -05:00
Mike Blumenkrantz
c163a38a8e ci: bump VVL to snapshot-2024wk06
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27358>
2024-02-15 22:35:01 -05:00
Mike Blumenkrantz
7c1916b98f zink: add a ci skip
avoids having to add vvl exceptions for the rest of the run

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27358>
2024-02-15 22:35:01 -05:00
Mike Blumenkrantz
4c08db5501 zink: don't add VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT for sparse textures
according to VUID-VkImageCreateInfo-flags-09403, this is illegal

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27358>
2024-02-15 22:35:01 -05:00
Mike Blumenkrantz
e8ce53a33d zink: promote gpl libs freeing during shader destroy out of prog loop
now that zink_gfx_lib_cache::stages_present exists (and is correct),
this value can be used directly to effect cache eviction instead of depending
on the prog->stages_present value, which may not even be the same prog that
owns a given zink_gfx_lib_cache instance

this fixes the case where a shader used in multiple progs with differing shader
masks would never have all its gpl pipelines freed

fixes leaks with caselist:
KHR-Single-GL46.arrays_of_arrays_gl.InteractionUniformBuffers1
KHR-Single-GL46.subgroups.quad.framebuffer.subgroupquadbroadcast_3_float_vertex

Fixes: d786f52f1f ("zink: prevent crash when freeing")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27358>
2024-02-15 22:35:01 -05:00
Mike Blumenkrantz
36e7350e0b zink: clamp zink_gfx_lib_cache::stages_present for generated tcs
this otherwise does not reflect reality

Fixes: d786f52f1f ("zink: prevent crash when freeing")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27358>
2024-02-15 22:35:01 -05:00