Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Commit

Permalink
mesa: set a type for depth fallback texture
Browse files Browse the repository at this point in the history
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: 0c6e56c ("mesa: (more) correctly handle incomplete depth textures")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9012
Signed-off-by: Tapani Pälli <[email protected]>
Reviewed-by: Mike Blumenkrantz <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23013>
(cherry picked from commit cd406ea)
  • Loading branch information
tpalli authored and 1ace committed May 25, 2023
1 parent 4afab8f commit ff867ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .pick_status.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion src/mesa/main/texobj.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ff867ea

Please sign in to comment.