Faith Ekstrand [Mon, 14 Aug 2023 16:56:00 +0000 (11:56 -0500)]
nir: Drop nir_dest
Instead, we replace every use of it with nir_def. Most of this commit
was generated by sed:
sed -i -e 's/dest.ssa/def/g' src/**/*.h src/**/*.c src/**/*.cpp
A few manual fixups were required in lima and the nir_legacy code.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 16:43:35 +0000 (11:43 -0500)]
nir: Drop nir_alu_dest
Instead, we replace it directly with nir_def. We could replace it with
nir_dest but the next commit gets rid of that so this avoids unnecessary
churn. Most of this commit was generated by sed:
sed -i -e 's/dest.dest.ssa/def/g' src/**/*.h src/**/*.c src/**/*.cpp
There were a few manual fixups required in the nir_legacy.c and
nir_from_ssa.c as nir_legacy_reg and nir_parallel_copy_entry both have a
similar pattern.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 16:33:30 +0000 (11:33 -0500)]
nir: Get rid of nir_dest_is_divergent()
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 16:19:15 +0000 (11:19 -0500)]
nir: Get rid of nir_dest_num_components()
We could add a nir_def_num_components() helper but we use
ssa.num_components about 3x as often as nir_dest_num_components() today
so that's a major Coccinelle refactor anyway and this doesn't make it
much worse. Most of this commit was generated byt the following
semantic patch:
@@
expression D;
@@
<...
-nir_dest_num_components(D)
+D.ssa.num_components
...
Some manual fixup was needed, especially in cpp files where Coccinelle
tends to give up the moment it sees any interesting C++.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 16:08:07 +0000 (11:08 -0500)]
nir: Get rid of nir_dest_bit_size()
We could add a nir_def_bit_size() helper but we use ->bit_size about 3x
as often as nir_dest_bit_size() today so that's a major Coccinelle
refactor anyway and this doesn't make it much worse. Most of this
commit was generated byt the following semantic patch:
@@
expression D;
@@
<...
-nir_dest_bit_size(D)
+D.ssa.bit_size
...
Some manual fixup was needed, especially in cpp files where Coccinelle
tends to give up the moment it sees any interesting C++.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 16:50:22 +0000 (11:50 -0500)]
nir/print: Replace all dest printing with print_def
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 16:41:49 +0000 (11:41 -0500)]
nir/validate: Replace all dest validation with validate_def
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 15:16:23 +0000 (10:16 -0500)]
nir/propagate_invariant: Stop passing around nir_dest
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 15:15:06 +0000 (10:15 -0500)]
nir/dce: Stop passing around nir_dest
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 15:14:54 +0000 (10:14 -0500)]
nir/gather_types: Stop passing around nir_dest
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 15:03:24 +0000 (10:03 -0500)]
nv50/ir: Stop passing around nir_dest and nir_alu_dest
We want to get rid of nir_dest so back-ends need to stop storing it
in structs and passing it through helpers.
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 14:53:12 +0000 (09:53 -0500)]
r600/sfn: Stop passing around nir_dest and nir_alu_dest
We want to get rid of nir_dest and nir_alu_dest so back-ends need to
stop storing it in structs and passing it through helpers.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 14:22:30 +0000 (09:22 -0500)]
etnaviv: Stop passing around nir_dest
We want to get rid of nir_dest so back-ends need to stop storing it
in structs and passing it through helpers.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 14:27:55 +0000 (09:27 -0500)]
lima: Stop using nir_dest directly
We want to get rid of nir_dest so back-ends need to stop storing it
in structs and passing it through helpers.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 14:03:07 +0000 (09:03 -0500)]
nir,ntt,a2xx,lima: Stop using nir_dest directly
We want to get rid of nir_dest so back-ends need to stop storing it
in structs and passing it through helpers.
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 15:10:35 +0000 (10:10 -0500)]
vc4: Stop passing around nir_dest
We want to get rid of nir_dest so back-ends need to stop storing it
in structs and passing it through helpers.
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 13:49:41 +0000 (08:49 -0500)]
broadcom: Stop using nir_dest directly
We want to get rid of nir_dest so back-ends need to stop storing it
in structs and passing it through helpers.
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 13:34:38 +0000 (08:34 -0500)]
intel/fs: Stop passing around nir_dest and nir_alu_dest
We want to get rid of nir_dest so back-ends need to stop storing it
in structs and passing it through helpers.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 13:27:34 +0000 (08:27 -0500)]
intel/vec4: Stop passing around nir_dest
We want to get rid of nir_dest so back-ends need to stop storing it
in structs and passing it through helpers.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Alyssa Rosenzweig [Mon, 14 Aug 2023 13:37:25 +0000 (09:37 -0400)]
nir: Drop nir_dest_init
Unused.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Alyssa Rosenzweig [Mon, 14 Aug 2023 13:13:40 +0000 (09:13 -0400)]
dxil: Do not reference nir_dest
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Alyssa Rosenzweig [Mon, 14 Aug 2023 13:11:10 +0000 (09:11 -0400)]
ir3: Do not reference nir_dest
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Alyssa Rosenzweig [Mon, 14 Aug 2023 13:03:47 +0000 (09:03 -0400)]
zink: Do not reference nir_dest
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Alyssa Rosenzweig [Mon, 14 Aug 2023 12:59:04 +0000 (08:59 -0400)]
panfrost: Do not reference nir_dest
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Alyssa Rosenzweig [Mon, 14 Aug 2023 12:57:58 +0000 (08:57 -0400)]
asahi: Do not reference nir_dest
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Alyssa Rosenzweig [Mon, 14 Aug 2023 12:55:17 +0000 (08:55 -0400)]
pan/bi: Don't reference nir_dest
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Alyssa Rosenzweig [Mon, 14 Aug 2023 12:51:56 +0000 (08:51 -0400)]
pan/mdg: Don't reference nir_dest
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Alyssa Rosenzweig [Mon, 14 Aug 2023 12:48:11 +0000 (08:48 -0400)]
agx: Remove agx_nir_ssa_index
Deduplicated from agx_def_index.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Alyssa Rosenzweig [Mon, 14 Aug 2023 12:46:28 +0000 (08:46 -0400)]
agx: Stop passing nir_dest around
Towards deleting nir_dest.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Konstantin Seurer [Sat, 12 Aug 2023 12:32:25 +0000 (14:32 +0200)]
nir/from_ssa: Don't insert store_reg instructions before phis
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9528
Fixes: ae0408b ("nir/from_ssa: Support register intrinsics")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24647>
David Rosca [Thu, 10 Aug 2023 20:05:12 +0000 (22:05 +0200)]
gallium/auxiliary/vl: Set correct csc matrix in set_buffer_layer
Shaders used in set_buffer_layer will apply colorspace conversion,
so we need to set correct matrix depending on the input and output
surface formats.
Use BT.601 (default) for YUV to RGB and identity for RGB to RGB.
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24626>
Mike Blumenkrantz [Fri, 11 Aug 2023 12:57:58 +0000 (08:57 -0400)]
lavapipe: handle VkBufferUsageFlags2KHR
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24633>
Mike Blumenkrantz [Fri, 11 Aug 2023 12:54:03 +0000 (08:54 -0400)]
lavapipe: handle VkPipelineCreateFlagBits2KHR
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24633>
David Heidelberg [Mon, 31 Jul 2023 07:48:09 +0000 (10:48 +0300)]
ci/baremetal: shorten BM_KERNEL to filename and BM_DTB to name only
We don't need the path, not at all when we use external kernel.
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24646>
David Heidelberg [Sun, 30 Jul 2023 17:33:14 +0000 (20:33 +0300)]
ci/baremetal: do not install curl, it's already there
curl is already installed in these images, drop it.
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24646>
Yonggang Luo [Fri, 4 Aug 2023 05:30:07 +0000 (13:30 +0800)]
freedreno: Use shared DIV_ROUND_UP instead div_round_up
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24666>
Mike Blumenkrantz [Fri, 11 Aug 2023 11:24:58 +0000 (07:24 -0400)]
u/draw: skip zero-sized indirect draws
cc: mesa-stable
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24631>
Rhys Perry [Tue, 8 Aug 2023 20:02:21 +0000 (21:02 +0100)]
aco: summarize register demand after handling branches
Fixes various dEQP-VK.ray_query.builtin.rayqueryterminate.* crashes.
fossil-db (gfx1100):
Totals from 196 (0.15% of 133461) affected shaders:
PreSGPRs: 8342 -> 8558 (+2.59%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes:
5a536eca9ca7 ("aco: calculate correct register demand for branch instructions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24579>
Sergi Blanch Torne [Tue, 1 Aug 2023 09:29:34 +0000 (11:29 +0200)]
Revert "ci: disable Collabora's LAVA lab for maintance"
This reverts commit https://gitlab.freedesktop.org/mesa/mesa/-/commit/
0089d4507a4e8d5deb428c2455929d72cf349983
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24425>
Christian Gmeiner [Thu, 27 Jul 2023 13:12:59 +0000 (15:12 +0200)]
etnaviv: switch to S_FIXED(..) macro
In different traces for different GPU models I see the same pattern:
0x00c80000, /* [00A00] PA.VIEWPORT_SCALE_X = 200.000000 */
0xff880000, /* [00A04] PA.VIEWPORT_SCALE_Y = -120.000000 */
etna_f32_to_fixp16(..) handles the negative case differently then blob. In the
concrete example -120 gets converted to 0xff880001. Switch to S_FIXED(..) to
simplify our code and to get the same results as blob.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24364>
Christian Gmeiner [Thu, 27 Jul 2023 10:18:51 +0000 (12:18 +0200)]
etnaviv: switch to U_FIXED(..) macro
Lets have a look at trace from blob (GC3000):
0x000b000b, /* [10080] NTE.SAMPLER[0].SIZE := WIDTH=11,HEIGHT=11 */
0x2001b86e, /* [10100] NTE.SAMPLER[0].LOG_SIZE := WIDTH=3.437500,HEIGHT=3.437500,ASTC=0,INT_FILTER=1,SRGB=0 */
If we ignore the WIDTH and HEIGHT outputs and only look at the raw value (0x2001b86e) we can see that 0x6e is used for WIDTH and HEIGHT.
Lets have a look at an other texutre size 180x180:
0x00b400b4, /* [10080] NTE.SAMPLER[0].SIZE := WIDTH=180,HEIGHT=180 */
0x2003bcef, /* [10100] NTE.SAMPLER[0].LOG_SIZE := WIDTH=7.468750,HEIGHT=7.468750,ASTC=0,INT_FILTER=1,SRGB=0 */
Lets use the same test on a different GPU that uses texture descriptors (GC7000):
[44] SIZE: 0x000b000b WIDTH=11,HEIGHT=11
...
[74] LOG_SIZE_EXT: 0x03750375 WIDTH=3.457031,HEIGHT=3.457031
If we ignore the WIDTH and HEIGHT outputs and only look at the raw value (0x03750375) we can see that 0x375 is used for WIDTH and HEIGHT.
Lets have a look at an other texutre size 180x180:
[44] SIZE: 0x00b400b4 WIDTH=180,HEIGHT=180
..
[74] LOG_SIZE_EXT: 0x077d077d WIDTH=7.488281,HEIGHT=7.488281
etnaviv creates the following values for the two texture sizes:
11 -> 0x6f
180 -> 0xf0
Lets switch to U_FIXED(..) which results in equal values.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24364>
Christian Gmeiner [Thu, 27 Jul 2023 10:12:08 +0000 (12:12 +0200)]
etnaviv: switch to log2f(..)
Drop our custom calculation of the logarithm base 2 and switch
to log2f(..).
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24364>
Mike Blumenkrantz [Fri, 11 Aug 2023 19:16:51 +0000 (15:16 -0400)]
zink: fix crash in lower_pv_mode_gs_store
src->parent can be null
Fixes:
39770c6503a ("zink: fix store subsitution in `lower_pv_mode_gs_store`")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24642>
Mike Blumenkrantz [Fri, 11 Aug 2023 18:40:22 +0000 (14:40 -0400)]
zink: fix null config screen creation
Fixes:
6d60115be7c ("zink: Fix enumerate devices when running compositor")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24641>
Karol Herbst [Tue, 4 Jul 2023 00:15:03 +0000 (02:15 +0200)]
clc: use CLANG_RESOURCE_DIR for clang's resource path
With certain build configuration that value can be a non empty string and
needs to be used.
This will also require distributions to rebuild mesa if and only if
CLANG_RESOURCE_DIR changes between clang rebuilds or updates.
Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23981>
Yonggang Luo [Fri, 4 Aug 2023 05:28:03 +0000 (13:28 +0800)]
v3d: Use DIV_ROUND_UP instead div_round_up
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24485>
Lionel Landwerlin [Thu, 20 Jul 2023 13:43:08 +0000 (16:43 +0300)]
anv: don't try to access dynamic buffers from surface states
Even with direct descriptors, our current implementation works by
doing A64 messages to read/write dynamic buffers. This is so that we
can apply the sliding range view of the descriptor while having
robustness support.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
06dfd216d3 ("anv: add direct descriptor support to apply_layout")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24256>
Yonggang Luo [Thu, 10 Aug 2023 17:44:15 +0000 (01:44 +0800)]
radv: Fixes mingw linkage error undefined reference to `radv_GetCalibratedTimestampsEXT'
message:
../../src/amd/vulkan/radv_sqtt.c:812: undefined reference to `radv_GetCalibratedTimestampsEXT'
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24664>
Sergi Blanch Torne [Tue, 1 Aug 2023 09:22:27 +0000 (11:22 +0200)]
ci: disable Collabora's LAVA lab for maintance
This is to inform you of some planned downtime in the LAVA lab as follows:
* Start: 2023-08-14 08:00 BST (UTC+1)
* End: 2023-08-14 12:00 BST (UTC+1)
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24424>
Mike Blumenkrantz [Fri, 30 Jun 2023 21:15:09 +0000 (17:15 -0400)]
gallium: move vertex stride to CSO
this simplifies code in most place and enables some optimizations in
frontends
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24117>
Mike Blumenkrantz [Mon, 10 Jul 2023 18:37:34 +0000 (14:37 -0400)]
nouveau: calloc vertex csos
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24117>
Mike Blumenkrantz [Wed, 5 Jul 2023 13:43:08 +0000 (09:43 -0400)]
virgl: fix some indentation
no functional changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24117>
Mike Blumenkrantz [Tue, 4 Jul 2023 14:55:37 +0000 (10:55 -0400)]
virgl: move virgl_vertex_elements_state to header
no functional changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24117>
Mike Blumenkrantz [Fri, 30 Jun 2023 21:13:38 +0000 (17:13 -0400)]
d3d10umd: use cso_context to set vertex buffers and elements
should be no functional changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24117>
Faith Ekstrand [Sun, 13 Aug 2023 00:24:01 +0000 (19:24 -0500)]
nir: Drop nir_foreach_dest()
This requires an annoying bit of shuffling into nir_inline_helpers.h but
it's not horrible.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24658>
Faith Ekstrand [Sun, 13 Aug 2023 00:23:23 +0000 (19:23 -0500)]
nir/from_ssa: Use nir_foreach_def() instead of nir_foreach_dest()
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24658>
Faith Ekstrand [Sun, 13 Aug 2023 00:19:21 +0000 (19:19 -0500)]
dxil: Use nir_foreach_def() instead of nir_foreach_dest()
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24658>
Faith Ekstrand [Sun, 13 Aug 2023 00:18:51 +0000 (19:18 -0500)]
st,zink,sfn: Use nir_foreach_def instead of nir_foreach_dest
It's basically the same code in all three.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24658>
Faith Ekstrand [Sun, 13 Aug 2023 00:10:24 +0000 (19:10 -0500)]
nir: nir_foreach_ssa_def() -> nir_foreach_def()
s/nir_foreach_ssa_def/nir_foreach_def/g
followed by
ninja -C _build clang-format
and a little hand clean-up in nir.c.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24658>
Faith Ekstrand [Sat, 12 Aug 2023 23:59:27 +0000 (18:59 -0500)]
nir: Drop nir_ssa_dest_init_for_type()
Replace it with a new nir_def_init_for_type()
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24658>
Faith Ekstrand [Sat, 12 Aug 2023 23:55:58 +0000 (18:55 -0500)]
nir: Drop nir_ssa_dest_init()
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24658>
Faith Ekstrand [Sat, 12 Aug 2023 23:53:42 +0000 (18:53 -0500)]
nir/serialize: [De]serialize nir_def nor nir_dest
This both gets rid of its use of nir_ssa_dest_init() but also will make
it easier to mechanically remove nir_dest entirely later.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24658>
Faith Ekstrand [Sat, 12 Aug 2023 23:53:12 +0000 (18:53 -0500)]
nir/clone: Clone nir_def nor nir_dest
This both gets rid of its use of nir_ssa_dest_init() but also will make
it easier to mechanically remove nir_dest entirely later.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24658>
Faith Ekstrand [Sun, 13 Aug 2023 00:01:17 +0000 (19:01 -0500)]
nir: Drop more instances of nir_ssa_dest_init()
Catching the cases that Coccinelle missed. Mostly in C++ files using
gtest which causes Coccinelle to just give up and walk away.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24658>
Faith Ekstrand [Sat, 12 Aug 2023 23:31:52 +0000 (18:31 -0500)]
nir: Drop most instances of nir_ssa_dest_init()
Generated using the following two semantic patches:
@@
expression I, J, NC, BS;
@@
-nir_ssa_dest_init(I, &J->dest, NC, BS);
+nir_def_init(I, &J->dest.ssa, NC, BS);
@@
expression I, J, NC, BS;
@@
-nir_ssa_dest_init(I, &J->dest.dest, NC, BS);
+nir_def_init(I, &J->dest.dest.ssa, NC, BS);
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24658>
David Rosca [Sun, 30 Jul 2023 15:36:06 +0000 (17:36 +0200)]
frontends/va: Ignore requested size when creating VAEncCodedBufferType
The buffer data is not directly accessible to application and it's
internally used to only store VACodedBufferSegment struct.
Ignore the size requested by application and instead allocate
sizeof(VACodedBufferSegment). Use calloc to zero out the struct.
This can save significant amount of memory, for example FFmpeg
will request up to tens of MB for single buffer.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6462
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24410>
Konstantin Seurer [Fri, 11 Aug 2023 10:55:05 +0000 (12:55 +0200)]
lavapipe: Use common physical device properties
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24629>
Konstantin Seurer [Sat, 12 Aug 2023 08:53:39 +0000 (10:53 +0200)]
clang-format: Disable formatting by default
This should make `git clang-format` usable for patches that modify
clang formatted and manually formatted code.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9492
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24645>
M Henning [Sat, 12 Aug 2023 23:34:32 +0000 (19:34 -0400)]
nvk: Remove reference to genUserClip
GL uses this for adding clip distances to shaders that are missing them,
but the vulkan spec guarantees "A shader must write a single clip distance
for each enabled clip half-space"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24657>
Faith Ekstrand [Sat, 12 Aug 2023 20:42:21 +0000 (15:42 -0500)]
nvk: Don't use nir_ssa_for_src()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24655>
Alyssa Rosenzweig [Sat, 12 Aug 2023 20:17:15 +0000 (16:17 -0400)]
nir: Drop "SSA" from NIR language
Everything is SSA now.
sed -e 's/nir_ssa_def/nir_def/g' \
-e 's/nir_ssa_undef/nir_undef/g' \
-e 's/nir_ssa_scalar/nir_scalar/g' \
-e 's/nir_src_rewrite_ssa/nir_src_rewrite/g' \
-e 's/nir_gather_ssa_types/nir_gather_types/g' \
-i $(git grep -l nir | grep -v relnotes)
git mv src/compiler/nir/nir_gather_ssa_types.c \
src/compiler/nir/nir_gather_types.c
ninja -C build/ clang-format
cd src/compiler/nir && find *.c *.h -type f -exec clang-format -i \{} \;
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24585>
Faith Ekstrand [Tue, 8 Aug 2023 17:00:35 +0000 (12:00 -0500)]
nir: clang-format src/compiler/nir/*.[ch]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24382>
Faith Ekstrand [Sat, 29 Jul 2023 16:37:48 +0000 (11:37 -0500)]
nir: Add a .clang-format file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24382>
Faith Ekstrand [Wed, 9 Aug 2023 18:03:21 +0000 (13:03 -0500)]
nir: Add a do to the do/while in nir_const_value_t_array()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24382>
Faith Ekstrand [Tue, 8 Aug 2023 16:53:39 +0000 (11:53 -0500)]
nir: Wrap pass macros in braces
This makes clang-format not mess them up so bad. It's also probably a
good idea to make sure anything we declare in the macro is properly
scoped.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24382>
Faith Ekstrand [Tue, 8 Aug 2023 16:25:17 +0000 (11:25 -0500)]
nir: Pretty format type mapping helpers
One of them was even breaking after every return statement. Classy...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24382>
Faith Ekstrand [Tue, 8 Aug 2023 16:23:19 +0000 (11:23 -0500)]
nir: More manual formatting
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24382>
Faith Ekstrand [Tue, 8 Aug 2023 16:11:56 +0000 (11:11 -0500)]
nir: Don't clang-format debug print setup
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24382>
Faith Ekstrand [Sat, 29 Jul 2023 16:37:16 +0000 (11:37 -0500)]
nir: Don't clang-format a couple typedefs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24382>
Faith Ekstrand [Sat, 29 Jul 2023 16:19:40 +0000 (11:19 -0500)]
nir: Don't clang-format const_value helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24382>
Faith Ekstrand [Sat, 29 Jul 2023 15:53:09 +0000 (10:53 -0500)]
nir: Re-align a couple enums and add clang-format comments
I actually kinda care about the human-readable formatting of these
enums. Keep clang-format from messing them up.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24382>
Faith Ekstrand [Sat, 12 Aug 2023 19:07:42 +0000 (14:07 -0500)]
clang-format: Set the default ColumnLimit to 0
This is a better default than any actual limit because it causes
clang-format to mostly leave line wrapping alone.
Suggested-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24382>
Faith Ekstrand [Tue, 8 Aug 2023 16:15:45 +0000 (11:15 -0500)]
clang-format: nir_foreach_src is not a foreach macro
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24382>
Faith Ekstrand [Sat, 29 Jul 2023 16:13:31 +0000 (11:13 -0500)]
clang-format: Add nir_foreach_reg_*
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24382>
Roman Stratiienko [Tue, 23 Aug 2022 17:08:22 +0000 (20:08 +0300)]
android: Introduce the Android buffer info abstraction
Both EGL and Vulkan implementations require obtaining buffer metadata,
e.g., format, modifier, offsets, strides, etc.
Currently, mesa3d doesn't have a generic solution, and every Vulkan
implementation uses its getters. Most of the getters rely on
kernel metadata storage that is available for x86-based GPU drivers.
ARM-based Vulkan drivers rely on userspace metadata sharing, making it
important to use advanced metadata API. Otherwise, the driver will work
with limited functionality (no YUV, lack of support for modifiers, etc.)
Current EGL buffer getter implementation is advanced enough and used as
a base for a common Android buffer-getter logic.
Use example:
void
android_buffer_test(android_handle_type *a_handle)
{
// First, get the gralloc object. It will be created if it doesn't
// exist. Use U_GRALLOC_TYPE_AUTO to let the implementation choose
// the best gralloc
struct u_gralloc *gralloc = u_gralloc_create(U_GRALLOC_TYPE_AUTO);
// Prepare the internal handle structure (hal_format and
// pixel_stride are required for the fallback implementation).
// Both Vulkan and EGL clients expose HAL format / pixel stride
// in their structures.
u_gralloc_buffer_handle hnd = {
.handle = a_handle->native_handle,
.hal_format = a_handle->hal_format,
.pixel_stride = a_handle->pixel_stride,
};
// Get the basic buffer info
u_gralloc_buffer_basic_info basic_info;
int ret = u_gralloc_get_buffer_basic_info(gralloc, &hnd, &basic_info);
if (ret) {
// Handle the error
}
// Get the color info
u_gralloc_buffer_color_info color_info;
ret = u_gralloc_get_buffer_color_info(gralloc, &hnd, &color_info);
if (ret) {
// Handle the error
}
// unref the gralloc object
u_gralloc_destroy(&gralloc);
}
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18215>
Roman Stratiienko [Thu, 10 Aug 2023 13:14:02 +0000 (16:14 +0300)]
util: Add NONNULL macro
Macro leverages __attribute__((__nonnull__)) to help users mark
the function parameter that isn't allowed to be NULL.
Suggested-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18215>
David Heidelberg [Sat, 12 Aug 2023 16:24:44 +0000 (18:24 +0200)]
ci/deqp: really remove the uncompressed results.csv file
Arguments are parsed in order, so the `-c` here causes that first `--rm`
won't get applied and then it gets overriden by `-o` which writes the file.
Sadly zstd won't report this as a issue, but that's being reported in [1],
so maybe in future versions zstd will warn about it.
[1] https://github.com/facebook/zstd/issues/3719
Fixes:
d110299d77c9 ("ci/deqp-runner: compress results.csv before uploading it to GitLab")
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24651>
Lionel Landwerlin [Sun, 4 Jun 2023 23:53:25 +0000 (02:53 +0300)]
anv: move genX(rasterization_mode) to gfx8_cmd_buffer.c
Only used there.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24632>
Lionel Landwerlin [Tue, 1 Aug 2023 09:18:53 +0000 (12:18 +0300)]
anv: get rid of genX(emit_multisample)
The initialization can be simplified and the real programming moved
over to genX_pipeline.c
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24632>
Lionel Landwerlin [Tue, 1 Aug 2023 20:16:43 +0000 (23:16 +0300)]
intel/decoder: add options to decode surfaces/samplers
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24632>
Lionel Landwerlin [Wed, 2 Aug 2023 06:30:05 +0000 (09:30 +0300)]
anv: emit 3DSTATE_GS only once per pipeline
Following
71ebd9b9d7, 3DSTATE_GS can be emitted as part of the
pipeline batch and as a dynamic state. Just do the latter.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
71ebd9b9d7 ("anv,hasvk: respect provoking vertex setting on geometry shaders")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24632>
Lionel Landwerlin [Tue, 1 Aug 2023 08:51:36 +0000 (11:51 +0300)]
blorp: drop programming of 3DSTATE_(MESH|TASK)_SHADER
We can disable the MESH/TASK stages by just using the CONTROL
instruction and keep the rest of the HW programmed as before.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24632>
Lionel Landwerlin [Fri, 4 Aug 2023 08:14:27 +0000 (11:14 +0300)]
intel/decoder: constify some input parameters
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24632>
David Heidelberg [Thu, 10 Aug 2023 09:06:14 +0000 (11:06 +0200)]
ci/farms: enabled Microsoft job only when conditions are met
Otherwise it gets run by default on newly pushed fork branch.
In general, this is copy-paste of `.container-rules`.
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24604>
antonino [Mon, 31 Jul 2023 15:54:52 +0000 (17:54 +0200)]
zink/nir: add a zink specific intrinsic for push constants
Push costants in Zink are not flat indexed like in vulkan drivers which
makes the `nir_intrinsic_load_push_constant` intrinsic inappropiate.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24401>
antonino [Mon, 31 Jul 2023 16:45:15 +0000 (18:45 +0200)]
zink: remove unused indices from `nir_load_push_constant` calls
Zink passes `base` and `range` indices to this intrinsic despite those
being ignored by nir_to_spirv. This change removes them completely.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24401>
David Heidelberg [Fri, 11 Aug 2023 13:12:18 +0000 (15:12 +0200)]
ci/freedreno: document vs-nested-return-sibling-loop2 flake on Adreno 530
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24607>
David Heidelberg [Fri, 11 Aug 2023 12:03:09 +0000 (14:03 +0200)]
ci/amd: add glx@glx-visuals-depth flake to raven
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24607>
David Heidelberg [Thu, 10 Aug 2023 10:04:39 +0000 (12:04 +0200)]
ci/build: limit debian-build-testing to 30 minutes
Previous 45 minutes is too much.
- 5 - 15 minutes mesa LTO build
- 5 - 15 minutes shader-db run
Should be safe, in case something fails, we still can make another run.
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24607>
Georg Lehmann [Thu, 10 Aug 2023 19:05:32 +0000 (21:05 +0200)]
nir/opt_if: also rewrite uniform uses for read_invocation
No Foz-DB changes, but maybe it matters in the future because dxil-spirv
will use read_invocation for WaveReadLaneFirst in fragment shaders.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24618>