Commit graph

7633 commits

Author SHA1 Message Date
Faith Ekstrand
a4e9002660 pan/bi: Emit MKVEC directly
Now that we have bi_lower_mkvec_swz(), there's no need to be so careful
in the NIR -> bi translation.  We can just emit MKVEC and move on.  The
lowering pass will sort out the detaisl.

Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40720>
2026-04-06 21:39:25 +00:00
Faith Ekstrand
b9e33c7897 pan/bi: Stop lowering swizzles on mkvec and swz
The new lowering can handle all the swizzle cases and is generally
better at it than swizzle lowering.

Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40720>
2026-04-06 21:39:25 +00:00
Faith Ekstrand
ed83d46d4e pan/bi: Always use SWZ.v4i8 in bi_lower_swizzle()
Now that we lower it, there's no advantage to one over the other at the
time this pass runs.  Also, the is_8bit check was technically wrong
since it checks destination sizes, not source sizes.  It's a lot safer
to just use SWZ.v4i8 and let the lowering pass do the right thing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40720>
2026-04-06 21:39:25 +00:00
Faith Ekstrand
bc7053a976 pan/bi: Add a lowering pass for MKVEC and SWZ
Instead of trying very carefully in the bifrost emit code to only
generate valid MKVEC for the target hardware, this adds a lowering pass
which is capable of lowering any MKVEC or SWZ we can throw at it.  Even
if the swizzle isn't supported or if it's a MKVEC.v4i8 on Valhall, we'll
lower it to something that does work on that platform.  This frees up
the rest of the compiler so we can add and modify MKVEC and SWZ at-will
and never have to worry about hardware generation details.

Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40720>
2026-04-06 21:39:24 +00:00
Faith Ekstrand
0edceaf383 pan/bi: Add a bi_op_supports_swizzle() helper
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40720>
2026-04-06 21:39:24 +00:00
Faith Ekstrand
a8879daf9c pan/bi: Add a bi_try_compose_swizzles() helper
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40720>
2026-04-06 21:39:24 +00:00
Faith Ekstrand
3b728cb613 pan/bi: Add a bi_swizzle_from_byte_channels() helper
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40720>
2026-04-06 21:39:24 +00:00
Faith Ekstrand
4912bda122 pan/bi: Return void from bi_swizzle_to_byte_channels()
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40720>
2026-04-06 21:39:24 +00:00
Faith Ekstrand
e637130794 pan/bi: Use bi_half() for texture MS indices
It feeds into a v2i16 so it needs to be 16-bit.

Fixes: ae79f6765a ("pan/bi: Emit Valhall texture instructions")
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40720>
2026-04-06 21:39:23 +00:00
Faith Ekstrand
77f9cbd0c2 pan/bi: Compose swizzles in bi_half() and bi_byte()
At least bi_half() has the decency to assert if the swizzle isn't
BI_SWIZZLE_H01 to start with but bi_byte() did an irrelevant assert
and then overwrote the swizzle with BI_SWIZZLE_B<lane> regardless of
what was there before.  In a lot of cases, this doesn't matter but we
use both in translating NIR to BI on things that may have already been
swizzled so we need to do the composition.

Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40720>
2026-04-06 21:39:23 +00:00
Faith Ekstrand
342e9ac7e8 pan/bi: Add a bi_swizzle_from_half() helper
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40720>
2026-04-06 21:39:23 +00:00
Faith Ekstrand
05c5e52054 pan/bi/ra: Allow offsets on tied sources
The only real requirement here is that the destination offset is zero
and that the destination is big enough to hold the source.  The source
offset doesn't matter.

Fixes: bc17288697 ("pan/bi: Lower split/collect before RA")
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40720>
2026-04-06 21:39:23 +00:00
Faith Ekstrand
538b5c411e pan/bi: Delete a few instruction encodings
The non-trivial non-replicate swizzles on IADD.v4x8 and ISUB.v4x8 are
either documented wrong or broken in hardware.  Instead of swizzling
b0101 and b2323, they swizzle b0011 and b2233 on G52.  This is either a
hardware bug or an issue with documentation.  In either case, it's
probably best not to trust it.  Those swizzles aren't all that useful
anyway.  We also weren't using any of them before (or they'd have
broken) so this isn't a performance regression.

Cc: mesa-stable
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40720>
2026-04-06 21:39:23 +00:00
Faith Ekstrand
3fffcf4338 pan/bi: Support more swizzle aliases in the bifrost pack code
Fixes: 82328a5245 ("pan/bi: Generate instruction packer for new IR")
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40720>
2026-04-06 21:39:23 +00:00
Valentine Burley
8444723c6a pan/ci: Document recent flakes and timeouts
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
These have blocked Marge multiple times recently.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40779>
2026-04-03 14:25:39 +00:00
Lorenzo Rossi
a45a7bbf44 pan/compiler: Split bifrost_nir.c from bifrost_compile.c
Before this, everything was in the giant bifrost_compile.c file, now
preprocess, optimize and postproces are in their own "small"
bifrost_nir.c.

I also removed some dead functions and moved the passes closer to their
usage, (ex, passes only used in preprocess are now just before
preprocess). Otherwise it's all the same code we had before.

Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40717>
2026-04-01 18:14:32 +00:00
Lorenzo Rossi
7d8b2c4128 pan/compiler: Split bi_debug.c from bifrost_compile.c
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40717>
2026-04-01 18:14:32 +00:00
Lorenzo Rossi
f19b9eddb6 pan/compiler: Replace bi_lower_ldexp16 with algebraic pass
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40717>
2026-04-01 18:14:31 +00:00
Christian Gmeiner
6333bf359b panvk: Advertise VK_KHR_shader_untyped_pointers on v9+
Enable the VK_KHR_shader_untyped_pointers extension and the
shaderUntypedPointers feature for Valhall and newer (v9+).

Bifrost (v6/v7) has issues with 8-bit vector loads through untyped
pointers combined with 16-bit storage, so restrict the extension
to architectures where it's fully functional.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40457>
2026-03-31 11:57:10 +00:00
Christian Gmeiner
37c8ff5416 panvk: Lower memcpy derefs
To make sure all memcpy derefs are lowered before explicit IO lowering.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40457>
2026-03-31 11:57:10 +00:00
Samuel Pitoiset
c4e3380187 nir,treewide: add nir_image_intrinsic_type
We have 4 image intrinsic variants now. This enum is useful for
nir_rewrite_image_intrinsic() and it will be used by other NIR passes.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40709>
2026-03-31 09:10:27 +00:00
Samuel Pitoiset
9d059a60f5 nir: introduce nir_descriptor_type for Vulkan like descriptors
This removes a Vulkan dependency in NIR core.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40670>
2026-03-31 07:16:20 +00:00
Samuel Pitoiset
ee7c6e3752 treewide: cleanup non-existent descriptor types from nir_intrinsic_desc_type()
The only possible values are:
- VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
- VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
- VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40670>
2026-03-31 07:16:20 +00:00
Ryan Mckeever
9c9f5f69fd panvk: enable fragmentStoresAndAtomics for Bifrost
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39207>
2026-03-31 02:18:24 +00:00
Ryan Mckeever
cf8a63c578 panvk: lower multisampled images before nir_lower_descriptors
This will allow image_deref_size intrinsics generated in
pan_nir_lower_image_ms to be lowered in nir_lower_descriptors.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39207>
2026-03-31 02:18:24 +00:00
Yiwei Zhang
a2e42eff52 ci/panvk: update expectations with new flakes
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40682>
2026-03-28 20:16:09 +00:00
Yiwei Zhang
73c9d35644 panvk: hide swapchainMaintenance1 behind WSI guard
Fixes: 9ec387efb1 ("panvk: advertise wsi maintenance extensions")
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40682>
2026-03-28 20:16:09 +00:00
Olivia Lee
8d5ba04e65 panvk/csf: use different resource registers for precomp vs user dispatch
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This allows us to avoid dirtying all of the state for user compute
dispatches when we run a precomp shader.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37970>
2026-03-28 03:53:41 +00:00
Lorenzo Rossi
c0e0591999 pan/compiler: Replace frag_coord_zw_pan with var_special_pan
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Just a bit cleaner, and we can unify point size too.

Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40677>
2026-03-27 19:23:02 +00:00
Lorenzo Rossi
5be2b03b88 pan/compiler: Add bound assert on emit_split_i32
This could've saved me a lot of time debugging stack corruption.

Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40677>
2026-03-27 19:23:02 +00:00
Christian Gmeiner
32ca98a26e panvk: Advertise VK_EXT_shader_atomic_float
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Expose float32 atomic exchange support for buffer, shared, and image
operations on all architectures. The existing axchg instruction is
type-agnostic, so no compiler changes are needed. Image atomics are
already lowered to global atomics via nir_lower_image_atomics_to_global.

Also add R32_FLOAT to the STORAGE_IMAGE_ATOMIC format feature flag so
image atomic operations are accepted for r32f images.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40506>
2026-03-26 21:28:49 +00:00
Lorenzo Rossi
245d54397d pan/compiler: Make lower_vs_outputs write needs_extended_fifo
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40537>
2026-03-26 20:53:21 +00:00
Lorenzo Rossi
445a22acbd pan/compiler: Group outputs in lower_vs_outputs
Previously bifrost_nir_lower_shader_output grouped outputs in separate
if blocks and made a best-effort attempt to group them together.  This
also assumed that pan_nir_lower_store_component wrote each output only
once and that nir_lower_io_vars_to_temporaries pulled them out of any
control flow.

Now all of these are handled by the new pan_nir_lower_vs_outputs pass
that handles write masks, control flow, per_view and grouping for IDVS.
This makes the overall dependencies much simpler, ensures that the
stores are grouped in the same ifs and should be more robust.

Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40537>
2026-03-26 20:53:21 +00:00
Lorenzo Rossi
66bee415ad pan/compiler: Split lower_varyings_io into fs_inputs and vs_outputs
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40537>
2026-03-26 20:53:21 +00:00
Lorenzo Rossi
b1acc1aa89 pan/compiler: Refactor va_shader_output_from_ in common code
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40537>
2026-03-26 20:53:20 +00:00
Lorenzo Rossi
024c66ec0f pan: Add PAN_MAX_MULTIVIEW_VIEW_COUNT
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40537>
2026-03-26 20:53:20 +00:00
Lorenzo Rossi
922405ab71 panfrost/bi: Separate va_shader_output from bitmasks
The new pass will need to iterate on the enum varyings

Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40537>
2026-03-26 20:53:20 +00:00
Faith Ekstrand
c2fc7d49e8 pan/bi: Rework mem_vectorize_cb
Intstead of focusing on numbers of components and bit sizes, focus on
the total number of bytes read.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40576>
2026-03-26 16:28:40 +00:00
Faith Ekstrand
a5801b1a23 pan/bi: Simplify unpack_64_2x32_split_*
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40576>
2026-03-26 16:28:40 +00:00
Faith Ekstrand
79f8c1ca9a pan/bi: Unify handling of unpack_*
These are just a fancy mov on Mali.  We need to use bi_make_vec_to()
because it handles 64-bit movs as well.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40576>
2026-03-26 16:28:40 +00:00
Faith Ekstrand
6cc10835b6 pan/bi: Unify handling of pack_*
These are the same as the split versions and vecN except they have one
source and they use src[0].swizzle[i] instead of src[i].swizzle[0].
While we're here, it's trivial to implement pack_64_4x16 as well.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40576>
2026-03-26 16:28:39 +00:00
Faith Ekstrand
56f5899786 pan/bi: Handle pack_*_split with vecN
They're literally the same thing since vectors are packed.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40576>
2026-03-26 16:28:39 +00:00
Faith Ekstrand
682ab923e6 pan/bi: Move nir_op_mov handling to the top
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40576>
2026-03-26 16:28:39 +00:00
Faith Ekstrand
0b029f319f pan/bi: Properly handle large 8-bit vectors in bi_alu_src_index()
Previously, we used bi_src_index() directly and ignored the offset we
took all that care to calculate at the top of the function.  For most
cases, this is fine since the offset is 0.  But if we ever have an i8v8,
or larger, this doesn't work.  It's not really more work to handle this
case.  All we have to do is use the offset and &3 the swizzle.  It just
means we can't have false code sharing with the bi_make_vec_to() case.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40576>
2026-03-26 16:28:38 +00:00
Faith Ekstrand
9950a98d5e pan/bi: Handle 64-bit sources in bi_alu_src_index()
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40576>
2026-03-26 16:28:38 +00:00
Faith Ekstrand
4be0e46e61 pan/bi: Allow 64-bit vectors in bi_make_vec_to()
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40576>
2026-03-26 16:28:38 +00:00
Faith Ekstrand
f09f080835 pan/bi: Vectorize SSBOs when not robust
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40576>
2026-03-26 16:28:37 +00:00
Faith Ekstrand
3c1a1d2006 panvk: Replace robust2_modes with robust_modes
There's no real difference for us between robustness and robustness2.
The only thing robust_modes does in nir_opt_load_store_vectorize() is to
tell it to be a bit more careful about integer overflow in address
calculations so you don't end up wrapping something around and getting a
non-zero load when you should have gotten an zero from OOB.  There's no
good reason why we should only set it for robustness2.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40576>
2026-03-26 16:28:37 +00:00
Faith Ekstrand
fb7e1fe81c pan/bi: Always vectorize UBO access
Now that we claim 16B robustness alignments, we can vectorize UBO
access, even when robustness2 is enabled.

Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40576>
2026-03-26 16:28:36 +00:00
Faith Ekstrand
3bbacfe8d7 panvk: Set min_ubo/ssbo_alignment in spirv_options
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40576>
2026-03-26 16:28:36 +00:00