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
Eric Engestrom
1625b5984a
ci: move broadcom files rules to src/broadcom/ci/gitlab-ci.yml
...
Signed-off-by: Eric Engestrom <eric@igalia.com >
Acked-by: David Heidelberg <david.heidelberg@collabora.com >
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24099 >
2023-07-18 23:07:52 +00:00
Alyssa Rosenzweig
3fed1b4a9e
v3dv: Rely on nir_builder setting workgroup size
...
Now the default.
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/24158 >
2023-07-17 19:53:49 +00:00
Faith Ekstrand
73e191924c
nir: Add a reg_intrinsics flag to nir_convert_from_ssa
...
It doesn't do anything yet. We leave that to the subsequent patches so we can
keep the tree-wide refactor as simple as possible.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23089 >
2023-07-12 01:34:27 +00:00
Lucas Fryzek
6b2fa965c6
gallium: Remove PIPE_CAP_RGB_OVERRIDE_DST_ALPHA_BLEND
...
Since the mesa state tracker can promote RGB texture formats
to RGBA texture formats (among other formats) without exposing
any of that information to a driver, it is more desirable to
have the behaviour of `PIPE_CAP_RGB_OVERRIDE_DST_ALPHA_BLEND`
be the default. This avoids rendering bugs where an application
sets `DST_ALPHA` blending on a format where there is no alpha
channel, that has been promoted to a format that actually has an
alpha channel. The driver can instead rely on the common code
in the state tracker to convert the blending parameter to one
that reflects the limitations of the application requested format,
as long as `PIPE_CAP_INDEP_BLEND_FUNC` is supported.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24044 >
2023-07-11 15:52:08 +00:00
Italo Nicola
b094332303
v3d: implement clear_render_target and clear_depth_stencil
...
Also added some related piglit failures to broadcom-rpi4-fails.txt.
Signed-off-by: Italo Nicola <italonicola@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23735 >
2023-07-10 15:23:06 +00:00
Eric Engestrom
5b2e672bb0
v3dv/ci: skip more tests that are timing out
...
Signed-off-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24018 >
2023-07-07 15:54:45 +00:00
Eric Engestrom
fb7c974514
v3dv/ci: fix skipping of vk tests
...
This is a regex, not a glob, so `dEQP-VK.ssbo.phys.layout.3*` matched
all of `dEQP-VK.ssbo.phys.layout`.
Signed-off-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24018 >
2023-07-07 15:54:45 +00:00
Eric Engestrom
d5e01e67a4
vc4/ci: fix skipping of gles3 piglit tests
...
This is a regex, not a glob, so `spec@!opengl es 3*` matched all of
`spec@!opengl es `.
Signed-off-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24018 >
2023-07-07 15:54:45 +00:00
Alyssa Rosenzweig
6562e89893
v3dv: Use vk_index_type_to_bytes
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24017 >
2023-07-07 07:22:32 -04:00
Iago Toral Quiroga
be91133f87
broadcom/compiler: don't leak v3d_compile when finding a new best strategy
...
If we had selected a best strategy and find an even better one we need to
make sure we free the previous one.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24001 >
2023-07-05 21:52:01 +00:00
Iago Toral Quiroga
dcc6288a13
broadcom/compiler: free defin and defout arrays if they already exist
...
Just like we do for everything else here, since we are going to realloc
them again right below. Notice this is not exactly a memory leak, since
all these arrays are allocated with ralloc using v3d_compile as context,
so all allocations will be eventually freed when the context is destroyed.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24001 >
2023-07-05 21:52:01 +00:00
Alejandro Piñeiro
bbdb615a86
v3dv/device: update conformanceVersion
...
The Vulkan CTS started generating the list of valid versions the
driver can report as conformant against based on the active branches,
and the branch we were reporting up to now is no longer valid.
Fixes dEQP-VK.api.driver_properties.conformance_version
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23980 >
2023-07-04 11:09:55 +00:00
Yonggang Luo
8f8ea2dd68
broadcom: Switch to use nir_foreach_function_impl
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23988 >
2023-07-04 10:47:26 +00:00
Yonggang Luo
edb607ed9f
v3d: Switch to use nir_foreach_function_impl
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23988 >
2023-07-04 10:47:26 +00:00
Iago Toral Quiroga
1f8ecd3ae0
broadcom: use nir info to keep track of implicit sample shading
...
It seems NIR is tracking this for us now so we can stop doing this
in the backend.
Also, new CTS tests seem to add the requirement where in the presence of
some builtin's like gl_SampleID in a shader, even if unused, sample shading
is expected to be enabled, which is something we can't track in the backend
since the variable may have been dropped by then.
Fixes 2 failures in:
dEQP-VK.draw.renderpass.implicit_sample_shading.sample*
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23984 >
2023-07-04 08:54:43 +00:00
Janne Grunau
fd4d0e1cc2
st/mesa: Set gl_config.floatMode based on color_format
...
Sets the float color component type in st_visual_to_context_mode()
ensuring float color values are not clamped.
Fixes dEQP-EGL.functional.wide_color.window_fp16_default_colorspace on
asahi, iris and most likely every other driver having it marked as fail
or flake.
Closes : mesa/mesa#9276
Signed-off-by: Janne Grunau <j@jannau.net >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Acked-by: David Heidelberg <david.heidelberg@collabora.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23914 >
2023-07-04 00:23:40 +00:00
Juan A. Suarez Romero
0dd0f35205
v3d/ci: add new flake
...
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23975 >
2023-07-03 18:57:04 +00:00
Konstantin Seurer
5c8c2ec85c
v3d: Use nir_builder_at
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23883 >
2023-07-03 15:21:37 +00:00
Alyssa Rosenzweig
a64f860acb
broadcom/compiler: Use nir_steal_tex_src
...
It's great for passes like these. Noticed while in the area.
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/23895 >
2023-06-29 22:36:50 +00:00
Alyssa Rosenzweig
5623f6571b
broadcom/compiler: Remove unused #define
...
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/23895 >
2023-06-29 22:36:50 +00:00
Alyssa Rosenzweig
4601517f54
broadcom/compiler: Remove v3d_nir_lower_robust_access
...
Now unused.
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/23895 >
2023-06-29 22:36:50 +00:00
Alyssa Rosenzweig
596176a720
broadcom/compiler: Use nir_lower_robust_access
...
The common code version, instead of the vendor version.
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/23895 >
2023-06-29 22:36:50 +00:00
Yonggang Luo
38935d9789
broadcom: replace redefined ALIGN() macro with common util functions
...
`cl_aligned_packet_length()` expand literals, so use ALIGN_POT to compute it
at compile time.
`v3dv_AllocateMemory()` uses a 64-bit `allocationSize`, so use `align64()`.
`v3d_lower_nir()` uses a 32-bit `shared_size`, so use `align()`.
Extracted out of https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23932
for easier review.
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23938 >
2023-06-29 21:12:07 +00:00
Iago Toral Quiroga
a7ccba2dfd
v3dv: fix blit path for compressed image to buffer copies
...
Here we were aliasing the full compressed image with an uncompressed
format that we would then use for sampling during the blit copy. This
had 2 issues:
1. Uncompressed image views would have smaller dimensions than the
compressed image, and thus, would also have less mip levels.
2. When sampling from smaller mip levels, the hw internally computes
the size of the mip level from the size of level 0, which then uses
to interpret the texture coordinates, but for some texture sizes
this size would not be an exact match for compressed and uncompressed
views.
To fix this, we modify the aliasing technique to only alias the
miplevel selected in the copy as a level 0 image and we ensure the
slice 0 for that image matches exactly the slice description of the
aliased mip level in the original image.
Fixes all test failures in
dEQP-VK.api.copy_and_blit.core.image_to_buffer.*
for compressed formats when we forcefully disable the TLB path.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23919 >
2023-06-29 10:13:42 +00:00
Iago Toral Quiroga
599e76617d
v3dv: use div_round_up for division by block size
...
We always want to round up when we divide by the block size.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23919 >
2023-06-29 10:13:42 +00:00