Commit graph

208898 commits

Author SHA1 Message Date
Antonio Ospite
90cf9327ce build: stop calling unreachable() without arguments
The unreachable(str) macro defined in src/util/macros.h is defined to
accept a literal string as an argument.

However the way it checks that the argument is a string literal, by
prepending an empty string where the argument is used, i.e.:

  #define unreachabel(str) assert(!"" str)

still allows users to call the macro with no arguments.

This is confusing, so pass an empty string to all invocations of
unreachable() for consistency.

This is done with the following command:

  git grep -l '[^_]unreachable();' -- "src/**" | sort | uniq | \
  while read file; \
  do \
    sed -e 's/\([^_]\)unreachable();/\1unreachable("");/g' -i "$file";
  done

This should not change the behaviour of the callers of unreachable() in
a meaningful way, but there will be some cosmetic consequence.

The changed invocations will now print:

  Assertion `!"" ""' failed.

instead of

  Assertion `!""' failed.

But this is also what happens for the invocations that do pass an
argument, for instance `unreachable("Invalid type")` currently prints:

  Assertion `!"" "Invalid type"' failed.

So all invocations now also have the same output style.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36437>
(cherry picked from commit b4c7d3a08e)
2025-08-06 13:43:30 +02:00
David Rosca
bb918ab253 vulkan/video: Fix h265 level values
From spec:
"general_level_idc shall be set equal to a value of 30 times the level number."

Fixes: 8243145f02 ("vulkan/video: add a h265 level translator.")
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36285>
(cherry picked from commit 2c3bb204a5)
2025-08-06 13:43:30 +02:00
Rhys Perry
4c9b91047b nir/load_store_vectorize: set is_store for shared append/consume
So that check_for_aliasing() doesn't ignore them.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Backport-to: 25.1
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36442>
(cherry picked from commit d3476650f1)
2025-08-06 13:43:30 +02:00
Rhys Perry
f9295bb5ec nir/load_store_vectorize: check for interfering shared2 before vectorizing
Only affected shaders in radv_fossils are f1_23.

fossil-db (navi21):
Totals from 3 (0.00% of 79825) affected shaders:
Instrs: 2700 -> 2730 (+1.11%)
CodeSize: 17096 -> 17228 (+0.77%)
Latency: 8424 -> 8726 (+3.58%)
InvThroughput: 3768 -> 3778 (+0.27%); split: -0.05%, +0.32%
Copies: 224 -> 234 (+4.46%)
PreVGPRs: 291 -> 287 (-1.37%)
VALU: 1989 -> 1996 (+0.35%); split: -0.05%, +0.40%

fossil-db (gfx1201):
Totals from 3 (0.00% of 79839) affected shaders:
Instrs: 2862 -> 2908 (+1.61%)
CodeSize: 17868 -> 18064 (+1.10%)
Latency: 7567 -> 7854 (+3.79%)
InvThroughput: 2810 -> 2802 (-0.28%)
Copies: 122 -> 120 (-1.64%)
PreVGPRs: 291 -> 287 (-1.37%)
VALU: 1890 -> 1885 (-0.26%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13616
Backport-to: 25.1
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36442>
(cherry picked from commit eeddf6b9e2)
2025-08-06 13:43:30 +02:00
Lionel Landwerlin
7247c50d44 anv: fix wsi image aliasing
The private BO can get removed due to WSI aliasing and that breaks the
submission code (expecting one).

Delay the registration on the device to when the image actually gets
bound and there is a private BO.

Fixes: b21e62b71a ("anv: avoid leaking private binding for aliased wsi image")
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36474>
(cherry picked from commit 9efb3ee511)
2025-08-06 13:43:30 +02:00
Eric Engestrom
1b545768a4 meson: fix VkLayer_MESA_device_select in the devenv
It's an implicit layer, not an explicit one like the others in that MR,
which I missed in the previous commit.

Fixes: 294d8ce80a ("meson: include VkLayer_MESA_device_select in the devenv")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36346>
(cherry picked from commit 45789ac396)
2025-08-06 13:43:30 +02:00
Mike Blumenkrantz
3ae34d3af5 zink: trigger multi-context buffer invalidate on internal buffer invalidate
this is the same as zink_context_replace_buffer_storage()

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36473>
(cherry picked from commit dedfb5ef78)
2025-08-06 13:43:30 +02:00
Mike Blumenkrantz
9bc3494a83 zink: fix tc buffer replacement rebind condition
this check is to detect multi-context rebinds, not to determine whether
all rebinds on the same context were successful

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36473>
(cherry picked from commit f1ba8f44d9)
2025-08-06 13:43:30 +02:00
Mike Blumenkrantz
0065fd2079 zink: also add access stage sync when rebinding buffers
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36473>
(cherry picked from commit 1c5e5aa4eb)
2025-08-06 13:43:30 +02:00
Thomas H.P. Andersen
8792dae1ef zink: do not overwrite existing error for miptail on uncommit
a7f86e38ca added the call to
sparse_backing_free. It reuses the ok variable and overwrites the
existing value

Fixes: a7f86e38ca
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36467>
(cherry picked from commit b08a23550f)
2025-08-06 13:43:30 +02:00
Eric Engestrom
7450850052 .pick_status.json: Update to 20dab5f819 2025-08-06 13:43:30 +02:00
Eric Engestrom
93457f7819 VERSION: bump for 25.2.0-rc3
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
2025-07-30 22:06:14 +02:00
David Rosca
42fce7e518 radeonsi: Add missing DEBUG_NAMED_VALUE_END to radeonsi_shader_debug_options
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
AddressSanitizer: global-buffer-overflow ../src/util/u_debug.c:331 in debug_parse_flags_option

Fixes: 5c92fe45a1 ("radeonsi: support more than 64 options for AMD_DEBUG")
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36434>
(cherry picked from commit f4436d606e)
2025-07-30 11:27:03 +02:00
Lionel Landwerlin
445190406e brw: fixup coarse_z computation
The delivered values in the coarse pixel size are 0 when coarse pixel
dispatch is disabled and that is screwing up our half pixel offset
adjustment.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36457>
(cherry picked from commit 9371e8d370)
2025-07-30 11:27:03 +02:00
Lionel Landwerlin
03dc030f4d brw: fixup source depth enabling with coarse pixel shading
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36457>
(cherry picked from commit 9dac7dda87)
2025-07-30 11:27:03 +02:00
Lionel Landwerlin
0b682ea08c brw: fix NIR metadata invalidation with closest-hit shaders
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36457>
(cherry picked from commit 68c50d129e)
2025-07-30 11:27:03 +02:00
Mel Henning
0a1a13fb21 loader: Don't load nouveau GL on nvidia kmd
The vulkan driver already has a check for this. This prevents the GL
driver from loading too.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13484
Fixes: e99446fc ("egl: Add EGL_EXT_device_query_name and EGL_EXT_device_persistent_id")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36449>
(cherry picked from commit 4be68b119e)
2025-07-30 11:27:03 +02:00
Mike Blumenkrantz
89527d22dc kopper: fix initial swapinterval setting
setting the mode here is harmless even on weirdo cts swapchain cases

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13568

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36452>
(cherry picked from commit f68cae3e13)
2025-07-30 11:27:03 +02:00
Faith Ekstrand
606137da71 vulkan/wsi/x11: Handle VK_NOT_READY in AcquireNextImage()
This check assumed that we would always get `VK_TIMEOUT` from
wsi_queue_pull() but the new explicit sync wait is smart enough to do
that for us.  Unfortunately, the X11 code weasn't smart enough to know
that VK_NOT_READY (which is a positive return code) was also an early
exit condition.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12971
Fixes: 899263ecfc ("wsi/x11: support explicit sync")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tested-by: Adam Ivora
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36419>
(cherry picked from commit 064b9e5645)
2025-07-30 11:27:03 +02:00
llyyr
4de4ae87ee radv: don't set HOST_IMAGE_TRANSFER_BIT if host_image_copy not enabled
This can't work if the extension isn't enabled, so only set if the
extension is enabled.

Fixes: d89b11011f ("radv: add support for formats with host-transfer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36400>
(cherry picked from commit c869971d05)
2025-07-30 11:27:03 +02:00
David Rosca
7c87b8bca0 radeonsi/vcn: Use more_rbsp_data flag for H264 PPS encode
transform_8x8_mode, pic_scaling_matrix_present_flag and
second_chroma_qp_index_offset may only be present in High profile.

Cc: mesa-stable
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36351>
(cherry picked from commit da5f3a1027)
2025-07-30 11:27:03 +02:00
David Rosca
4eb22db6a7 frontends/va: Add H264 encode more_rbsp_data PPS flag
Cc: mesa-stable
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36351>
(cherry picked from commit 6247c7fdc1)
2025-07-30 11:27:03 +02:00
Christoph Pillmayer
dc9fb92c1f vk/sync: Pass dependencyFlags in vk_common_CmdPipelineBarrier
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>

Fixes: 97f0a449 ("vulkan: implement legacy entrypoints on top of VK_KHR_synchronization2")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36321>
(cherry picked from commit a501d26dee)
2025-07-30 11:27:03 +02:00
Erico Nunes
30b2aa1965 lima: ppir: fix check for discard_block in optimization
uses_discard may be set when the nir shader contains a 'discard'
implemented with a nir 'terminate', in that case it may stil not
necessarily have a discard block.
Fixes a crash in shaders that have comp->uses_discard but no
comp->discard_block.

Fixes: fa9ddbe82b ("lima: ppir: optimize branches")

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36350>
(cherry picked from commit d620529ddb)
2025-07-30 11:27:03 +02:00
Maíra Canal
319e2871be vulkan: don't destroy vk_sync_timeline if a point is still pending
Currently, vk_sync_timeline_wait() may report idle while we still have
time points outstanding in vk_queue. This race between vk_sync_timeline
and vk_queue is problematic as vk_queue_submit_cleanup() can end-up
trying to unref a timeline point that was already destroyed in
vk_sync_timeline_finish(), leading to an use-after-free.

Address this race-condition by introducing a reference counter to the
timeline. Each timeline point takes a reference to the timeline when
it's checked out and drops the reference when it's freed. Now, the
timeline is only destroyed when all the references had been dropped.

To guarantee that all references will be dropped and the timeline will
be destroyed, vk_sync_timeline_finish() waits for all pending points
to be checked out.

This commit fixes several Mesa CI flakes in v3dv related to timeline
semaphores.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12648
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35921>
(cherry picked from commit ab3aaad957)
2025-07-30 11:27:03 +02:00
Faith Ekstrand
d1c31389b7 vulkan: Hold a reference to pending vk_sync_timeline_points
Previously, we had a sort of double reference count with refcount being
used to track how many waits were holding a reference and pending being
used to track whether or not it was in the pending list. This meant
that the unref operation actually had to look at both refcount and
pending in order to determine if it could free the time point. This is
way too confusing. Instead, we should just always take a reference
while we're pending.

This also simplifies the over-all interface because there's no longer a
difference between free and release. `struct vk_sync_timeline_point` is
now just a reference-counted API.

Reviewed-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35921>
(cherry picked from commit 088a979e79)
2025-07-30 11:27:03 +02:00
Faith Ekstrand
0f0f724c5e vulkan: Rename a bunch of vk_sync_timeline helpers
Whenever we assume the timeline state is locked, we use _locked, pass in
the timeline state explicitly, and rename it so it's clearly an action
which the timeline does on the point.  This makes it far more clear who
owns a reference to what and where.

Reviewed-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35921>
(cherry picked from commit 54eb41588c)
2025-07-30 11:27:03 +02:00
Maíra Canal
b1ffe7bc10 vulkan: create a wrapper struct for vk_sync_timeline
The lifetime of `struct vk_sync_timeline` is tied to the lifetime of
`vk_fence` or `vk_semaphore` objects. To better manage this lifecycle,
create a wrapper struct `vk_sync_timeline_state` that contains the
timeline state and is dynamically allocated when the timeline is
initialized. This separation allows the timeline state to persist
independently of the sync object lifecycle.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35921>
(cherry picked from commit d73b9a7229)
2025-07-30 11:27:02 +02:00
Mel Henning
9cd8b8cc2b nak/mark_lcssa_invariants: Invalidate divergence
Preserving this was resulting in validation errors like:
error: def->loop_invariant == BITSET_TEST(loop_invariance, def->index) (../src/compiler/nir/nir_validate.c:1890)

Fixes: 1d6082bf56 ("nouveau: switch to nir_metadata_divergence")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36415>
(cherry picked from commit a1b64fdc12)
2025-07-30 11:27:02 +02:00
Juston Li
9b48969fb0 anv/android: refactor anb resolve to fix align assertion
Retrieving memory requirement size and alignment via
anv_image_get_memory_requirements() return's 0 before surfaces are added
by resolve_anb_image() and will assert in align64() when align is 0:

Abort message: '../src/util/u_math.h:713: uint64_t align64(uint64_t, uint64_t): assertion "util_is_power_of_two_nonzero64(alignment)" failed'

Refactor out anv_image_bind_from_gralloc() into resolve_anb_image() so
the checks are performed after the surface is adds.

Resolving also requires API 29 so return VK_ERROR_EXTENSION_NOT_PRESENT
without it.

Fixes: 43cb986d9e ("anv/android: resolve ANB swapchain images on bind")
Signed-off-by: Juston Li <justonli@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36060>
(cherry picked from commit e1ca09317e)
2025-07-30 11:27:02 +02:00
Myrrh Periwinkle
bf2422f15d gallium: Properly handle non-contiguous used sampler view indexes
There is nothing guaranteeing that the currently used sampler view
indexes will be contiguous, which means the resulting extra sampler
views created by st_get_sampler_views may not be placed at the end of
the resulting array. Therefore, the exact indexes of these views must
be passed to the caller for releasing instead of simply assuming that
they will always be placed at the end.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13363
Fixes: 73da0dcddc ("gallium: eliminate frontend refcounting from samplerviews")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36397>
(cherry picked from commit abcd02a07d)
2025-07-30 11:27:02 +02:00
Erik Faye-Lund
1a49d24912 docs/features: add missing panvk extension
Mark VK_EXT_robustness2 as supported on pank/v10+, as it's been exposed
for a little while.

Fixes: ef91ad64d5 ("panvk/v10+: Advertise nullDescriptor support")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36408>
(cherry picked from commit 1123987bb3)
2025-07-30 11:27:02 +02:00
Erik Faye-Lund
de7ece0dda pan/ci: remove non-existent flag from PAN_MESA_DEBUG
There's been a few years since these flags existed, let's drop them.

Fixes: ea03d0652d ("panfrost: Remove PAN_MESA_DEBUG=deqp")
Fixes: 7c7c38b126 ("panfrost: Remove unused debug parameter")
Acked-by: Valentine Burley <valentine.burley@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36310>
(cherry picked from commit 2adcb4c81a)
2025-07-30 11:27:02 +02:00
Patrick Lerda
d20f7d7af7 dri: complete the support for ARGB4444
This change is inspired by 1021d6fe62 ("dri: deal
with ARGB1555")

This issue is now mostly fixed with
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36081
Anyway, the dri3_cpp_for_fourcc entry is still missing and should
be added.

This change is useful for instance with r600 which
can handle this format.

Note: this mode was generated at the "glx visuals" level
on r600 by default before the commit d709b42180.

This change was tested on r600 palm and cayman with X11
loaded with a version of mesa generating this very mode:
glx/glx-visuals-depth -pixmap: fail pass
glx/glx-visuals-stencil -pixmap: fail pass

Fixes: 00aa095d53 ("dri: Support 1555/4444 formats")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34294>
(cherry picked from commit cea80e1a10)
2025-07-30 11:27:02 +02:00
Rhys Perry
90fbfc51ca nir/uub: fix 8/16-bit overflow
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Backport-to: 25.1
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13552
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13553
Tested-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36372>
(cherry picked from commit a9a1da0264)
2025-07-30 11:27:02 +02:00
Danylo Piliaiev
79508ec179 tu: Fix nullptr dereference in cmd_buffer tracepoint
Fixes: ac2046c5b0 ("tu/perfetto: Add app and engine names to the command buffer tracepoint")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36389>
(cherry picked from commit fd1e8cf03f)
2025-07-30 11:27:02 +02:00
Mary Guillemard
1bbcab35b0 pan/bi: Properly handle SWZ.v4i8 lowering on v11+
We were not supporting non replicate swizzle and this trigger an
assertion on fossils/parallel-rdp/small_subgroup.foz.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 1481b14fcb ("pan/bi: Lower SWZ.v4i8 to multiple MKVEC.v2i8 on v11+")
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36349>
(cherry picked from commit 525f2972a6)
2025-07-30 11:27:02 +02:00
Mike Blumenkrantz
ae7366adbd zink: create a dummy image for shaderdb runs
Fixes: 0a2c395394 ("zink: require nullDescriptor feature")

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13591
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36377>
(cherry picked from commit a76f1cf3ee)
2025-07-30 11:27:02 +02:00
David Rosca
af0158ca77 radv/video: Use the new defines for H264 SPS info flags
Also set gaps_in_frame_num_value_allowed_flag.

Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36225>
(cherry picked from commit cc7178b9eb)
2025-07-30 11:27:02 +02:00
Konstantin Seurer
0a10416ea1 radv: Initialize base IDs when doing a BVH update with src!=dst
Fixes: 2d48b2c ("radv: Use subgroup OPs for BVH updates on GFX12")
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35445>
(cherry picked from commit 33a694fe9b)
2025-07-30 11:27:02 +02:00
David Rosca
9936d4a21d radv/video: Fix session_init and rc_per_pic on VCN2
Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36353>
(cherry picked from commit 627fdb368d)
2025-07-30 11:27:02 +02:00
David Rosca
02ed0edc4d radv/video: Fix setting H265 encode cu_qp_delta on VCN2
Fixes H265 encoding with rate control disabled.

Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36353>
(cherry picked from commit c11508ad41)
2025-07-30 11:27:02 +02:00
David Rosca
46b15df51d radv/video: Fix encode bitstream buffer offset and alignment
Caused issues on VCN2.

Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36353>
(cherry picked from commit 70473690f5)
2025-07-30 11:27:02 +02:00
David Rosca
af333d68cf radv/video: Add more encode session params overrides
Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36353>
(cherry picked from commit a30f91b71a)
2025-07-30 11:27:02 +02:00
David Rosca
378fb9ced7 radv/video: Send slice control, spec misc and deblocking params every frame
These params can change per frame, so we need to send the values
to firmware on every frame instead of only once at session init.

Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36353>
(cherry picked from commit e3715df4ee)
2025-07-30 11:27:02 +02:00
David Rosca
85d3939d49 radv/video: Set encodeInputPictureGranularity for AV1 encode
Fixes: 37e71a5cb2 ("radv/video: add support for AV1 encoding")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36311>
(cherry picked from commit 8f6ceed8f5)
2025-07-30 11:27:02 +02:00
David Rosca
c967394a02 radv/video: Add bit depth and profile check for VP9 decode
Fixes: b8ac2d47e7 ("radv/video: add KHR_video_decode_vp9 support.")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36311>
(cherry picked from commit fd0c70aded)
2025-07-30 11:27:02 +02:00
David Rosca
9c87f57811 radv/video: Add bit depth and profile check for AV1 encode
Fixes: 37e71a5cb2 ("radv/video: add support for AV1 encoding")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36311>
(cherry picked from commit bdad9e7e48)
2025-07-30 11:27:02 +02:00
Yiwei Zhang
7b3f2f64fa lavapipe: fix maint4 vkGetDeviceImageMemoryRequirements
Otherwise plane aspect and dedicated alloc req are missed.

Fixes: 987e8a5a0c ("lavapipe: implement vkGetDevice*MemoryRequirements")
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36335>
(cherry picked from commit 549f6cdb17)
2025-07-30 11:27:02 +02:00
Yiwei Zhang
0bb0d124ae lavapipe: fix maint4 vkGetDeviceBufferMemoryRequirements
Otherwise dedicated alloc req is missed.

Fixes: 987e8a5a0c ("lavapipe: implement vkGetDevice*MemoryRequirements")
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36335>
(cherry picked from commit e309f1ad45)
2025-07-30 11:27:02 +02:00