From ff867ea139428f5743d4624255d4a3ef95aae2b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Mon, 15 May 2023 08:34:35 +0300 Subject: [PATCH] mesa: set a type for depth fallback texture MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise we will later attempt to figure out format with type GL_NONE which is not handled by _mesa_format_from_format_and_type. Fixes: 0c6e56c391a ("mesa: (more) correctly handle incomplete depth textures") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9012 Signed-off-by: Tapani Pälli Reviewed-by: Mike Blumenkrantz Part-of: (cherry picked from commit cd406eae7dbf25de997e708f2719a478114f0d58) --- .pick_status.json | 2 +- src/mesa/main/texobj.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 0c0f19d32fd0..42984f54a66c 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2452,7 +2452,7 @@ "description": "mesa: set a type for depth fallback texture", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "0c6e56c391a262bef2d20037b4ca77d60948f3e7" }, diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 1546551d8a47..e2b31d460f1b 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -1071,7 +1071,7 @@ _mesa_get_fallback_texture(struct gl_context *ctx, gl_texture_index tex, bool is if (is_depth) texFormat = st_ChooseTextureFormat(ctx, target, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT, - GL_NONE); + GL_UNSIGNED_INT); else texFormat = st_ChooseTextureFormat(ctx, target, GL_RGBA, GL_RGBA,