From c99ba3eb479705114ff84695af33b1681bfaf142 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 24 Jan 2017 22:54:06 +0100 Subject: [PATCH] radeonsi: unbind disabled shader stages to prevent useless L2 prefetches MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeonsi/si_state_shaders.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index 010ce15a8b5..b3616dcfaff 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -2439,6 +2439,9 @@ bool si_update_shaders(struct si_context *sctx) if (r) return false; si_pm4_bind_state(sctx, es, sctx->vs_shader.current->pm4); + + si_pm4_bind_state(sctx, ls, NULL); + si_pm4_bind_state(sctx, hs, NULL); } else { /* VS as VS */ r = si_shader_select(ctx, &sctx->vs_shader, &compiler_state); @@ -2446,6 +2449,9 @@ bool si_update_shaders(struct si_context *sctx) return false; si_pm4_bind_state(sctx, vs, sctx->vs_shader.current->pm4); si_update_so(sctx, sctx->vs_shader.cso); + + si_pm4_bind_state(sctx, ls, NULL); + si_pm4_bind_state(sctx, hs, NULL); } /* Update GS. */ -- 2.30.2