diff --git a/3rdparty/glsl-optimizer/src/glsl/glsl_optimizer.cpp b/3rdparty/glsl-optimizer/src/glsl/glsl_optimizer.cpp index 69318ee0..f5ceda82 100644 --- a/3rdparty/glsl-optimizer/src/glsl/glsl_optimizer.cpp +++ b/3rdparty/glsl-optimizer/src/glsl/glsl_optimizer.cpp @@ -171,7 +171,7 @@ static void propagate_precision_expr(ir_instruction *ir, void *data) return; glsl_precision prec_params_max = glsl_precision_undefined; - for (int i = 0; i < expr->get_num_operands(); ++i) + for (int i = 0; i < (int)expr->get_num_operands(); ++i) { ir_rvalue* op = expr->operands[i]; if (op && op->get_precision() != glsl_precision_undefined) @@ -317,7 +317,7 @@ glslopt_shader* glslopt_optimize (glslopt_ctx* ctx, glslopt_shader_type type, co { glslopt_shader* shader = new (ctx->mem_ctx) glslopt_shader (); - PrintGlslMode printMode; + PrintGlslMode printMode = kPrintGlslVertex; switch (type) { case kGlslOptShaderVertex: shader->shader->Type = GL_VERTEX_SHADER; printMode = kPrintGlslVertex; break; case kGlslOptShaderFragment: shader->shader->Type = GL_FRAGMENT_SHADER; printMode = kPrintGlslFragment; break; diff --git a/3rdparty/glsl-optimizer/src/glsl/ir.cpp b/3rdparty/glsl-optimizer/src/glsl/ir.cpp index fc00be00..d19de803 100644 --- a/3rdparty/glsl-optimizer/src/glsl/ir.cpp +++ b/3rdparty/glsl-optimizer/src/glsl/ir.cpp @@ -1544,7 +1544,7 @@ ir_swizzle::variable_referenced() const ir_variable::ir_variable(const struct glsl_type *type, const char *name, ir_variable_mode mode, glsl_precision precision) : max_array_access(0), read_only(false), centroid(false), invariant(false), - mode(mode), precision(precision), interpolation(INTERP_QUALIFIER_NONE) + mode(mode), interpolation(INTERP_QUALIFIER_NONE), precision(precision) { this->ir_type = ir_type_variable; this->type = type; diff --git a/3rdparty/glsl-optimizer/src/glsl/ir_validate.cpp b/3rdparty/glsl-optimizer/src/glsl/ir_validate.cpp index f75d05e9..dd9ccdea 100644 --- a/3rdparty/glsl-optimizer/src/glsl/ir_validate.cpp +++ b/3rdparty/glsl-optimizer/src/glsl/ir_validate.cpp @@ -227,6 +227,9 @@ ir_visitor_status ir_validate::visit_leave(ir_expression *ir) { switch (ir->operation) { + case ir_ternop_clamp: + case ir_ternop_mix: + break; case ir_unop_bit_not: assert(ir->operands[0]->type == ir->type); break;