Commit Graph

184201 Commits

Author SHA1 Message Date
Echo J
32babbc416 nvk: Set ICD version to 1.3
This should complete the Vulkan 1.3 puzzle

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27319>
2024-01-27 16:19:10 +00:00
Sebastian Wick
c467a87e06 radeonsi: Destroy queues before the aux contexts
Otherwise the queue might access the already destroyed aux contexts

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27300>
2024-01-27 14:59:11 +00:00
Faith Ekstrand
a0a453e43f nvk: Advertise Vulkan 1.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27317>
2024-01-27 06:30:08 +00:00
Faith Ekstrand
25d40e8e2c nvk: Stop requiring dedicated allocations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27317>
2024-01-27 06:30:08 +00:00
Juston Li
305256e344 venus: handle empty resolved query feedback list
On the off chance the combined list resolves to empty due to resets,
skip adding query feedback by not increasing the total cmd buffer
count for query feedback.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27163>
2024-01-26 23:40:52 +00:00
Juston Li
df1cd20096 venus: recycle linked query feedback immediately during submission
Instead of just recyling 1 linked query feedback cmd for use and
defering the actualy recycle, recycle all linked cmds found when
setting up submission immediately.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27163>
2024-01-26 23:40:52 +00:00
Juston Li
decc5d4539 venus: add comments for query feedback batch free list
Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27163>
2024-01-26 23:40:52 +00:00
Juston Li
e2c4bafccc venus: free query batches for VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT
When a pool is reset with VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT,
free up all query batches in the pool.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27163>
2024-01-26 23:40:52 +00:00
Juston Li
aceda1f5f6 venus: acquire mutex when recycling query feedback cmds
Fixes: 5b24ab91e4 ("venus: switch to unconditionally deferred query feedback")

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27163>
2024-01-26 23:40:52 +00:00
Juston Li
c3417c5bb8 venus: refactor query feedback cmds
The list free_query_feedback_cmds for recycling query feedback cmds was
only used in vn_command_pool when it was a vn_feedback_cmd_pool.

For clarity, refactor and store this list in vn_feedback_cmd_pool
instead and introduce a new struct vn_query_feedback_cmd that references
the feedback cmd and the feedback cmd pool for tracking.

Refactor out the allocation portion of query feedback cmds into its own
function for allocating the new vn_query_feedback_cmd struct.

Fixes: 5b24ab91e4 ("venus: switch to unconditionally deferred query feedback")

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27163>
2024-01-26 23:40:52 +00:00
Eric Engestrom
7bc5646609 ci: bump the image tags to rebuild all the deqp variants
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27250>
2024-01-26 21:49:05 +00:00
Eric Engestrom
52b784dbc5 ci/deqp: only keep the mustpass lists that are relevant to the build
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27250>
2024-01-26 21:49:05 +00:00
Eric Engestrom
e0c564dd0b ci/deqp: only compile the test binaries that are relevant to the build
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27250>
2024-01-26 21:49:05 +00:00
Eric Engestrom
969b430a23 ci/deqp: only compile EGL tests in GL builds, not VK builds
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27250>
2024-01-26 21:49:05 +00:00
Eric Engestrom
d9833b89a2 ci/deqp: drop the implicit DEQP_TARGET; explicitly set default in VK builds
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27250>
2024-01-26 21:49:05 +00:00
Eric Engestrom
fb326ef27f ci/deqp: split vk and gl builds
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27250>
2024-01-26 21:49:05 +00:00
Eric Engestrom
24161160e5 ci/deqp: move editable part to the top of the file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27250>
2024-01-26 21:49:05 +00:00
Eric Engestrom
86bf197bf7 ci/deqp: avoid storing the huge list of vk tests on android builds
Same as we do with GL mustpass lists.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27250>
2024-01-26 21:49:05 +00:00
Eric Engestrom
3cc1c71148 ci/deqp: simplify version log dump
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27250>
2024-01-26 21:49:05 +00:00
Eric Engestrom
115ab467c6 ci/deqp: fix default target check when target is not specified
Fixes: 27a1b4e4f3 ("ci/deqp: ensure that in `default` builds, wayland + x11 + xcb are all built")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27250>
2024-01-26 21:49:05 +00:00
Lionel Landwerlin
3b9466dd51 anv: fix transfer barriers flushes with compute queue
Transfer operation are implemented differently on the compute engine
and require a different kind of cache flush.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27233>
2024-01-26 20:47:18 +00:00
Ryan Neph
9f99685c1b virgl: use PIPE_MAX_SAMPLERS in bind_samplers_states
Fix incorrect use of PIPE_MAX_SHADER_SAMPLER_VIEWS in
virgl_bind_samplers_states.

Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27251>
2024-01-26 18:20:13 +00:00
Javier Martinez Canillas
5275df0cfe gallium: Add ssd130x to the list of kmsro drivers
Add an entry point for the ssd130x modesetting driver, to expose a _dri.so
and allow Solomon panels to display the contents rendered by a GPU driver.

Suggested-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27135>
2024-01-26 17:52:45 +00:00
Lionel Landwerlin
9d31680e79 anv: retain ccs image binding address
Memory can be free before images it is bound to. When unmapping the
CCS range in the AUX-TT, we cannot rely on the anv_bo::offset field
because the anv_bo might have been freed.

Just save the mapping address/size and use those values at unmapping
time.

Fixes an assert on CI with :

  dEQP-VK.synchronization.internally_synchronized_objects.pipeline_cache_graphics

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: e519e06f4b ("anv: add missing alignment for AUX-TT mapping")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27304>
2024-01-26 17:29:31 +00:00
Lionel Landwerlin
eead86ad8e anv: rename aux_tt image field
We'll add more to the sub-struct

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27304>
2024-01-26 17:29:31 +00:00
Lionel Landwerlin
fdc2f0a52e anv: factor out aux-tt binding logic for future reuse
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27304>
2024-01-26 17:29:30 +00:00
Faith Ekstrand
6260fa47ff nak: Loop to ensure we get accurate shader clocks
Even though CS2R can fetch a whole 64 bits at a time, that doesn't mean
it does so atomically.  Instead, we need to loop, alternating high and
low until we fetch the same high value twice.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27303>
2024-01-26 16:55:50 +00:00
Faith Ekstrand
48ebfeba34 nak: Add a source barrier intrinsic
This just inserts a GPU stall until the given source is available.  We
need this in order to properly implement shader clock.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27303>
2024-01-26 16:55:50 +00:00
Faith Ekstrand
d57c79846d nak: Choose S2R vs CS2R based on sysval index
CS2R is only allowed for SV_CLOCK

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27303>
2024-01-26 16:55:50 +00:00
Lionel Landwerlin
e121d873bd anv/hasvk: don't report error when intel_get_device_info_from_fd fails
A side effect of the previous change is that we started getting
failures from that function but that only says the device is not
supported, so silently fail and return.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 3fd44345c4 ("intel: Skip ioctls for querying device info when hardware is unsupported")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27294>
2024-01-26 16:30:25 +00:00
Pierre-Eric Pelloux-Prayer
02fe3c32cd ac, radeonsi: remove has_syncobj, has_fence_to_handle
syncobj support is now required so these features are always
available.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24724>
2024-01-26 16:02:26 +00:00
Pierre-Eric Pelloux-Prayer
d25201903d winsys/amdgpu: use syncobj rather than amdgpu fence
syncobjs provide the same features and allow to unify code
paths because we don't need to handle imported syncobj
separately.

This simplifies the code and doesn't seem to have any perf
impact.

Syncobjs are supported in amdgpu since kernel commit 660e855813f78
during 4.12 cycle but the minor version wasn't bumped so use
the next bump value asthe minimum supported version.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24724>
2024-01-26 16:02:26 +00:00
Samuel Pitoiset
d14ecd6d89 radv: use device->vk.enabled_features instead of iterating twice
vk_device already has the list of enabled features, no need to iterate
twice on the pNext structs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27276>
2024-01-26 15:16:26 +00:00
Pierre-Eric Pelloux-Prayer
cce5920025 radeonsi: adjust flags for si_compute_shorten_ubyte_buffer
- no need to flush anything before as we're working on a clean
  buffer (SI_OP_SKIP_CACHE_INV_BEFORE)
- L2 must be flushed after the job to avoid rendering artifacts.
  Instead of setting it manually, use SI_OP_SYNC_AFTER +
  SI_COHERENCY_NONE.

Fixes: 1a99f50c7f ("radeonsi: use a compute shader to convert unsupported indices format")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27095>
2024-01-26 14:13:55 +00:00
Pierre-Eric Pelloux-Prayer
0e16da89fe radeonsi: emit cache flushes before draw registers
This fixes #9807 but I don't understand why.

Emitting cache flushes before VGT_PRIMITIVE_TYPE is what makes
the problem go away but changing the order in si_draw() is clearer.

The only cases where sctx->flags is modified in si_emit_draw_registers
is handled using si_emit_cache_flush_direct so we can move cache
flushing up without any addtional conditionals.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9807
Fixes: 1e4b539042 ("radeonsi: handle deferred cache flushes as a state (si_atom)")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27095>
2024-01-26 14:13:55 +00:00
Lionel Landwerlin
72dc596aa0 anv: implement VK_EXT_attachment_feedback_loop_dynamic_state
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23523>
2024-01-26 13:39:02 +00:00
Faith Ekstrand
a9d72609d9 anv: Advertise VK_EXT_attachment_feedback_loop_layout
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23523>
2024-01-26 13:39:02 +00:00
Lionel Landwerlin
dda8c2b8be anv: handle image feedback loop usage
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23523>
2024-01-26 13:39:02 +00:00
Faith Ekstrand
bd285a6ad5 anv: Add helpers for getting the surface state from an image view
Gets rid of some duplicated logic.

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23523>
2024-01-26 13:39:02 +00:00
Lionel Landwerlin
16391645ef anv: add check that in renderpass barriers apply to attachments
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23523>
2024-01-26 13:39:02 +00:00
Lionel Landwerlin
eed788213b anv: ensure consistent layout transitions in render passes
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23523>
2024-01-26 13:39:02 +00:00
Lionel Landwerlin
76cf391255 vulkan/runtime: add helper to query attachment layout
The runtime is turning GENERAL layouts into FEEDBACK_LOOP ones when it
detects feedback loops in a render pass. This is breaking drivers that
would like to use a different HW layout for those 2 layouts because if
the application inserts barrier in the render pass, the barriers the
driver sees are inconsistent.

This could lead to barrier of this type :
   - GENERAL       -> FEEDBACK_LOOP (runtime)
   - GENERAL       -> GENERAL       (app)
   - FEEDBACK_LOOP -> GENERAL       (runtime)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23523>
2024-01-26 13:39:01 +00:00
Lionel Landwerlin
f92bff9198 intel/ds: track predication of blorp operations
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23523>
2024-01-26 13:39:01 +00:00
Vlad Schiller
97efa57531 pvr: Implement VK_EXT_memory_budget
Signed-off-by: Vlad Schiller <vlad-radu.schiller@imgtec.com>
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27189>
2024-01-26 12:06:55 +00:00
Tatsuyuki Ishi
991ae339f5 radv: Implement NIR caching behind RADV_PERFTEST=nircache.
NIR caching is useful for two use cases:
- Shader permutations involving reused VS or FS.
- GPL-like engine that compiles a separate (library) variant and an
  optimized (monolithic) variant, e.g. DXVK.

By caching the result of radv_shader_spirv_to_nir, permutations hitting
the cache can have their compilation time reduced by 50% or more.

There are still open questions about the memory and storage footprint of
NIR caches, which is why this is gated behind a perftest flag. In
particular, Steam doesn't want to ship NIR cache since they are
unnecessary in presence of a full precompiled shader cache. In this
commit, the cache entries do not reside in memory and are immediately
written to the disk. Further design around how the caches are stored and
how to coordinate cache type with Steam etc. is left as future work.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26696>
2024-01-26 11:46:18 +00:00
Tatsuyuki Ishi
2ed5f2cace radv: Re-sort RADV_PERFTEST env vars in docs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26696>
2024-01-26 11:46:18 +00:00
Tatsuyuki Ishi
8bf5c33c9c radv: Rename cache_search_nir to cache_lookup_nir_handle.
A future commit will introduce cache_lookup_nir (which does not create
an intermediate vk_pipeline_cache_object), so rename it for consistency.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26696>
2024-01-26 11:46:18 +00:00
Tatsuyuki Ishi
70b0c5909b radv: Add radv_spirv_to_nir_options that summarize early gfx states.
radv_shader_spirv_to_nir now takes a more minimal struct instead of gfx
states. This struct will be used for NIR cache hashing in the future.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26696>
2024-01-26 11:46:18 +00:00
Lionel Landwerlin
e519e06f4b anv: add missing alignment for AUX-TT mapping
Buffers that are not dedicated can also be used for CCS mapped images,
so they need to be aligned to the AUX-TT requirements.

GTK+ is running into such case where it creates an image with a CCS
modifier. When requesting the alignment through
vkGetImageMemoryRequirements() the 64KB/1MB alignment is returned, but
the binding fails with an assert because the VkDeviceMemory has not
been aligned to the AUX-TT requirement and we cannot disable CCS since
the modifier requires it.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 4cdd3178fb ("anv: Meet CCS alignment reqs with dedicated allocs")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10433
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27258>
2024-01-26 11:20:17 +00:00
Pavel Ondračka
337fbab9ce r300: remove backend support for SUB
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27089>
2024-01-26 11:06:06 +00:00