st_pbo/compute: handle download failures with fallback

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18118>
This commit is contained in:
Mike Blumenkrantz
2022-08-12 12:37:22 -04:00
committed by Marge Bot
parent fcae7cfd27
commit bd3b03939b

View File

@@ -1124,6 +1124,8 @@ st_GetTexSubImage_shader(struct gl_context * ctx,
dst = download_texture_compute(st, &ctx->Pack, xoffset, yoffset, zoffset, width, height, depth,
level, layer, format, type, src_format, view_target, src, dst_format,
swizzle_clamp);
if (!dst)
return false;
if (!can_copy_direct(&ctx->Pack) || !ctx->Pack.BufferObj) {
copy_converted_buffer(ctx, &ctx->Pack, view_target, dst, dst_format, xoffset, yoffset, zoffset,