From f0c8c6581c0d08f03e9a638997bf2806a526e40d Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 18 Mar 2021 13:31:01 -0400 Subject: [PATCH] llvmpipe/setup: force fs constant updating upon beginning queries this flushes any pending updates and avoids trying to access constant buffers which have been unset (and are also potentially deleted) Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/llvmpipe/lp_setup.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c index 284d78a83a2..97d85bdba13 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_setup.c @@ -1514,6 +1514,11 @@ void lp_setup_begin_query(struct lp_setup_context *setup, struct llvmpipe_query *pq) { + struct llvmpipe_context *llvmpipe = llvmpipe_context(setup->pipe); + if (llvmpipe->dirty & LP_NEW_FS_CONSTANTS) + lp_setup_set_fs_constants(llvmpipe->setup, + ARRAY_SIZE(llvmpipe->constants[PIPE_SHADER_FRAGMENT]), + llvmpipe->constants[PIPE_SHADER_FRAGMENT]); set_scene_state(setup, SETUP_ACTIVE, "begin_query");