glsl: Allow dot() on scalars, and throw out dotlike().
authorMatt Turner <mattst88@gmail.com>
Sun, 2 Mar 2014 18:34:45 +0000 (10:34 -0800)
committerMatt Turner <mattst88@gmail.com>
Wed, 19 Mar 2014 06:20:29 +0000 (23:20 -0700)
commitc049dd4396d1639859810d6124faa863dae61d1b
tree047633ec813c5f55e9f2e56397e1d0e932d2edca
parent6cbc64c3cb416fadad6e80042e24cd1e1b682897
glsl: Allow dot() on scalars, and throw out dotlike().

In all uses of dotlike() we're writing generic code that operates on 1-4
component vectors. That our IR requires ir_binop_dot expressions'
operands to be 2+ component vectors is an implementation detail that's
not important when implementing built-in functions with dot(), which is
defined for scalar floats in GLSL.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/glsl/builtin_functions.cpp
src/glsl/ir_builder.cpp
src/glsl/ir_builder.h