aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2016-07-18 10:58:42 -0700
committerIan Romanick <[email protected]>2016-08-30 16:28:03 -0700
commit822b5c5eb257cccd0fe3939819a3588d18173a23 (patch)
tree078f08f4ba4a79739cc5a66a0da3fc8474b922f9 /src
parentabc81f788343e1780c21ec748153e7bb003cd7e0 (diff)
glsl: Eliminate constant_template2
constant_template_common can now handle the case where the result type is different from the input type by using type_signature_iter. This changes the "shape" of all the cast-style operators, but they should function the same. Signed-off-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/glsl/ir_expression_operation.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/compiler/glsl/ir_expression_operation.py b/src/compiler/glsl/ir_expression_operation.py
index 5979136435e..c718faa9d87 100644
--- a/src/compiler/glsl/ir_expression_operation.py
+++ b/src/compiler/glsl/ir_expression_operation.py
@@ -108,15 +108,6 @@ constant_template_common = mako.template.Template("""\
}
break;""")
-# This template is for unary operations that map an operand of one type to an
-# operand of another type. ir_unop_f2b is an example.
-constant_template2 = mako.template.Template("""\
- case ${op.get_enum_name()}:
- assert(op[0]->type->base_type == ${op.source_types[0].glsl_type});
- for (unsigned c = 0; c < op[0]->type->components(); c++)
- data.${op.dest_type.union_field}[c] = ${op.get_c_expression(op.source_types)};
- break;""")
-
# This template is for binary operations that can operate on some combination
# of scalar and vector operands.
constant_template_vector_scalar = mako.template.Template("""\
@@ -379,8 +370,6 @@ class operation(object):
return constant_template_horizontal_nonassignment.render(op=self)
elif horizontal_operation in self.flags:
return constant_template_horizontal_single_implementation.render(op=self)
- elif self.dest_type is not None and len(self.source_types) == 1:
- return constant_template2.render(op=self)
elif self.num_operands == 2:
if self.name == "mul":
return constant_template_mul.render(op=self)