Commit Graph

169767 Commits

Author SHA1 Message Date
Alyssa Rosenzweig c7bf3b69eb panvk: Clang-format
We're going to enforce clang-format in CI, so get with the program! This doesn't
change a *ton* all considered, because panvk was already aiming for the style we
have in the panfrost clang-format file.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22372>
2023-04-10 21:56:04 +00:00
Alyssa Rosenzweig 4ccf174009 panfrost: Re-run clang-format
We've regressed the clang-formatting in a few places, since we're not enforcing
formatting in CI yet and I think at one point my editor wasn't quite right.
Reapply so we can get to clang-format-clean.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22372>
2023-04-10 21:56:04 +00:00
Alyssa Rosenzweig 0a67386b40 pan/decode: Move comment out of designated initializer
clang-format chokes on this.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22372>
2023-04-10 21:56:04 +00:00
Alyssa Rosenzweig c90f036516 panfrost/winsys: Clang-format
This was missed in the original clang-format commit because I touch this code so
infrequently, lol.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22372>
2023-04-10 21:56:04 +00:00
Alyssa Rosenzweig edb5b03cde panfrost/winsys: Add .clang-format for winsys folder
Last place where Panfrost code hides.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22372>
2023-04-10 21:56:04 +00:00
Alyssa Rosenzweig 74a31491ed panfrost: Symlink gallium .clang-format to common
So we only have one .clang-format file to worry about.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22372>
2023-04-10 21:56:04 +00:00
Alyssa Rosenzweig e3105f93bd mailmap: Update my e-mail
https://rosenzweig.io/blog/passing-reins-panfrost.html

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22399>
2023-04-10 21:54:05 +00:00
Mike Blumenkrantz d87756923d lavapipe: refactor/consolidate GPL shader copying
this is easier to read/modify

also add asserts for members that should be null

Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22352>
2023-04-10 21:35:57 +00:00
Mike Blumenkrantz e33fda3732 lavapipe: copy fragment shader when merging GPL pipelines
this otherwise loses access data and causes flakiness with atomic ops

Fixes: 6e5fe71599 ("lavapipe: split out shader struct members into their own struct")

Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22352>
2023-04-10 21:35:57 +00:00
Timur Kristóf 14be6b084e radv: Don't include nir.h in radv_shader.h
Avoid recompiling some RADV files when something changes in NIR.
Also clean up a few other includes.

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 2ff1267959 aco: Only include nir.h in instruction selection.
Don't recompile entire ACO when something changes in NIR.
Instead, only use some headers which are actually needed,
include these in ACO files instead of relying on nir.h to
include them.

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