Lionel Landwerlin [Mon, 14 Mar 2022 20:38:45 +0000 (22:38 +0200)]
anv: silence compiler warnings
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6146
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15387>
Daniel Stone [Tue, 15 Mar 2022 22:02:58 +0000 (22:02 +0000)]
ci: Add new Panfrost G52 skip
This started failing for some reason, has been seen in
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/
19776551 and others.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Suggested-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15396>
Stefan Dirsch [Mon, 14 Mar 2022 12:41:28 +0000 (13:41 +0100)]
meson: restore private requires to libdrm in dri.pc file
Due to a typo the private requires to libdrm were lost in dri.pc.
Fixed another typo: Infastructure --> Infrastructure
Fixes:
3ae3569d822 ("meson: restore dri.pc file")
Signed-off-by: Stefan Dirsch <sndirsch@suse.com>
Tested-by: Stefan Dirsch <sndirsch@suse.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15375>
Emma Anholt [Thu, 10 Mar 2022 19:15:16 +0000 (11:15 -0800)]
turnip: use vk_shader_module_to_nir().
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15305>
Jason Ekstrand [Wed, 9 Mar 2022 18:18:05 +0000 (12:18 -0600)]
panvk: Use vk_shader_module_to_nir()
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15305>
Jason Ekstrand [Wed, 9 Mar 2022 18:05:39 +0000 (12:05 -0600)]
panvk: Use vk_shader_module
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15305>
Jason Ekstrand [Wed, 9 Mar 2022 17:37:11 +0000 (11:37 -0600)]
anv: Use vk_shader_module_to_nir()
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15305>
Jason Ekstrand [Wed, 9 Mar 2022 17:26:03 +0000 (11:26 -0600)]
vulkan: Add a vk_shader_module_to_nir() helper
This encapsulates all the little bits needed to turn a shader module
into some mostly reasonable NIR. It handles inlining functions,
lowering variable initializers, handling per-member structs and other
trickiness that is needed for consuming the output of spirv_to_nir.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15305>
Mike Blumenkrantz [Mon, 14 Mar 2022 13:34:39 +0000 (09:34 -0400)]
lavapipe: enable KHR_memory_model support
lavapipe's memory is always coherent, so this is already supported
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15377>
Mike Blumenkrantz [Mon, 14 Mar 2022 13:45:28 +0000 (09:45 -0400)]
llvmpipe: set nir_shader_compiler_options::use_scoped_barrier
required for vk memory model
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15377>
Mike Blumenkrantz [Mon, 14 Mar 2022 14:04:42 +0000 (10:04 -0400)]
lavapipe: strip unneeded scoped barriers
most of these do nothing and can't be emitted without breaking shaders
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15377>
Connor Abbott [Tue, 22 Feb 2022 17:01:27 +0000 (18:01 +0100)]
ir3: Use isam for bindless readonly ssbo loads
Since this isn't hooked up in gallium, only do it for bindless for now.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15288>
Connor Abbott [Tue, 8 Mar 2022 19:49:01 +0000 (20:49 +0100)]
ir3: Actually use wrmask in emit_sam
I noticed that isam emitted for SSBO loads was writing all 4 components,
which this fixes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15288>
Connor Abbott [Tue, 8 Mar 2022 12:57:04 +0000 (13:57 +0100)]
ir3/lower_spill: Fix corner case with oob offsets
If the base register is killed, it may be reused as the destination of a
ldp. In that case we should just skip resetting it afterwards.
Fixes regressions in dEQP-VK.ssbo.layout.random.scalar.38 later.
Fixes:
9912c61362b ("ir3/spill: Support larger spill slot offset")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15288>
Connor Abbott [Tue, 8 Mar 2022 12:54:56 +0000 (13:54 +0100)]
ir3/parser: Don't use right recursion
This fixes memory exhaustion errors when doing shader replacement with
very large shaders.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15288>
Connor Abbott [Wed, 23 Feb 2022 15:52:38 +0000 (16:52 +0100)]
tu: Add an extra storage descriptor for isam
Based on a workaround the blob does.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15288>
Connor Abbott [Wed, 23 Feb 2022 15:34:59 +0000 (16:34 +0100)]
tu: Handle UBO/SSBO descriptors with different sizes
We reuse the otherwise-unused offset channel to represent the array
stride, so that reindexing works properly.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15288>
Connor Abbott [Wed, 23 Feb 2022 15:16:03 +0000 (16:16 +0100)]
tu: Rewrite dynamic descriptor handling
We need to prepare for storage buffers having different sizes from
uniform buffers. This switches dynamic_offset_offset to have units of
bytes, the same as offset, and as a nice bonus we can more easily
combine the dynamic and non-dynamic paths in various different places.
This also entails rewriting the code that patches dynamic descriptors,
since we can no longer assume a linear mapping between indices in
dynamicOffsets and descriptor locations which the previous approach
heavily relied on.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15288>
Mike Blumenkrantz [Tue, 8 Mar 2022 20:46:27 +0000 (15:46 -0500)]
zink: export indirect io pipe caps
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15327>
Mike Blumenkrantz [Tue, 8 Mar 2022 20:43:34 +0000 (15:43 -0500)]
zink: fix unreachable() location in ntv streamout info
super annoying to debug otherwise
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15327>
Mike Blumenkrantz [Tue, 8 Mar 2022 20:43:10 +0000 (15:43 -0500)]
zink: add DOUBLE glsl type for streamout export
not used yet but someday
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15327>
Mike Blumenkrantz [Tue, 8 Mar 2022 20:42:09 +0000 (15:42 -0500)]
zink: add nir_var_function_temp support to ntv
I said I'd never do this, but here we are
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15327>
Emma Anholt [Fri, 11 Mar 2022 21:14:46 +0000 (13:14 -0800)]
turnip: Enable VK_EXT_display_control using the common code.
It's all implemented now, so we can turn it back on. Passes 15/16 tests
when X11 isn't running, and 1/16 when it is, with no failures in either
mode.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15351>
Samuel Pitoiset [Mon, 14 Mar 2022 16:30:57 +0000 (17:30 +0100)]
radv: fix returning empty drmFormatModifierTilingFeatures
From the Vulkan spec:
"drmFormatModifierTilingFeatures is a bitmask of
VkFormatFeatureFlagBits that are supported by any image created
with format and drmFormatModifier. The returned
drmFormatModifierTilingFeatures must contain at least one bit."
This fixes recent CTS dEQP-VK.drm_format_modifiers.*.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15383>
Samuel Pitoiset [Wed, 9 Mar 2022 08:48:08 +0000 (09:48 +0100)]
radv: remove VK_AMD_shader_info support
This extension is quite old and useless now.
VK_KHR_pipeline_executable_properties should be used instead.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15299>
Bas Nieuwenhuizen [Sun, 13 Mar 2022 18:10:38 +0000 (19:10 +0100)]
radv: Expose VK_VALVE_descriptor_set_host_mapping for vkd3d only.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15363>
Hans-Kristian Arntzen [Tue, 22 Feb 2022 10:42:54 +0000 (11:42 +0100)]
radv: Implement VK_VALVE_descriptor_set_host_mapping.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15363>
Bas Nieuwenhuizen [Sun, 13 Mar 2022 18:02:34 +0000 (19:02 +0100)]
vk: Update xml and headers to 1.3.207.
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15363>
Dave Airlie [Mon, 14 Mar 2022 19:22:54 +0000 (05:22 +1000)]
llvmpipe/fs: add missing depth_clamp key printing
Helps debugging shaders better.
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15385>
Mike Blumenkrantz [Mon, 14 Mar 2022 17:52:09 +0000 (13:52 -0400)]
lavapipe: KHR_shader_integer_dot_product
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15384>
Mike Blumenkrantz [Mon, 14 Mar 2022 17:50:02 +0000 (13:50 -0400)]
gallivm: implement nir_op_pack_32_4x8_split
just reusing existing helpers and llvm can optimize it for us
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15384>
Mike Blumenkrantz [Mon, 14 Mar 2022 14:28:46 +0000 (10:28 -0400)]
lavapipe: maintenance4
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15378>
Mike Blumenkrantz [Mon, 14 Mar 2022 13:50:47 +0000 (09:50 -0400)]
lavapipe: set maxBufferSize for maintenance4
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15378>
Mike Blumenkrantz [Mon, 14 Mar 2022 14:27:46 +0000 (10:27 -0400)]
lavapipe: implement vkGetDevice*MemoryRequirements
for maint4
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15378>
Mike Blumenkrantz [Mon, 14 Mar 2022 13:40:02 +0000 (09:40 -0400)]
lavapipe: ref/unref pipeline layouts for pipeline creation
required by maintenance4
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15378>
Mike Blumenkrantz [Wed, 9 Mar 2022 14:03:20 +0000 (09:03 -0500)]
lavapipe: always clone shader nir for shader states
these become owned and freed by llvmpipe, so ensure that freeing
them there won't cause crashes
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15281>
Jason Ekstrand [Sat, 12 Mar 2022 17:01:12 +0000 (11:01 -0600)]
panvk: Use the correct integer border colors
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15382>
Jason Ekstrand [Sat, 12 Mar 2022 03:42:21 +0000 (21:42 -0600)]
panvk: Rework texture, sampler, and image binding index calculation
This adds a new get_resource_deref_binding helper which decodes a
resource deref into set, binding, and index. To make texture
instructions nicer, the index can optionally be split into immediate
and SSA parts.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15382>
Jason Ekstrand [Fri, 11 Mar 2022 20:38:08 +0000 (14:38 -0600)]
panvk: Skip ZS setup if there is no depth/stencil attachment
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15382>
Jason Ekstrand [Fri, 11 Mar 2022 20:13:28 +0000 (14:13 -0600)]
panvk: Make panvk_image_view derive from vk_image_view
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15382>
Jason Ekstrand [Fri, 11 Mar 2022 20:01:15 +0000 (14:01 -0600)]
panvk: Make panvk_image derive from vk_image
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15382>
Eric Engestrom [Thu, 10 Oct 2019 17:13:53 +0000 (18:13 +0100)]
Revert "glx: Fix build errors with --enable-mangling (v2)"
This reverts commit
a27f2d991b1723c3349623401ce3c8f26dcdb28b.
As of
a0829cf23b307ca44ab8 ("GL: drop symbols mangling support"), this
extra complexity isn't needed anymore.
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2298>
Igor Torrente [Mon, 14 Mar 2022 11:39:01 +0000 (08:39 -0300)]
Venus: add VN_CMD_ENQUEUE to vn_cmd_encode_memory_barriers
Signed-off-by: Igor Torrente <igor.torrente@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15344>
Igor Torrente [Mon, 14 Mar 2022 10:55:20 +0000 (07:55 -0300)]
Venus: Adjust VN_CMD_ENQUEUE to set VN_COMMAND_BUFFER_STATE_INVALID
This improves the issue of a return inside the macro.
Signed-off-by: Igor Torrente <igor.torrente@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15344>
Igor Torrente [Fri, 11 Mar 2022 12:31:59 +0000 (09:31 -0300)]
Venus: Add VN_CMD_ENQUEUE macro with vkCmd* common code
Several `vn_Cmd` share the same code to enqueue the command to the
command stream.
This adds a macro with this common code.
Signed-off-by: Igor Torrente <igor.torrente@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15344>
Samuel Pitoiset [Tue, 8 Mar 2022 13:05:52 +0000 (14:05 +0100)]
radv: export the pipeline hash via VK_KHR_pipeline_executable_properties
This will help to match RGP<->Fossilize pipelines.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15279>
Rhys Perry [Wed, 16 Feb 2022 20:01:36 +0000 (20:01 +0000)]
radv,aco,ac/llvm: fix indirect dispatches on the compute queue on GFX7-10
Since neither PKT3_LOAD_SH_REG_INDEX nor PKT3_COPY_DATA work with compute
queues on GFX7-10, we have to load the dispatch size from memory in the
shader.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15064>
Rhys Perry [Thu, 17 Feb 2022 16:41:35 +0000 (16:41 +0000)]
aco: split and recombine unaligned sgpr inputs
An example is the num_work_groups argument. Fixes invalid assembly with
func.compute.num-workgroups.basic.q0
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15064>
Juan A. Suarez Romero [Mon, 14 Mar 2022 12:32:16 +0000 (13:32 +0100)]
v3dv/ci: add test to skip list
Add test that it is a timeout in the CI, but otherwise it passes.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15374>
Boris Brezillon [Fri, 24 Sep 2021 17:34:12 +0000 (19:34 +0200)]
panvk: Add support for texel buffers
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15334>
Boris Brezillon [Thu, 23 Sep 2021 16:02:41 +0000 (18:02 +0200)]
panvk: Add a dummy sampler for NIR tex operations that don't take one
In the NIR domain, some texture operations don't require a sampler, but
Bifrost/Midgard always want one. Let's add a dummy sampler to handle
that case.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15334>
Jason Ekstrand [Wed, 9 Mar 2022 16:12:19 +0000 (10:12 -0600)]
panvk: Stop advertising Vulkan 1.1
We're nowhere close to even having Vulkan 1.0 working yet, there's no
reason to get too excited about 1.1. It just means piles more test
crashes for features we're claiming to support but don't. If we want to
enable more tests, we can turn on the extensions for those features once
we actually have them working.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15334>
Erik Faye-Lund [Wed, 2 Mar 2022 11:58:58 +0000 (12:58 +0100)]
Revert "ci: downgrade sphinx to v3.x"
The readthedocs theme now supports Sphinx 4.x, so there's no longer any
reason to stick with 3.x.
This reverts commit
a545b6eda040ee40b5c36533d7ae378fc24fcf09.
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15212>
Icecream95 [Thu, 14 Oct 2021 03:39:59 +0000 (16:39 +1300)]
panfrost: Optimise recalculation of max sampler view
Previously we always searched through 128 sampler views for set
sampler views, now we never look above the maximum updated view.
Fixes:
304851422a4 ("panfrost: Fix set_sampler_views for big GL")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15366>
Icecream95 [Thu, 14 Oct 2021 03:38:38 +0000 (16:38 +1300)]
panfrost: Don't initialise the trampolines array
PIPE_MAX_SHADER_SAMPLER_VIEWS is 128, so we just end up initialising a
kilobyte of memory for no reason, when usually only a couple of
sampler views are used.
Fixes:
53ef20f08d4 ("panfrost: Handle NULL sampler views")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15366>
Samuel Pitoiset [Mon, 28 Feb 2022 15:00:43 +0000 (16:00 +0100)]
radv: stop zeroing radv_sample_locations_state in barriers
This is useless because all fields should be correctly filled if the
pNext struct is found.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15164>
Samuel Pitoiset [Mon, 28 Feb 2022 14:38:19 +0000 (15:38 +0100)]
radv: move waiting for events to CmdWaitEvents2KHR()
CmdPipelineBarrier doesn't have events.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15164>
Samuel Pitoiset [Wed, 23 Feb 2022 18:49:54 +0000 (19:49 +0100)]
radv: remove unnecessary check in FreeCommandBuffers()
cmd_buffer->pool should never be NULL. Even if AllocateCommandBuffers()
fails, the successfully created cmdbuffers would have it set correctly.
From the Vulkan spec:
"VUID-vkFreeCommandBuffers-pCommandBuffers-parent
Each element of pCommandBuffers that is a valid handle must have
been created, allocated, or retrieved from commandPool."
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15164>
Samuel Pitoiset [Wed, 23 Feb 2022 18:46:15 +0000 (19:46 +0100)]
radv: remove unnecessary NULL check in TrimCommandPool()
This function seems rarely used or maybe never but I noticed this.
From the Vulkan spec:
"VUID-vkTrimCommandPool-commandPool-parameter
commandPool must be a valid VkCommandPool handle".
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15164>
Samuel Pitoiset [Fri, 25 Feb 2022 07:14:25 +0000 (08:14 +0100)]
radv: remove useless check in radv_cmd_buffer_upload_data()
ptr shouldn't be NULL.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15164>
Samuel Pitoiset [Thu, 17 Feb 2022 15:21:47 +0000 (16:21 +0100)]
radv: fix compatibility with VK_IMAGE_CREATE_EXTENDED_USAGE_BIT
Some formats can be accepted if a compatible format is also supported
and VK_IMAGE_CREATE_EXTENDED_USAGE_BIT used.
Fixes new CTS dEQP-VK.image.extended_usage_bit_compatibility.*.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6046
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15063>
Samuel Pitoiset [Fri, 11 Mar 2022 08:10:41 +0000 (09:10 +0100)]
radv: update inputs_read when lowering the view index
Otherwise inputs_read doesn't contain the information. This shouldn't
fix anything in practice because radv_shader_info gathers this from
the variable.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15337>
Ernst Sjöstrand [Sat, 12 Mar 2022 16:24:11 +0000 (17:24 +0100)]
intel/compiler: Fix non-trivial designated initializer
Not supported by GCC 7.
src/compiler/nir/nir_builder_opcodes.h:14156:118:
sorry, unimplemented: non-trivial designated initializers not supported
src/intel/compiler/brw_mesh.cpp:515:7:
note: in expansion of macro ‘nir_store_per_primitive_output’
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Fixes:
bc4f8c073a2 ("intel/compiler: inject MUE initialization")
Signed-off-by: Ernst Sjöstrand <ernstp@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15360>
Samuel Pitoiset [Mon, 28 Feb 2022 14:50:34 +0000 (15:50 +0100)]
radv: stop waiting for DMA to be idle for all transfer operations
Only copy operations actually use CP DMA.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15194>
Gert Wollny [Thu, 10 Mar 2022 13:17:55 +0000 (14:17 +0100)]
Revert "llvmpipe: allow vertex processing and fragment processing in parallel"
This reverts commit
ec8104c6b227421b3a21e9c0652e3050066bb169.
llvmpipe: allow vertex processing and fragment processing in parallel
The commit breaks the the virglrenderer vtest environment used in the
virglrednerer CI and running wayland in virtualized environments.
Related: #6130
Related: #6110
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Acked-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15338>
Samuel Pitoiset [Wed, 16 Feb 2022 18:03:48 +0000 (19:03 +0100)]
radv: fix indirect dispatches on the compute queue on GFX10.3+
For weird reasons, the COPY_DATA packet doesn't seem to copy anything
while on the compute queue. Instead, use PKT3_LOAD_SH_REG_INDEX which
seems to work as expected.
Note that LOAD_SH_REG_INDEX on the compute queue is only supported by
the CP on GFX10.3, so we need to implement a different solution (load
from the indirect BO in the shader) for older generations.
This should fix the Control RT GPU hang.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15053>
Samuel Pitoiset [Wed, 16 Feb 2022 18:02:51 +0000 (19:02 +0100)]
amd: add PKT3_LOAD_SH_REG_INDEX
It seems only available on GFX8+.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15053>
Daniel Schürmann [Fri, 18 Jun 2021 15:51:15 +0000 (17:51 +0200)]
aco/ra: refactor collect_vars() to return a sorted vector
The vector of IDs is sorted with decreasing sizes,
and by increasing assigned registers.
This decouples register assingment from ssa IDs.
Totals from 12694 (9.41% of 134913) affected shaders: (GFX10.3)
VGPRs: 757864 -> 757848 (-0.00%); split: -0.00%, +0.00%
CodeSize:
72350540 ->
72348688 (-0.00%); split: -0.02%, +0.02%
MaxWaves: 237018 -> 237020 (+0.00%); split: +0.00%, -0.00%
Instrs:
13545494 ->
13544699 (-0.01%); split: -0.03%, +0.02%
Latency:
148539203 ->
148533292 (-0.00%); split: -0.01%, +0.00%
InvThroughput:
30319086 ->
30320382 (+0.00%); split: -0.01%, +0.01%
VClause: 326875 -> 327028 (+0.05%); split: -0.05%, +0.09%
SClause: 479833 -> 479837 (+0.00%); split: -0.00%, +0.00%
Copies: 862152 -> 860914 (-0.14%); split: -0.43%, +0.28%
Branches: 317775 -> 317777 (+0.00%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11526>
Daniel Schürmann [Fri, 18 Jun 2021 15:45:16 +0000 (17:45 +0200)]
aco/ra: refactor find_vars() to return a vector
instead of std::set<>
No fossil-db changes.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11526>
Daniel Schürmann [Fri, 18 Jun 2021 14:43:18 +0000 (16:43 +0200)]
aco/ra: special-case get_reg_for_create_vector_copy()
This function implements separate handling for
p_create_vector during get_regs_for_copies().
This simplifies some code and lets more precisely select
swap instructions if possible.
Totals from 876 (0.65% of 134913) affected shaders: (GFX10.3)
VGPRs: 53312 -> 53336 (+0.05%)
CodeSize: 3792936 -> 3788160 (-0.13%); split: -0.15%, +0.03%
MaxWaves: 16084 -> 16078 (-0.04%)
Instrs: 707449 -> 706385 (-0.15%); split: -0.19%, +0.04%
Latency: 6288293 -> 6286677 (-0.03%); split: -0.03%, +0.01%
InvThroughput: 4264450 -> 4263671 (-0.02%); split: -0.02%, +0.00%
VClause: 18655 -> 18679 (+0.13%); split: -0.20%, +0.33%
Copies: 55397 -> 54353 (-1.88%); split: -2.45%, +0.57%
Branches: 12426 -> 12415 (-0.09%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11526>
Daniel Schürmann [Fri, 18 Jun 2021 08:59:58 +0000 (10:59 +0200)]
aco/ra: count constant moves in get_reg_create_vector()
Also implements a correct_pos_mask to keep track which
operands are already at the right target position.
To mitigate some regressions, call get_reg_impl() less often.
Totals from 1229 (0.91% of 134913) affected shaders: (GFX10.3)
VGPRs: 60216 -> 59848 (-0.61%)
CodeSize: 3716496 -> 3711268 (-0.14%); split: -0.19%, +0.05%
MaxWaves: 27952 -> 28004 (+0.19%)
Instrs: 685983 -> 685035 (-0.14%); split: -0.20%, +0.06%
Latency: 6727587 -> 6725340 (-0.03%); split: -0.06%, +0.02%
InvThroughput: 9289043 -> 9289866 (+0.01%); split: -0.02%, +0.03%
VClause: 17730 -> 17740 (+0.06%); split: -0.25%, +0.30%
Copies: 54352 -> 53420 (-1.71%); split: -2.46%, +0.75%
Branches: 12122 -> 12121 (-0.01%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11526>
Samuel Pitoiset [Fri, 25 Feb 2022 07:54:27 +0000 (08:54 +0100)]
radv: rework the CS regalloc hang workaround
Move it to the pipeline creation to reduce computations in the hot path.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15162>
Samuel Pitoiset [Fri, 25 Feb 2022 07:44:07 +0000 (08:44 +0100)]
radv: fix the CS regalloc hang workaround on GFX6 and few GFX7 chips
RadeonSI uses a different terminology and info->blocks is actually the
number of threads, not the number of blocks (ie. info->grid).
Found by inspection.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15162>
Mike Blumenkrantz [Mon, 7 Mar 2022 20:17:55 +0000 (15:17 -0500)]
zink: use dynamic rasterizer_discard state when possible
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15328>
Mike Blumenkrantz [Mon, 7 Mar 2022 20:09:56 +0000 (15:09 -0500)]
zink: move dynamic state2 pipeline state to substruct in pipeline state
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15328>
Mike Blumenkrantz [Mon, 7 Mar 2022 20:56:58 +0000 (15:56 -0500)]
zink: assert that the dynamic state array size is big enough
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15328>
Dave Airlie [Mon, 7 Mar 2022 00:49:05 +0000 (10:49 +1000)]
radv/winsys: add support for queues without user fences.
The video queues don't have user fence support.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15257>
Dave Airlie [Mon, 7 Mar 2022 00:45:03 +0000 (10:45 +1000)]
radv/winsys: add a ring level detection for ib bo usage.
The video rings can't use IB bos
v2: add use_ib flag to avoid a bunch of checks.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15257>
Dave Airlie [Mon, 7 Mar 2022 00:34:37 +0000 (10:34 +1000)]
radv/winsys: add nop packets for uvd and vcn dec.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15257>
Dave Airlie [Mon, 7 Mar 2022 00:31:20 +0000 (10:31 +1000)]
radv/winsys: complete ring/ip translations.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15257>
Mihai Preda [Tue, 8 Mar 2022 02:00:43 +0000 (04:00 +0200)]
radeonsi/tests: update piglit baseline on vega20
current as of commit:
67314601947
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15273>
Konstantin Seurer [Fri, 14 Jan 2022 22:05:19 +0000 (23:05 +0100)]
radv: Enable KHR_ray_query
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14565>
Konstantin Seurer [Fri, 14 Jan 2022 22:08:27 +0000 (23:08 +0100)]
radv: Lower ray queries
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14565>
Konstantin Seurer [Fri, 14 Jan 2022 22:06:07 +0000 (23:06 +0100)]
nir,spirv: Preserve ray_query_value
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14565>
Konstantin Seurer [Fri, 14 Jan 2022 22:02:37 +0000 (23:02 +0100)]
radv: Move common code to seperate file
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14565>
Dave Airlie [Sat, 12 Mar 2022 19:42:10 +0000 (05:42 +1000)]
radv: try and fix internal transfer queue mapping
The WSI code wants to remain generic and try and use vulkan APIs,
even though these queues aren't exposed through the API.
Add the transfer queue to the end of the queues.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15357>
Mike Blumenkrantz [Sun, 13 Mar 2022 00:15:17 +0000 (19:15 -0500)]
zink: anv ci updates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15361>
Alyssa Rosenzweig [Sat, 5 Mar 2022 21:27:56 +0000 (16:27 -0500)]
panfrost: Handle txs of cube arrays
We need to divide the array length by 6 to match what OpenGL expects.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15254>
Alyssa Rosenzweig [Sat, 5 Mar 2022 20:49:43 +0000 (15:49 -0500)]
pan/bi: Handle non-2D arrays
Handle arrays generically by using the last component of the coordinate source
as the array index. That works for both 2D arrays and cube arrays, fixing cube
arrays. Cube arrays were already handled correctly in core Panfrost code.
This code path is not tested in dEQP-GLES31 without exposing OES_cube_map_array,
which depends on OES_geometry_shader, which we don't have. Yet we do expose
PIPE_CAP_CUBE_ARRAY, so ARB_cube_map_array is exposed.
Disabling PIPE_CAP_CUBE_ARRAY would be an easy band-aid fix, but it's easy
enough to handle correctly.
dEQP-GLES31 passes with a hack enabling OES_cube_map_array [without geometry
shaders].
Also fixes 1D arrays on Bifrost for the same reasons.
Fixes:
70d6c5675d6 ("pan/bi: Emit TEXC with builder")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15254>
Alyssa Rosenzweig [Sat, 5 Mar 2022 20:10:10 +0000 (15:10 -0500)]
panfrost: Emulate GL_CLAMP on Bifrost
Hardware support was removed with Midgard. Use mesa/st to emulate GL_CLAMP with
nir_lower_tex automatically (the Zink lowering), and disable GL_MIRROR_CLAMP
which isn't lowered correctly.
Fixes *texwrap* Piglit tests on G52.
Fixes:
f9ceab7b237 ("panfrost: Fix CLAMP wrap mode")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15253>
Rob Clark [Fri, 11 Mar 2022 04:46:23 +0000 (20:46 -0800)]
freedreno/ir3: Don't try re-swapping cat3 srcs
This can lead us to endless loops of "progress".. Note fixes commit
commit really just exposed an existing problem.
Fixes:
9c9e8c33498 ("nir: Reorder ffma and fsub combining")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6133
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15336>
Rob Clark [Fri, 11 Mar 2022 04:42:00 +0000 (20:42 -0800)]
freedreno/ir3: Remove unused define
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15336>
Rob Clark [Thu, 9 Apr 2020 16:39:09 +0000 (09:39 -0700)]
mesa: Easier shader capture for android
I've typed this patch a few times already.. lets just add some debug
code which can be easily switched on so I don't have to type it again.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15336>
Dave Airlie [Mon, 28 Feb 2022 08:01:44 +0000 (18:01 +1000)]
crocus: force ignore_sample_mask_out on gen4/5 for precompile
on gen4/5 this won't ever be anything else, avoids some recompiles.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15315>
Dave Airlie [Thu, 3 Mar 2022 03:48:34 +0000 (13:48 +1000)]
intel: add some missing debug recompile info.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15315>
Jason Ekstrand [Fri, 11 Mar 2022 18:47:21 +0000 (12:47 -0600)]
bifrost: Constant fold after lower_explicit_io
nir_lower_explicit_io generates mul+add chains even for constants. One
round of constant folding should get rid of these. This fixes all of
the dEQP-VK.glsl.conversions.* tests on panvk.
GoGoGoGo'd-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15349>
Alyssa Rosenzweig [Sat, 5 Mar 2022 22:07:37 +0000 (17:07 -0500)]
mesa: Remove unused framebuffer validation
Probably unused since we deleted classic.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15255>
Jason Ekstrand [Fri, 11 Mar 2022 21:28:26 +0000 (15:28 -0600)]
bifrost: Handle nir_op_frexp* and nir_op_ldexp
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15352>
Jason Ekstrand [Fri, 11 Mar 2022 22:11:16 +0000 (16:11 -0600)]
bifrost: Implement fine and coarse derivatives
We leave the undecorated ops as fine so we don't disturb panfrost. For
coarse derivatives, we use a lane ID of 0 for the first lane and 1 or 2
for the second depending on axis. This ensures that coarse derivatives
are quad-uniform.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15352>
Jason Ekstrand [Fri, 11 Mar 2022 22:09:28 +0000 (16:09 -0600)]
bifrost: Simplify derivatives a bit
Instead of two magic ternary operations, define a new `axis` temporary
which is 1 for X and 2 for Y. Then define everything else in terms of
this variable. In particular, the mask operation we do on LANE_ID is a
mask so it makes more sense to use ~axis than 1/2 but in the other
order.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15352>