Commit graph

185092 commits

Author SHA1 Message Date
Samuel Pitoiset
9f660d8c72 radv: prefix radv_vgt_shader_key::streamout with ngg
This is only for NGG streamout (GFX11).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27575>
2024-02-19 16:30:08 +00:00
Samuel Pitoiset
b98a7abcd6 radv: determine the ES stage for merged NGG shaders compiled separately
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27575>
2024-02-19 16:30:08 +00:00
Samuel Pitoiset
eea75777be radv: pass the ES stage when emitting geometry shader with ESO
Not used yet, but will be needed for NGG support.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27575>
2024-02-19 16:30:08 +00:00
Karol Herbst
9dcc20bccc meson/rusticl: import rust instead of unstable-rust
The rust module has been stabilized since meson 1.0 and we require 1.3.1

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10627
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27679>
2024-02-19 15:44:59 +00:00
Mike Blumenkrantz
fba34ae5f5 zink: add a750 baseline
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27683>
2024-02-19 15:27:48 +00:00
Corentin Noël
dd6decfaba zink: do not use undefined stage mask if on missing KHR_synchronization2
VK_PIPELINE_STAGE_NONE can only be set as dstStageMask if KHR_synchronization2
is defined.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27682>
2024-02-19 15:04:04 +00:00
Corentin Noël
7cafe65ea1 zink: use symbolic values instead of 0
Just make it easier to remember which parameter is accepting which type.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27682>
2024-02-19 15:04:04 +00:00
Patrick Lerda
3b90c46bdf r300: fix vertex_buffer related refcnt imbalance
Indeed, vertex_buffer was not properly freed.

For instance, this issue is triggered with:
"piglit/bin/fcc-read-after-clear blit rb -auto -fbo"
while setting GALLIUM_REFCNT_LOG=refcnt.log.

Fixes: 8a963d122d ("r300g/swtcl: don't do stuff which is only for HWTCL")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27678>
2024-02-19 14:48:18 +00:00
Mike Blumenkrantz
fb97141131 zink: always enable glsl_correct_derivatives_after_discard
this matches radeonsi behavior and eliminates the driconf handling

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27489>
2024-02-19 14:26:49 +00:00
Lionel Landwerlin
63676ed502 anv: fix Wa_16013994831 macros
The commit that switched to the WA framework forgot to update one of
the ifdef section.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: e6e320fc79 ("anv: make Wa_16013994831 to use intel_needs_workaround")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27676>
2024-02-19 12:48:33 +00:00
Lionel Landwerlin
682c23aa06 anv: remove unused definition
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27504>
2024-02-19 11:10:29 +00:00
Lionel Landwerlin
27a7c5447d anv: reenable ANV_ALWAYS_BINDLESS
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27504>
2024-02-19 11:10:29 +00:00
Lionel Landwerlin
dbee85713f anv: factor out descriptor buffer flushing
Take the opportunity to fix the flush of the descriptor buffer surface
when needed. Previously we would only flush it if the shader used one
of the push descriptor.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27504>
2024-02-19 11:10:29 +00:00
Lionel Landwerlin
cf193af762 anv: fixup push descriptor shader analysis
There are a couple mistakes here :

   - using a bitfield as an index to generate a bitfield...

   - in anv_nir_push_desc_ubo_fully_promoted(), confusing binding
     table access of the descriptor buffer with actual descriptors

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ff91c5ca42 ("anv: add analysis for push descriptor uses and store it in shader cache")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27504>
2024-02-19 11:10:29 +00:00
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