summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-07-10 15:46:54 +1000
committerMarge Bot <eric+marge@anholt.net>2020-07-10 22:04:27 +0000
commit05e23cb23dde76afeaa77746eea37236086668e5 (patch)
tree29b1984580f499c33b2b6a950f42df024b40ee5d
parent54232bee06a3742e42754b223712de17a3f7ac59 (diff)
llvmpipe/cs: fix image/sampler binding for compute
The compute shader dirtying is a bit wrong here, since we don't have a second stage like for fragment shaders, so dirty the compute shader whenever a sampler or image changes, (ssbo/contexts don't needs this). Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5835>
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_cs.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_cs.c b/src/gallium/drivers/llvmpipe/lp_state_cs.c
index 7bd52bb78b0..59757234a83 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_cs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_cs.c
@@ -1210,9 +1210,6 @@ update_csctx_ssbo(struct llvmpipe_context *llvmpipe)
static void
llvmpipe_cs_update_derived(struct llvmpipe_context *llvmpipe, void *input)
{
- if (llvmpipe->cs_dirty & (LP_CSNEW_CS))
- llvmpipe_update_cs(llvmpipe);
-
if (llvmpipe->cs_dirty & LP_CSNEW_CONSTANTS) {
lp_csctx_set_cs_constants(llvmpipe->csctx,
ARRAY_SIZE(llvmpipe->constants[PIPE_SHADER_COMPUTE]),
@@ -1248,6 +1245,13 @@ llvmpipe_cs_update_derived(struct llvmpipe_context *llvmpipe, void *input)
csctx->cs.current.jit_context.kernel_args = input;
}
+ if (llvmpipe->cs_dirty & (LP_CSNEW_CS |
+ LP_CSNEW_IMAGES |
+ LP_CSNEW_SAMPLER_VIEW |
+ LP_CSNEW_SAMPLER))
+ llvmpipe_update_cs(llvmpipe);
+
+
llvmpipe->cs_dirty = 0;
}