r600g: move SPI setup to PS setup
authorVadim Girlin <vadimgirlin@gmail.com>
Fri, 4 Nov 2011 17:24:03 +0000 (21:24 +0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 4 Nov 2011 20:23:24 +0000 (16:23 -0400)
commit9804cf3118ae7249098af2a9c78b36f4fb576ee4
treed7ccba7d7cafe243a783b6013ca1663e6de179a9
parentc15f8569fddac5f8aee77863922fd5bb992cfe8a
r600g: move SPI setup to PS setup

SPI semantic indices for PS/VS are now static, so we don't
need to update spi config for every shaders combination. We can move
the functionality of r600_spi_update to r600(evergreen)_pipe_shader_ps.

Flatshade state is now controlled by the global FLAT_SHADE_ENA flag
instead of updating FLAT_SHADE for all inputs.

Sprite coord still requires the update of spi setup when
sprite_coord_enable is first changed from zero (enabled), and then
only when it's changed to other non-zero value (enabled for other input).
Change to zero (disabling) and back to the same value is handled via
global SPRITE_COORD_ENA.

New field "sprite_coord_enable" added to "struct r600_pipe_shader"
to track current state for the pixel shader. It's checked in the
r600_update_derived_state.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_pipe.h
src/gallium/drivers/r600/r600_state.c
src/gallium/drivers/r600/r600_state_common.c