summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Clark <robdclark@chromium.org>2020-09-09 14:03:43 -0700
committerMarge Bot <eric+marge@anholt.net>2020-09-10 02:36:59 +0000
commit6e4d0a48e3dad0dbf0515b5391b8d0d52795e0fc (patch)
tree6e0f4fab695ee7f528e1a63e3280d34cab5fb8d2
parent18f5d362829f8299736feac077df19f513a120af (diff)
freedreno: Clear gs/tcs/tes state for clear blits
Otherwise we could emit a clear blit that is trying to use some random GS stage, which doesn't go well. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6649>
-rw-r--r--src/gallium/drivers/freedreno/freedreno_blitter.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_blitter.c b/src/gallium/drivers/freedreno/freedreno_blitter.c
index d45ae670c01..59e35468336 100644
--- a/src/gallium/drivers/freedreno/freedreno_blitter.c
+++ b/src/gallium/drivers/freedreno/freedreno_blitter.c
@@ -225,6 +225,13 @@ fd_blitter_clear(struct pipe_context *pctx, unsigned buffers,
pctx->bind_vs_state(pctx, ctx->solid_prog.vs);
pctx->bind_fs_state(pctx, ctx->solid_prog.fs);
+ /* Clear geom/tess shaders, lest the draw emit code think we are
+ * trying to use use them:
+ */
+ pctx->bind_gs_state(pctx, NULL);
+ pctx->bind_tcs_state(pctx, NULL);
+ pctx->bind_tes_state(pctx, NULL);
+
struct pipe_draw_info info = {
.mode = PIPE_PRIM_MAX, /* maps to DI_PT_RECTLIST */
.count = 2,