diff options
author | Kenneth Graunke <[email protected]> | 2012-12-01 23:40:42 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2013-02-28 13:18:59 -0800 |
commit | 1afd33ec054f7c1741a01ce89301355a7074396f (patch) | |
tree | 3b89235482fc0c3df6ab0e724fd1263b97b9ae0f /src/mesa/program | |
parent | f0213b124259804ce8e114575fe9058dffdf5864 (diff) |
glsl: Consolidate ir_expression constructors that use explicit types.
Previously, we had separate constructors for one, two, and four operand
expressions. This patch consolidates them into a single constructor
which uses NULL default parameters.
The unary and binary operator constructors had assertions to verify that
the caller supplied the correct number of operands for the expression,
but the four-operand version did not. Since get_num_operands for
ir_quadop_vector returns the number of vector_elements, we can safely
add that without breaking the semantics of ir_quadop_vector.
This also paves the way for expressions with three operands. Currently,
none can be constructed since get_num_operands() never returns 3.
Reviewed-by: Matt Turner <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Signed-off-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/program')
0 files changed, 0 insertions, 0 deletions