[Mesa-dev] [PATCH 14/21] glsl: Add a new ir_builder::dotlike() function.

Matt Turner mattst88 at gmail.com
Wed Sep 4 19:11:23 PDT 2013


On Wed, Sep 4, 2013 at 3:22 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> dotlike() uses ir_binop_mul for scalars, and ir_binop_dot for vectors.
>
> When generating built-in functions, we often want to use regular
> multiply for scalar signatures, and dot() for vector signatures.
> ir_binop_dot only works on vectors, so we have to switch opcodes,
> even if the code is otherwise identical.  dotlike() makes this easy.

Why not just make dot() do this?


More information about the mesa-dev mailing list