From 447bb9029f7e03b03e507053b9f63536d8fc74ac Mon Sep 17 00:00:00 2001 From: Tapani Pälli Date: Thu, 12 Dec 2013 15:08:59 +0200 Subject: glsl: move variables in to ir_variable::data, part II MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch moves following bitfields and variables to the data structure: explicit_location, explicit_index, explicit_binding, has_initializer, is_unmatched_generic_inout, location_frac, from_named_ifc_block_nonarray, from_named_ifc_block_array, depth_layout, location, index, binding, max_array_access, atomic Signed-off-by: Tapani Pälli Reviewed-by: Paul Berry --- src/glsl/ir.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/glsl/ir.cpp') diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp index 980c2015573..04a7b874a9d 100644 --- a/src/glsl/ir.cpp +++ b/src/glsl/ir.cpp @@ -1579,21 +1579,21 @@ ir_swizzle::variable_referenced() const ir_variable::ir_variable(const struct glsl_type *type, const char *name, ir_variable_mode mode) - : max_array_access(0), max_ifc_array_access(NULL), atomic() + : max_ifc_array_access(NULL) { this->ir_type = ir_type_variable; this->type = type; this->name = ralloc_strdup(this, name); - this->explicit_location = false; - this->has_initializer = false; - this->location = -1; - this->location_frac = 0; + this->data.explicit_location = false; + this->data.has_initializer = false; + this->data.location = -1; + this->data.location_frac = 0; this->warn_extension = NULL; this->constant_value = NULL; this->constant_initializer = NULL; this->data.origin_upper_left = false; this->data.pixel_center_integer = false; - this->depth_layout = ir_depth_layout_none; + this->data.depth_layout = ir_depth_layout_none; this->data.used = false; this->data.read_only = false; this->data.centroid = false; @@ -1602,6 +1602,9 @@ ir_variable::ir_variable(const struct glsl_type *type, const char *name, this->data.how_declared = ir_var_declared_normally; this->data.mode = mode; this->data.interpolation = INTERP_QUALIFIER_NONE; + this->data.max_array_access = 0; + this->data.atomic.buffer_index = 0; + this->data.atomic.offset = 0; if (type != NULL) { if (type->base_type == GLSL_TYPE_SAMPLER) @@ -1635,7 +1638,7 @@ ir_variable::determine_interpolation_mode(bool flat_shade) { if (this->data.interpolation != INTERP_QUALIFIER_NONE) return (glsl_interp_qualifier) this->data.interpolation; - int location = this->location; + int location = this->data.location; bool is_gl_Color = location == VARYING_SLOT_COL0 || location == VARYING_SLOT_COL1; if (flat_shade && is_gl_Color) -- cgit v1.2.3