diff options
author | Dave Airlie <[email protected]> | 2020-04-23 12:32:53 +1000 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-07-10 22:04:27 +0000 |
commit | 54232bee06a3742e42754b223712de17a3f7ac59 (patch) | |
tree | d1ab833a4079734204f182b5f0d191f9cfd833c9 | |
parent | 7582f4a49cdb87b1657e44ba38104445bc28bd77 (diff) |
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5835>
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_sampler.c | 4 |
1 files changed, 4 insertions, 0 deletions
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]); } |