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 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 >
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
Faith Ekstrand
0ec7b8455e
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 >
2023-08-13 17:12:52 +00:00
Faith Ekstrand
6914272c30
nir: Drop nir_ssa_dest_init()
...
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
174a75631f
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 >
2023-08-13 17:12:52 +00:00
Faith Ekstrand
9cd9115d87
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 >
2023-08-13 17:12:52 +00:00
Faith Ekstrand
d2c4749986
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 >
2023-08-13 17:12:52 +00:00
Faith Ekstrand
ed9affa02f
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 >
2023-08-13 17:12:52 +00:00
David Rosca
7bcbfae87c
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 >
2023-08-13 16:52:14 +00:00
Konstantin Seurer
040a0fcf42
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 >
2023-08-13 15:30:10 +00:00
Konstantin Seurer
e2a02f3910
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 >
2023-08-13 16:48:49 +02:00
M Henning
47722b2d7f
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 >
2023-08-12 19:38:18 -04:00
Faith Ekstrand
0b9fee379d
nvk: Don't use nir_ssa_for_src()
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24655 >
2023-08-12 23:10:54 +00:00
Alyssa Rosenzweig
09d31922de
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 >
2023-08-12 16:44:41 -04:00
Faith Ekstrand
777d336b1f
nir: clang-format src/compiler/nir/*.[ch]
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24382 >
2023-08-12 19:27:28 +00:00
Faith Ekstrand
6fb63f369c
nir: Add a .clang-format file
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24382 >
2023-08-12 19:27:28 +00:00
Faith Ekstrand
0d9254204b
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 >
2023-08-12 19:27:28 +00:00
Faith Ekstrand
bb8f143749
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 >
2023-08-12 19:27:28 +00:00
Faith Ekstrand
7f6112302b
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 >
2023-08-12 19:27:28 +00:00
Faith Ekstrand
59e5b51084
nir: More manual formatting
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24382 >
2023-08-12 19:27:28 +00:00
Faith Ekstrand
57e10f7c93
nir: Don't clang-format debug print setup
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24382 >
2023-08-12 19:27:28 +00:00