From c8bdf6129a4a628e788fc964e4621ed807663835 Mon Sep 17 00:00:00 2001 From: Chris Rankin Date: Mon, 19 Feb 2024 14:08:38 +0000 Subject: [PATCH] vdpau: Declare texture object as immutable using helper function. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10618 Signed-off-by: Chris Rankin Reviewed-by: Marek Olšák Part-of: (cherry picked from commit e1e84b0721312b5b5b085571d6a5e0504f01d4fb) --- .pick_status.json | 2 +- src/mesa/main/vdpau.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 8e750cf3815..22f3b56b3d2 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1964,7 +1964,7 @@ "description": "vdpau: Declare texture object as immutable using helper function.", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/mesa/main/vdpau.c b/src/mesa/main/vdpau.c index b648dfbdac2..a9d1e97fd31 100644 --- a/src/mesa/main/vdpau.c +++ b/src/mesa/main/vdpau.c @@ -39,6 +39,7 @@ #include "glformats.h" #include "texobj.h" #include "teximage.h" +#include "textureview.h" #include "api_exec_decl.h" #include "state_tracker/st_cb_texture.h" @@ -179,7 +180,7 @@ register_surface(struct gl_context *ctx, GLboolean isOutput, } /* This will disallow respecifying the storage. */ - tex->Immutable = GL_TRUE; + _mesa_set_texture_view_state(ctx, tex, target, 1); _mesa_unlock_texture(ctx, tex); _mesa_reference_texobj(&surf->textures[i], tex);