Skip to content

shader: Fix fragment interpolants fill

fill_fragment_interpolants() used to have its own logic to find interpolants, but the context also had num_interps member, which is determined with a different logic. In particular, emit_ios_fs() does not emit interpolants when GL ES is being used and there is no available color in bits, resulting in smaller num_interps.

To eliminate the possibility of this kind of inconsistency, replace num_interps with interp_input_mask, which is a bitmask of the inputs. fill_fragment_interpolants() can later query the member to find interpolants actually created. num_interps used to track the outputs as well, but we do not need another bitmask for the outputs because nobody is currently interested in that.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>

Merge request reports