Yiwei Zhang
072223c11d
egl/android: clean up u_gralloc_get_buffer_color_info handling
...
No longer need the defaults, and can properly bail on real errors. The
behavior change of chroma sitting has been mentioned in the prior
commit, and doesn't affect gallium side.
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35613 >
2025-06-20 18:13:36 +00:00
Yiwei Zhang
4b68ed990b
u_gralloc: assign default u_gralloc_buffer_color_info
...
Gralloc is the central piece to align defaults and expectations across
different APIs. Doing so simplifies client side handling. To be noted,
midpoint chroma location is preferred as the default to skip the chroma
lowering pass. The same has been suggested by all Vulkan drivers with
AHB implemented and practiced for years under venus.
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35613 >
2025-06-20 18:13:36 +00:00
Yiwei Zhang
64d18f84b0
u_gralloc/mapper4: fill u_gralloc_buffer_color_info properly
...
Clients are expecting the color info to be fully filled when the api
exists. Give proper defaults for the metadata to stay aligned with
legacy backends.
Also amend the missing ChromaSiting cases.
Fixes: ee42e2166d ("android: Introduce the Android buffer info abstraction")
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35613 >
2025-06-20 18:13:36 +00:00
Yiwei Zhang
0ac1e05f65
u_gralloc/mapper5: fill u_gralloc_buffer_color_info properly
...
Clients are expecting the color info to be fully filled when the api
exists. Give proper defaults for the metadata to stay aligned with
legacy backends.
Fixes: 122fd46b15 ("Android15 support gralloc IMapper5")
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35613 >
2025-06-20 18:13:36 +00:00
Karol Herbst
de1ce0f75e
rusticl: allow packagers to enable freedreno by default
...
The msm driver hasn't yet passed conformance, so it's not part of the
auto set at this point in time. But this will allow distribution to
enable it by default, if they find it suitable.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35618 >
2025-06-20 17:46:32 +00:00
Job Noorman
bc10c812d6
ir3/legalize: apply initial GS/TCS sync in legalize
...
When applying the sync flags after legalize, we might run into the issue
of the first instruction not supporting (ss)/(sy). We cannot insert a
nop at that point anymore since jump targets have already been
calculated. Fix this by applying the sync flags during legalize, where
all other sync flags are also applied.
Signed-off-by: Job Noorman <jnoorman@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35653 >
2025-06-20 17:23:46 +00:00
Job Noorman
e51fa32aac
ir3/legalize: propagate force_ss/sy across blocks
...
Just like the other sync state, we might need to apply this at the start
of successor blocks.
Signed-off-by: Job Noorman <jnoorman@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35653 >
2025-06-20 17:23:46 +00:00
Job Noorman
a5355b5ffd
ir3/legalize: don't force (ss) after predt
...
This isn't necessary and since predt is a terminator and we (mistakenly)
didn't propagate force_ss across blocks, it wasn't actually applied.
Signed-off-by: Job Noorman <jnoorman@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35653 >
2025-06-20 17:23:46 +00:00
Mike Blumenkrantz
2e071cc66c
zink: actually use GENERAL image barrier functions
...
and fix a bunch of issues there
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:32 +00:00
Mike Blumenkrantz
5c2344b6a6
zink: mimic buffer transfer dst noop barrier semantics with images
...
this should better guarantee sync with GENERAL
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:32 +00:00
Mike Blumenkrantz
bbac75acd3
zink: always unset unordered access flags when executing an ordered barrier
...
this otherwise confuses the calculator
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:31 +00:00
Mike Blumenkrantz
ea45f89ebe
zink: always pass through src access flags for buffer barriers
...
this is more accurate and avoids mixing/matching flags from different cmdbufs
probably won't affect anything at this exact moment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:31 +00:00
Mike Blumenkrantz
cb026adc4c
zink: don't use TRANSFER bit as default pipeline stage if no access is set
...
should be TOP_OF_PIPE
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:31 +00:00
Mike Blumenkrantz
5ff573d534
zink: skip sampler layout updates when using GENERAL layouts
...
these are always GENERAL
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
06be46c7a0
zink: add another aggressive sampler barrier after sequential image copies
...
this should better handle pipelined texture uploads
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
e5d1547f08
zink: break out the fb unbind sampler barrier
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
d8c1fdb644
zink: fix GENERAL image copy box resets on non-transfer barrier
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
43def9716b
zink: use GENERAL layout in zink_copy_image_buffer when possible
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
4f329fdc61
zink: local screen variable in zink_copy_image_buffer
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
d30008124d
zink: fix image transfer op batching with GENERAL layouts
...
this depends on the access, not the layout
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
3d073bb0b3
zink: delete barrier sync flag inferring
...
these are all explicit now
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
5f22d3f174
zink: fill in sync flags for a couple barriers
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:30 +00:00
Mike Blumenkrantz
4483c6195d
zink: put back the sampler barrier on fb unbind with GENERAL layouts
...
this is actually critical to avoid splitting renderpasses regardless of
the layout being used
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35476 >
2025-06-20 17:08:30 +00:00
Yiwei Zhang
41d241bf6e
radv: relax the native_handle_t::numFds requirement
...
For modern gralloc impl, usually there's other fds appended in the
native_handle_t for gralloc buffer metadata sharing. So numFds can be
greater than 1, while the common agreement is still that the format
plane handles being placed at the beginning in the lack of a standard
format plane fd metadata query mapper api.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13163
Cc: mesa-stable
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35038 >
2025-06-20 16:51:18 +00:00
Alyssa Rosenzweig
b0f8c22682
nir/opt_sink: sink agx backfacing
...
helps an elden ring shader:
Totals from 1 (0.03% of 3206) affected shaders:
Instrs: 4146 -> 4141 (-0.12%)
CodeSize: 27374 -> 27334 (-0.15%)
ALU: 2554 -> 2549 (-0.20%)
FSCIB: 2554 -> 2549 (-0.20%)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35559 >
2025-06-20 16:09:28 +00:00
Alyssa Rosenzweig
3eeba6efdd
nir/opt_preamble: hoist reorderable SSBO loads on AGX
...
basically asahi version of 2f93137308 ("nir/opt_preamble: Handle
load_global_ir3"). elden ring:
Totals from 2409 (75.14% of 3206) affected shaders:
MaxWaves: 2068416 -> 2081984 (+0.66%); split: +0.74%, -0.08%
Instrs: 2439078 -> 1849792 (-24.16%)
CodeSize: 15570886 -> 12196612 (-21.67%)
Spills: 11623 -> 11678 (+0.47%); split: -0.63%, +1.10%
Fills: 9815 -> 9762 (-0.54%); split: -1.37%, +0.83%
Scratch: 31200 -> 31328 (+0.41%); split: -0.23%, +0.64%
ALU: 1154256 -> 1038680 (-10.01%); split: -10.22%, +0.21%
FSCIB: 1154256 -> 1038479 (-10.03%); split: -10.24%, +0.21%
IC: 248318 -> 237344 (-4.42%); split: -4.47%, +0.05%
GPRs: 266323 -> 254621 (-4.39%); split: -4.72%, +0.33%
Uniforms: 639557 -> 794085 (+24.16%); split: -0.07%, +24.23%
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reacted-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35559 >
2025-06-20 16:09:28 +00:00
Christoph Neuhauser
e99446fc5e
egl: Add EGL_EXT_device_query_name and EGL_EXT_device_persistent_id
...
Adds support for the EGL extensions EGL_EXT_device_query_name and
EGL_EXT_device_persistent_id. This enables querying device name, vendor
name, renderer name and device and driver UUIDs.
Signed-off-by: Christoph Neuhauser <christoph.neuhauser@intel.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34958 >
2025-06-20 15:35:44 +00:00
Karol Herbst
ee7536a1e3
radeonsi: implement SVM interfaces
...
Acked-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35175 >
2025-06-20 15:10:42 +00:00
Karol Herbst
a107041112
radeonsi: implement resource_get_address
...
Acked-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35175 >
2025-06-20 15:10:42 +00:00
Karol Herbst
a1b8c6c404
radeosi: assert addresses are not NULL in a couple of places
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35175 >
2025-06-20 15:10:42 +00:00
Mike Blumenkrantz
d2d98abf1d
gallium: add compressed_surface_reinterpret_blocks_layered
...
this affects piglit/bin/ext_texture_array-compressed teximage pbo -auto -fbo
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6891
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35612 >
2025-06-20 14:47:25 +00:00
Valentine Burley
f39240b98f
panvk/ci: Increase DEQP_FRACTION for g610-vk
...
Adjust the fraction of the panfrost-g610-vk:arm64 job, which has
been taking longer than the recommended 10 minutes of testing.
Signed-off-by: Valentine Burley <valentine.burley@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35438 >
2025-06-20 14:05:06 +00:00
Nanley Chery
42ef23ecd1
intel/blorp: Don't redescribe some Tile64 clears
...
We don't support redescribing Tile64 and 3D due to interleaved depth
planes.
Fixes: 312952048b ("intel/blorp: Redescribe gfx12.5 surfaces for CCS fast clears")
Tested-by: Ian Romanick <ian.d.romanick@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35619 >
2025-06-20 13:39:20 +00:00
John Anthony
cce2fa9af6
panvk: report the maximum supported size for a variable count iub
...
If VkDescriptorSetVariableDescriptorCountLayoutSupport is passed to
vkGetDescriptorSetLayoutSupport, we should report the maximum size in
bytes for inline uniform blocks.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Olivia Lee <olivia.lee@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Fixes: 5fe5e317 ("panvk: advertise descriptor indexing on valhall")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35545 >
2025-06-20 13:14:34 +00:00
John Anthony
1b309e77fc
panvk: handle 0 count for vdc when checking if layout is supported
...
A binding with variable descriptor count should be counted when checking
if a descriptor set layout is supported, even if it has a count of zero.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Olivia Lee <olivia.lee@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Fixes: 5fe5e317 ("panvk: advertise descriptor indexing on valhall")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35545 >
2025-06-20 13:14:34 +00:00
John Anthony
5023feb0f7
panvk: count iubs correctly when checking if layout is supported
...
For inline uniform blocks, the descriptor count given in the binding is
a byte size. Convert the size into a descriptor count and use that when
checking if a descriptor set layout is supported.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Olivia Lee <olivia.lee@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Fixes: 0440d1dd03 ("panvk: Advertise VK_EXT_inline_uniform_block")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35545 >
2025-06-20 13:14:34 +00:00
John Anthony
3e9dc4f777
panvk: use variable count when initializing iub buffer descriptor
...
Ensure we use the variable count to initialize the internal buffer
descriptor for variable count inline uniform block, if we have one.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Olivia Lee <olivia.lee@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Fixes: 5fe5e317 ("panvk: advertise descriptor indexing on valhall")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35545 >
2025-06-20 13:14:33 +00:00
John Anthony
9719744d05
panvk: fix allocated size for sets with variable count iub
...
When allocating descriptor sets, ensure we correctly calculate the new
size if the last binding is an inline uniform block with a variable
count.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Olivia Lee <olivia.lee@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Fixes: 5fe5e317 ("panvk: advertise descriptor indexing on valhall")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35545 >
2025-06-20 13:14:33 +00:00
John Anthony
37a5e6562e
panvk: add panvk_get_iub_desc_count and panvk_get_iub_size
...
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Olivia Lee <olivia.lee@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35545 >
2025-06-20 13:14:33 +00:00
John Anthony
677153c642
panvk: fix maxInlineUniformTotalSize
...
maxInlineUniformTotalSize is derived from
MAX_INLINE_UNIFORM_BLOCK_DESCRIPTORS, but due to missing parenthesis
around the expression, the value calculated is incorrect.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Olivia Lee <olivia.lee@collabora.com >
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com >
Fixes: 0440d1dd03 ("panvk: Advertise VK_EXT_inline_uniform_block")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35545 >
2025-06-20 13:14:32 +00:00
Mary Guillemard
266b25a356
panvk/ci: Update Mali-G52 status with full VKCTS
...
New failures found with current main full run.
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35639 >
2025-06-20 10:11:52 +00:00
Mary Guillemard
c3897b3a98
panvk: Fix dependency chain on indirect dispatch for JM
...
The copy job was missing a dependency on the indirect job causing issues
on various "dEQP-VK.synchronization.*indirect*" and
"dEQP-VK.synchronization2.*indirect*" tests.
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com >
Fixes: 8b4e515ca2 ("panvk: Implement indirect dispatch on JM")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35639 >
2025-06-20 10:11:52 +00:00
Mary Guillemard
e8137404b6
meson: make clz available in OpenCL code
...
for various math helpers.
the clzll version isn't available since long long is 128-bit for CL.
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35639 >
2025-06-20 10:11:52 +00:00
Mary Guillemard
2c455c2d81
libcl: Add more UINT_MAX variants
...
Needed by panvk's minmax CL code.
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35639 >
2025-06-20 10:11:52 +00:00
Mary Guillemard
276b65dbca
pan/clc: Lower IO as late as possible
...
We were assigning the scratch size of the whole lib... that was causing
very big TLS usage on draw indirect.
With this TLS usage is way lower now at the cost of running more pass
for every variants.
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35639 >
2025-06-20 10:11:52 +00:00
Mary Guillemard
01c8ee5737
pan/clc: Use hash_format_strings option with nir_lower_printf
...
At some point CL C shader switched to a format hash approach and we
forgot to properly migrate here.
This should fix all printf again.
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35639 >
2025-06-20 10:11:52 +00:00
Rhys Perry
325dfd809a
radv,aco: switch to shader statistics framework
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12756
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35583 >
2025-06-20 09:26:58 +00:00
Rhys Perry
2382d657ec
radv: use vk_outarray for pipeline statistics/executables
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35583 >
2025-06-20 09:26:58 +00:00
Rhys Perry
eb86717f4d
util/stats: add serialize helpers
...
These copy the stats with any padding zero'd.
The layout is the same as the C struct, so it's still usable as one, if
the alignment is correct.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35583 >
2025-06-20 09:26:58 +00:00
Rhys Perry
92eb0941d3
util/stats: fix XML type validation
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35583 >
2025-06-20 09:26:58 +00:00