extra/mesa to 24.1.4-2

This commit is contained in:
Kevin Mihelich 2024-07-19 18:49:59 +00:00
parent 193f3ef3b3
commit 6ca09be2ee
3 changed files with 133 additions and 16 deletions

View file

@ -1,7 +1,7 @@
pkgbase = mesa
pkgdesc = Open-source OpenGL drivers
pkgver = 24.1.3
pkgrel = 1
pkgver = 24.1.4
pkgrel = 2
epoch = 1
url = https://www.mesa3d.org/
arch = x86_64
@ -52,8 +52,9 @@ pkgbase = mesa
makedepends = directx-headers
makedepends = libomxil-bellagio
options = !lto
source = https://mesa.freedesktop.org/archive/mesa-24.1.3.tar.xz
source = https://mesa.freedesktop.org/archive/mesa-24.1.3.tar.xz.sig
source = https://mesa.freedesktop.org/archive/mesa-24.1.4.tar.xz
source = https://mesa.freedesktop.org/archive/mesa-24.1.4.tar.xz.sig
source = 0001-Revert-frontends-va-Fix-AV1-slice_data_offset-with-m.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
@ -65,15 +66,17 @@ pkgbase = mesa
validpgpkeys = 57551DE15B968F6341C248F68D8E31AFC32428A6
validpgpkeys = A5CC9FEC93F2F837CB044912336909B6B25FADFA
validpgpkeys = E3E8F480C52ADD73B278EE78E1ECBE07D7D70895
sha256sums = 63236426b25a745ba6aa2d6daf8cd769d5ea01887b0745ab7124d2ef33a9020d
sha256sums = 7cf7c6f665263ad0122889c1d4b076654c1eedea7a2f38c69c8c51579937ade1
sha256sums = SKIP
sha256sums = db209e829f8888396dc89f06cc650048170ab8a830247a8a243de206a8121937
sha256sums = 39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b
sha256sums = 3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b
sha256sums = 5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae
sha256sums = de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c
sha256sums = 23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a
b2sums = 2e8e4ee98f904aa02f304a6c3cbbb81d04802203e270e6b8ad2b7a62b334ac28f5e91687d7a92501f66b0043255a533d024537ff5ef3f2f03d986e46a7272eeb
b2sums = 2109fc604858a0927271d7b1edb76a24514acac6117e564c6999c99f068624964f5cf0b7d022cac5726e432353a32a5278b3aa00b64dd4118bb2f0b7123c3b41
b2sums = SKIP
b2sums = bc2897ab0a7718d38e7843f85f15aa50b06fd89aed1ea494119f9e486ef0a82c500554913fb8ca26f2c0df4ce4fe9067188341a6c90556453fc80558afaaada9
b2sums = fff0dec06b21e391783cc136790238acb783780eaedcf14875a350e7ceb46fdc100c8b9e3f09fb7f4c2196c25d4c6b61e574c0dad762d94533b628faab68cf5c
b2sums = 4cede03c08758ccd6bf53a0d0057d7542dfdd0c93d342e89f3b90460be85518a9fd24958d8b1da2b5a09b5ddbee8a4263982194158e171c2bba3e394d88d6dac
b2sums = 77c4b166f1200e1ee2ab94a5014acd334c1fe4b7d72851d73768d491c56c6779a0882a304c1f30c88732a6168351f0f786b10516ae537cff993892a749175848

View file

@ -0,0 +1,106 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: David Rosca <david.rosca@amd.com>
Date: Thu, 18 Jul 2024 19:15:13 +0200
Subject: [PATCH] Revert "frontends/va: Fix AV1 slice_data_offset with multiple
slice data buffers"
This commit is fixing an issue where all AV1 slice data offsets always point
into the first slice data buffer, even when multiple slice data buffers
are submitted. However, after b0d6e58d88f ("Reapply "radeonsi/vcn: AV1 skip the redundant bs resize"")
only the first slice data buffer will be sent to decoder and the incorrect
behavior is required, so this commit also needs to be reverted.
This reverts commit 6746d4df6eac83d048e88c2d54aa19e7c1a0a696.
---
src/gallium/frontends/va/picture.c | 11 +++--------
src/gallium/frontends/va/picture_av1.c | 4 ++--
src/gallium/frontends/va/va_private.h | 2 +-
3 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/src/gallium/frontends/va/picture.c b/src/gallium/frontends/va/picture.c
index 59692aeee91c..a2bb608ec96a 100644
--- a/src/gallium/frontends/va/picture.c
+++ b/src/gallium/frontends/va/picture.c
@@ -299,7 +299,7 @@ handleIQMatrixBuffer(vlVaContext *context, vlVaBuffer *buf)
}
static void
-handleSliceParameterBuffer(vlVaContext *context, vlVaBuffer *buf, unsigned num_slices, unsigned slice_offset)
+handleSliceParameterBuffer(vlVaContext *context, vlVaBuffer *buf, unsigned num_slices)
{
switch (u_reduce_video_profile(context->templat.profile)) {
case PIPE_VIDEO_FORMAT_MPEG12:
@@ -331,7 +331,7 @@ handleSliceParameterBuffer(vlVaContext *context, vlVaBuffer *buf, unsigned num_s
break;
case PIPE_VIDEO_FORMAT_AV1:
- vlVaHandleSliceParameterBufferAV1(context, buf, num_slices, slice_offset);
+ vlVaHandleSliceParameterBufferAV1(context, buf, num_slices);
break;
default:
@@ -968,7 +968,6 @@ vlVaRenderPicture(VADriverContextP ctx, VAContextID context_id, VABufferID *buff
unsigned i;
unsigned slice_idx = 0;
- unsigned slice_offset = 0;
vlVaBuffer *seq_param_buf = NULL;
if (!ctx)
@@ -1024,17 +1023,13 @@ vlVaRenderPicture(VADriverContextP ctx, VAContextID context_id, VABufferID *buff
slice_idx is the zero based number of total slices received
before this call to handleSliceParameterBuffer
-
- slice_offset is the slice offset in bitstream buffer
*/
- handleSliceParameterBuffer(context, buf, slice_idx, slice_offset);
+ handleSliceParameterBuffer(context, buf, slice_idx);
slice_idx += buf->num_elements;
} break;
case VASliceDataBufferType:
vaStatus = handleVASliceDataBufferType(context, buf);
- if (slice_idx)
- slice_offset += buf->size;
break;
case VAProcPipelineParameterBufferType:
diff --git a/src/gallium/frontends/va/picture_av1.c b/src/gallium/frontends/va/picture_av1.c
index c014b0b1168c..e6f2652e3623 100644
--- a/src/gallium/frontends/va/picture_av1.c
+++ b/src/gallium/frontends/va/picture_av1.c
@@ -396,18 +396,18 @@ void vlVaHandlePictureParameterBufferAV1(vlVaDriver *drv, vlVaContext *context,
context->desc.av1.slice_parameter.slice_count = 0;
}
-void vlVaHandleSliceParameterBufferAV1(vlVaContext *context, vlVaBuffer *buf, unsigned num_slices, unsigned slice_offset)
+void vlVaHandleSliceParameterBufferAV1(vlVaContext *context, vlVaBuffer *buf, unsigned num_slices)
{
for (uint32_t buffer_idx = 0; buffer_idx < buf->num_elements; buffer_idx++) {
uint32_t slice_index =
/* slices obtained so far from vaRenderPicture in previous calls*/
num_slices +
/* current slice index processing this VASliceParameterBufferAV1 */
buffer_idx;
VASliceParameterBufferAV1 *av1 = &(((VASliceParameterBufferAV1*)buf->data)[buffer_idx]);
context->desc.av1.slice_parameter.slice_data_size[slice_index] = av1->slice_data_size;
- context->desc.av1.slice_parameter.slice_data_offset[slice_index] = slice_offset + av1->slice_data_offset;
+ context->desc.av1.slice_parameter.slice_data_offset[slice_index] = av1->slice_data_offset;
context->desc.av1.slice_parameter.slice_data_row[slice_index] = av1->tile_row;
context->desc.av1.slice_parameter.slice_data_col[slice_index] = av1->tile_column;
context->desc.av1.slice_parameter.slice_data_anchor_frame_idx[slice_index] = av1->anchor_frame_idx;
diff --git a/src/gallium/frontends/va/va_private.h b/src/gallium/frontends/va/va_private.h
index 007ed95ce7f7..ad30f3bad2a9 100644
--- a/src/gallium/frontends/va/va_private.h
+++ b/src/gallium/frontends/va/va_private.h
@@ -540,7 +540,7 @@ void vlVaHandlePictureParameterBufferVP9(vlVaDriver *drv, vlVaContext *context,
void vlVaHandleSliceParameterBufferVP9(vlVaContext *context, vlVaBuffer *buf);
void vlVaDecoderVP9BitstreamHeader(vlVaContext *context, vlVaBuffer *buf);
void vlVaHandlePictureParameterBufferAV1(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf);
-void vlVaHandleSliceParameterBufferAV1(vlVaContext *context, vlVaBuffer *buf, unsigned num_slices, unsigned slice_offset);
+void vlVaHandleSliceParameterBufferAV1(vlVaContext *context, vlVaBuffer *buf, unsigned num_slices);
void getEncParamPresetH264(vlVaContext *context);
void getEncParamPresetH265(vlVaContext *context);
void getEncParamPresetAV1(vlVaContext *context);

View file

@ -30,8 +30,8 @@ pkgname=(
vulkan-panfrost
vulkan-freedreno
)
pkgver=24.1.3
pkgrel=1
pkgver=24.1.4
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-Revert-frontends-va-Fix-AV1-slice_data_offset-with-m.patch
)
validpgpkeys=(
946D09B5E4C9845E63075FF1D961C596A7203456 # Andres Gomez <tanty@igalia.com>
@ -130,15 +131,9 @@ for _crate in "${!_crates[@]}"; do
)
done
sha256sums=('63236426b25a745ba6aa2d6daf8cd769d5ea01887b0745ab7124d2ef33a9020d'
'SKIP'
'39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b'
'3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b'
'5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae'
'de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c'
'23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a')
b2sums=('2e8e4ee98f904aa02f304a6c3cbbb81d04802203e270e6b8ad2b7a62b334ac28f5e91687d7a92501f66b0043255a533d024537ff5ef3f2f03d986e46a7272eeb'
b2sums=('2109fc604858a0927271d7b1edb76a24514acac6117e564c6999c99f068624964f5cf0b7d022cac5726e432353a32a5278b3aa00b64dd4118bb2f0b7123c3b41'
'SKIP'
'bc2897ab0a7718d38e7843f85f15aa50b06fd89aed1ea494119f9e486ef0a82c500554913fb8ca26f2c0df4ce4fe9067188341a6c90556453fc80558afaaada9'
'fff0dec06b21e391783cc136790238acb783780eaedcf14875a350e7ceb46fdc100c8b9e3f09fb7f4c2196c25d4c6b61e574c0dad762d94533b628faab68cf5c'
'4cede03c08758ccd6bf53a0d0057d7542dfdd0c93d342e89f3b90460be85518a9fd24958d8b1da2b5a09b5ddbee8a4263982194158e171c2bba3e394d88d6dac'
'77c4b166f1200e1ee2ab94a5014acd334c1fe4b7d72851d73768d491c56c6779a0882a304c1f30c88732a6168351f0f786b10516ae537cff993892a749175848'
@ -146,10 +141,23 @@ b2sums=('2e8e4ee98f904aa02f304a6c3cbbb81d04802203e270e6b8ad2b7a62b334ac28f5e9168
'2cff6626624d03f70f1662af45a8644c28a9f92e2dfe38999bef3ba4a4c1ce825ae598277e9cb7abd5585eebfb17b239effc8d0bbf1c6ac196499f0d288e5e01')
# https://docs.mesa3d.org/relnotes.html
sha256sums=('7cf7c6f665263ad0122889c1d4b076654c1eedea7a2f38c69c8c51579937ade1'
'SKIP'
'db209e829f8888396dc89f06cc650048170ab8a830247a8a243de206a8121937'
'39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b'
'3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b'
'5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae'
'de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c'
'23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a')
prepare() {
cd mesa-$pkgver
# Fix AV1 decode
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/11533
# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30255
patch -Np1 -i ../0001-Revert-frontends-va-Fix-AV1-slice_data_offset-with-m.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