Commit graph

184955 commits

Author SHA1 Message Date
Samuel Pitoiset
a5bdc4b19a radv: fix a compilation warning in radv_bind_graphics_shaders()
../src/amd/vulkan/radv_cmd_buffer.c: In function ‘radv_bind_graphics_shaders’:
../src/amd/vulkan/radv_cmd_buffer.c:9366:65: warning: array subscript -1 is below array bounds of ‘struct radv_shader *[14]’ [-Warray-bounds=]
 9366 |    cmd_buffer->state.last_vgt_shader = cmd_buffer->state.shaders[last_vgt_api_stage];

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27670>
2024-02-20 08:47:18 +00:00
Guilherme Gallo
41cd32d10e ci/lava: Broader R8152 error handling
The r8152 error detection is now considering any order of the known
patterns to detect variations of the r8152 issues during the test phase.
This includes a small refactoring for eventual new issues.

Additionally, adjusted the timing for setting the `start_time` in
`test_lava_job_submitter.py` to ensure consistency and reliability in
test execution, aligning the start time closer to the job submission
process.

With this fix, the bad state shown in the following job will be
detected:
https://gitlab.freedesktop.org/drm/msm/-/jobs/55033953

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27688>
2024-02-20 00:48:24 +00:00
Mike Blumenkrantz
c6635c09d0 zink: avoid infinite recursion on (very) small BAR systems in bo alloc
this should only try a full reclaim if possible, not unconditionally

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27606>
2024-02-19 19:27:16 +00:00
Mike Blumenkrantz
817ca5147e zink: compute bo unique_id on use, not creation
this avoids wasting ids in suballocated slabs

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27606>
2024-02-19 19:27:16 +00:00
Mike Blumenkrantz
8c3adf749d zink: add an assert for dummy fb surface creation
add some info in the improbable case that this fails

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27606>
2024-02-19 19:27:16 +00:00
Mike Blumenkrantz
8bad4205c6 zink: validate sample count on image create
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27606>
2024-02-19 19:27:16 +00:00
Mike Blumenkrantz
386450b10e zink: pre-check formats for samplecount support
this should allow frontends to accurately detect unsupported format+sample
combinations instead of just failing at resource creation

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27606>
2024-02-19 19:27:15 +00:00
Mike Blumenkrantz
f827055cb4 zink: flag the use_img as unsync access with buf2img copies, not the swapchain
these are not the same

Fixes: a0510b23f6f ("zink: add automatic swapchain readback using heuristics")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27606>
2024-02-19 19:27:15 +00:00
Mike Blumenkrantz
b8b51d96b0 zink: delete maxDescriptorBufferBindings checks
only one descriptor buffer is used now

Fixes: 13c6ad0038 ("zink: use a single descriptor buffer for all non-bindless types")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27685>
2024-02-19 17:12:37 +00:00
Samuel Pitoiset
2deaf632e2 radv: use radv_shader_info for computing NGG LDS layout
This should be similar.

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
21577bfacb radv: store the number of outputs for VS/TES as NGG
To compute NGG info without relying on NIR.

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
5e1da1d10f radv: determine the number of invocations only for VS/TES as NGG
To make it clear that this doesn't depend on GS.

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
12b5c3f00e radv: set radv_vgt_shader_key::ngg_streamout for ESO
Not used yet, but will be needed.

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
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