Commit Graph

189546 Commits

Author SHA1 Message Date
Mike Blumenkrantz
42e3d580cc lavapipe: split out DGC into separate file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29293>
2024-05-20 19:27:33 +00:00
Mike Lothian
3be436830e ac/llvm: Remove global access ops handling
They have been lowered in nir

v2: Keep the _amd versions
v3: Fix if's with removed ops

Signed-off-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29280>
2024-05-20 18:41:20 +00:00
Mike Lothian
d2e80e57a3 radeonsi,aco: Run ac_nir_lower_global_access pass
This allows rusticl to run under radeonsi when using ACO

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11179
Signed-off-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29280>
2024-05-20 18:41:20 +00:00
Dylan Baker
46644ba371 meson: use glslang --depfile argument when possible
This reduces the amount of manual dependency tracking developers need to
do. This is turned on if glslang >= 11.3.0 is used, or 11.9.0 on
Windows, but otherwise the status quo is maintained. This means I have
not removed any use of `depend_files`. We could make make these hard
requirements and remove the use of `depend_files` too.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28329>
2024-05-20 17:34:17 +00:00
Samuel Pitoiset
32e43fe77c ac,radv,radeonsi: add helper to know if a format is supported by DB
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29291>
2024-05-20 16:55:37 +00:00
Samuel Pitoiset
d2234adf59 ac,radv,radeonsi: add helper to know if a format is supported by CB
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29291>
2024-05-20 16:55:37 +00:00
Samuel Pitoiset
c62f86587f amd/common: move some format related helpers to ac_formats.c
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29291>
2024-05-20 16:55:37 +00:00
Samuel Pitoiset
473559001f radv: add radv_is_colorbuffer_format_blendable()
This will allow us to add a common helper to know if a format is
supported by CB.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29291>
2024-05-20 16:55:37 +00:00
Samuel Pitoiset
8f39e3a0f3 radv: stop checking the return value of ac_get_cb_number_type()
It can't be ~0U.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29291>
2024-05-20 16:55:37 +00:00
Samuel Pitoiset
e227f2cc72 radv: remove redundant check for VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 on GFX6-10
ac_get_cb_format() already returns V_028C70_COLOR_INVALID.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29291>
2024-05-20 16:55:37 +00:00
Sil Vilerino
58ca4cee9e d3d12: Video Encode - Fix inputs for older OS support query cap
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29290>
2024-05-20 14:45:56 +00:00
Sil Vilerino
d8eb9fc9b4 nir: Mark variable as ASSERTED to fix unused variable warning treated as error
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29290>
2024-05-20 14:45:56 +00:00
Samuel Pitoiset
07080c5fc5 radv: simplify creating gfx10 texture descriptors for sliced 3d/2d view of 3d
This will be easier to add a common helper between RADV and RadeonSI
for creating texture descriptors.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29269>
2024-05-20 14:15:40 +00:00
Samuel Pitoiset
16952a179b radv: allow 3d views with VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT
VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT allows to create 2d views
of a 3d image but nothing in the spec disallows to also create 3d views
when this flag is set.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29269>
2024-05-20 14:15:40 +00:00
Samuel Pitoiset
96a9625866 ac,radv,radeonsi: add a function to get the color format endian swap
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29265>
2024-05-20 13:41:03 +00:00
Samuel Pitoiset
35c6b9c066 ac,radv,radeonsi: add a function to translate db format
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29265>
2024-05-20 13:41:03 +00:00
Samuel Pitoiset
934fc47822 radv: use PIPE_FORMAT in radv_translate_dbformat()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29265>
2024-05-20 13:41:03 +00:00
Samuel Pitoiset
7f0430bb36 ac,radv,radeonsi: add a function to translate colorswap
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29265>
2024-05-20 13:41:02 +00:00
Samuel Pitoiset
40428bd497 radv: use PIPE_FORMAT in radv_translate_colorswap()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29265>
2024-05-20 13:41:02 +00:00
Samuel Pitoiset
255e76b419 ac,radv,radeonsi: add a function to translate tex numformat
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29265>
2024-05-20 13:41:02 +00:00
Samuel Pitoiset
6030c876d0 radv: use PIPE_FORMAT in radv_translate_tex_numformat()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29265>
2024-05-20 13:41:02 +00:00
Samuel Pitoiset
2fef95f901 radv: stop checking the output value of radv_translate_tex_numformat
This function just never returns ~0.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29265>
2024-05-20 13:41:02 +00:00
Rhys Perry
418fed1805 aco: update VS prolog waitcnt for GFX12
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29225>
2024-05-20 10:45:39 +00:00
Rhys Perry
f01cac835f aco/stats: support GFX12 in collect_preasm_stats()
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29225>
2024-05-20 10:45:39 +00:00
Rhys Perry
9e9cabd2fa aco/waitcnt: support GFX12 in waitcnt pass
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29225>
2024-05-20 10:45:39 +00:00
Rhys Perry
cadce0f3b7 aco: add GFX12 wait counters
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29225>
2024-05-20 10:45:38 +00:00
Erico Nunes
c5e13af73c ci: lima farm maintenance
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29285>
2024-05-20 12:15:15 +02:00
Lionel Landwerlin
a31996ce5a anv: switch to vk_device::mem_cache field for default cache
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11175
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29258>
2024-05-20 08:23:48 +00:00
Alejandro Piñeiro
b2282e3a57 v3dv/meta_clear: use v3dv_renderpass used as parameter
emit_subpass_color_clear_rects and emit_subpass_ds_clear_rects is
receiving a v3dv_render_pass parameter pass, but then using
cmd_buffer->state.pass to access the current pass. All calls to those
methods are already initializing that parameter to that value.

This commit just uses the parameter. An alternative would be to remove
one of the parameters of the function call. I find this option
slightly more readable.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29218>
2024-05-20 10:01:33 +02:00
Alejandro Piñeiro
07f3c37b9a v3dv/meta_clear: take into account multiview for the custom clear pipeline caches
The resulting pipeline/shaders are different when we are using
multiview (for example, a geometry shader is injected in order to
support multiview).

Doesn't fix any CTS test run individually, but fixes some
dEQP-VK.draw.dynamic_rendering.primary_cmd_buff.multi_draw.overlapping*
CTS tests when run in a batch (using deqp-vk --deqp-caselist-file),
like:

dEQP-VK.draw.dynamic_rendering.primary_cmd_buff.multi_draw.mosaic.indexed_mixed.16_draws.stride_zero.10_instances.vert_only.single_view.offset_6_no_draw_id
dEQP-VK.draw.dynamic_rendering.primary_cmd_buff.multi_draw.overlapping.normal.one_draw.stride_zero.1_instance.vert_only.multiview.no_offset_no_draw_id

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29218>
2024-05-20 10:01:33 +02:00
Alejandro Piñeiro
4f26303dbb v3dv: add debug option to disable custom pipeline caches for meta operations
Included as a new option of the existing V3DV_ENABLE_PIPELINE_CACHE
environment variable.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29218>
2024-05-20 10:01:33 +02:00
Timothy Arceri
795057d44e glsl: move geom input array sizing to nir linker
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29256>
2024-05-20 00:12:50 +00:00
David Heidelberg
08659a0baa winsys/i915: depends on intel_wa.h
Prevent compilation failure due to not-yet generated intel_wa header.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11174
Cc: mesa-stable

Reviewed-by: Mark Janes <markjanes@swizzler.org>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29252>
2024-05-18 15:36:13 +00:00
Mike Blumenkrantz
ffe54ca293 nir/linking: fix nir_assign_io_var_locations for scalarized dual blend
this would previously assign all scalar variables to the highest
driver location

cc: mesa-stable

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28753>
2024-05-18 13:50:27 +00:00
Mike Blumenkrantz
e28061c502 nir/lower_aaline: fix for scalarized outputs
this otherwise was broken

cc: mesa-stable

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28753>
2024-05-18 13:50:27 +00:00
Marek Olšák
b4bd380704 nir/algebraic: eliminate pack+unpack and unpack+pack pairs
A new NIR shader for AMD drivers will need this.

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29233>
2024-05-17 22:04:00 +00:00
Faith Ekstrand
681acde6d3 nvk/meta: Save and restore set_dynamic_buffer_start
Fixes: e0d907f56f ("nvk: Rework descriptor set binding")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29276>
2024-05-17 21:41:18 +00:00
Faith Ekstrand
3e9b08f417 nvk: Refactor nvk_meta_begin() to use a desc helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29276>
2024-05-17 21:41:17 +00:00
Faith Ekstrand
6f0292f6b0 nvk: Add an NVK_MAX_SAMPLES #define
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29276>
2024-05-17 21:41:17 +00:00
Faith Ekstrand
ce0efbd175 nvk: Move and better document set_dynamic_buffer_start
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29276>
2024-05-17 21:41:17 +00:00
Faith Ekstrand
99f806b733 nvk: Advertise 32 descriptor sets
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29276>
2024-05-17 21:41:17 +00:00
Faith Ekstrand
54ce220f10 nvk: Store an nvk_buffer_address for each set in the root table.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29276>
2024-05-17 21:41:17 +00:00
Faith Ekstrand
0e417df499 nvk: Add static asserts for nvk_buffer_address layout
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29276>
2024-05-17 21:41:17 +00:00
Faith Ekstrand
6fcfcd2625 nvk: Store descriptor set addresses in descriptor state
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29276>
2024-05-17 21:41:17 +00:00
David Heidelberg
f55c51a343 ci/etnaviv: add flakes from nightly runs
Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29254>
2024-05-17 19:29:40 +00:00
David Heidelberg
788d945c9a ci/alpine: re-enable Mold linker
It's more than one year since it was problematic.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29272>
2024-05-17 11:11:59 -07:00
Roman Stratiienko
7ae4a2ae34 u_gralloc/fallback: Extract modifier from QCOM native_handle
After Turnip moved to u_gralloc, some users started complaining
about issues. It turns out that modern platforms do not have
grallocs{0,1} but have gralloc4 only. There's no
known way to build mesa3d with gralloc4 support using NDK.

So we add this workaround to fallback gralloc to mimic the original
behavior of the Turnip driver before switching to u_gralloc.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11171
Fixes: 1373b0966c ("turnip: ANB/AHB support")
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29260>
2024-05-17 15:03:53 +00:00
Adrian Perez de Castro
2934e1fad5 Revert "egl/wayland: Remove EGL_WL_create_wayland_buffer_from_image"
The EGL_WL_create_wayland_buffer_from_image is still used in WPE WebKit.
There is work in progress to continue adoption of DMA-BUF usage inside
WebKit which will eventually render the extension unneeded; but in the
meantime an update to a version of Mesa without the extension would
render applications using WPE WebKit unusable.

This reverts commit a3418105b9.

Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29266>
2024-05-17 14:15:47 +00:00
Samuel Pitoiset
7fe169dd4a ac,radv,radeonsi: introduce a helper to build a sampler descriptor
This introduces ac_sampler_state which contains all information to
build a sampler descriptor for AMD hardware instead of duplicating
code between RADV and RadeonSI. Both drivers just need to fill this
new struct to get a descriptor.

This allows RADV to get GFX12 support for free. I think we should
introduce helpers for other type of descriptors.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29221>
2024-05-17 13:43:12 +00:00
Samuel Pitoiset
cd05b23a95 radeonsi: refactor si_translate_border_color()
For using the common ac helper for building a sampler descriptor.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29221>
2024-05-17 13:43:12 +00:00