diff options
author | Tapani Pälli <[email protected]> | 2013-12-12 15:08:59 +0200 |
---|---|---|
committer | Tapani Pälli <[email protected]> | 2013-12-12 17:28:11 +0200 |
commit | 447bb9029f7e03b03e507053b9f63536d8fc74ac (patch) | |
tree | cda0ab8ca2637995300aa4544e0cf733bfead1da /src/glsl/link_uniforms.cpp | |
parent | 33ee2c67c0a4e8f2fefbf37dacabd14918060af5 (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/link_uniforms.cpp')
-rw-r--r-- | src/glsl/link_uniforms.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp index 632167e4993..bda6e4ffb3b 100644 --- a/src/glsl/link_uniforms.cpp +++ b/src/glsl/link_uniforms.cpp @@ -75,7 +75,7 @@ program_resource_visitor::process(ir_variable *var) */ /* Only strdup the name if we actually will need to modify it. */ - if (var->from_named_ifc_block_array) { + if (var->data.from_named_ifc_block_array) { /* lower_named_interface_blocks created this variable by lowering an * interface block array to an array variable. For example if the * original source code was: @@ -108,7 +108,7 @@ program_resource_visitor::process(ir_variable *var) recursion(var->type, &name, new_length, false, NULL); } ralloc_free(name); - } else if (var->from_named_ifc_block_nonarray) { + } else if (var->data.from_named_ifc_block_nonarray) { /* lower_named_interface_blocks created this variable by lowering a * named interface block (non-array) to an ordinary variable. For * example if the original source code was: @@ -408,10 +408,10 @@ public: const struct gl_uniform_block *const block = &prog->UniformBlocks[ubo_block_index]; - assert(var->location != -1); + assert(var->data.location != -1); const struct gl_uniform_buffer_variable *const ubo_var = - &block->Uniforms[var->location]; + &block->Uniforms[var->data.location]; ubo_row_major = ubo_var->RowMajor; ubo_byte_offset = ubo_var->Offset; @@ -640,7 +640,7 @@ link_update_uniform_buffer_variables(struct gl_shader *shader) assert(var->data.mode == ir_var_uniform); if (var->is_interface_instance()) { - var->location = 0; + var->data.location = 0; continue; } @@ -669,13 +669,13 @@ link_update_uniform_buffer_variables(struct gl_shader *shader) if (strncmp(var->name, begin, l) == 0) { found = true; - var->location = j; + var->data.location = j; break; } } else if (!strcmp(var->name, shader->UniformBlocks[i].Uniforms[j].Name)) { found = true; - var->location = j; + var->data.location = j; break; } } |