platform/upstream/mesa.git
2 years agoradv: fix missing destruction of the inotify thread
Samuel Pitoiset [Wed, 16 Mar 2022 09:00:36 +0000 (10:00 +0100)]
radv: fix missing destruction of the inotify thread

The notifier state must be destroyed when a device is destroyed. Oops.
This fixes crashes at launch with The Witcher 3.

Fixes: c50557d9612 ("radv: allow applications to dynamically change RADV_FORCE_VRS")
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/15405>

2 years agoanv: implement EXT_depth_clip_control
Vadym Shovkoplias [Wed, 9 Mar 2022 10:35:26 +0000 (12:35 +0200)]
anv: implement EXT_depth_clip_control

A new extension allowing the application to use the OpenGL depth
range in NDC, i.e. with depth in range [-1, 1], as opposed to
Vulkan’s default of [0, 1].

v2:
- call gfx8_cmd_buffer_emit_viewport on ANV_CMD_DIRTY_PIPELINE (Jason)
- remove redundant !! operator since negativeOneToOne must be true or
  false (Tapani)
- coding style changes (Lionel)

Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6070
Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15304>

2 years agoci, radv: Update flake expectations
Charlie Turner [Mon, 14 Mar 2022 21:07:26 +0000 (21:07 +0000)]
ci, radv: Update flake expectations

dEQP-VK.api.object_management.multithreaded_shared_resources.image_2d
is flakey crashing on RENOIR and VEGA10.

Thanks Rhys Perry for pointing out the flake.

Acked-by: Martin Roukala <martin.roukala@mupuf.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15386>

2 years agoci, valve: Bump the trigger container
Charlie Turner [Wed, 2 Mar 2022 16:30:26 +0000 (16:30 +0000)]
ci, valve: Bump the trigger container

This contains some fixes in the executor client related to multipart
HTTP uploads. It will hopefully improve the stability of jobs!

Acked-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15386>

2 years agoci, valve: Show real kernel addresses in KFENCE reports.
Charlie Turner [Wed, 2 Mar 2022 10:13:00 +0000 (10:13 +0000)]
ci, valve: Show real kernel addresses in KFENCE reports.

Acked-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15386>

2 years agoradv: only clear VRAM for app and descriptor BOs when set via drirc
Samuel Pitoiset [Thu, 24 Feb 2022 17:29:17 +0000 (18:29 +0100)]
radv: only clear VRAM for app and descriptor BOs when set via drirc

We don't have to clear other internal BOs when it's set for eg. vkd3d.
This should reduce the number of SDMA clears.

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

2 years agoradv/winsys: remove old comment about zerovram
Samuel Pitoiset [Thu, 24 Feb 2022 17:00:55 +0000 (18:00 +0100)]
radv/winsys: remove old comment about zerovram

RADV requires Linux 4.15+.

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

2 years agolavapipe: EXT_image_robustness
Mike Blumenkrantz [Mon, 14 Mar 2022 20:20:11 +0000 (16:20 -0400)]
lavapipe: EXT_image_robustness

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15388>

2 years agogallivm: fix oob image detection for cube/1dArray/2dArray/cubeArray
Mike Blumenkrantz [Mon, 14 Mar 2022 20:19:25 +0000 (16:19 -0400)]
gallivm: fix oob image detection for cube/1dArray/2dArray/cubeArray

these all need to check for z coord oob to avoid crashing

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15388>

2 years agolavapipe: EXT_pipeline_creation_cache_control
Mike Blumenkrantz [Mon, 14 Mar 2022 16:26:15 +0000 (12:26 -0400)]
lavapipe: EXT_pipeline_creation_cache_control

again, technically passing is still passing

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15379>

2 years agolavapipe: EXT_pipeline_creation_feedback
Mike Blumenkrantz [Mon, 14 Mar 2022 16:12:34 +0000 (12:12 -0400)]
lavapipe: EXT_pipeline_creation_feedback

cts passes with mostly quality warnings, but it does pass

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15379>

2 years agolavapipe: KHR_zero_initialize_workgroup_memory
Mike Blumenkrantz [Mon, 14 Mar 2022 20:30:29 +0000 (16:30 -0400)]
lavapipe: KHR_zero_initialize_workgroup_memory

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15403>

2 years agollvmpipe: add handling for zeroing cs shared memory
Mike Blumenkrantz [Mon, 14 Mar 2022 21:16:45 +0000 (17:16 -0400)]
llvmpipe: add handling for zeroing cs shared memory

since this is just allocated by the cpu, it needs to be zeroed if the
shader expects that behavior

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15403>

2 years agolavapipe: KHR_format_feature_flags2
Mike Blumenkrantz [Mon, 14 Mar 2022 17:11:37 +0000 (13:11 -0400)]
lavapipe: KHR_format_feature_flags2

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15395>

2 years agolavapipe: use VkFormatFeatureFlags2 in format detection
Mike Blumenkrantz [Mon, 14 Mar 2022 17:11:18 +0000 (13:11 -0400)]
lavapipe: use VkFormatFeatureFlags2 in format detection

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15395>

2 years agogallium: add flag to draw info to indicate converted draws
Mike Blumenkrantz [Tue, 8 Mar 2022 22:38:06 +0000 (17:38 -0500)]
gallium: add flag to draw info to indicate converted draws

this draw mode in particular requires driver-specific conversions
for queries (e.g., number of vertices), so pass that info through

the only limitation is that it doesn't work for dlists,
but I have yet to see a real use case of a statistics query being used with dlists

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15326>

2 years agopanvk: Fix SSBO buffer offsets
Jason Ekstrand [Sat, 12 Mar 2022 04:16:20 +0000 (22:16 -0600)]
panvk: Fix SSBO buffer offsets

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15398>

2 years agopanvk: Require 16B alignment for UBOs
Jason Ekstrand [Fri, 11 Mar 2022 19:18:32 +0000 (13:18 -0600)]
panvk: Require 16B alignment for UBOs

This is required by MALI_UNIFORM_BUFFER.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15398>

2 years agoanv: silence compiler warnings
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>

2 years agoci: Add new Panfrost G52 skip
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>

2 years agomeson: restore private requires to libdrm in dri.pc file
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>

2 years agoturnip: use vk_shader_module_to_nir().
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>

2 years agopanvk: Use vk_shader_module_to_nir()
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>

2 years agopanvk: Use vk_shader_module
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>

2 years agoanv: Use vk_shader_module_to_nir()
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>

2 years agovulkan: Add a vk_shader_module_to_nir() helper
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>

2 years agolavapipe: enable KHR_memory_model support
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>

2 years agollvmpipe: set nir_shader_compiler_options::use_scoped_barrier
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>

2 years agolavapipe: strip unneeded scoped barriers
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>

2 years agoir3: Use isam for bindless readonly ssbo loads
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>

2 years agoir3: Actually use wrmask in emit_sam
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>

2 years agoir3/lower_spill: Fix corner case with oob offsets
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>

2 years agoir3/parser: Don't use right recursion
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>

2 years agotu: Add an extra storage descriptor for isam
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>

2 years agotu: Handle UBO/SSBO descriptors with different sizes
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>

2 years agotu: Rewrite dynamic descriptor handling
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>

2 years agozink: export indirect io pipe caps
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>

2 years agozink: fix unreachable() location in ntv streamout info
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>

2 years agozink: add DOUBLE glsl type for streamout export
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>

2 years agozink: add nir_var_function_temp support to ntv
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>

2 years agoturnip: Enable VK_EXT_display_control using the common code.
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>

2 years agoradv: fix returning empty drmFormatModifierTilingFeatures
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>

2 years agoradv: remove VK_AMD_shader_info support
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>

2 years agoradv: Expose VK_VALVE_descriptor_set_host_mapping for vkd3d only.
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>

2 years agoradv: Implement VK_VALVE_descriptor_set_host_mapping.
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>

2 years agovk: Update xml and headers to 1.3.207.
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>

2 years agollvmpipe/fs: add missing depth_clamp key printing
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>

2 years agolavapipe: KHR_shader_integer_dot_product
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>

2 years agogallivm: implement nir_op_pack_32_4x8_split
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>

2 years agolavapipe: maintenance4
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>

2 years agolavapipe: set maxBufferSize for maintenance4
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>

2 years agolavapipe: implement vkGetDevice*MemoryRequirements
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>

2 years agolavapipe: ref/unref pipeline layouts for pipeline creation
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>

2 years agolavapipe: always clone shader nir for shader states
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>

2 years agopanvk: Use the correct integer border colors
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>

2 years agopanvk: Rework texture, sampler, and image binding index calculation
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>

2 years agopanvk: Skip ZS setup if there is no depth/stencil attachment
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>

2 years agopanvk: Make panvk_image_view derive from vk_image_view
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>

2 years agopanvk: Make panvk_image derive from vk_image
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>

2 years agoRevert "glx: Fix build errors with --enable-mangling (v2)"
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>

2 years agoVenus: add VN_CMD_ENQUEUE to vn_cmd_encode_memory_barriers
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>

2 years agoVenus: Adjust VN_CMD_ENQUEUE to set VN_COMMAND_BUFFER_STATE_INVALID
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>

2 years agoVenus: Add VN_CMD_ENQUEUE macro with vkCmd* common code
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>

2 years agoradv: export the pipeline hash via VK_KHR_pipeline_executable_properties
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>

2 years agoradv,aco,ac/llvm: fix indirect dispatches on the compute queue on GFX7-10
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>

2 years agoaco: split and recombine unaligned sgpr inputs
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>

2 years agov3dv/ci: add test to skip list
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>

2 years agopanvk: Add support for texel buffers
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>

2 years agopanvk: Add a dummy sampler for NIR tex operations that don't take one
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>

2 years agopanvk: Stop advertising Vulkan 1.1
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>

2 years agoRevert "ci: downgrade sphinx to v3.x"
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>

2 years agopanfrost: Optimise recalculation of max sampler view
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>

2 years agopanfrost: Don't initialise the trampolines array
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>

2 years agoradv: stop zeroing radv_sample_locations_state in barriers
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>

2 years agoradv: move waiting for events to CmdWaitEvents2KHR()
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>

2 years agoradv: remove unnecessary check in FreeCommandBuffers()
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>

2 years agoradv: remove unnecessary NULL check in TrimCommandPool()
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>

2 years agoradv: remove useless check in radv_cmd_buffer_upload_data()
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>

2 years agoradv: fix compatibility with VK_IMAGE_CREATE_EXTENDED_USAGE_BIT
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>

2 years agoradv: update inputs_read when lowering the view index
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>

2 years agointel/compiler: Fix non-trivial designated initializer
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>

2 years agoradv: stop waiting for DMA to be idle for all transfer operations
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>

2 years agoRevert "llvmpipe: allow vertex processing and fragment processing in parallel"
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>

2 years agoradv: fix indirect dispatches on the compute queue on GFX10.3+
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>

2 years agoamd: add PKT3_LOAD_SH_REG_INDEX
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>

2 years agoaco/ra: refactor collect_vars() to return a sorted vector
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>

2 years agoaco/ra: refactor find_vars() to return a vector
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>

2 years agoaco/ra: special-case get_reg_for_create_vector_copy()
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>

2 years agoaco/ra: count constant moves in get_reg_create_vector()
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>

2 years agoradv: rework the CS regalloc hang workaround
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>

2 years agoradv: fix the CS regalloc hang workaround on GFX6 and few GFX7 chips
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>

2 years agozink: use dynamic rasterizer_discard state when possible
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>

2 years agozink: move dynamic state2 pipeline state to substruct in pipeline state
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>

2 years agozink: assert that the dynamic state array size is big enough
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>

2 years agoradv/winsys: add support for queues without user fences.
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>

2 years agoradv/winsys: add a ring level detection for ib bo usage.
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>

2 years agoradv/winsys: add nop packets for uvd and vcn dec.
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>

2 years agoradv/winsys: complete ring/ip translations.
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>

2 years agoradeonsi/tests: update piglit baseline on vega20
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>

2 years agoradv: Enable KHR_ray_query
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>