Mesa (main): llvmpipe: protect from doing FB fetch of missing buffers
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Nov 17 04:37:25 UTC 2021
Module: Mesa
Branch: main
Commit: 2b3a0209280aa097b00254b714ae01d4d2ff01cb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2b3a0209280aa097b00254b714ae01d4d2ff01cb
Author: Pavel Asyutchenko <sventeam at yandex.ru>
Date: Thu Oct 7 20:57:16 2021 +0300
llvmpipe: protect from doing FB fetch of missing buffers
Signed-off-by: Pavel Asyutchenko <sventeam at yandex.ru>
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13252>
---
src/gallium/drivers/llvmpipe/lp_state_fs.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index 976d14a3224..7a01528e36a 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -470,6 +470,11 @@ static void fs_fb_fetch(const struct lp_build_fs_iface *iface,
LLVMValueRef dst[4 * 4];
enum pipe_format cbuf_format = key->cbuf_format[cbuf];
const struct util_format_description* out_format_desc = util_format_description(cbuf_format);
+ if (out_format_desc->format == PIPE_FORMAT_NONE) {
+ result[0] = result[1] = result[2] = result[3] = bld->undef;
+ return;
+ }
+
struct lp_type dst_type;
unsigned block_size = bld->type.length;
unsigned block_height = key->resource_1d ? 1 : 2;
More information about the mesa-commit
mailing list