aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2016-02-19 09:18:41 +0100
committerIago Toral Quiroga <[email protected]>2016-02-19 14:16:05 +0100
commitd1617b4088aafc58affde4e348f66c0d45286735 (patch)
treeae2f26a0f1bcdabb069db5b74071628bc3129384 /src
parentad22886ef12907409c621c92aafb56c1ceb047a5 (diff)
glsl: Mark float constants as such
So we don't generate double to float conversion code Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/glsl/ast_function.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/glsl/ast_function.cpp b/src/compiler/glsl/ast_function.cpp
index 238993e24d0..2ed61de0b9f 100644
--- a/src/compiler/glsl/ast_function.cpp
+++ b/src/compiler/glsl/ast_function.cpp
@@ -1484,12 +1484,12 @@ emit_inline_matrix_constructor(const glsl_type *type,
for (/* empty */; col < var->type->matrix_columns; col++) {
ir_constant_data ident;
- ident.f[0] = 0.0;
- ident.f[1] = 0.0;
- ident.f[2] = 0.0;
- ident.f[3] = 0.0;
+ ident.f[0] = 0.0f;
+ ident.f[1] = 0.0f;
+ ident.f[2] = 0.0f;
+ ident.f[3] = 0.0f;
- ident.f[col] = 1.0;
+ ident.f[col] = 1.0f;
ir_rvalue *const rhs = new(ctx) ir_constant(col_type, &ident);