Commit Graph

2493 Commits

Author SHA1 Message Date
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
Yonggang Luo 62ce223245 treewide: Switch to use nir_foreach_function_with_impl when possible
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23903>
2023-06-29 08:36:03 +00:00
Erik Faye-Lund 80212172e4 v3dv: use imm-helpers
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23855>
2023-06-29 07:08:18 +00:00
Erik Faye-Lund b3b3be55c4 broadcom/compiler: use imm-helpers
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23855>
2023-06-29 07:08:18 +00:00
Alejandro Piñeiro 59518b6dc6 v3dv: add a linear images to buffer copy codepath
Called copy_image_to_buffer_texel_buffer, that reuses
copy_image_linear_texel_buffer, by setting up a image destination from
the buffer destination.

This fixes new ycbcr tests added recently (1.3.6.0) like:
dEQP-VK.ycbcr.copy.*.*.*buffer*

that were failing due lack of a codepath handling them.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23864>
2023-06-28 12:55:16 +02:00
Alejandro Piñeiro 74fd2b9dd7 v3dv: refactor copy_image_to_buffer_blit
In order to have common code to create a image from a buffer, that we
plan to use later on a new codepath.

This refactor adds three new methods:
 * One that gathers all the info required to create the structures and
   implement the operation
 * One that creates the image from the buffer, based on that info
 * One that creates a BlitRegion from that info

This seems like too much splitting, but we needed to do it in this
way, because we can't ensure that future uses of this common code
would use a BlitRegion.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23864>
2023-06-28 12:54:57 +02:00
Alyssa Rosenzweig 815efcdf7e nir: Use nir_builder_create
perl -p0e 's/nir_builder ([^;]*);\s*nir_builder_init\(&\1, /nir_builder \1 = nir_builder_create(/g' -i $(git grep -l nir_builder_init)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23860>
2023-06-27 18:13:02 +00:00
Iago Toral Quiroga 03ad1d5ab6 v3dv: don't use the TLB path if we might be copying partial tiles
With TLB paths we are always storing full tiles, so we can't use it
if the regions we store are not a multiple of the tile size (or the
full image).

Unfortunately, at the point we call this we don't usually have the
tile size yet so for now we skip the path if we are not copying
full mip levels.

Fixes various CTS fails in:
dEQP-VK.ycbcr.copy.*.optimal*buffer_optimal*

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23739>
2023-06-27 09:04:20 +02:00
Iago Toral Quiroga cec030a233 v3dv: fix slice size for miplevels >= 2
We want to store the slice size in pixels not the level size
after padding to a power of 2 we use miplevels >= 2.

Fixes: 1cb2d2a5ee ('v3dv: store slice dimensions in pixels')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23739>
2023-06-27 09:04:20 +02:00
Juan A. Suarez Romero 99502b42b4 vc4/v3d/ci: update expected results
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23862>
2023-06-26 18:44:16 +02:00
Eric Engestrom 337908440e v3dv: replace boolean and uint with bool and size_t
There's no reason to use the gallium `p_compiler.h` types in vulkan code.

Inspired by https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23577,
but using `size_t` for `ulist_data_size` because its two users are
`blob_read_bytes()` and `memcpy()`, both of which expect a `size_t`.

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23795>
2023-06-24 12:21:09 +00:00
Juan A. Suarez Romero ab6aa14f42 v3d: clear alpha-only as red-only
When clearing an alpha-only format, set the alpha channel into red
channel.

Fixes `spec@ext_texture_integer@multisample-fast-clear
gl_ext_texture_integer`.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23497>
2023-06-20 07:45:31 +00:00
Caio Oliveira 59cc77f0fa compiler: Move from nir_scope to mesa_scope
Just moving the enum and performing renames, no behavior change.

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23328>
2023-06-19 23:29:26 +00:00
Iago Toral Quiroga 5cdb2371fd v3dv: expose shaderImageGatherExtended
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/23616>
2023-06-19 08:13:06 +00:00
Iago Toral Quiroga e31aff59d8 broadcom/compiler: handle textureGatherOffsets
There is a lowering in NIR for this so we just need to enable it.

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/23616>
2023-06-19 08:13:06 +00:00
Erik Faye-Lund 2a71e332aa nir: use new immediate comparison helpers
There's plenty of places we can use these new and shiny helpers, so
let's clean up the code a bit.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23460>
2023-06-15 13:33:58 +02:00
Emma Anholt 97744f11cf ci: Drop skips for some previously-invalid CTS tests.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23610>
2023-06-14 16:45:23 +00:00
Emma Anholt 8c35537351 ci: Update to vulkan-cts-1.3.5.2 (and pull in some more fixes).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23610>
2023-06-14 16:45:23 +00:00
Iago Toral Quiroga 6114e66124 broadcom/compiler: only use last thread switch flag to detect final section
Since commit 'c98ddc778a3 broadcom/compiler: force a last thrsw for spilling'
we always ensure we signal the last thread section explicitly with a
last thread switch.

Relying on VPM stores to detect the last thread section is particularly bad,
because we can have VPM stores occurring quite early in a shader program,
which would disable TMU spilling almost entirely.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22461>
2023-06-14 09:27:50 +00:00
Alejandro Piñeiro dfdbf5bf94 broadcom/compiler: clarify use of QFILE_VPM
This was only used for version < 40 (See commit 22a02f3e3).

Adding some extra explanations and asserts of places where it is used.

As we are here also move the definition of a register with QFILE_VPM,
to avoid defining it if not needed.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22984>
2023-06-14 09:03:35 +00:00
Alyssa Rosenzweig 1d4a59448c treewide: Remove use_scoped_barrier
It is now set by all relevant drivers and not checked anywhere.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23191>
2023-06-13 16:36:10 +00:00
Juan A. Suarez Romero acf6364068 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/23617>
2023-06-13 10:55:16 +00:00
Emma Anholt 0cffef54e5 v3d: Respect nir_intrinsic_store_output's write_mask.
Usually lower_io_to_temps sorts this out for us so you only get full
writes, but we should be able to handle it without that.  Avoids a
regression with the mesa/st PBO VS with layer output.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23114>
2023-06-12 17:37:54 +00:00
Iago Toral Quiroga c5b6a65f81 v3d,v3dv: fix viewport offset for negative viewport center
If the viewport center is not positive we can't express it
through the fine coordinates, which are unsigned, and we
need to use the coarse coordinates too.

Fixes new crashes in Vulkan CTS 1.3.6.0:
dEQP-VK.draw.renderpass.offscreen_viewport.*negative*

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23489>
2023-06-07 18:40:56 +00:00
Iago Toral Quiroga 78dc0bc589 broadcom/cle: fix up viewport offset packet definition for V3D 4.1+
These are split between fine and coarse coordinates. We have only been
using fine until now, so we kept the same naming convention we had
prior to V3D 4.1 for simplicity, but we will start using the coarse
coordinates soon too.

Also, the signedness was reversed: coarse coordinates are signed and
fine coordinates are unsigned.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23489>
2023-06-07 18:40:56 +00:00
Iago Toral Quiroga 84af2cb44a v3dv: simplify scissor setup for negative viewport height
KHR_maintenance1 allows clients to specify a negative
height, but not a negative width, so assert on that and
simplify the computations for the horizontal dimension.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23489>
2023-06-07 18:40:55 +00:00
Iago Toral Quiroga 226c62b745 v3dv: remove bogus viewport code
This is incorrectly undoing the code right above it.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23489>
2023-06-07 18:40:55 +00:00
Juan A. Suarez Romero 7a21b59df9 v3d: handle samplerExternalOES
Add handling for GLSL_SAMPLER_DIM_EXTERNAL.

Fixes `spec@oes_egl_image_external_essl3@oes_egl_image_external_essl3`.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23469>
2023-06-07 09:20:32 +00:00
Yonggang Luo b687fa4ccb vulkan: move nir_convert_ycbcr into vulkan runtime
This only used by vulkan drivers and depends on vulkan util, so do the move to decouple
nir from vulkan utils

Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23444>
2023-06-07 08:42:03 +00:00
Alyssa Rosenzweig 99a00e2247 treewide: Use nir_trim_vector more
Via Coccinelle patches

    @@
    expression a, b, c;
    @@

    -nir_channels(b, a, (1 << c) - 1)
    +nir_trim_vector(b, a, c)

    @@
    expression a, b, c;
    @@

    -nir_channels(b, a, BITFIELD_MASK(c))
    +nir_trim_vector(b, a, c)

    @@
    expression a, b;
    @@

    -nir_channels(b, a, 3)
    +nir_trim_vector(b, a, 2)

    @@
    expression a, b;
    @@

    -nir_channels(b, a, 7)
    +nir_trim_vector(b, a, 3)

Plus a fixup for pointless trimming an immediate in RADV and radeonsi.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23352>
2023-06-06 18:52:25 +00:00
Alyssa Rosenzweig 68eda9456f treewide: Use nir_tex_src_for_ssa
Via Coccinelle patch:

    @@
    expression a, b, c;
    @@

    -a.src = nir_src_for_ssa(b);
    -a.src_type = c;
    +a = nir_tex_src_for_ssa(c, b);

    @@
    expression a, b, c;
    @@

    -a.src_type = c;
    -a.src = nir_src_for_ssa(b);
    +a = nir_tex_src_for_ssa(c, b);

Plus manual fixups, including...

* a few identity swizzles changed to nir_trim_vector in TTN and prog-to-nir to
  fix the Coccinelle-botched formatting, and similarly a pointless nir_channels
* collapsing a now-pointless temp in vtn

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23352>
2023-06-06 18:52:25 +00:00