mesa/st: use fallback path when pipe->clear_texture is not available

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23735>
This commit is contained in:
Italo Nicola 2023-06-22 18:45:18 +00:00 committed by Marge Bot
parent 2594436c7a
commit 29a64f677a

View file

@ -3689,7 +3689,13 @@ st_ClearTexSubImage(struct gl_context *ctx,
assert(level <= pt->last_level);
pipe->clear_texture(pipe, pt, level, &box, clearValue ? clearValue : zeros);
if (pipe->clear_texture) {
pipe->clear_texture(pipe, pt, level, &box,
clearValue ? clearValue : zeros);
} else {
u_default_clear_texture(pipe, pt, level, &box,
clearValue ? clearValue : zeros);
}
}