Commit graph

201327 commits

Author SHA1 Message Date
Antonio Ospite
30740e3af9 ci/android: use ANDROID_SDK_VERSION for debian-android job too
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33188>
2025-01-24 14:15:22 +00:00
Antonio Ospite
4b2996e749 ci/android: use ANDROID_SDK_VERSION when building deqp components
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33188>
2025-01-24 14:15:22 +00:00
Antonio Ospite
26d6607063 ci/android: update ANDROID_NDK and ANDROID_SDK_VERSION
Update ANDROID_NDK to the latest stable release 27c and bump
ANDROID_SDK_VERSION to API version 34 which matches the Android 14
release we are using for the cuttlefish images.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33188>
2025-01-24 14:15:22 +00:00
David Rosca
6ebc25bc14 frontends/va: Stop using extra context for deinterlacing
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33126>
2025-01-24 13:40:28 +00:00
David Rosca
ea73d1b47c gallium/vl: Add compute shader deinterlace filter
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33126>
2025-01-24 13:40:27 +00:00
David Rosca
604fb68876 radeonsi: Report surface alignment for AV1 encode
This is also useful for AV1 to allow applications to use container crop.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33083>
2025-01-24 13:04:47 +00:00
David Rosca
ad0f197c6c radeonsi/vcn: Fix AV1 coded size for VCN 5.0
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33083>
2025-01-24 13:04:47 +00:00
Job Noorman
b4c95124ab freedreno: add missing entries to ForEachMacros
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32107>
2025-01-24 12:15:31 +00:00
Job Noorman
bbd164e2e3 freedreno: remove unused entries from ForEachMacros
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32107>
2025-01-24 12:15:31 +00:00
Job Noorman
bc6152c1c3 freedreno: move ForEachMacros into freedreno
This change moves freedreno specific ForEachMacros from the top level
.clang-format to the freedreno specific .clang-format.

This is done to avoid triggering CI for all drivers when making changes
to this list.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32107>
2025-01-24 12:15:31 +00:00
Job Noorman
dd74ef36a5 ir3: account for inserted nops in delay calculation
Whenever we insert a (nopN) on the previous instruction to add nops, we
initially add them to the current cycle count. However, existing (nopN)
fields are not accounted for. This means the if a (nopN) gets inserted
and the block is processed again, the cycle count will be too low and we
might insert more nops than necessary.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33178>
2025-01-24 11:39:44 +00:00
Samuel Pitoiset
d41a3bb744 radv: program COMPUTE_DISPATCH_INTERLEAVE on GFX12
To the same value as GFX11.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33185>
2025-01-24 11:08:59 +00:00
Samuel Pitoiset
c039caeb53 ac/cmdbuf: program SPI_SHADER_GS_MESHLET_CTRL to 0 in the GFX12 preamble
Otherwise, it's derivative group quads by default.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33185>
2025-01-24 11:08:59 +00:00
Lionel Landwerlin
7ddb49653d anv/brw: rework primitive count writing
Instead the complicated logic we currently have, do this :

We start with this shader :

int main() {
   ...
   if (...) {
      SetMeshOutputsEXT(0, 0);
      return;
   } else {
      SetMeshOutputsEXT(...);
   }
   ...
}

We turn it into this :

int main() {
   uint __temp_prim_count = 0;
   ...
   if (...) {
      __temp_prim_count = 0;
      return;
   } else {
      __temp_prim_count = ...;
   }
   ...

   if (is_first_group_lane()) {
      SetMeshOutputsEXT(..., __temp_prim_count);
   }
}

This works because the SPIRV spec says this :

   "The arguments are taken from the first invocation in each
    workgroup. Any invocation must execute this instruction no more
    than once and under uniform control flow."

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12388
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33038>
2025-01-24 10:19:28 +00:00
Lionel Landwerlin
4cc847cfd4 anv/Wa_18019110168: copy the primitive count writes
That way we don't have to lower the set_vertex_and_primitive_count
intrinsic before applying this WA.

Cc stable for the next patches that are fixing something.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33038>
2025-01-24 10:19:28 +00:00
Lionel Landwerlin
1067d95987 compiler: add VARYING_BIT_PRIMITIVE_COUNT
Cc stable for the next patches that are fixing something.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33038>
2025-01-24 10:19:28 +00:00
Sergi Blanch Torne
e02539d7b6 ci: disable Collabora's farm due to unexpected power cut
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33198>
2025-01-24 11:06:00 +01:00
Timothy Arceri
09f73024a5 glsl: fix num_views linker error
The declaration must be the same across shaders but not all shaders
must make the declaration.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33149>
2025-01-24 01:47:55 +00:00
Timothy Arceri
914697c4ac glsl: fix num_views validation message
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33149>
2025-01-24 01:47:55 +00:00
Caio Oliveira
ee625f44d5 intel/elk: Fix wrong destination to memset
Conversion to use rzalloc_array missed these.

Fixes: c9e667b7ad ("intel/elk: Remove uses of VLAs")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12513
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33192>
2025-01-24 01:09:26 +00:00
Valentine Burley
c670bbc093 freedreno/ci: Update expectations again
This started passing in the last 24 hours on a306.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33187>
2025-01-24 00:29:11 +00:00
Rhys Perry
0eb5f66660 nir/validate: validate ssa dominance by default
This no longer modifies dominance metadata, so enable it by default.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
b145045112 nir/validate: preserve dominance during SSA validation
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
b1945fd21a nir/validate: validate metadata
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9572
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
2d94ca93b5 nir/liveness: stop requiring instr indices
nir_live_defs_impl() doesn't actually use them, and every
nir_metadata_require of nir_metadata_live_defs already requires them.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
bfc570ff98 nir/gcm: stop preserving nir_metadata_loop_analysis
This pass changes instr_cost if it makes progress.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
36840db6fe nir/loop_analyze: use a sparse array and stop indexing SSA defs
Indexing SSA defs is unexpected behaviour and interferes with using
nir_loop_analyze_impl for validation.

It probably also breaks nir_metadata_live_defs.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
77118fcf72 nir: rerun loop analysis if the parameters change
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
aae1aa4888 d3d12: store only once in d3d12_emit_points
d3d12_lower_point_sprite expects a single store for each output, each
dominating the emit_vertex.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
083a557856 d3d12: fix phi handling in d3d12_lower_primitive_id
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
9c159490c3 microsoft/compiler: repair SSA in dxil_nir_split_tess_ctrl
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
3850f8b167 microsoft/compiler: invalidate loop analysis in dxil_nir_lower_double_math
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:44 +00:00
Rhys Perry
30473fd1e7 v3dv: fix SSA dominance error
Offset should be increased regardless of whether a result is written or
not.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32005>
2025-01-23 23:35:43 +00:00
Konstantin Seurer
eecaf80554 radv/rmv: Use radv_rmv_log_resource_destroy more
Gets rid of some duplicate code with the added benefit of removing a
memory leak warning when destroying the device because
radv_rmv_log_border_color_palette_destroy did not destroy the resource
ID.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33167>
2025-01-23 23:07:49 +00:00
Connor Abbott
6d406eeefa tu: Support VK_EXT_conservative_rasterization on a7xx
This supports everything the blob does.

The registers exist on later a6xx gens, but they would be way more
inconvenient to use since they're mixed up with binning/not-binning and
compression state, and I'm not sure if it works.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33152>
2025-01-23 22:37:11 +00:00
Connor Abbott
2798521bda tu: Stop setting binning fields on a7xx
These fields don't actually enable binning, but rather disables the FS.
This seems to happen automatically on a7xx when binning, because the
blob doesn't set them specially during the binning pass.

Move them to rasterization, because RB_RENDER_CNTL will start depending
on rasterization state in the next commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33152>
2025-01-23 22:37:11 +00:00
Connor Abbott
ffe8220bbd tu, freedreno: Write PC_DGEN_SU_CONSERVATIVE_RAS_CNTL
Prevent other processes writing this from messing us up.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33152>
2025-01-23 22:37:11 +00:00
Konstantin Seurer
6701806cd1 llvmpipe: Avoid a crash when using 5 coords with AF
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32935>
2025-01-23 21:57:04 +00:00
Konstantin Seurer
3f7564d86b llvmpipe: Fix half-pixel sample offset with AF
Simply adding -0.5 will cause a noticeable offset for low sample counts.

Reviewed-by: Aleksi Sapon <aleksi.sapon@autodesk.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32935>
2025-01-23 21:57:03 +00:00
Mike Blumenkrantz
f3b8d7da46 egl: never select swrast for vmwgfx
ForceSoftware will be true in this case from the high-level fallback,
but this isn't really swrast

Fixes: 1de7c86bc1 ("dri: pass through a type enum for creating screen instead of driver_extensions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33123>
2025-01-23 21:14:21 +00:00
Caio Oliveira
563631cdd8 intel/brw: Rely on existing helper for dispatch width of geometry stages
Helper already exists and is used in the functions, just save the value
so can be reused.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33175>
2025-01-23 20:29:31 +00:00
Igor Torrente
fcb4412e9a Zink: Add NVK to the non driver_workarounds.implicit_sync list
This workarround is causing `VK_ERROR_DEVICE_LOST` to NVK when running
glmark2. And as NVK is part of mesa, it doesn't need the hand-holding
from Zink.

cc: mesa-stable

Signed-off-by: Igor Torrente <igor.torrente@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33142>
2025-01-23 19:12:40 +00:00
José Roberto de Souza
e9f4458c37 anv: Allow WSI blit_src Image to be kept compressed when transitioning to VK_IMAGE_LAYOUT_PRESENT_SRC_KHR
When WSI is working in prime/dma-buf mode, it has one additional
VkBuffer or VkImage where the main VkImage is copied to without any
compression or tiling different from linear

The batch buffer to do this copy is created in
wsi_finish_create_blit_context(). It performs a barrier transitioning
the VkImage to VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, performs the
copy, and then transitions it back to VK_IMAGE_LAYOUT_PRESENT_SRC_KHR.

However, in this prime/dma-buf mode, no display modifiers are involved,
which causes compression to be disabled when switching to
VK_IMAGE_LAYOUT_PRESENT_SRC_KHR.
This change adds an exception to allow the Vkimage to remain compressed
because we can handle the compressed-to-uncompressed copy.

Doing so fixes an issue that was reported with BMG + integrated GPU
and should also improve performance by keeping the VkImage compressed.

Cc: mesa-stable
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12354
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33044>
2025-01-23 18:27:31 +00:00
José Roberto de Souza
5a37467cfd anv: Return scanout PAT entry for scanout and external buffers in discrete GPUs
Without this scanout and external buffers will be allocated as WB
what will fail allocation if DRM_XE_GEM_CREATE_FLAG_SCANOUT is set
or it will use WC but it will not be the special PAT entry for scanout.

Cc: mesa-stable
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33044>
2025-01-23 18:27:31 +00:00
Job Noorman
41ae187003 ir3: disable alias.rt pre-a750
Even though alias.tex is supported on all of a7xx, alias.rt is only
support from a750.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 0aa9678d4d ("ir3: add support for alias.rt")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33184>
2025-01-23 17:55:22 +00:00
Lionel Landwerlin
9ea04a1a53 anv: don't look at pipelines to figure out CPS values
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33170>
2025-01-23 17:13:54 +00:00
Tapani Pälli
e85646eace anv: set dependency between SF_CLIP and CC_PTR states
Fixes flickering seen in Cyberpunk 2077, Supraland and some
other game workloads.

cc: mesa-stable

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12494
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12504
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12453
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33163>
2025-01-23 16:26:24 +00:00
Karmjit Mahil
5846172f15 tu: Free pre_chain patchpoint data
Fixes a leak in:
dEQP-VK.dynamic_rendering.primary_cmd_buff.random.seed42
dEQP-VK.dynamic_rendering.primary_cmd_buff.random.seed60_geometry
dEQP-VK.dynamic_rendering.primary_cmd_buff.random.seed95_geometry_multiview

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33084>
2025-01-23 15:39:50 +00:00
Lars-Ivar Hesselberg Simonsen
2d3c50d484 panvk: Fix barriers in secondary cmdbufs w/o rp's
When encountering pipeline barriers in secondary command buffers that do
not start their renderpasses, our barrier logic would not detect the
need to flush existing draws, leading to race conditions in case of
subpassLoad.

This change ensures we flush existing draws when required in secondary
command buffers.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33182>
2025-01-23 15:13:17 +00:00
Mike Blumenkrantz
d1c2795876 zink: fix replacing incompatible pipelines
if e.g., multiview framebuffer is enabled, shader objects cannot be used,
requiring the bound shaders to be compiled into a pipeline on-demand

this is not knowable in advance and will always result in a stall

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33005>
2025-01-23 14:36:26 +00:00