From 1349dd16ff4f0e40e9ecefcb818302752cd0bf38 Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Sat, 2 Apr 2016 13:19:42 +0200 Subject: radeonsi: only emit compute shader state when switching shaders MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v2: - Do check if anything changed earlier - Use emitted_program instead of emitted_bo to prevent shaders with shader->bo = NULL confusing the check - Use radeon_set_sh_reg* Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Marek Olšák Reviewed-by: Nicolai Hähnle Reviewed-by: Edward O'Callaghan --- src/gallium/drivers/radeonsi/si_pipe.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gallium/drivers/radeonsi/si_pipe.h') diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index d752c0c7fbd..ff60dcf67dc 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -133,6 +133,8 @@ struct si_sampler_state { struct si_cs_shader_state { struct si_compute *program; + struct si_compute *emitted_program; + unsigned offset; bool initialized; }; -- cgit v1.2.3