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 <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9692>
This commit is contained in:
Mike Blumenkrantz 2021-03-18 13:31:01 -04:00
parent 6d995d3fe2
commit f0c8c6581c
1 changed files with 5 additions and 0 deletions

View File

@ -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");