diff options
author | Samuel Pitoiset <[email protected]> | 2017-04-21 10:53:32 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-04-21 19:34:12 +0200 |
commit | cacc823c39044307e6befe12c3f51317f09973e2 (patch) | |
tree | acf639a236ced06911c76517b9637d7f722460e9 /src/compiler/glsl/ir_expression_operation.py | |
parent | 100721959bb400f16e42aada6ee8215458b9fcdd (diff) |
glsl: make use of glsl_type::is_double()
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Reviewed-by: Edward O'Callaghan <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ir_expression_operation.py')
-rw-r--r-- | src/compiler/glsl/ir_expression_operation.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/glsl/ir_expression_operation.py b/src/compiler/glsl/ir_expression_operation.py index 1d29560733e..d5e596b9179 100644 --- a/src/compiler/glsl/ir_expression_operation.py +++ b/src/compiler/glsl/ir_expression_operation.py @@ -180,7 +180,7 @@ constant_template_mul = mako.template.Template("""\ for (unsigned j = 0; j < p; j++) { for (unsigned i = 0; i < n; i++) { for (unsigned k = 0; k < m; k++) { - if (op[0]->type->base_type == GLSL_TYPE_DOUBLE) + if (op[0]->type->is_double()) data.d[i+n*j] += op[0]->value.d[i+n*k]*op[1]->value.d[k+m*j]; else data.f[i+n*j] += op[0]->value.f[i+n*k]*op[1]->value.f[k+m*j]; @@ -277,11 +277,11 @@ constant_template_vector = mako.template.Template("""\ constant_template_lrp = mako.template.Template("""\ case ${op.get_enum_name()}: { assert(op[0]->type->base_type == GLSL_TYPE_FLOAT || - op[0]->type->base_type == GLSL_TYPE_DOUBLE); + op[0]->type->is_double()); assert(op[1]->type->base_type == GLSL_TYPE_FLOAT || - op[1]->type->base_type == GLSL_TYPE_DOUBLE); + op[1]->type->is_double()); assert(op[2]->type->base_type == GLSL_TYPE_FLOAT || - op[2]->type->base_type == GLSL_TYPE_DOUBLE); + op[2]->type->is_double()); unsigned c2_inc = op[2]->type->is_scalar() ? 0 : 1; for (unsigned c = 0, c2 = 0; c < components; c2 += c2_inc, c++) { |