r300: possibility of merging ADD and MUL into MAD when effectively only 2 sources are used
Consider following snippet of code:
MUL temp2.xy temp0.xy temp1.xy
ADD temp2.z temp0.z temp0.1
Because only 2 sources are used we aren't failing into case of MAD
with macro.
(The same with MUL
+ MOV
or ADD
+ MOV
)
Tagging as always @ondracka
EDIT by @ondracka:
Just adding a list of all the other options we can do together with what is done already (merged in #17560):
-
MOV + MOV -
MOV + ADD -
MOV + MUL -
MOV + MAD (if they share a source or at least one source is None) WIP branch: https://gitlab.freedesktop.org/ondracka/mesa/-/commits/r300_merge_channels2 -
ADD + MUL (if they share a source or at least one source is None) -
ADD + ADD (if they share a source or at least one source is None)