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