Commit Graph

169756 Commits

Author SHA1 Message Date
Timur Kristóf 8e9d269da6 aco: Don't use nir_selection_control in aco_ir.
We don't want to rely on any NIR structures in ACO, because
we would like to avoid the need to include nir.h in aco_ir.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22241>
2023-04-10 20:01:28 +00:00
Timur Kristóf cff02468c6 aco: Fix optimization of v_cmp with subgroup invocation.
There was a typo in this optimization which went unnoticed.

Fixes: 2c40215ab9
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22393>
2023-04-10 19:15:27 +00:00
Yiwei Zhang 57afa79933 venus: move exp feature init back to ring and remove unused function
This mostly undos 476c771e34 and removes
the unused vn_renderer_submit_simple_sync.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22323>
2023-04-10 18:59:40 +00:00
Yiwei Zhang b285083cad venus: requires ringMonitoring
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22323>
2023-04-10 18:59:40 +00:00
Yiwei Zhang 5fcb2830e6 venus: requires asyncRoundtrip
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22323>
2023-04-10 18:59:40 +00:00
Jesse Natalie 3cbd4fb61b dzn: Don't enable bindless by default
There's bad interactions with dynamic buffers at this point:
* Perf issues due to allocating and freeing the buffer to store indices/offsets
* Large dynamic uniform buffer offsets (above 65K) cause out-of-bounds reads

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22371>
2023-04-10 18:43:12 +00:00
Jesse Natalie 4d142ec594 dzn: Never set STATE_RENDER_TARGET on a compute command list
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22371>
2023-04-10 18:43:12 +00:00
Jesse Natalie 5aca593262 dzn: Ignore unnormalized sampling flag if driver doesn't support it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22371>
2023-04-10 18:43:12 +00:00
Jesse Natalie 51c96cb745 dzn: Use a linear allocator for upload data on command buffers
Significantly improves performance for apps that heavily use
dynamic descriptors.

Still needs caching so they can be re-used after command buffer reset.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22371>
2023-04-10 18:43:12 +00:00
Jesse Natalie 0c2848f44a dzn: Changes to descriptor set dirty flag handling
The scenario of:
* App binds multiple descriptor sets
* App binds a pipeline that uses a subset of them
* App binds a pipeline that uses more of them

was broken. We were only copying the descriptors for the accessible
subset before, but then clearing all dirty bits, so simply changing
the pipeline wouldn't result in more descriptors being copied.

When running not-bindless, the right thing to do is to copy *all*
descriptors if we're copying any. When running bindless, each parameter
is set separately, and more importantly, *can't* be set on the command
list if the root signature can't access them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22371>
2023-04-10 18:43:12 +00:00
Jesse Natalie 01ccba0d8e microsoft/compiler: Don't split loads/stores that will be split by lower_explicit_io
Otherwise we can end up splitting push constant loads, which currently require
an unbroken (no-cast) deref chain up to the variable.

Fixes: 4c527f4f ("spirv2dxil: Lower unaligned loads and stores")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22371>
2023-04-10 18:43:12 +00:00
Samuel Pitoiset 642a88df3d docs: add more release notes for RADV
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22390>
2023-04-10 18:37:26 +00:00
Rhys Perry bb653b0acb nir: make nir_fisnan helper exact
Floating point ALU assume no NaNs unless
FLOAT_CONTROLS_SIGNED_ZERO_INF_NAN_PRESERVE_FPn or (for some opcodes)
exact=true.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: bf9c1699cd ("nir: add nir_fisnan helper function")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22206>
2023-04-10 17:42:24 +00:00
Vitaliy Triang3l Kuzmin a6ab0cff08 radv: Set DB_Z_INFO.NUM_SAMPLES to MSAA_EXPOSED_SAMPLES without Z/S
This case is a new addition in GFX11, and according to PAL, when no
depth/stencil attachment is bound, it must be set to the number of coverage
samples (the number of SampleMask bits - which is MSAA_EXPOSED_SAMPLES):

4640888b57/src/core/hw/gfxip/gfx9/gfx9UniversalCmdBuffer.cpp (L6978)

Without this change, the maximum of depth/stencil and color sample counts
is used, and if there are no depth/stencil or color attachments (target-
independent rasterization), the Depth Block assumes 1 coverage sample, and
thus Primitive Ordered Pixel Shading doesn't work correctly (and fails 4xAA
fragment shader interlock CTS tests), and occlusion queries don't count the
correct number of samples (according to the "Sample Counting" section of
the Vulkan specification, "the occlusion query sample counter increments by
one for each sample with a coverage value of 1...")

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22375>
2023-04-10 15:07:30 +00:00
Mike Blumenkrantz 75a7dcf35f zink: try to prune resources from barrier jit on fb unbind
if a resource has no binds remaining then it should not remain in
the queue for barrier updates on the next draw

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22398>
2023-04-10 14:44:13 +00:00
André Almeida 871aa64e53 winsys/amdgpu: Fix amdgpu_cs_query_reset_state2 error log
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: André Almeida <andrealmeid@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22253>
2023-04-10 13:50:36 +00:00
André Almeida ad4a72c11e radv: Implement vk.check_status
Implement check_status function so the driver can check if the GPU has
been reset by the application, and thus if it's still available.

AMDGPU_CTX_QUERY ioctls work by asking amdgpu if this context was the
cause of a previous GPU reset.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: André Almeida <andrealmeid@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22253>
2023-04-10 13:50:36 +00:00
Samuel Pitoiset c8949db0cc radv/ci: update expected failures with BONAIRE
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22391>
2023-04-10 11:47:15 +00:00
Samuel Pitoiset 18ea108038 radv/ci: remove no longer existing tests for PITCAIRN
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22366>
2023-04-10 10:53:47 +00:00
Samuel Pitoiset d3e5a1f638 radv/ci: update expected failures for PITCAIRN
These have been recently fixed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22366>
2023-04-10 10:53:47 +00:00
Samuel Pitoiset 6476abd821 radv: enable VK_EXT_graphics_pipeline_library by default
You won't get your money back!

It's been a very long time but everything should be working great now.

This replaces RADV_PERFTEST=gpl by RADV_DEBUG=nogpl to disable the
extension for debugging purposes.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22362>
2023-04-10 10:02:32 +00:00
Daniel Schürmann 719a0e269e vulkan/pipeline_cache: move vk_log on failed deserialization to vk_pipeline_cache_load()
Partially evicted or corrupted disk cache entries should not create
application cache log entries.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21967>
2023-04-10 09:14:30 +00:00
Daniel Schürmann 53eb3ad375 vulkan/pipeline_cache: add cache parameter to deserialize() function
This allows for secondary cache lookups during deserialization.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21967>
2023-04-10 09:14:30 +00:00
Daniel Schürmann a6360a3203 vulkan/pipeline_cache: use vk_pipeline_cache_create_and_insert_object() during vk_pipeline_cache_load()
This avoids an extra serialize() step for disk-cache insertion.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21967>
2023-04-10 09:14:30 +00:00
Daniel Schürmann f524f91d6f vulkan/pipeline_cache: implement vk_pipeline_cache_create_and_insert_object()
This function directly inserts the serialized data into the disk cache
before calling deserialize() and inserting into the pipeline cache.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21967>
2023-04-10 09:14:30 +00:00
Daniel Schürmann 84fa7b1745 vulkan/pipeline_cache: Don't re-insert disk-cache hits into disk-cache
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21967>
2023-04-10 09:14:30 +00:00
Daniel Schürmann 5daff41e27 vulkan/pipeline_cache: remove vk_device from vk_pipeline_cache_object
It is not necessary to store the extra pointer.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21967>
2023-04-10 09:14:30 +00:00
David Heidelberg 4ac56e3e5a ci/v3d: add flaking spec@ext_framebuffer_blit@fbo-sys-blit
Flakes on both RPI 3 and RPI 4.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22377>
2023-04-08 22:24:47 +02:00
Timur Kristóf ba537ac25a ac/llvm: Cover runtime 0 in GFX10 gs_alloc_req workaround.
Previously, the workaround only covered compile-time zero, but
this is insufficient and can cause GPU hangs in RadeonSI when
NGG culling is enabled.

Fix this by handling runtime zero in the workaround.

Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22370>
2023-04-08 13:54:06 +00:00
Adam Jackson c7da969f8f mesa: Enable NV_texture_barrier in GLES2+
The spec text is written against 3.2 but only requires framebuffer
objects and ES2.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19234>
2023-04-08 06:10:44 +00:00
Kenneth Graunke 98bcf650f1 intel/compiler: Use nir_dest_bit_size() for ballot bit size check
There's no guarantee that this is a SSA value.  Use the helper to handle
both SSA values and register correctly.  Otherwise we read trash when we
encounter a register and make bad decisions on types, possibly leading
to our destination being UQ typed when the VGRF is only 32-bit.

Fixes compilation with -Dintel-clc=enabled since 7f6491b76d
(nir: Combine if_uses with instruction uses) but the bug is much older
than that, circa 2017.  We were just getting lucky before.

Fixes: 069bf7c907 ("i965/fs: Match destination type to size for ballot")
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22374>
2023-04-07 19:28:56 -07:00
Alyssa Rosenzweig f5471ca965 nir/validate: Only walk uses once
Ostensibly faster.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
2023-04-07 23:48:03 +00:00
Alyssa Rosenzweig 9a35079074 nir/repair_ssa: Refactor some use handling
We can mostly unify the instr-use and if-use handling, which is a lot more
concise.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
2023-04-07 23:48:03 +00:00
Alyssa Rosenzweig dcb59a7672 nir: Remove nir_if_rewrite_condition_ssa
Now unused.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
2023-04-07 23:48:03 +00:00
Alyssa Rosenzweig ed85a49727 dxil: Use nir_src_rewrite_ssa
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
2023-04-07 23:48:03 +00:00
Alyssa Rosenzweig e25c182993 nir: Use nir_src_rewrite_ssa
Where sensible.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
2023-04-07 23:48:03 +00:00
Alyssa Rosenzweig e9e0956d62 nir: Factor out nir_src_rewrite_ssa helper
Like nir_instr_rewrite_ssa but without the asserted extra argument. Works on ifs
too, now that we have a unified use list.

We do need to assert that the source has actually been inserted and has valid
use/def chains. Previously, asserting on the parent instruction accomplished
that indirectly. For the more general helper, we instead directly assert that
there exists a non-null parent, whatever it is.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
2023-04-07 23:48:03 +00:00
Alyssa Rosenzweig 2285b5daae nir: Reduce indirection
A source used by an if is necessarily the condition of that if.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
2023-04-07 23:48:03 +00:00
Alyssa Rosenzweig 373bd37b85 dxil: Avoid list_length
Do O(1) check instead.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
2023-04-07 23:48:03 +00:00
Alyssa Rosenzweig c4a91c12dc nir/validate: Don't treat if-uses specially
We don't use the tag anywhere, so don't bother with it.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Suggested-by: Faith Ekstrand <faith@gfxstrand.net>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
2023-04-07 23:48:03 +00:00
Alyssa Rosenzweig f3b420692b nir: Remove 2nd argument from nir_before_src
We can now determine whether a nir_src is for an if without a sideband, so
simplify the function signature.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Suggested-by: Faith Ekstrand <faith@gfxstrand.net>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
2023-04-07 23:48:03 +00:00
Alyssa Rosenzweig 8505f0bd84 nir/opt_loop_unroll: Avoid list_length
It is O(N) but can often be replaced with something O(1).

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
2023-04-07 23:48:03 +00:00
Alyssa Rosenzweig 7356f3eee7 nir/opt_ray_queries: Don't use list_length
Expensive.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
2023-04-07 23:48:03 +00:00
Alyssa Rosenzweig 7f6491b76d nir: Combine if_uses with instruction uses
Every nir_ssa_def is part of a chain of uses, implemented with doubly linked
lists.  That means each requires 2 * 64-bit = 16 bytes per def, which is
memory intensive. Together they require 32 bytes per def. Not cool.

To cut that memory use in half, we can combine the two linked lists into a
single use list that contains both regular instruction uses and if-uses. To do
this, we augment the nir_src with a boolean "is_if", and reimplement the
abstract if-uses operations on top of that list. That boolean should fit into
the padding already in nir_src so should not actually affect memory use, and in
the future we sneak it into the bottom bit of a pointer.

However, this creates a new inefficiency: now iterating over regular uses
separate from if-uses is (nominally) more expensive. It turns out virtually
every caller of nir_foreach_if_use(_safe) also calls nir_foreach_use(_safe)
immediately before, so we rewrite most of the callers to instead call a new
single `nir_foreach_use_including_if(_safe)` which predicates the logic based on
`src->is_if`. This should mitigate the performance difference.

There's a bit of churn, but this is largely a mechanical set of changes.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
2023-04-07 23:48:03 +00:00
Alyssa Rosenzweig fd9c69218a tu: Use vk_features2_to_features
Sanitizes properties returned through GetPhysicalDeviceFormatProperties2.

Bit-31 is not valid to return in the original
vkGetPhysicalDeviceFormatProperties{2,}. Sanitize the bit returned from the
internal to ensure invalid bits aren't return to the application.

Falls in line with the other vulkan drivers.

Based on original commit by Ryan Houdek.

Closes: #8733
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22217>
2023-04-07 18:16:43 -04:00
Alyssa Rosenzweig 4fa2924610 anv,hasvk: Use vk_features2_to_features
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22217>
2023-04-07 18:16:40 -04:00
Alyssa Rosenzweig 672a06a1b6 pvr: Use vk_features2_to_features
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22217>
2023-04-07 18:16:40 -04:00
Alyssa Rosenzweig c517d45341 lavapipe: Use vk_features2_to_features
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22217>
2023-04-07 18:16:40 -04:00
Alyssa Rosenzweig b222b02d3d v3dv: Use vk_features2_to_features
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22217>
2023-04-07 18:16:40 -04:00
Alyssa Rosenzweig a7389f6894 radv: Use vk_features2_to_features
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22217>
2023-04-07 18:16:40 -04:00