Commit Graph

176493 Commits

Author SHA1 Message Date
Faith Ekstrand
cced401b0f 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>
2023-08-14 21:22:53 +00:00
Faith Ekstrand
2155634fb9 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>
2023-08-14 21:22:53 +00:00
Faith Ekstrand
dd2178060d 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>
2023-08-14 21:22:53 +00:00
Faith Ekstrand
734b15186b 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>
2023-08-14 21:22:53 +00:00
Faith Ekstrand
11af0c1f1b 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>
2023-08-14 21:22:53 +00:00
Faith Ekstrand
9b4677981f 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>
2023-08-14 21:22:53 +00:00
Faith Ekstrand
b30da1b281 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>
2023-08-14 21:22:53 +00:00
Faith Ekstrand
f922ea7c07 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>
2023-08-14 21:22:53 +00:00
Faith Ekstrand
ce8b157b94 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>
2023-08-14 21:22:53 +00:00
Faith Ekstrand
de5bc9128c 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>
2023-08-14 21:22:53 +00:00
Alyssa Rosenzweig
6b01d6a6b8 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>
2023-08-14 21:22:53 +00:00
Alyssa Rosenzweig
1deba364e1 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>
2023-08-14 21:22:52 +00:00
Alyssa Rosenzweig
262373541d 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>
2023-08-14 21:22:52 +00:00
Alyssa Rosenzweig
b41676d7ed 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>
2023-08-14 21:22:52 +00:00
Alyssa Rosenzweig
dcdd9966c7 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>
2023-08-14 21:22:52 +00:00
Alyssa Rosenzweig
02ddb7eae2 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>
2023-08-14 21:22:52 +00:00
Alyssa Rosenzweig
5aa38181cc 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>
2023-08-14 21:22:52 +00:00
Alyssa Rosenzweig
08093a7dea 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>
2023-08-14 21:22:52 +00:00
Alyssa Rosenzweig
d9786a48aa 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>
2023-08-14 21:22:52 +00:00
Alyssa Rosenzweig
6f66f3583e 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>
2023-08-14 21:22:52 +00:00
Konstantin Seurer
7cf9ff304e 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>
2023-08-14 19:27:19 +00:00
David Rosca
cbb28eaeaf 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>
2023-08-14 18:18:16 +00:00
Mike Blumenkrantz
69fa48fbb1 lavapipe: handle VkBufferUsageFlags2KHR
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24633>
2023-08-14 17:56:23 +00:00
Mike Blumenkrantz
566e556478 lavapipe: handle VkPipelineCreateFlagBits2KHR
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24633>
2023-08-14 17:56:22 +00:00
David Heidelberg
5174cae8c2 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>
2023-08-14 17:18:04 +00:00
David Heidelberg
795a099f38 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>
2023-08-14 17:18:04 +00:00
Yonggang Luo
a93d7ec445 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>
2023-08-14 16:24:18 +00:00
Mike Blumenkrantz
581f6fb7c8 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>
2023-08-14 15:32:26 +00:00
Rhys Perry
efb80c1715 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: 5a536eca9c ("aco: calculate correct register demand for branch instructions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24579>
2023-08-14 15:08:37 +00:00
Sergi Blanch Torne
b882309e84 Revert "ci: disable Collabora's LAVA lab for maintance"
This reverts commit 0089d4507a

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24425>
2023-08-14 14:32:34 +00:00
Christian Gmeiner
83d7e327f9 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>
2023-08-14 14:10:15 +00:00
Christian Gmeiner
8bce68edf5 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>
2023-08-14 14:10:15 +00:00
Christian Gmeiner
16915c7a71 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>
2023-08-14 14:10:15 +00:00
Mike Blumenkrantz
04dbb556c2 zink: fix crash in lower_pv_mode_gs_store
src->parent can be null

Fixes: 39770c6503 ("zink: fix store subsitution in `lower_pv_mode_gs_store`")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24642>
2023-08-14 11:46:05 +00:00
Mike Blumenkrantz
198719de39 zink: fix null config screen creation
Fixes: 6d60115be7 ("zink: Fix enumerate devices when running compositor")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24641>
2023-08-14 11:26:51 +00:00
Karol Herbst
e1c278ae82 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>
2023-08-14 10:50:25 +00:00
Yonggang Luo
9d7a3f170b 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>
2023-08-14 10:27:44 +00:00
Lionel Landwerlin
7ec12b537a 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>
2023-08-14 07:27:16 +00:00
Yonggang Luo
3e72539dc2 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>
2023-08-14 15:00:56 +08:00
Sergi Blanch Torne
7006104d7e 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>
2023-08-14 08:11:22 +02:00
Mike Blumenkrantz
7672545223 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>
2023-08-14 01:23:25 +00:00
Mike Blumenkrantz
29fd7bf603 nouveau: calloc vertex csos
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24117>
2023-08-14 01:23:25 +00:00
Mike Blumenkrantz
ea09370204 virgl: fix some indentation
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24117>
2023-08-14 01:23:25 +00:00
Mike Blumenkrantz
6984e524f4 virgl: move virgl_vertex_elements_state to header
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24117>
2023-08-14 01:23:25 +00:00
Mike Blumenkrantz
4eb4c9bba9 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>
2023-08-14 01:23:25 +00:00
Faith Ekstrand
65cda2c0e1 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>
2023-08-13 17:12:52 +00:00
Faith Ekstrand
95a3c1325d 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>
2023-08-13 17:12:52 +00:00
Faith Ekstrand
581ee2ccb4 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>
2023-08-13 17:12:52 +00:00
Faith Ekstrand
369270906b 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>
2023-08-13 17:12:52 +00:00
Faith Ekstrand
6203750d78 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>
2023-08-13 17:12:52 +00:00