diff --git a/extra/mesa/.SRCINFO b/extra/mesa/.SRCINFO index 98a5dcff0..3a6a544e1 100644 --- a/extra/mesa/.SRCINFO +++ b/extra/mesa/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = mesa pkgdesc = Open-source OpenGL drivers pkgver = 24.1.5 - pkgrel = 1 + pkgrel = 2 epoch = 1 url = https://www.mesa3d.org/ arch = x86_64 @@ -54,6 +54,7 @@ pkgbase = mesa options = !lto source = https://mesa.freedesktop.org/archive/mesa-24.1.5.tar.xz source = https://mesa.freedesktop.org/archive/mesa-24.1.5.tar.xz.sig + source = 0001-radeonsi-vcn-Add-decode-DPB-buffers-as-CS-dependency.patch source = proc-macro2-1.0.70.tar.gz::https://crates.io/api/v1/crates/proc-macro2/1.0.70/download source = unicode-ident-1.0.12.tar.gz::https://crates.io/api/v1/crates/unicode-ident/1.0.12/download source = quote-1.0.33.tar.gz::https://crates.io/api/v1/crates/quote/1.0.33/download @@ -67,6 +68,7 @@ pkgbase = mesa validpgpkeys = E3E8F480C52ADD73B278EE78E1ECBE07D7D70895 sha256sums = 02761ffd965dd64b95421ebfca1191d73724aba00f30034009237564f34cf976 sha256sums = SKIP + sha256sums = a8fb1efea63eeec07af76b51d64c8a1c9748f903e511a7cd68438eb977dd0d4f sha256sums = 39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b sha256sums = 3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b sha256sums = 5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae @@ -74,6 +76,7 @@ pkgbase = mesa sha256sums = 23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a b2sums = ea29b3b8b6f178dd21d7ee3042ea829755e398f8876dfac6c744de77c08d85abb2736add2141204e6d3343de46040f49d96e1ad455714880b4be46d7b36581f1 b2sums = SKIP + b2sums = e823803cb9b49e15d5e245f2c4a4a62347d70871c82776d20699213eab7aacdefa9581cf28bbb12977038dcb4f41d8e2f14b7e7090b9ebd0612c56b08637c694 b2sums = fff0dec06b21e391783cc136790238acb783780eaedcf14875a350e7ceb46fdc100c8b9e3f09fb7f4c2196c25d4c6b61e574c0dad762d94533b628faab68cf5c b2sums = 4cede03c08758ccd6bf53a0d0057d7542dfdd0c93d342e89f3b90460be85518a9fd24958d8b1da2b5a09b5ddbee8a4263982194158e171c2bba3e394d88d6dac b2sums = 77c4b166f1200e1ee2ab94a5014acd334c1fe4b7d72851d73768d491c56c6779a0882a304c1f30c88732a6168351f0f786b10516ae537cff993892a749175848 diff --git a/extra/mesa/0001-radeonsi-vcn-Add-decode-DPB-buffers-as-CS-dependency.patch b/extra/mesa/0001-radeonsi-vcn-Add-decode-DPB-buffers-as-CS-dependency.patch new file mode 100644 index 000000000..5c2c1ac09 --- /dev/null +++ b/extra/mesa/0001-radeonsi-vcn-Add-decode-DPB-buffers-as-CS-dependency.patch @@ -0,0 +1,28 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: David Rosca +Date: Mon, 5 Aug 2024 09:14:37 +0200 +Subject: [PATCH] radeonsi/vcn: Add decode DPB buffers as CS dependency + +This is needed to ensure correct synchronization in kernel eg. when it +moves the buffers between VRAM and GTT. + +Reviewed-by: Boyuan Zhang +(cherry picked from commit 0c024bbe641b092bbbc751baae54a37642794de0) + +Part-of: +--- + src/gallium/drivers/radeonsi/radeon_vcn_dec.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/gallium/drivers/radeonsi/radeon_vcn_dec.c b/src/gallium/drivers/radeonsi/radeon_vcn_dec.c +index ede5f9d7c1a5..9e3d0b88493b 100644 +--- a/src/gallium/drivers/radeonsi/radeon_vcn_dec.c ++++ b/src/gallium/drivers/radeonsi/radeon_vcn_dec.c +@@ -1838,6 +1838,7 @@ static unsigned rvcn_dec_dynamic_dpb_t2_message(struct radeon_decoder *dec, rvcn + RVID_ERR("Ref list from application is incorrect, using dummy buffer instead.\n"); + addr = dec->ws->buffer_get_virtual_address(dummy->dpb.res->buf); + } ++ dec->ws->cs_add_buffer(&dec->cs, d->dpb.res->buf, RADEON_USAGE_READWRITE | RADEON_USAGE_SYNCHRONIZED, RADEON_DOMAIN_VRAM); + dynamic_dpb_t2->dpbAddrLo[i] = addr; + dynamic_dpb_t2->dpbAddrHi[i] = addr >> 32; + ++dynamic_dpb_t2->dpbArraySize; diff --git a/extra/mesa/PKGBUILD b/extra/mesa/PKGBUILD index 7376f3fee..ca4b4d697 100644 --- a/extra/mesa/PKGBUILD +++ b/extra/mesa/PKGBUILD @@ -31,7 +31,7 @@ pkgname=( vulkan-freedreno ) pkgver=24.1.5 -pkgrel=1 +pkgrel=2 epoch=1 pkgdesc="Open-source OpenGL drivers" url="https://www.mesa3d.org/" @@ -104,6 +104,7 @@ options=( ) source=( "https://mesa.freedesktop.org/archive/mesa-$pkgver.tar.xz"{,.sig} + 0001-radeonsi-vcn-Add-decode-DPB-buffers-as-CS-dependency.patch ) validpgpkeys=( 946D09B5E4C9845E63075FF1D961C596A7203456 # Andres Gomez @@ -132,6 +133,7 @@ done b2sums=('ea29b3b8b6f178dd21d7ee3042ea829755e398f8876dfac6c744de77c08d85abb2736add2141204e6d3343de46040f49d96e1ad455714880b4be46d7b36581f1' 'SKIP' + 'e823803cb9b49e15d5e245f2c4a4a62347d70871c82776d20699213eab7aacdefa9581cf28bbb12977038dcb4f41d8e2f14b7e7090b9ebd0612c56b08637c694' 'fff0dec06b21e391783cc136790238acb783780eaedcf14875a350e7ceb46fdc100c8b9e3f09fb7f4c2196c25d4c6b61e574c0dad762d94533b628faab68cf5c' '4cede03c08758ccd6bf53a0d0057d7542dfdd0c93d342e89f3b90460be85518a9fd24958d8b1da2b5a09b5ddbee8a4263982194158e171c2bba3e394d88d6dac' '77c4b166f1200e1ee2ab94a5014acd334c1fe4b7d72851d73768d491c56c6779a0882a304c1f30c88732a6168351f0f786b10516ae537cff993892a749175848' @@ -141,6 +143,7 @@ b2sums=('ea29b3b8b6f178dd21d7ee3042ea829755e398f8876dfac6c744de77c08d85abb2736ad # https://docs.mesa3d.org/relnotes.html sha256sums=('02761ffd965dd64b95421ebfca1191d73724aba00f30034009237564f34cf976' 'SKIP' + 'a8fb1efea63eeec07af76b51d64c8a1c9748f903e511a7cd68438eb977dd0d4f' '39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b' '3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b' '5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae' @@ -150,6 +153,13 @@ sha256sums=('02761ffd965dd64b95421ebfca1191d73724aba00f30034009237564f34cf976' prepare() { cd mesa-$pkgver + # Fix video decoding memory bugs on AMD 7840H + # https://gitlab.archlinux.org/archlinux/packaging/packages/mesa/-/issues/16 + # https://gitlab.freedesktop.org/drm/amd/-/issues/3437 + # https://gitlab.freedesktop.org/drm/amd/-/issues/3497 + # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30510 + patch -Np1 -i ../0001-radeonsi-vcn-Add-decode-DPB-buffers-as-CS-dependency.patch + # Include package release in version string so Chromium invalidates # its GPU cache; otherwise it can cause pages to render incorrectly. # https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/2020604