Pavel Ondračka [Thu, 9 Feb 2023 19:49:54 +0000 (20:49 +0100)]
nine: use separate register for aL emulation
NIR loop unrolling is only working if the loop counter is a scalar.
So keep the loop counter separate and move the aL emulation and
the aL increment to a new register.
This allows loop unrolling with vec4 backends where unconditional
scalarizing of phi nodes is undesirable, like for example r300.
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Axel Davy <davyaxel0@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7222
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21243>
Karol Herbst [Fri, 18 Nov 2022 14:51:18 +0000 (15:51 +0100)]
rusticl/kernel: make use of cso info
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>
Karol Herbst [Wed, 30 Nov 2022 16:53:43 +0000 (17:53 +0100)]
panfrost: implement get_compute_state_info
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>
Karol Herbst [Wed, 30 Nov 2022 16:53:12 +0000 (17:53 +0100)]
panfrost: move max_thread_count and take reg_count into account
We'll need it to report proper thread counts for OpenCL.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>
Karol Herbst [Wed, 30 Nov 2022 13:55:30 +0000 (14:55 +0100)]
nvc0: implement get_compute_state_info
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>
Karol Herbst [Wed, 30 Nov 2022 16:17:48 +0000 (17:17 +0100)]
nv50: implement get_compute_state_info
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>
Karol Herbst [Fri, 18 Nov 2022 20:20:05 +0000 (21:20 +0100)]
iris: implement get_compute_state_info
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>
Karol Herbst [Wed, 30 Nov 2022 11:53:57 +0000 (12:53 +0100)]
lp: implement get_compute_state_info
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>
Karol Herbst [Wed, 16 Nov 2022 22:22:13 +0000 (23:22 +0100)]
gallium: add get_compute_state_info
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>
Karol Herbst [Tue, 22 Nov 2022 22:00:46 +0000 (23:00 +0100)]
rusticl/kernel: set has_variable_shared_mem on the nir
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>
Karol Herbst [Tue, 22 Nov 2022 21:47:29 +0000 (22:47 +0100)]
nir: track existence of variable shared memory
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855>
Sil Vilerino [Fri, 31 Mar 2023 15:12:28 +0000 (11:12 -0400)]
Revert "d3d12: Honor suggested driver profile/level for H264/HEVC encode"
This reverts commit
37652da61612aadfedc23ba484b33781654d5d56.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22239>
Rhys Perry [Thu, 30 Mar 2023 14:33:57 +0000 (15:33 +0100)]
aco: don't optimize s_or_b64(v_cmp_u_f32(a, b), cmp(a, a))
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22214>
Charlie Birks [Thu, 17 Jun 2021 11:23:29 +0000 (11:23 +0000)]
docs: add a few vulkan extensions supported by multiple drivers
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11445>
Konstantin Seurer [Thu, 2 Mar 2023 12:57:03 +0000 (13:57 +0100)]
radv/ci: Update ray tracing pipeline fail/skip lists
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22018>
Samuel Pitoiset [Fri, 31 Mar 2023 11:32:59 +0000 (13:32 +0200)]
radv: fix binding raytracing/compute pipelines
If a compute pipeline is bound after a raytracing pipeline, the
computes shader slot (aka RT prolog) will be overwritten.
To fix this, move the RT prolog outside of the compute shader slot.
Fixes:
d109362a3da ("radv: copy bound shaders to the cmdbuf state")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22235>
Samuel Pitoiset [Fri, 31 Mar 2023 11:55:38 +0000 (13:55 +0200)]
radv: add the raygen shader BO to the cmdbuf list
Found by inspection.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22235>
Timur Kristóf [Thu, 30 Mar 2023 21:44:18 +0000 (23:44 +0200)]
ac/nir/ngg: Slightly improve attribute ring offset calculation.
Inspired by Nicolai Hähnle's commit in LLPC.
Instead of using a SALU instruction to add to the scalar
offset, rely on the buffer swizzling and use constant offset.
Fossil DB stats on GFX1100:
Totals from 47910 (35.51% of 134913) affected shaders:
CodeSize:
87927612 ->
86968136 (-1.09%)
Instrs:
17584007 ->
17440094 (-0.82%)
Latency:
97232173 ->
97126311 (-0.11%)
InvThroughput: 9904586 -> 9905288 (+0.01%); split: -0.02%, +0.02%
VClause: 544430 -> 542566 (-0.34%)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22227>
Timur Kristóf [Fri, 31 Mar 2023 03:05:36 +0000 (05:05 +0200)]
radv: Use radv_get_shader to get vertex shader when binding pipeline.
The shaders[MESA_SHADER_VERTEX] can be NULL for merged shaders.
Fixes:
b2ac40e734194fcb571a72396b5644b1d351e48a
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8749
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22229>
Samuel Pitoiset [Thu, 30 Mar 2023 15:08:27 +0000 (17:08 +0200)]
radv: configure PA_SC_MODE_CNTL_1 during cmdbuf recording
Two graphics pipeline parameters need to be copied to the cmdbuf
state.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22218>
Samuel Pitoiset [Thu, 30 Mar 2023 15:40:28 +0000 (17:40 +0200)]
radv: set PS_ITER_SAMPLE(1) for sample shading during cmdbuf recording
This shouldn't be configured in the pipeline.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22218>
Samuel Pitoiset [Thu, 30 Mar 2023 12:06:14 +0000 (14:06 +0200)]
radv: copy db_render_control to the cmdbuf state
This register is only used for meta operations.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22218>
José Roberto de Souza [Tue, 14 Feb 2023 19:54:16 +0000 (11:54 -0800)]
iris: Implement Xe version of bo_madvise() and bo_set_caching()
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22060>
Maarten Lankhorst [Thu, 15 Dec 2022 17:48:13 +0000 (18:48 +0100)]
iris: Place scanout buffers only into lmem for discrete GPUs
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22060>
José Roberto de Souza [Tue, 14 Feb 2023 19:58:34 +0000 (11:58 -0800)]
iris: Handle allocation of scanout buffers in Xe
Bos that will be scanout in display need to be allocated with
flags = XE_GEM_CREATE_FLAG_SCANOUT in Xe and that implies to different
caching rules for this buffer.
So here not allowing to get scanout buffer from cache or allow it
to be placed in a cache bucket for reuse.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22060>
José Roberto de Souza [Tue, 14 Feb 2023 19:49:17 +0000 (11:49 -0800)]
iris: Handle allocation of exported buffers in Xe kmd
Bos that will be exported need to be allocated with vm_id = 0 in Xe,
so don't try to get a bo from cache that was allocated with a
valid vm_id.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22060>
José Roberto de Souza [Thu, 17 Nov 2022 20:47:59 +0000 (12:47 -0800)]
iris: Add BO_ALLOC_SHARED
Xe KMD requires special handling for exported buffers during creation.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22060>
Faith Ekstrand [Mon, 20 Mar 2023 23:00:38 +0000 (18:00 -0500)]
anv: Use the new vk_device_memory base struct
Reviewed-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038>
Faith Ekstrand [Mon, 20 Mar 2023 19:49:00 +0000 (14:49 -0500)]
vulkan: Add a vk_device_memory base struct
This lets us provide a vk_device_memory_range helper similar to what's
provided for buffers for dealing with VK_WHOLE_SIZE. We can also handle
flags and some annoyance around Android hardware buffer import.
Reviewed-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038>
Faith Ekstrand [Mon, 20 Mar 2023 23:41:31 +0000 (18:41 -0500)]
vulkan,anv,hasvk,radv: Unify Android hardware buffer creation
Reviewed-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038>
Faith Ekstrand [Tue, 21 Mar 2023 16:09:48 +0000 (11:09 -0500)]
radv: Set vk_image.ahardware_buffer_format
Reviewed-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038>
Faith Ekstrand [Tue, 21 Mar 2023 15:42:54 +0000 (10:42 -0500)]
anv,hasvk: Set vk_image.ahardware_buffer_format
This effectively just modifies it for YCbCr images where the common code
doesn't have a useable format mapping.
Reviewed-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038>
Faith Ekstrand [Tue, 21 Mar 2023 15:24:40 +0000 (10:24 -0500)]
vulkan: Add an ahardware_buffer_format field to vk_image
Reviewed-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038>
Faith Ekstrand [Tue, 21 Mar 2023 23:25:37 +0000 (18:25 -0500)]
vulkan/android: Fix hardware buffer usage flags
We now add the correct usage flags for input attachments, storage
images, and depth/stencil attachments.
Reviewed-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038>
Faith Ekstrand [Mon, 20 Mar 2023 23:29:37 +0000 (18:29 -0500)]
vulkan,anv,hasvk,radv: Add a common vk_image_usage_to_ahb_usage helper
Reviewed-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038>
Felix DeGrood [Wed, 29 Mar 2023 19:35:44 +0000 (19:35 +0000)]
anv: set CFE_STATE.OverDispatchControl to default
BSpec specifies default value for CFE_STATE.OverDispatchControl
is 2, or 50% overdispatch. No observed performance impact.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22179>
Felix DeGrood [Tue, 28 Mar 2023 17:04:32 +0000 (17:04 +0000)]
anv: only emit CFE_STATE when scratch space increases
On Gen12.5+, we only need to emit CFE_STATE when scratch space
has changed, not on every pipeline binding. Also, only grow the
scratch space, never shrink it. Need to reset after secondary buf.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22179>
Lionel Landwerlin [Thu, 30 Mar 2023 12:16:09 +0000 (15:16 +0300)]
anv: move queue check helpers to anv_private
Also fix missing trace point stuff in command buffer begin/end
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22179>
Lionel Landwerlin [Thu, 30 Mar 2023 10:22:53 +0000 (13:22 +0300)]
anv: compute the largest GRL kernel scratch size
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22179>
Felix DeGrood [Tue, 28 Mar 2023 16:10:12 +0000 (16:10 +0000)]
anv: cs_stall during compute state flush on < gen12.5
The CS Stall in cmd_buffer_flush_compute_state is only required
on HW that uses MEDIA_VFE_STATE, gen12 and previous.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22179>
Lucas Fryzek [Thu, 2 Mar 2023 12:38:50 +0000 (07:38 -0500)]
gallium: Modify default path for DMABUF to use DRM
Modify the code path taken in `u_pipe_screen_get_param_defaults`
to call DRM to check if `PIPE_CAP_DMABUF` is supported. This is
required for overriding the behavior in `dri2_init_screen_extensions`
to support importing DMA bufs on drivers that don't support DRM, by
simply changing how `PIPE_CAP_DMABUF` is handled in their driver.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
Lucas Fryzek [Thu, 2 Mar 2023 19:52:02 +0000 (14:52 -0500)]
d3d12/llvmpipe/softpipe: Add support for `get_screen_fd`
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
Lucas Fryzek [Thu, 2 Mar 2023 19:51:08 +0000 (14:51 -0500)]
r300/r600/radeon_si: Add support for `get_screen_fd`
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
Lucas Fryzek [Thu, 2 Mar 2023 19:49:31 +0000 (14:49 -0500)]
virgl: Add support for `get_screen_fd`
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
Lucas Fryzek [Thu, 2 Mar 2023 19:48:56 +0000 (14:48 -0500)]
svga: Add support for `get_screen_fd`
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
Lucas Fryzek [Thu, 2 Mar 2023 19:48:14 +0000 (14:48 -0500)]
i915: Add support for `get_screen_fd`
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
Lucas Fryzek [Thu, 2 Mar 2023 19:47:32 +0000 (14:47 -0500)]
iris: Add support for `get_screen_fd`
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
Lucas Fryzek [Thu, 2 Mar 2023 19:47:02 +0000 (14:47 -0500)]
zink: Add support for `get_screen_fd`
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
Lucas Fryzek [Thu, 2 Mar 2023 19:46:29 +0000 (14:46 -0500)]
nouveau: Add support for `get_screen_fd`
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
Lucas Fryzek [Thu, 2 Mar 2023 19:45:46 +0000 (14:45 -0500)]
tegra: Add support for `get_screen_fd`
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
Lucas Fryzek [Thu, 2 Mar 2023 19:45:11 +0000 (14:45 -0500)]
crocus: Add support for `get_screen_fd`
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
Mike Blumenkrantz [Fri, 31 Mar 2023 11:22:03 +0000 (07:22 -0400)]
lavapipe: advertise EXT_shader_object
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22233>
Mike Blumenkrantz [Tue, 7 Mar 2023 17:44:53 +0000 (12:44 -0500)]
lavapipe: implement EXT_shader_object
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22233>
Mike Blumenkrantz [Mon, 6 Mar 2023 20:21:54 +0000 (15:21 -0500)]
lavapipe: break out pipeline layout creation for reuse
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22233>
Corentin Noël [Fri, 3 Mar 2023 18:38:34 +0000 (19:38 +0100)]
venus/ci: Only run one crosvm instance
As venus now has separate render server processes it is better to use a single
crosvm instance to run all the tests.
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21693>
Corentin Noël [Fri, 17 Mar 2023 09:53:48 +0000 (10:53 +0100)]
ci: Uprev crosvm and virglrenderer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21693>
Samuel Pitoiset [Fri, 31 Mar 2023 08:33:12 +0000 (10:33 +0200)]
vulkan: Update XML and headers to 1.3.246
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22231>
antonino [Thu, 30 Mar 2023 15:55:38 +0000 (17:55 +0200)]
zink: update requirements now that pv mode can be emulated
Zink can now emulate provoking vertex mode when the extention is
missing, update requirements to reflect this.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22162>
antonino [Thu, 23 Mar 2023 12:58:04 +0000 (13:58 +0100)]
zink: always advertize provoking vertex mode support
Require VK_EXT_provoking_vertex for optimal_keys and always advertize
PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION since it can now be
emulated
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22162>
antonino [Fri, 24 Mar 2023 15:03:02 +0000 (16:03 +0100)]
zink: add provoking vertex mode lowering
Can be used as fallback for when VK_EXT_provoking_vertex is missing
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22162>
antonino [Wed, 29 Mar 2023 09:43:33 +0000 (11:43 +0200)]
zink: add field to 'zink_gs_key' and enum
Add enum for pv emulation primitives and `lower_pv_mode`
to `zink_gs_key`
The enum contains the possible values of the lower_pv_mode key
This key will be non 0 whenever provoking vertex mode needs to be
emulated and it's exact value encodes relevant information about the
primitive that needs to be emulated
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22162>
antonino [Thu, 23 Mar 2023 12:34:45 +0000 (13:34 +0100)]
zink: simplify logic to call `zink_set_primitive_emulation_keys`
The logic had grown to check every primitive indivdually, instead just
check wehether `rast_prim` has changed
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22162>
antonino [Thu, 30 Mar 2023 15:45:15 +0000 (17:45 +0200)]
nir: only handle flat interpolation when needed in `nir_create_passthrough_gs`
When turning primitives into line strips this function needs to move
attributes around, but this is not needed in other cases.
Fixes:
1a5bdca2dda ("zink: implement flat shading using inlined uniforms")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22162>
xurui [Thu, 30 Mar 2023 03:25:05 +0000 (11:25 +0800)]
panfrost: Check the return value of drmGetVersion
Signed-off-by: xurui <xurui@kylinos.cn>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22203>
Erik Faye-Lund [Tue, 15 Nov 2022 10:56:28 +0000 (11:56 +0100)]
docs: make code-block indents consistent
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22052>
Erik Faye-Lund [Tue, 15 Nov 2022 10:54:30 +0000 (11:54 +0100)]
docs: format code-block as toml
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22052>
Erik Faye-Lund [Tue, 15 Nov 2022 10:52:49 +0000 (11:52 +0100)]
docs: format code-block as ini
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22052>
Friedrich Vock [Fri, 17 Mar 2023 07:22:42 +0000 (08:22 +0100)]
radv: Work around use-after-free compiler errors
Fixes:
4dafb69d ("radv/rt: defer library_pipeline allocation")
Tested-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21981>
Samuel Pitoiset [Wed, 25 Jan 2023 15:22:16 +0000 (16:22 +0100)]
radv: add dynamic support for rectangles enable/mode
This is in VK_EXT_discard_rectangles version 2.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21360>
Samuel Pitoiset [Wed, 25 Jan 2023 15:35:14 +0000 (16:35 +0100)]
vulkan: add dynamic support for rectangles enable/mode
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21360>
Samuel Pitoiset [Thu, 30 Mar 2023 15:26:34 +0000 (17:26 +0200)]
radv: fix sample shading when a new fragment shader is bound
Sample shading can be enabled from the pipeline and from the fragment
shader, in that case we need to re-emit some states.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22215>
Sagar Ghuge [Thu, 30 Mar 2023 17:18:21 +0000 (10:18 -0700)]
intel/decoder: Bump the binding table guess value to 32
Let's bump the binding table value guess to 32 instead of 8 and also stop
decoding the binding table entries as soon as we hit the zero
initialized value in the map.
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22221>
Alyssa Rosenzweig [Thu, 30 Mar 2023 15:37:43 +0000 (11:37 -0400)]
docs: Remove docs about macOS hardware drivers
We dropped support for hardware macOS drivers in
afe134a49c5 ("asahi: Drop macOS
backend"), so drop the corresponding documentation. Layered and software drivers
are still supported on macOS for better or worse, so the main "Notes on macOS"
page can stay I think.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22213>
Jesse Natalie [Tue, 7 Feb 2023 22:14:37 +0000 (14:14 -0800)]
microsoft/clc: Add shader model / validator to compiler API
Shader model 6.2 was the upper bounds of what *could* be generated
before, but not all devices support it. And other devices support
even more. So, let's pass in the shader model / validator that will
be used by the API caller.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21178>
Alyssa Rosenzweig [Thu, 16 Mar 2023 01:36:18 +0000 (21:36 -0400)]
panfrost: Choose hierarchy masks by vertex count
Currently, we always use a hierarchy mask with all levels enabled. While this is
efficient for geometry-heavy workloads like 3D games, it is wasteful for 2D
applications that draw very few vertices. For drawing just a few textured quads,
the overhead of small bin sizes outweighs any performance advantages, so it's a
bit slower. More problematically, small bin sizes require tremendous amounts of
memory for the polygon lists, leading to significant memory consumption (~10MB)
for the polygon list for even the simplest of 2D blits.
To reduce our memory footprint, we need to choose our hierarchy masks more
carefully. In general, we want to allow small bin sizes for geometry-heavy
workloads but not for geometry-light workloads. We estimate vertex count in the
driver as a proxy for this, and use a simple heuristic to select a bin size
based on the estimated vertex count. None of this is an exact science, and the
heuristic could probably be tuned. Nevertheless, the heuristic used (comparing
framebuffer size to vertex count) works well in practice, significantly reducing
the memory footprint of 2D applications like Firefox without hurting the
performance of 3D applications.
I originally wrote this patch while diagnosing high memory footprints on my
Midgard laptop, which is why only Midgard is in scope here. On Bifrost and
Valhall, we have a similar hiearchy mask selection problem. It seems likely that
the same heuristic would work there too, but it's a different code path that I
have not integrated or tested. I'll leave that for the adventurous reader, to
get the memory footprint win there too.
(It's also possible the win is smaller on newer Malis than on Midgard, since Arm
claims they optimized the tiler data structures on the newer parts. There's
probably still some merit to the idea.)
On Mali-T860, glmark2 -bdesktop frametime decreased by 1.35% +/- 0.91% at 95%
confidence, showing a slight win for 2D workloads No statistically significant
difference for glmark2 -bshading:shading=phong, since 3D workloads continue to
use the same hierarchy masks.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19482>
Alyssa Rosenzweig [Thu, 16 Mar 2023 01:35:29 +0000 (21:35 -0400)]
panfrost: Estimate vertex count for hier mask
In the next commit, we will refine our algorithm to select hierarchy masks based
on the vertex count. In preparation, augment the driver to track rough estimates
of the vertex count so we have a "geometry complexity" input for the heuristic.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19482>
Alyssa Rosenzweig [Mon, 31 Oct 2022 03:33:48 +0000 (23:33 -0400)]
panfrost: Clean up tiler calculations
We're about to do some work on this file. Clean it up first.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19482>
Danylo Piliaiev [Fri, 3 Mar 2023 18:32:36 +0000 (19:32 +0100)]
freedreno/computerator: Add support for a7xx
Not everything works correctly, e.g. stib seems flakey while stg
seems alright.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
Danylo Piliaiev [Fri, 3 Mar 2023 13:11:40 +0000 (14:11 +0100)]
freedreno/computerator: Templatize a6xx backend
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
Danylo Piliaiev [Tue, 21 Feb 2023 14:49:57 +0000 (15:49 +0100)]
freedreno: Add dummy a730/a740 definition
Needed for assembly/disassembly.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
Danylo Piliaiev [Thu, 16 Feb 2023 18:24:16 +0000 (19:24 +0100)]
freedreno: Move fd6_pack.h to common code accessible by computerator
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
Danylo Piliaiev [Fri, 3 Mar 2023 12:39:19 +0000 (13:39 +0100)]
freedreno/computerator: Convert to C++
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
Danylo Piliaiev [Mon, 27 Mar 2023 16:48:47 +0000 (18:48 +0200)]
freedreno: C++ fixes for computerator to compile
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
Danylo Piliaiev [Fri, 3 Mar 2023 12:32:09 +0000 (13:32 +0100)]
freedreno/computerator: C++ proofing
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
Danylo Piliaiev [Thu, 16 Feb 2023 18:24:16 +0000 (19:24 +0100)]
freedreno/registers: More a7xx regs
Based on
011c54b0 from Jonathan Marek.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
Danylo Piliaiev [Fri, 3 Mar 2023 18:32:08 +0000 (19:32 +0100)]
freedreno/registers: Document new CP_EVENT_WRITE::SEQNO
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
Alyssa Rosenzweig [Sun, 15 Jan 2023 01:10:12 +0000 (20:10 -0500)]
panfrost: Add a v9 fast path for no images
The usual case.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21848>
Alyssa Rosenzweig [Sat, 14 Jan 2023 23:24:32 +0000 (18:24 -0500)]
panfrost: Don't update access with a single batch
drawoverhead test 25 from 462->492
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21848>
Alyssa Rosenzweig [Sat, 14 Jan 2023 03:53:20 +0000 (22:53 -0500)]
panfrost: Mark packs as ALWAYS_INLINE
As Intel does. These functions are written with the expectation that they will
be inlined away, allowing gcc's copy-prop and constant folding to eliminate the
template struct and any unused fields.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21848>
Alyssa Rosenzweig [Sat, 14 Jan 2023 03:39:03 +0000 (22:39 -0500)]
panfrost: Don't redundantly call emit_const_buf
On Valhall, we were calling emit_const_buf in two places:
1. The main "handle dirty flags" code shared with Bifrost
2. A Valhall-specific shader environment emitter
The latter was not dirty tracked, and the former was not used. That meant we
were calling emit_const_buf way too much. It's not a cheap routine, either.
Instead, use the results from the dirty tracked function in the shader
environment emitter, to avoid the redundant call and get the expected dirty
tracking.
In a Dolphin trace I'm looking at, fps increases 27->33.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21848>
Alyssa Rosenzweig [Sat, 29 Oct 2022 22:16:22 +0000 (18:16 -0400)]
panfrost: Print perf debug on seqnum overflow
Another unexpected source of flushes.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21830>
Alyssa Rosenzweig [Sat, 29 Oct 2022 22:13:16 +0000 (18:13 -0400)]
panfrost: Print perf debug when flushing everything
..Even if the only batch is the one that's currently bound.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21830>
Mike Blumenkrantz [Fri, 24 Mar 2023 21:17:06 +0000 (17:17 -0400)]
zink: stop caching vertex states
I tried to be too clever and ended up wasting cpu cycles. it's
much, much, much, much faster to just generate this one struct array
every time than it is to do set lookups with thousands of members
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22116>
Mike Blumenkrantz [Fri, 24 Mar 2023 21:01:11 +0000 (17:01 -0400)]
zink: use fast popcnt for vstate draws
also delete some unused stubs for no dynamic vertex input since I'm never
gonna implement that path
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22116>
Mike Blumenkrantz [Fri, 24 Mar 2023 20:59:54 +0000 (16:59 -0400)]
zink: don't swizzle velems state for vstate draws
this isn't ever used, so don't touch it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22116>
Mike Blumenkrantz [Fri, 24 Mar 2023 20:58:11 +0000 (16:58 -0400)]
zink: explicitly pass null velems when creating pipelines with dynamic vinput
this may or may not be a usable pointer, and it's not being read, so
don't pass it at all
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22116>
Mike Blumenkrantz [Fri, 24 Mar 2023 20:41:47 +0000 (16:41 -0400)]
zink: add another vstate draw template for popcnt presence
matching radeonsi
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22116>
Mike Blumenkrantz [Fri, 24 Mar 2023 20:36:04 +0000 (16:36 -0400)]
zink: bind vertex state directly from draw hook
this is more streamlined and readable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22116>
Mike Blumenkrantz [Fri, 24 Mar 2023 20:13:34 +0000 (16:13 -0400)]
zink: use search_or_add for masking vstate
this should be a significant perf boost instead of multiple lookups
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22116>
Mike Blumenkrantz [Fri, 24 Mar 2023 20:11:44 +0000 (16:11 -0400)]
zink: flag vertex buffers for rebind after vstate draws
vstate draws bind their own vertex buffers unrelated to the bound
gallium buffers, so any draw occurring after a vstate draw must
rebind vertex buffers to ensure the correct ones are bound
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22116>