Commit Graph

193069 Commits

Author SHA1 Message Date
Faith Ekstrand b17f139281 nak: Wire up sparse residency for texture ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand 140cf8d616 nak/nir: Add sparse support to shrink_image_load()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand 671c6334bf nak: Plumb is_sparse through from NIR for texture ops
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Mohamed Ahmed 75390a7aeb nak: wire up shader resource residency intrinsics
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand 09e2917ee8 nak: Rename resident to fault
The predicate returns true if the requisite pixels are NOT resident.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Mohamed Ahmed 48803ac53d nvk: enable sparse residency features
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand db45b29f5f nvk/queue: Add support for non-opaque sparse binds
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand 80b417d557 nvk: Refactor opaque image binds
This adds a helper for iterating over the various planes separate from
the actual bind operation.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand 97de81af13 nvk/queue: Add a push_bind helper
This automatically combines consecutive bind ranges so we potentially
pass a smaller set of binds to the kernel.  It also does the assert that
everything is in-bounds.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Mohamed Ahmed bd6940a68d nvk: add sparse queries
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Mohamed Ahmed 23f2cfe8fb nil: Add support for sparse resident images
These have to use one of the Vulkan specified sparse image block sizes
for the tiling and have concept of a mip tail start LOD which we need to
calculate as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand 3700e58692 nvk: Use "real" 3D image views
Now that we have NAK and codegen isn't messing about with 3D images
behind our back, 3D storage images "just work".

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:23 +00:00
Faith Ekstrand e5a2a9b60e nil: Add a concept of sliced 3D image views
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Faith Ekstrand c809e85832 nil: Add a concept of width to tile sizes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Faith Ekstrand f406206fee nil: Rework tiling calculations
Instead of calling choose_tiling once per LOD, we now call it once at
the top and then simply clamp at every LOD like the hardware does.  This
means all heuristic decisions get made up-front and the mip level walk
simply emulates the hardware.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Faith Ekstrand 1a2f23439b nvk: Use row_stride_B instead of width for render and copies
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Mohamed Ahmed 301e707db5 nil: Expose tiling_extent_B()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Mohamed Ahmed 7a314170f7 nil: Add helpers for conversion from pixel values to tiles
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Mohamed Ahmed 132516d702 nil: Add helper function to get tile size in pixels
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Mohamed Ahmed ad62f87045 nil: change image_level_size() to take tiling in account
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26719>
2024-03-09 00:13:22 +00:00
Paulo Zanoni a8f7d26c2b anv: change the vm_bind-related kmd_backend vfuncs to return VkResult
All these vfuncs funnel down to either stubs or the xe_vm_bind_op()
function. By returning int we're shifting VkResult generation to the
callers, which are simply not doing the correct job. If they get
VkResult they can simply throw the errors up the stack without having
to erroneously try to figure out what really happened.

Today the callers are returning either VK_ERROR_UNKNOWN or
VK_ERROR_OUT_OF_DEVICE_MEMORY, but after the patch we're returning
either VK_ERROR_OUT_OF_HOST_MEMORY or VK_ERROR_DEVICE_LOST.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27926>
2024-03-08 23:14:09 +00:00
Paulo Zanoni 4863e12679 anv/sparse: don't use the bind_timeline when doing sparse binding
The bind_timeline is used to guarantee that non-sparse objects will
be bound when batches use them (although any batch will wait on the
most recent bind, even if that's not necessary). For sparse binding
resources, it's up to the user to guarantee synchronization: do not
force every single batch buffer to wait on the latest sparse binding
operation, as that adds unnecessary synchronization points.

v2: Document how each of the vfuncs interacts with bind_timeline
    (José).

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27926>
2024-03-08 23:14:09 +00:00
Paulo Zanoni 8051919b3c anv/sparse: leave the semaphore waits and signals to the vm_bind ioctl
We can now finally leave the semaphore waits and signals to the
vm_bind ioctl, making vm_bind operations truly asynchronous.

This was previously done for TR-TT in 18bd00c024 ("anv/trtt: don't
wait/signal syncobjs using the CPU anymore").

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27926>
2024-03-08 23:14:09 +00:00
Paulo Zanoni aa07d8a04c anv/sparse: don't issue a single bind operation per vm_bind ioctl
The xe.ko driver finally fixed bug 746, which means we can finally
pass multiple bind operations in a single ioctl. There's a dEQP test
that issues 960 bind operations in a single call, so our gains here
have potential, although most real-world apps are not even remotely
close to this.

Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/746
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27926>
2024-03-08 23:14:09 +00:00
David Heidelberg dd6301935e ci/freedreno: update expectations comment
Fixes: c91bd82b4b ("Uprev Piglit to 1e631479c0b477006dd7561c55e06269d2878d8d")

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28060>
2024-03-08 22:12:18 +00:00
David Heidelberg 9ab02222d0 ci/deqp: backport Implement support for the EGL_EXT_config_select_group extension GL-CTS patch
This will be useful for finishing the
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9989

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28060>
2024-03-08 22:12:18 +00:00
Yiwei Zhang c9d3cc2615 vulkan: refactor the runtime header gen order dependency
Summary:
- ensure headers used outside runtime are included in dependency source
- drop redundant idep_vulkan_common_entrypoints_h
- drop redundant icd side tricks for the order of header gen

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28066>
2024-03-08 21:42:07 +00:00
Yiwei Zhang d857f10574 vulkan: remove header files from lib source files
The generated "astc_spv.h" is for runtime internal use, so leave it
inside the runtime files to ensure the header is generated before being
used to compile.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28066>
2024-03-08 21:42:07 +00:00
Yiwei Zhang 90824e07a2 vulkan: properly ensure wsi_entrypoints header gen order
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28066>
2024-03-08 21:42:07 +00:00
Yiwei Zhang 872c9fabeb vulkan: remove unused wsi_common_entrypoints include and dep
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28066>
2024-03-08 21:42:07 +00:00
Yiwei Zhang 8af267eb00 venus: fix ffb batch prepare for a corner case and avoid a memcpy UB
Batches must be ignored if batch count is zero, so all batch inspections
have to be gated behind batch count. For memcpy, it's UB if either src
or dst is NULL even when size is zero.

Side note:
- For original commit, this fixes just the memcpy UB
- For current codes, this fixes to not skip ffb batch prepare

Fixes: 493a3b5cda ("venus: refactor batch submission fixup")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28071>
2024-03-08 21:26:18 +00:00
David Heidelberg f5532f8bab intel/tools: avoid invalid time and file bits combination
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10780

Fixes: cc41603d6d ("intel/tools: new intel_sanitize_gpu tool")
Reported-by: Fabio Pedretti <pedretti.fabio@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28081>
2024-03-08 21:01:38 +00:00
Collabora's Gfx CI Team c91bd82b4b Uprev Piglit to 1e631479c0b477006dd7561c55e06269d2878d8d
https://gitlab.freedesktop.org/mesa/piglit/-/compare/2a1c49a81cd9a6bf5d0c3a9b87225be94771ca96...1e631479c0b477006dd7561c55e06269d2878d8d

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28003>
2024-03-08 19:12:56 +00:00
Sil Vilerino 803f7f5398 d3d12: Video Encode - Add driver workaround for rate control reconfiguration
Adds a driver workaround for IHVs actually supporting rate control
reconfiguration but not reporting it in the DX12 driver support flags,
and later having crashes/hangs in the driver when the rate control
reconfiguration happens using the fallback method that includes re-creating
the encoder state and encoder heap objects upon new rate control params

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28075>
2024-03-08 18:19:45 +00:00
Sil Vilerino 830561c575 d3d12: Only check D3D12_FEATURE_DATA_PLACED_RESOURCE_SUPPORT_INFO for D3D_FEATURE_LEVEL_1_0_GENERIC
Fixes: 55e377e965 ("d3d12: Add partial media, compute, graphics support with CORE and GENERIC feature levels")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28074>
2024-03-08 18:02:03 +00:00
Sil Vilerino 1b6d7ab80b d3d12: Add GetDesc wrapper for ID3D12Heap
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10779
Fixes: 55e377e965 ("d3d12: Add partial media, compute, graphics support with CORE and GENERIC feature levels")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28074>
2024-03-08 18:02:03 +00:00
Valentine Burley 089cb522be docs: Update features.txt for anv, nvk and tu
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28052>
2024-03-08 16:56:38 +00:00
Valentine Burley fbd3269756 tu: Promote VK_EXT_line_rasterization to KHR
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28052>
2024-03-08 16:56:37 +00:00
Valentine Burley 465ff8114c tu: Promote VK_EXT_load_store_op_none to KHR
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28052>
2024-03-08 16:56:37 +00:00
Valentine Burley 2d3ed6853d tu: Promote VK_EXT_index_type_uint8 to KHR
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28052>
2024-03-08 16:56:37 +00:00
José Roberto de Souza 7ea5d1ed7d anv: Skip cmd_buffer_emit_bt_pool_base_address() in blitter and video engines
Blitter and video engines don't support PIPE_CONTROL and
3DSTATE_BINDING_TABLE_POOL_ALLOC.
I'm not 100% sure if something else should be called instead but this
is doing the same as cmd_buffer_emit_state_base_address() and this
fixes the test that was crashing in
unreachable("Trying to emit unsupported PIPE_CONTROL command.");

Fixes: dEQP-VK.pipeline.monolithic.timestamp.misc_tests.two_cmd_buffers_secondary_transfer_queue_with_availability_bit
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/28053>
2024-03-08 14:39:09 +00:00
José Roberto de Souza cccb5e36f1 anv: Call flush_pipeline_select_gpgpu() for compute engines in compute code paths
These 2 compute code paths were checking for
anv_cmd_buffer_is_render_queue() before calling
flush_pipeline_select_gpgpu() causing cmd_buffer->state.current_pipeline
to never to be set to GPGPU, trigerring
assert(cmd_buffer->state.current_pipeline == GPGPU) when running in
the compute engine.

So here just dropping the anv_cmd_buffer_is_render_queue() check.

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/28053>
2024-03-08 14:39:09 +00:00
Zan Dobersek a13860e5df tu: add RMV support
Add RMV support for Turnip. The internal RMV layer is added and integrated
into the VkDevice entrypoint dispatch tables. As elsewhere, memory tracing
is put into action when enabled through the MESA_VK_TRACE environment
variable.

Similar to other implementations of RMV support in Mesa, tracing points are
added across Turnip to report on different types of RMV events, calling
into tu_rmv logging functions to emit the relevant RMV token data.

TU_BO_ALLOC_INTERNAL_RESOURCE allocation flag is added. When used, in RMV
output such an allocation will be associated with an internal resource
of the VK_RMV_RESOURCE_TYPE_MISC_INTERNAL type.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27631>
2024-03-08 11:34:17 +00:00
Zan Dobersek e29677b16d vulkan/rmv: enable logging miscellaneous internal resources
Add the vk_rmv_misc_internal_description struct and list the misc_internal
member of that type in the vk_rmv_resource_create_token union, allowing
logging of different internal resources in RMV dumps.

The vk_rmv_common.h header also has the C-linkage block added in order to
enable its inclusion in C++ files.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27631>
2024-03-08 11:34:17 +00:00
Samuel Pitoiset 6965c569cc radv/ci: mark dEQP-VK.shader_object.binding.mesh_swap_task as flake on NAVI21
Can't reproduce locally.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27895>
2024-03-08 08:43:15 +00:00
Samuel Pitoiset fbdf99d01b radv/ci: enable RADV_PERFTEST=shader_object for VKCTS jobs on GFX10+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27895>
2024-03-08 08:43:15 +00:00
Felix DeGrood 26da033c91 intel/ds: add pipe control reasons to perfetto flushes
Add up to four reasons per flush to perfetto flushes. PC reasons
will help debuggers understand why flushes were required, and
perhaps provide hints as to how they can be avoided.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27400>
2024-03-08 07:52:20 +00:00
Samuel Pitoiset 3f8ff988fa radv: add a helper to emit PS/TCS epilogs
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28042>
2024-03-08 07:28:47 +00:00
Samuel Pitoiset 0ed6aba85a radv,aco: stop duplicating PS/TCS epilog fields
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28042>
2024-03-08 07:28:47 +00:00
Samuel Pitoiset 974d1395a2 radv: allow RADV_PERFTEST=shader_object on GFX10/GFX10.3
VK_EXT_shader_object is now supported on all GPUs! It's still not
enabled by default because it needs more testing and more fixing (Renoir
still hangs for some reasons and Zink/RADV on Polaris10 still has
flakes).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27880>
2024-03-08 07:09:40 +00:00