summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir.cpp
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2013-12-12 15:08:59 +0200
committerTapani Pälli <[email protected]>2013-12-12 17:28:11 +0200
commit447bb9029f7e03b03e507053b9f63536d8fc74ac (patch)
treecda0ab8ca2637995300aa4544e0cf733bfead1da /src/glsl/ir.cpp
parent33ee2c67c0a4e8f2fefbf37dacabd14918060af5 (diff)
glsl: move variables in to ir_variable::data, part II
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 <[email protected]> Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/glsl/ir.cpp')
-rw-r--r--src/glsl/ir.cpp17
1 files changed, 10 insertions, 7 deletions
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)