Commit graph

214263 commits

Author SHA1 Message Date
Ella Stanforth
c9e9d72cce v3d/compiler: implement normalised to float conversions
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35820>
2025-09-30 12:48:42 +00:00
Ella Stanforth
082e6369f9 nir: add v3d specific intrinsic normalised to float conversion
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35820>
2025-09-30 12:48:42 +00:00
Ella Stanforth
9263e1838b v3d/compiler: Lower load_output after logic operations
Fixes: 42154029fc ("v3d/compiler: Implement software blend lowering")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35820>
2025-09-30 12:48:42 +00:00
Ella Stanforth
0a640f42c5 v3d/compiler: Add unpacking instructions for normalised 16bit formats.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35820>
2025-09-30 12:48:41 +00:00
Ella Stanforth
8ad47b67b8 v3d: Fallback to software blend support for formats that do not support blend.
Allows us to support blending for internal formats other than 8n and 16f.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35820>
2025-09-30 12:48:40 +00:00
Ella Stanforth
ee48e81b26 v3d: Always lower frag color
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35820>
2025-09-30 12:48:39 +00:00
Ella Stanforth
dfbf1a8e80 v3d: rename msaa resolve
The conditions for being able to do msaa resolve and hardware blending are
identical.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35820>
2025-09-30 12:48:39 +00:00
Simon Perretta
61a9c4f63d pvr, pco: add primitive support for terminate,demote_to_helper}_invocation
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:54 +00:00
Simon Perretta
a1acd6f8d1 pvr, pco: add primitive support for VK_KHR_robustness2.nullDescriptor
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:54 +00:00
Simon Perretta
2a7ebf2ae0 nir/lower_alpha: extend to support dynamic a2c
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:53 +00:00
Simon Perretta
63c4ecfae0 pvr, pco: add remaining support for eds2 & 3
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:53 +00:00
James Fitzpatrick
17468aee4b pvr: add support for (EXT|KHR)_line_rasterization
Signed-off-by: James Fitzpatrick <james.fitzpatrick@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:52 +00:00
James Fitzpatrick
7e11ec20e4 pvr: update WClamp value to 1.0e-13f
Signed-off-by: James Fitzpatrick <james.fitzpatrick@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:52 +00:00
Luigi Santivetti
a48857be7b pvr: propagate image samples when doing a blit from DS surface
Enabling DS resolve attachment entails a blit for a ZLS subtile region, in such
case the TQ needs to know the number of samples in the source surface in order to
pack the texture state.

Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:51 +00:00
leonperianu
9ab273f5ab pvr: add support for VK_KHR_depth_stencil_resolve
This commit enables the VK_KHR_depth_stencil_resolve extension in the PVR
Vulkan driver. Only worth to note that this implementation is based on the
renderpass driver path and it will need a rework as part of the dynamic
rendering enablement.

Signed-off-by: leonperianu <leon.perianu@imgtec.com>
Co-authored-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Co-authored-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Co-authored-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:51 +00:00
Luigi Santivetti
6c4883bc9d pvr: restrict the scope of copy_{buffer,image}_to_{image,buffer}
Do not conflate api and internal driver use of copy commands and make the
correct assumptions for the api path, according to the Vulkan spec.

Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:51 +00:00
Luigi Santivetti
2c2fdac093 pvr: improve unemitted resolve attachments readability
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:51 +00:00
Frank Binns
2e97daec67 pvr: setup Vulkan 1.1 & 1.2 features, properties, version
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:50 +00:00
Frank Binns
b1cb11337a pvr: advertise KHR_spirv_1_4
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:50 +00:00
Simon Perretta
27b329eea3 pvr: add support for VK_KHR_shader_draw_parameters, drawIndirectFirstInstance
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:49 +00:00
Simon Perretta
0134e86375 pco: set lower_device_index_to_zero
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:49 +00:00
Frank Binns
80609b35e1 pvr: advertise KHR_shader_subgroup_extended_types
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:49 +00:00
Simon Perretta
bd96981cad pvr, pco: add minimal support required for Vulkan 1.2 subgroups
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:48 +00:00
Simon Perretta
6dc5e1e109 pco: fully support Vulkan 1.2 image atomics
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:48 +00:00
Simon Perretta
08e3740e07 pvr, pco: support imageCubeArray feature
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:47 +00:00
Simon Perretta
339ba75014 pco: treat all load_consts as 32-bit
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:47 +00:00
Frank Binns
c0df962fa0 pvr: enable KHR_create_renderpass2
The driver already implements the regular render pass functions in terms of the
VK_KHR_create_renderpass2 functions. However, the extension couldn't be
advertised due to missing support for VK_KHR_multiview. Now multiview is
supported, renderpass2 can be advertised as well.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:46 +00:00
Simon Perretta
cb6c921502 pvr, pco: add multiview compiler support, advertise extension
- Pass view index to fragment shader via linked flat varying.
- Use view index instead of layer id for input attachments when required.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:46 +00:00
Peter Quayle
9d48088428 pvr: add view index support for vertex shaders
Signed-off-by: Peter Quayle <peter.quayle@imgtec.com>
Co-authored-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:46 +00:00
Peter Quayle
93c7f0f9c0 pvr: various multiview fixes
- Fix ds address offset for multiview.
- Fix multiview depth/stencil address by restoring it after every kick.
- Enable empty tile processing after first subpass for multiview.

Signed-off-by: Peter Quayle <peter.quayle@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:45 +00:00
Luigi Santivetti
a1002a6673 pvr: add initial driver support for VK_KHR_multiview
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:45 +00:00
Lewis Cooper
8eb26e4986 pvr: Implement VK_KHR_dedicated_allocation
Signed-off-by: Lewis Cooper <lewis.cooper@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:44 +00:00
Simon Perretta
63461f1026 pvr: enable VK_FORMAT_D32_SFLOAT_S8_UINT
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:44 +00:00
Simon Perretta
ca6580aa71 pvr: enable independentBlend feature
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:44 +00:00
Simon Perretta
41a759bcbe pco: discard invalid instances depending on the sample & valid masks
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:44 +00:00
Simon Perretta
7fdf3683bc pvr, pco: allow fs sample rate to be dynamically set
Sets up the PDS doutu sample rate as late as possible, utilises
covmask(1.0f) to detect whether the fragment shader is running in single
sampled mode or not in order to select registers that differ based on
the execution rate.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:43 +00:00
Simon Perretta
2d485e8fea pvr: enable sampleRateShading feature
TODO: do something with pipeline create info?!

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:43 +00:00
Simon Perretta
2476e4c1ab pvr: add debug for missing sysvals
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:42 +00:00
Simon Perretta
f20c7b92b2 pvr, pco: track and implement workaround for brn74056
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37512>
2025-09-30 12:15:42 +00:00
Mike Blumenkrantz
5702234013 zink: fix disabling multiview mesh with shader objects
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37623>
2025-09-30 11:22:28 +00:00
Mike Blumenkrantz
3b63317d93 mesa: delete task and mesh programs on context destroy
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37623>
2025-09-30 11:22:28 +00:00
Roland Scheidegger
7e0c0ba08c lavapipe: implement VK_EXT_sample_locations
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Seems to pass all relevant lavapipe vk cts tests
zink-lavapipe fails, but it's broken in zink, update ci expectation

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37603>
2025-09-30 01:13:29 +00:00
Konstantin Seurer
dca33aa0a0 vulkan/vk_cmd_queue: Clone VkSampleLocationsInfoEXT extending VkRenderingInfo
This is used by the renderpass implementation but the Vulkan spec does
not say that VkSampleLocationsInfoEXT can extend VkRenderingInfo.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37603>
2025-09-30 01:13:29 +00:00
Jianxun Zhang
a5acfdf753 iris: Assert no disabling aux in first query (xe2)
Xe2 platforms have a different way to disable CCS
compression.

Suggested by Nanley Chery <nanley.g.chery@intel.com>

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37098>
2025-09-29 17:08:54 -07:00
Jianxun Zhang
1cbee485e7 iris: Ensure type of bo's heap is consistent with modifier
This helps us to catch a compressed bo is picked up for
an uncompressed modifiers when importing dmabuf, and vise
versa.

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37098>
2025-09-29 17:08:53 -07:00
Jianxun Zhang
5aa4dc7f77 iris: Disable compression on sharing without modifier
For an image created either without a modifier to share or as the
destination image to get rid of compression by re-allocation, it
should have compression disabled.

Close: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13729
(Fix firefox misrendering when gfx.wayland.hdr option is true)

Backport-to: 25.2

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37098>
2025-09-29 17:08:53 -07:00
Aitor Camacho
06dbd4c33c nir: Set cursor in lower_sampler_lod_bias
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Alyssa Anne Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37494>
2025-09-29 23:24:52 +00:00
Deborah Brouwer
9029c8b1e3 android: fall back to SwiftShader’s LLVM
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
If no external/llvm-project directory is present, build with SwiftShader’s
static LLVM library if available. This can simplify Mesa builds inside
AOSP.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37607>
2025-09-29 14:49:43 -07:00
Ian Romanick
23bd356b42 brw/nir: nir_intrinsic_load_reloc_const_intel may not be scalar [v3]
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
If the (NIR) destination is a register (i.e., not an SSA value), the
destination of the BRW instruction will not be is_scalar. This occurs in
some shaders in Final Fantasy XVI (and
finalfantasytype0_1.rdc.2826e29da3722a83.1.foz).

If the destination is not is_scalar, revert most of this code to the
state previous to f3593df877. This means

- Allocate a SIMD1 register and UNDEF it.
- Emit a SIMD1 MOV_RELOC_IMM to that register.
- Emit an additional MOV to expand the SIMD1 result.

Closes: #12520
Fixes: f3593df877 ("brw/nir: Treat load_reloc_const_intel as convergent")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37384>
2025-09-29 16:48:07 +00:00
Samuel Pitoiset
29ccbb21f3 radv: add a helper whether shader fp16 is enabled
To remove code duplication.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37619>
2025-09-29 16:17:11 +00:00