OSDN Git Service

radeonsi: move BCOLOR PS input locations after all other inputs
authorMarek Olšák <marek.olsak@amd.com>
Sat, 2 Jan 2016 01:54:29 +0000 (02:54 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 9 Feb 2016 20:19:51 +0000 (21:19 +0100)
commit6dda2455c88a752d513d842cc9be1833fe98a89c
tree5fece251010829a80a88c4c4c46e93415af53087
parent606e4185f331ad37e6c20bc1063bff7cb2420e29
radeonsi: move BCOLOR PS input locations after all other inputs

BCOLOR inputs were immediately after COLOR inputs. Thus, all following inputs
were offset by 1 if color_two_side was enabled, and not offset if it was not
enabled, which is a variation that's problematic if we want to have 1 variant
per shader and the variant doesn't care about color_two_side (that should be
handled by other bytecode attached at the beginning).

Instead, move BCOLOR inputs after all other inputs, so BCOLOR0 is at location
"num_inputs" if it's present. BCOLOR1 is next.

This also allows removing si_shader::nparam and
si_shader::ps_input_param_offset, which are useless now.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_shader.c
src/gallium/drivers/radeonsi/si_shader.h
src/gallium/drivers/radeonsi/si_state_shaders.c