diff options
author | Chia-I Wu <[email protected]> | 2013-06-24 14:13:33 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2013-06-25 13:51:58 +0800 |
commit | 9b18df6e087a4db8ed5ed38bcc6b1db34fa95586 (patch) | |
tree | 677fc49af1f7b06ebce449dc39f2e56e42252ace /src/gallium/drivers/ilo/ilo_state.c | |
parent | c4fa24ff0873b7b9a5c4dacbd2c130788e88ad35 (diff) |
ilo: move SBE setup code to ilo_shader.c
Add ilo_shader_select_kernel_routing() to construct 3DSTATE_SBE. It is called
in ilo_finalize_states(), rather than in create_fs_state(), as it depends on
VS/GS and rasterizer states.
With this change, ilo_shader_internal.h is no longer needed for
ilo_gpe_gen6.c.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_state.c')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_state.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/ilo/ilo_state.c b/src/gallium/drivers/ilo/ilo_state.c index 58894f288ff..7046a69890c 100644 --- a/src/gallium/drivers/ilo/ilo_state.c +++ b/src/gallium/drivers/ilo/ilo_state.c @@ -72,6 +72,14 @@ finalize_shader_states(struct ilo_context *ilo) /* mark the state dirty if a new kernel is selected */ ilo->dirty |= state; } + + /* need to setup SBE for FS */ + if (type == PIPE_SHADER_FRAGMENT && ilo->dirty & + (state | ILO_DIRTY_GS | ILO_DIRTY_VS | ILO_DIRTY_RASTERIZER)) { + if (ilo_shader_select_kernel_routing(shader, + (ilo->gs) ? ilo->gs : ilo->vs, ilo->rasterizer)) + ilo->dirty |= state; + } } } |