From: Dave Airlie Date: Thu, 23 Apr 2020 02:32:53 +0000 (+1000) Subject: llvmpipe: flush resources on sampler view binding X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=54232bee06a3742e42754b223712de17a3f7ac59;p=mesa.git llvmpipe: flush resources on sampler view binding The resource may have been written to as images previously. KHR-GL45.shader_image_load_store.advanced-sync-imageAccess2 Reviewed-by: Roland Scheidegger Part-of: --- diff --git a/src/gallium/drivers/llvmpipe/lp_state_sampler.c b/src/gallium/drivers/llvmpipe/lp_state_sampler.c index 5bebc10ea21..f802af45f5a 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_sampler.c +++ b/src/gallium/drivers/llvmpipe/lp_state_sampler.c @@ -39,6 +39,7 @@ #include "lp_state.h" #include "lp_debug.h" #include "frontend/sw_winsys.h" +#include "lp_flush.h" static void * @@ -137,6 +138,9 @@ llvmpipe_set_sampler_views(struct pipe_context *pipe, debug_printf("Illegal setting of sampler_view %d created in another " "context\n", i); } + + if (views[i]) + llvmpipe_flush_resource(pipe, views[i]->texture, 0, true, false, false, "sampler_view"); pipe_sampler_view_reference(&llvmpipe->sampler_views[shader][start + i], views[i]); }