Eric Engestrom
566c919df8
ci/deqp: backport fix for dEQP-EGL.functional.wide_color.*_888_colorspace_*
...
Signed-off-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24808 >
2023-08-22 18:12:08 +00:00
Georg Lehmann
2ac7e6614a
nir: unify lower_bitfield_extract with has_bfe
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24662 >
2023-08-22 12:08:37 +00:00
Georg Lehmann
34c3f81614
nir: unify lower_bitfield_insert with has_{bfm,bfi,bitfield_select}
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24662 >
2023-08-22 12:08:37 +00:00
Eric Engestrom
953ac9da79
v3d/qpu: fix type of function argument
...
Fixes: 05c7d9715b ("broadcom: Add V3D 3.3 QPU instruction pack, unpack, and disasm.")
Signed-off-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24787 >
2023-08-20 04:58:17 +00:00
Eric Engestrom
8a1f3d0d73
v3dv: fix shader stage name in error message
...
Fixes: 60145629a2 ("v3dv: initial CreateGraphicsPipeline/DestroyPipeline implementation")
Signed-off-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24787 >
2023-08-20 04:58:17 +00:00
Eric Engestrom
ae0cb0b998
v3dv: fix copy/pasted type of sample
...
And use the type in functions instead of a generic `uint32_t` to make it
easier to notice the wrong type.
Fixes: 47e02a2ef1 ("v3dv: add a fast path for vkCmdClearAttachments")
Signed-off-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24787 >
2023-08-20 04:58:17 +00:00
Eric Engestrom
4dc0cb1ebe
v3dv: fix VK_PIPELINE_ROBUSTNESS_{BUFFER,IMAGE}_BEHAVIOR_DEVICE_DEFAULT_EXT copy/paste typo
...
Fixes: 24d9a80247 ("v3dv: implement VK_EXT_pipeline_robustness")
Signed-off-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24787 >
2023-08-20 04:58:16 +00:00
Faith Ekstrand
b5d6b7c402
nir: Drop most uses if nir_instr_rewrite_src()
...
Generated by the following semantic patch:
@@
expression I, S, D;
@@
-nir_instr_rewrite_src(I, S, nir_src_for_ssa(D));
+nir_src_rewrite(S, D);
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24729 >
2023-08-18 01:00:15 +00:00
Faith Ekstrand
298a3eebd8
nir: Take a nir_def * in nir_tex_instr_add_src()
...
NIR bits were hand-typed. Driver updates done through the following
semantic patch:
@@
expression T, ST, D;
@@
-nir_tex_instr_add_src(T, ST, nir_src_for_ssa(D));
+nir_tex_instr_add_src(T, ST, D);
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24729 >
2023-08-18 01:00:14 +00:00
Faith Ekstrand
65b6ac8aa4
nir: Rename nir_instr_type_ssa_undef to nir_instr_type_undef
...
We already renamed the type, we just need to rename the enum and the
casting helper functions.
Generated with sed:
sed -i -e 's/nir_instr_type_ssa_undef/nir_instr_type_undef/g' src/**/*.h src/**/*.c src/**/*.cpp
sed -i -e 's/nir_instr_as_ssa_undef/nir_instr_as_undef/g' src/**/*.h src/**/*.c src/**/*.cpp
and two tiny whitespace fixups in lima.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24703 >
2023-08-15 17:44:27 +00:00
Alyssa Rosenzweig
8552311343
broadcom/compiler: Use nir_trim_vector explicitly
...
...when trying to ignore components. Trim functionality with nir_ssa_for_src is
deprecated.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24654 >
2023-08-15 11:59:03 -04:00
Faith Ekstrand
4695bebc79
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 >
2023-08-14 21:22:53 +00:00
Faith Ekstrand
6c1d32581a
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 >
2023-08-14 21:22:53 +00:00
Faith Ekstrand
80a1836d8b
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 >
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
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
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
Mike Blumenkrantz
e9a5da2f4b
nir: add a filter cb to lower_io_to_scalar
...
this is useful for drivers that want to do selective scalarization
of io
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24565 >
2023-08-11 09:02:53 +00:00
Konstantin Seurer
eaee792ea5
vulkan: Add a generated vk_properties struct
...
Generates a physical device properties table to avoid dealing with pNext
chains in the driver. Based on vk_features.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24575 >
2023-08-11 02:53:47 +00:00
Iago Toral Quiroga
d28e5960e5
v3dv: assert that only tex instructions with sampler state have a sampler src
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24537 >
2023-08-10 07:10:01 +00:00
Iago Toral Quiroga
da625903c7
squash! v3dv,broadcom/compiler: don't abuse sampler index
...
For tex instructions that don't have sampler state use backend_flags
instead of sampler index to bind default sampler state.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24537 >
2023-08-10 07:10:01 +00:00
Iago Toral Quiroga
a95c33eeaf
v3dv: remove unused code
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24537 >
2023-08-10 07:10:00 +00:00
Yonggang Luo
0ca43db2d0
v3dv: Use alignas(8) over 64 bit atomic value
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24571 >
2023-08-09 05:15:09 +00:00
Juan A. Suarez Romero
0dafa2e0f0
vc4/ci: update expected results
...
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24550 >
2023-08-08 10:52:01 +00:00
Iago Toral Quiroga
85c5b68823
v3dv: drop cpu path for buffer to image copies
...
We really want to avoid cpu jobs as much as possible. Also,
the texel buffer path we have for this should be able to
handle most cases.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24466 >
2023-08-07 06:48:40 +00:00
Alyssa Rosenzweig
95e3df39c0
treewide: sed out more is_ssa
...
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/24432 >
2023-08-03 22:40:28 +00:00
Alyssa Rosenzweig
a8013644a1
nir: Drop nir_alu_src::{negate,abs}
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24432 >
2023-08-03 22:40:28 +00:00
Alyssa Rosenzweig
ab0d878932
treewide: Remove more is_ssa asserts
...
Stuff Coccinelle missed.
sed -i -e '/assert(.*\.is_ssa)/d' $(git grep -l is_ssa)
sed -i -e '/ASSERT.*\.is_ssa)/d' $(git grep -l is_ssa)
+ a manual fixup to restore the assert for parallel copy lowering.
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/24432 >
2023-08-03 22:40:28 +00:00
Alyssa Rosenzweig
5fead24365
treewide: Drop is_ssa asserts
...
We only see SSA now.
Via Coccinelle patch:
@@
expression x;
@@
-assert(x.is_ssa);
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/24432 >
2023-08-03 22:40:28 +00:00
Alyssa Rosenzweig
d559764e7c
nir: Remove nir_alu_dest::saturate
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24432 >
2023-08-03 22:40:28 +00:00
Alyssa Rosenzweig
91f676819c
vc4,broadcom/compiler: Drop write_mask handling
...
There's no legacy register support so we ncessarily write a contiguous vector.
In other words, the write_mask is of the form `(1 << x) - 1`. Meanwhile this
code asserts the write mask is of the form (1 << x)`. Putting it together the
write mask is necessarily always 0x1, writing out a single scalar.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24471 >
2023-08-03 13:06:38 +00:00
Iago Toral Quiroga
f0e603583e
broadcom/compiler: drop execution environment from the shader key
...
We are no longer using this for anything.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24396 >
2023-08-03 06:32:41 +00:00
Iago Toral Quiroga
b95bb44c61
broadcom/compiler: always clamp results from logic ops
...
We have also been clamping our integer RTs in GL for a while now.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24396 >
2023-08-03 06:32:41 +00:00
Iago Toral Quiroga
fb80e830ef
v3dv: don't set lower_wpos_pntc for Vulkan
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24396 >
2023-08-03 06:32:41 +00:00
Iago Toral Quiroga
87e167baa1
broadcom/compiler: move vulkan's point coord lowering to the driver
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24396 >
2023-08-03 06:32:40 +00:00
Iago Toral Quiroga
59018b0228
broadcom/compiler: move uniform offset lowering from compiler to GL driver
...
We only need this in GL so move it there.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24396 >
2023-08-03 06:32:40 +00:00
Iago Toral Quiroga
f5931ba6d8
broadcom/compiler: use NIR's lowering for dispatch base
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24396 >
2023-08-03 06:32:40 +00:00
Iago Toral Quiroga
9211b9afdf
broadcom/compiler: stop asserting on Vulkan environment
...
The idea is to eventually get rid of key->environment.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24396 >
2023-08-03 06:32:40 +00:00
Iago Toral Quiroga
fc0ca7407b
v3dv: fix incorrect key setup
...
We had this incorrectly included inside the body of loop over
the subpass attachments so when all attachments are unused we
would not set this correctly.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24396 >
2023-08-03 06:32:40 +00:00
Iago Toral Quiroga
e941732ab1
v3dv: stop incrementing UBO indices by one
...
This matches what we do for OpenGL, allowing us to
have the same compiler behavior for both worlds.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24396 >
2023-08-03 06:32:40 +00:00
Eric Engestrom
eadc72d9de
broadcom/ci: reduce v3dv-rpi4-vk timeout to 30min (instead of 1h)
...
This means that when things go wrong, we don't hold the runner (and Marge)
for as long, while still having a 2x margin over the usual run time.
Signed-off-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24402 >
2023-08-02 16:36:51 +00:00
Eric Engestrom
4346fe8e2a
broadcom/ci: reduce v3d-rpi4-traces timeout to 30min (instead of 1h)
...
This means that when things go wrong, we don't hold the runner (and Marge)
for as long, while still having a 2x margin over the usual run time.
Signed-off-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24402 >
2023-08-02 16:36:50 +00:00
Eric Engestrom
9ca031b4a8
broadcom/ci: reduce v3d-rpi4-gl timeout to 30min (instead of 1h)
...
This means that when things go wrong, we don't hold the runner (and Marge)
for as long, while still having a 2x margin over the usual run time.
Signed-off-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24402 >
2023-08-02 16:36:50 +00:00
Eric Engestrom
b23d4d86dd
broadcom/ci: reduce vc4-rpi3-gl timeout to 30min (instead of 1h)
...
This means that when things go wrong, we don't hold the runner (and Marge)
for as long, while still having a 2x margin over the usual run time.
Signed-off-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24402 >
2023-08-02 16:36:50 +00:00
Alyssa Rosenzweig
17d66055ae
nir: Remove reg_intrinsics parameter to convert_from_ssa
...
All users must set it.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24450 >
2023-08-02 10:26:45 -04:00
Juan A. Suarez Romero
08579810d1
broadcom/ci: update expected results
...
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24437 >
2023-08-02 08:16:20 +00:00
Yonggang Luo
9817f7d621
util: Move pipe_swizzle from p_defines.h to u_formats.h
...
pipe_swizzle is used by src/util/*, so do the move to decouple src/util/* from gallium
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19522 >
2023-08-02 03:41:23 +00:00
Alyssa Rosenzweig
51db19f7a2
nir: Rename scoped_barrier -> barrier
...
sed + ninja clang-format + fix up spacing for common code.
If you are unhappy that I did not manually change the whitespace of your driver,
you need to enable clang-format for it so the formatting would happen
automatically.
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/24428 >
2023-08-01 23:18:29 +00:00
Faith Ekstrand
d89ca14e71
broadcom/compiler: Convert to new-style NIR registers
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24153 >
2023-07-25 15:36:52 +00:00
Alyssa Rosenzweig
03b2c34793
nir: Remove register arrays
...
Nothing produces them any more, so remove them from NIR. This massively reduces
the size of nir_src, which should improve performance all over.
nir_src size reduced from 56 bytes -> 40 bytes (pahole results on arm64, x86_64
should be similar.)
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/24253 >
2023-07-21 11:25:49 +00:00