X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fglsl%2Flower_vector.cpp;h=a658410ae6fd20e0a894b35ad3658fb3db59faf3;hb=9b387b5d3f4103c51079ea5298d33086af6da433;hp=93c37638bbd4eb7397cbcc61a49b65ac45169ce0;hpb=a172368ef1500fd2c7c1e55133e8e098b73d97a5;p=mesa.git diff --git a/src/glsl/lower_vector.cpp b/src/glsl/lower_vector.cpp index 93c37638bbd..a658410ae6f 100644 --- a/src/glsl/lower_vector.cpp +++ b/src/glsl/lower_vector.cpp @@ -31,9 +31,11 @@ #include "ir.h" #include "ir_rvalue_visitor.h" +namespace { + class lower_vector_visitor : public ir_rvalue_visitor { public: - lower_vector_visitor() : progress(false) + lower_vector_visitor() : dont_lower_swz(false), progress(false) { /* empty */ } @@ -48,6 +50,8 @@ public: bool progress; }; +} /* anonymous namespace */ + /** * Determine if an IR expression tree looks like an extended swizzle * @@ -125,7 +129,7 @@ lower_vector_visitor::handle_rvalue(ir_rvalue **rvalue) if (this->dont_lower_swz && is_extended_swizzle(expr)) return; - /* FINISHME: Is this the right thing to use for the talloc context? + /* FINISHME: Is this the right thing to use for the ralloc context? */ void *const mem_ctx = expr; @@ -183,7 +187,7 @@ lower_vector_visitor::handle_rvalue(ir_rvalue **rvalue) if (assigned > 0) { ir_constant *const c = new(mem_ctx) ir_constant(glsl_type::get_instance(expr->type->base_type, - assigned, 0), + assigned, 1), &d); ir_dereference *const lhs = new(mem_ctx) ir_dereference_variable(temp); ir_assignment *const assign =