aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glsl')
-rw-r--r--mesalib/src/glsl/ast_to_hir.cpp2
-rw-r--r--mesalib/src/glsl/ir.cpp2
-rw-r--r--mesalib/src/glsl/ir_builder.cpp2
-rw-r--r--mesalib/src/glsl/ir_builder.h2
-rw-r--r--mesalib/src/glsl/lower_mat_op_to_vec.cpp8
-rw-r--r--mesalib/src/glsl/lower_vec_index_to_cond_assign.cpp4
-rw-r--r--mesalib/src/glsl/lower_vec_index_to_swizzle.cpp2
7 files changed, 11 insertions, 11 deletions
diff --git a/mesalib/src/glsl/ast_to_hir.cpp b/mesalib/src/glsl/ast_to_hir.cpp
index 5157661b3..d450aa1e4 100644
--- a/mesalib/src/glsl/ast_to_hir.cpp
+++ b/mesalib/src/glsl/ast_to_hir.cpp
@@ -4058,7 +4058,7 @@ ast_uniform_block::hir(exec_list *instructions,
decl_list->hir(&declared_variables, state);
foreach_list_const(node, &declared_variables) {
- struct ir_variable *var = (ir_variable *)node;
+ ir_variable *var = (ir_variable *)node;
struct gl_uniform_buffer_variable *ubo_var =
&ubo->Uniforms[ubo->NumUniforms++];
diff --git a/mesalib/src/glsl/ir.cpp b/mesalib/src/glsl/ir.cpp
index 1c7aadaca..7b0a487b6 100644
--- a/mesalib/src/glsl/ir.cpp
+++ b/mesalib/src/glsl/ir.cpp
@@ -780,7 +780,7 @@ ir_constant::get_float_component(unsigned i) const
case GLSL_TYPE_UINT: return (float) this->value.u[i];
case GLSL_TYPE_INT: return (float) this->value.i[i];
case GLSL_TYPE_FLOAT: return this->value.f[i];
- case GLSL_TYPE_BOOL: return this->value.b[i] ? 1.0 : 0.0;
+ case GLSL_TYPE_BOOL: return this->value.b[i] ? 1.0f : 0.0f;
default: assert(!"Should not get here."); break;
}
diff --git a/mesalib/src/glsl/ir_builder.cpp b/mesalib/src/glsl/ir_builder.cpp
index d96e25c18..c62f0b115 100644
--- a/mesalib/src/glsl/ir_builder.cpp
+++ b/mesalib/src/glsl/ir_builder.cpp
@@ -77,7 +77,7 @@ swizzle(operand a, int swizzle, int components)
}
ir_swizzle *
-swizzle_for_size(operand a, int components)
+swizzle_for_size(operand a, unsigned components)
{
void *mem_ctx = ralloc_parent(a.val);
diff --git a/mesalib/src/glsl/ir_builder.h b/mesalib/src/glsl/ir_builder.h
index 7a0a196ee..067858df4 100644
--- a/mesalib/src/glsl/ir_builder.h
+++ b/mesalib/src/glsl/ir_builder.h
@@ -94,7 +94,7 @@ ir_expression *saturate(operand a);
/**
* Swizzle away later components, but preserve the ordering.
*/
-ir_swizzle *swizzle_for_size(operand a, int components);
+ir_swizzle *swizzle_for_size(operand a, unsigned components);
ir_swizzle *swizzle_xxxx(operand a);
ir_swizzle *swizzle_yyyy(operand a);
diff --git a/mesalib/src/glsl/lower_mat_op_to_vec.cpp b/mesalib/src/glsl/lower_mat_op_to_vec.cpp
index a371afc14..08cae29fa 100644
--- a/mesalib/src/glsl/lower_mat_op_to_vec.cpp
+++ b/mesalib/src/glsl/lower_mat_op_to_vec.cpp
@@ -122,7 +122,7 @@ ir_mat_op_to_vec_visitor::do_mul_mat_mat(ir_dereference *result,
ir_dereference *a,
ir_dereference *b)
{
- int b_col, i;
+ unsigned b_col, i;
ir_assignment *assign;
ir_expression *expr;
@@ -154,7 +154,7 @@ ir_mat_op_to_vec_visitor::do_mul_mat_vec(ir_dereference *result,
ir_dereference *a,
ir_dereference *b)
{
- int i;
+ unsigned i;
ir_assignment *assign;
ir_expression *expr;
@@ -183,7 +183,7 @@ ir_mat_op_to_vec_visitor::do_mul_vec_mat(ir_dereference *result,
ir_dereference *a,
ir_dereference *b)
{
- int i;
+ unsigned i;
for (i = 0; i < b->type->matrix_columns; i++) {
ir_rvalue *column_result;
@@ -208,7 +208,7 @@ ir_mat_op_to_vec_visitor::do_mul_mat_scalar(ir_dereference *result,
ir_dereference *a,
ir_dereference *b)
{
- int i;
+ unsigned i;
for (i = 0; i < a->type->matrix_columns; i++) {
ir_expression *column_expr;
diff --git a/mesalib/src/glsl/lower_vec_index_to_cond_assign.cpp b/mesalib/src/glsl/lower_vec_index_to_cond_assign.cpp
index fce9c3424..789f62afe 100644
--- a/mesalib/src/glsl/lower_vec_index_to_cond_assign.cpp
+++ b/mesalib/src/glsl/lower_vec_index_to_cond_assign.cpp
@@ -71,7 +71,7 @@ ir_vec_index_to_cond_assign_visitor::convert_vec_index_to_cond_assign(ir_rvalue
ir_assignment *assign;
ir_variable *index, *var;
ir_dereference *deref;
- int i;
+ unsigned i;
if (!orig_deref)
return ir;
@@ -164,7 +164,7 @@ ir_vec_index_to_cond_assign_visitor::visit_leave(ir_assignment *ir)
ir_variable *index, *var;
ir_dereference_variable *deref;
ir_assignment *assign;
- int i;
+ unsigned i;
ir->rhs = convert_vec_index_to_cond_assign(ir->rhs);
if (ir->condition)
diff --git a/mesalib/src/glsl/lower_vec_index_to_swizzle.cpp b/mesalib/src/glsl/lower_vec_index_to_swizzle.cpp
index 46fd6ace1..264d6dc07 100644
--- a/mesalib/src/glsl/lower_vec_index_to_swizzle.cpp
+++ b/mesalib/src/glsl/lower_vec_index_to_swizzle.cpp
@@ -93,7 +93,7 @@ ir_vec_index_to_swizzle_visitor::convert_vec_index_to_swizzle(ir_rvalue *ir)
* large. For simplicity sake, just clamp the index to [0, size-1].
*/
const int i = MIN2(MAX2(ir_constant->value.i[0], 0),
- (deref->array->type->vector_elements - 1));
+ ((int) deref->array->type->vector_elements - 1));
return new(ctx) ir_swizzle(deref->array, i, 0, 0, 0, 1);
}