mesa: set a type for depth fallback texture

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: 0c6e56c391 ("mesa: (more) correctly handle incomplete depth textures")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9012
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23013>
(cherry picked from commit cd406eae7d)
This commit is contained in:
Tapani Pälli 2023-05-15 08:34:35 +03:00 committed by Eric Engestrom
parent 4afab8f697
commit ff867ea139
2 changed files with 2 additions and 2 deletions

View file

@ -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"
},

View file

@ -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,