diff options
author | Timothy Arceri <[email protected]> | 2019-03-05 15:05:52 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2019-03-06 13:10:02 +1100 |
commit | 81ee2cd8ba5a0145520e849e20c1a8e43f78c6fa (patch) | |
tree | e48654b4aa6bd70eda71e17eedbe5e1a20143dfa /src/compiler/glsl | |
parent | 272e927d0e9fed6e791d706ff5d895b6c2036fc0 (diff) |
glsl: rename is_record() -> is_struct()
Replace was done using:
find ./src -type f -exec sed -i -- \
's/is_record(/is_struct(/g' {} \;
Acked-by: Karol Herbst <[email protected]>
Acked-by: Jason Ekstrand <[email protected]>
Acked-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r-- | src/compiler/glsl/ast_function.cpp | 4 | ||||
-rw-r--r-- | src/compiler/glsl/ast_to_hir.cpp | 22 | ||||
-rw-r--r-- | src/compiler/glsl/glsl_parser_extras.cpp | 2 | ||||
-rw-r--r-- | src/compiler/glsl/hir_field_selection.cpp | 2 | ||||
-rw-r--r-- | src/compiler/glsl/ir.cpp | 16 | ||||
-rw-r--r-- | src/compiler/glsl/ir_print_visitor.cpp | 4 | ||||
-rw-r--r-- | src/compiler/glsl/link_uniform_blocks.cpp | 4 | ||||
-rw-r--r-- | src/compiler/glsl/link_uniform_initializers.cpp | 4 | ||||
-rw-r--r-- | src/compiler/glsl/link_uniforms.cpp | 30 | ||||
-rw-r--r-- | src/compiler/glsl/link_varyings.cpp | 12 | ||||
-rw-r--r-- | src/compiler/glsl/linker.cpp | 2 | ||||
-rw-r--r-- | src/compiler/glsl/lower_buffer_access.cpp | 8 | ||||
-rw-r--r-- | src/compiler/glsl/lower_packed_varyings.cpp | 4 | ||||
-rw-r--r-- | src/compiler/glsl/lower_ubo_reference.cpp | 2 | ||||
-rw-r--r-- | src/compiler/glsl/opt_structure_splitting.cpp | 4 |
15 files changed, 60 insertions, 60 deletions
diff --git a/src/compiler/glsl/ast_function.cpp b/src/compiler/glsl/ast_function.cpp index 2be7a8c195d..6bd8987cd9b 100644 --- a/src/compiler/glsl/ast_function.cpp +++ b/src/compiler/glsl/ast_function.cpp @@ -2118,7 +2118,7 @@ ast_function_expression::hir(exec_list *instructions, * must have the exact number of arguments with matching types in the * correct order. */ - if (constructor_type->is_record()) { + if (constructor_type->is_struct()) { return process_record_constructor(instructions, constructor_type, &loc, &this->expressions, state); @@ -2458,7 +2458,7 @@ ast_aggregate_initializer::hir(exec_list *instructions, &this->expressions, state); } - if (constructor_type->is_record()) { + if (constructor_type->is_struct()) { return process_record_constructor(instructions, constructor_type, &loc, &this->expressions, state); } diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index 92a9650cc05..68acf2666cc 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -2389,7 +2389,7 @@ precision_qualifier_allowed(const glsl_type *type) const glsl_type *const t = type->without_array(); return (t->is_float() || t->is_integer() || t->contains_opaque()) && - !t->is_record(); + !t->is_struct(); } const glsl_type * @@ -2807,7 +2807,7 @@ validate_xfb_offset_qualifier(YYLTYPE *loc, /* Make sure nested structs don't contain unsized arrays, and validate * any xfb_offsets on interface members. */ - if (t_without_array->is_record() || t_without_array->is_interface()) + if (t_without_array->is_struct() || t_without_array->is_interface()) for (unsigned int i = 0; i < t_without_array->length; i++) { const glsl_type *member_t = t_without_array->fields.structure[i].type; @@ -3691,7 +3691,7 @@ apply_layout_qualifier_to_variable(const struct ast_type_qualifier *qual, const glsl_type *type = var->type->without_array(); unsigned components = type->component_slots(); - if (type->is_matrix() || type->is_record()) { + if (type->is_matrix() || type->is_struct()) { _mesa_glsl_error(loc, state, "component layout qualifier " "cannot be applied to a matrix, a structure, " "a block, or an array containing any of " @@ -5302,15 +5302,15 @@ ast_declarator_list::hir(exec_list *instructions, _mesa_shader_stage_to_string(state->stage)); } if (var->type->is_array() && - var->type->fields.array->is_record()) { + var->type->fields.array->is_struct()) { _mesa_glsl_error(&loc, state, "fragment shader input " "cannot have an array of structs"); } - if (var->type->is_record()) { + if (var->type->is_struct()) { for (unsigned i = 0; i < var->type->length; i++) { if (var->type->fields.structure[i].type->is_array() || - var->type->fields.structure[i].type->is_record()) + var->type->fields.structure[i].type->is_struct()) _mesa_glsl_error(&loc, state, "fragment shader input cannot have " "a struct that contains an " @@ -5337,7 +5337,7 @@ ast_declarator_list::hir(exec_list *instructions, * * A structure */ if (state->stage == MESA_SHADER_FRAGMENT) { - if (check_type->is_record() || check_type->is_matrix()) + if (check_type->is_struct() || check_type->is_matrix()) _mesa_glsl_error(&loc, state, "fragment shader output " "cannot have struct or matrix type"); @@ -5408,16 +5408,16 @@ ast_declarator_list::hir(exec_list *instructions, type = var->type->fields.array; } - if (type->is_array() && type->fields.array->is_record()) { + if (type->is_array() && type->fields.array->is_struct()) { _mesa_glsl_error(&loc, state, "%s shader output cannot have " "an array of structs", _mesa_shader_stage_to_string(state->stage)); } - if (type->is_record()) { + if (type->is_struct()) { for (unsigned i = 0; i < type->length; i++) { if (type->fields.structure[i].type->is_array() || - type->fields.structure[i].type->is_record()) + type->fields.structure[i].type->is_struct()) _mesa_glsl_error(&loc, state, "%s shader output cannot have a " "struct that contains an " @@ -7468,7 +7468,7 @@ ast_process_struct_or_iface_block_members(exec_list *instructions, if (is_interface && layout && (layout->flags.q.uniform || layout->flags.q.buffer) && (field_type->without_array()->is_matrix() - || field_type->without_array()->is_record())) { + || field_type->without_array()->is_struct())) { /* If no layout is specified for the field, inherit the layout * from the block. */ diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index fd3e9e55af1..f2bf9cad16b 100644 --- a/src/compiler/glsl/glsl_parser_extras.cpp +++ b/src/compiler/glsl/glsl_parser_extras.cpp @@ -940,7 +940,7 @@ _mesa_ast_set_aggregate_type(const glsl_type *type, } /* If the aggregate is a struct, recursively set its fields' types. */ - } else if (type->is_record()) { + } else if (type->is_struct()) { exec_node *expr_node = ai->expressions.get_head_raw(); /* Iterate through the struct's fields. */ diff --git a/src/compiler/glsl/hir_field_selection.cpp b/src/compiler/glsl/hir_field_selection.cpp index 9f23643fd02..cb499d43b06 100644 --- a/src/compiler/glsl/hir_field_selection.cpp +++ b/src/compiler/glsl/hir_field_selection.cpp @@ -46,7 +46,7 @@ _mesa_ast_field_selection_to_hir(const ast_expression *expr, YYLTYPE loc = expr->get_location(); if (op->type->is_error()) { /* silently propagate the error */ - } else if (op->type->is_record() || op->type->is_interface()) { + } else if (op->type->is_struct() || op->type->is_interface()) { result = new(ctx) ir_dereference_record(op, expr->primary_expression.identifier); diff --git a/src/compiler/glsl/ir.cpp b/src/compiler/glsl/ir.cpp index 77e37161b74..060bd3ae7f5 100644 --- a/src/compiler/glsl/ir.cpp +++ b/src/compiler/glsl/ir.cpp @@ -754,14 +754,14 @@ ir_constant::ir_constant(const struct glsl_type *type, exec_list *value_list) this->type = type; assert(type->is_scalar() || type->is_vector() || type->is_matrix() - || type->is_record() || type->is_array()); + || type->is_struct() || type->is_array()); /* If the constant is a record, the types of each of the entries in * value_list must be a 1-for-1 match with the structure components. Each * entry must also be a constant. Just move the nodes from the value_list * to the list in the ir_constant. */ - if (type->is_array() || type->is_record()) { + if (type->is_array() || type->is_struct()) { this->const_elements = ralloc_array(this, ir_constant *, type->length); unsigned i = 0; foreach_in_list(ir_constant, value, value_list) { @@ -909,7 +909,7 @@ ir_constant * ir_constant::zero(void *mem_ctx, const glsl_type *type) { assert(type->is_scalar() || type->is_vector() || type->is_matrix() - || type->is_record() || type->is_array()); + || type->is_struct() || type->is_array()); ir_constant *c = new(mem_ctx) ir_constant; c->type = type; @@ -922,7 +922,7 @@ ir_constant::zero(void *mem_ctx, const glsl_type *type) c->const_elements[i] = ir_constant::zero(c, type->fields.array); } - if (type->is_record()) { + if (type->is_struct()) { c->const_elements = ralloc_array(c, ir_constant *, type->length); for (unsigned i = 0; i < type->length; i++) { @@ -1114,7 +1114,7 @@ ir_constant::get_array_element(unsigned i) const ir_constant * ir_constant::get_record_field(int idx) { - assert(this->type->is_record()); + assert(this->type->is_struct()); assert(idx >= 0 && (unsigned) idx < this->type->length); return const_elements[idx]; @@ -1185,7 +1185,7 @@ ir_constant::copy_offset(ir_constant *src, int offset) void ir_constant::copy_masked_offset(ir_constant *src, int offset, unsigned int mask) { - assert (!type->is_array() && !type->is_record()); + assert (!type->is_array() && !type->is_struct()); if (!type->is_vector() && !type->is_matrix()) { offset = 0; @@ -1233,7 +1233,7 @@ ir_constant::has_value(const ir_constant *c) const if (this->type != c->type) return false; - if (this->type->is_array() || this->type->is_record()) { + if (this->type->is_array() || this->type->is_struct()) { for (unsigned i = 0; i < this->type->length; i++) { if (!this->const_elements[i]->has_value(c->const_elements[i])) return false; @@ -1944,7 +1944,7 @@ steal_memory(ir_instruction *ir, void *new_ctx) * visitor, so steal their values by hand. */ if (constant != NULL && - (constant->type->is_array() || constant->type->is_record())) { + (constant->type->is_array() || constant->type->is_struct())) { for (unsigned int i = 0; i < constant->type->length; i++) { steal_memory(constant->const_elements[i], ir); } diff --git a/src/compiler/glsl/ir_print_visitor.cpp b/src/compiler/glsl/ir_print_visitor.cpp index ef6bca1229e..119e3ee1e2e 100644 --- a/src/compiler/glsl/ir_print_visitor.cpp +++ b/src/compiler/glsl/ir_print_visitor.cpp @@ -149,7 +149,7 @@ print_type(FILE *f, const glsl_type *t) fprintf(f, "(array "); print_type(f, t->fields.array); fprintf(f, " %u)", t->length); - } else if (t->is_record() && !is_gl_identifier(t->name)) { + } else if (t->is_struct() && !is_gl_identifier(t->name)) { fprintf(f, "%s@%p", t->name, (void *) t); } else { fprintf(f, "%s", t->name); @@ -469,7 +469,7 @@ void ir_print_visitor::visit(ir_constant *ir) if (ir->type->is_array()) { for (unsigned i = 0; i < ir->type->length; i++) ir->get_array_element(i)->accept(this); - } else if (ir->type->is_record()) { + } else if (ir->type->is_struct()) { for (unsigned i = 0; i < ir->type->length; i++) { fprintf(f, "(%s ", ir->type->fields.structure[i].name); ir->get_record_field(i)->accept(this); diff --git a/src/compiler/glsl/link_uniform_blocks.cpp b/src/compiler/glsl/link_uniform_blocks.cpp index 0b890586298..45f1c0fe98d 100644 --- a/src/compiler/glsl/link_uniform_blocks.cpp +++ b/src/compiler/glsl/link_uniform_blocks.cpp @@ -68,7 +68,7 @@ private: bool row_major, const enum glsl_interface_packing packing) { - assert(type->is_record()); + assert(type->is_struct()); if (packing == GLSL_INTERFACE_PACKING_STD430) this->offset = glsl_align( this->offset, type->std430_base_alignment(row_major)); @@ -81,7 +81,7 @@ private: bool row_major, const enum glsl_interface_packing packing) { - assert(type->is_record()); + assert(type->is_struct()); /* If this is the last field of a structure, apply rule #9. The * ARB_uniform_buffer_object spec says: diff --git a/src/compiler/glsl/link_uniform_initializers.cpp b/src/compiler/glsl/link_uniform_initializers.cpp index 64f47f9913f..61b324592df 100644 --- a/src/compiler/glsl/link_uniform_initializers.cpp +++ b/src/compiler/glsl/link_uniform_initializers.cpp @@ -190,7 +190,7 @@ set_uniform_initializer(void *mem_ctx, gl_shader_program *prog, ir_constant *val, unsigned int boolean_true) { const glsl_type *t_without_array = type->without_array(); - if (type->is_record()) { + if (type->is_struct()) { for (unsigned int i = 0; i < type->length; i++) { const glsl_type *field_type = type->fields.structure[i].type; const char *field_name = ralloc_asprintf(mem_ctx, "%s.%s", name, @@ -200,7 +200,7 @@ set_uniform_initializer(void *mem_ctx, gl_shader_program *prog, boolean_true); } return; - } else if (t_without_array->is_record() || + } else if (t_without_array->is_struct() || (type->is_array() && type->fields.array->is_array())) { const glsl_type *const element_type = type->fields.array; diff --git a/src/compiler/glsl/link_uniforms.cpp b/src/compiler/glsl/link_uniforms.cpp index 13fc603ce7a..8ca140dcaa8 100644 --- a/src/compiler/glsl/link_uniforms.cpp +++ b/src/compiler/glsl/link_uniforms.cpp @@ -46,7 +46,7 @@ void program_resource_visitor::process(const glsl_type *type, const char *name, bool use_std430_as_default) { - assert(type->without_array()->is_record() + assert(type->without_array()->is_struct() || type->without_array()->is_interface()); unsigned record_array_count = 1; @@ -88,7 +88,7 @@ program_resource_visitor::process(ir_variable *var, const glsl_type *var_type, * processing functions because no information is available to do * otherwise. See the warning in linker.h. */ - if (t_without_array->is_record() || + if (t_without_array->is_struct() || (t->is_array() && t->fields.array->is_array())) { char *name = ralloc_strdup(NULL, var->name); recursion(var->type, &name, strlen(name), row_major, NULL, packing, @@ -129,11 +129,11 @@ program_resource_visitor::recursion(const glsl_type *t, char **name, named_ifc_member->name); recursion(named_ifc_member->type, name, name_length, row_major, NULL, packing, false, record_array_count, NULL); - } else if (t->is_record() || t->is_interface()) { - if (record_type == NULL && t->is_record()) + } else if (t->is_struct() || t->is_interface()) { + if (record_type == NULL && t->is_struct()) record_type = t; - if (t->is_record()) + if (t->is_struct()) this->enter_record(t, *name, row_major, packing); for (unsigned i = 0; i < t->length; i++) { @@ -177,14 +177,14 @@ program_resource_visitor::recursion(const glsl_type *t, char **name, record_type = NULL; } - if (t->is_record()) { + if (t->is_struct()) { (*name)[name_length] = '\0'; this->leave_record(t, *name, row_major, packing); } - } else if (t->without_array()->is_record() || + } else if (t->without_array()->is_struct() || t->without_array()->is_interface() || (t->is_array() && t->fields.array->is_array())) { - if (record_type == NULL && t->fields.array->is_record()) + if (record_type == NULL && t->fields.array->is_struct()) record_type = t->fields.array; unsigned length = t->length; @@ -334,7 +334,7 @@ private: const enum glsl_interface_packing, bool /* last_field */) { - assert(!type->without_array()->is_record()); + assert(!type->without_array()->is_struct()); assert(!type->without_array()->is_interface()); assert(!(type->is_array() && type->fields.array->is_array())); @@ -767,7 +767,7 @@ private: bool row_major, const enum glsl_interface_packing packing) { - assert(type->is_record()); + assert(type->is_struct()); if (this->buffer_block_index == -1) return; if (packing == GLSL_INTERFACE_PACKING_STD430) @@ -782,7 +782,7 @@ private: bool row_major, const enum glsl_interface_packing packing) { - assert(type->is_record()); + assert(type->is_struct()); if (this->buffer_block_index == -1) return; if (packing == GLSL_INTERFACE_PACKING_STD430) @@ -798,7 +798,7 @@ private: const enum glsl_interface_packing packing, bool /* last_field */) { - assert(!type->without_array()->is_record()); + assert(!type->without_array()->is_struct()); assert(!type->without_array()->is_interface()); assert(!(type->is_array() && type->fields.array->is_array())); @@ -849,7 +849,7 @@ private: /* Assign explicit locations. */ if (current_var->data.explicit_location) { /* Set sequential locations for struct fields. */ - if (current_var->type->without_array()->is_record() || + if (current_var->type->without_array()->is_struct() || current_var->type->is_array_of_arrays()) { const unsigned entries = MAX2(1, this->uniforms[id].array_elements); this->uniforms[id].remap_location = @@ -1105,10 +1105,10 @@ link_update_uniform_buffer_variables(struct gl_linked_shader *shader, bool found = false; char sentinel = '\0'; - if (var->type->is_record()) { + if (var->type->is_struct()) { sentinel = '.'; } else if (var->type->is_array() && (var->type->fields.array->is_array() - || var->type->without_array()->is_record())) { + || var->type->without_array()->is_struct())) { sentinel = '['; } diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp index 93b3b82b93a..2d17e06240d 100644 --- a/src/compiler/glsl/link_varyings.cpp +++ b/src/compiler/glsl/link_varyings.cpp @@ -79,7 +79,7 @@ create_xfb_varying_names(void *mem_ctx, const glsl_type *t, char **name, create_xfb_varying_names(mem_ctx, ifc_member_t, name, new_length, count, NULL, NULL, varying_names); - } else if (t->is_record()) { + } else if (t->is_struct()) { for (unsigned i = 0; i < t->length; i++) { const char *field = t->fields.structure[i].name; size_t new_length = name_length; @@ -90,7 +90,7 @@ create_xfb_varying_names(void *mem_ctx, const glsl_type *t, char **name, new_length, count, NULL, NULL, varying_names); } - } else if (t->without_array()->is_record() || + } else if (t->without_array()->is_struct() || t->without_array()->is_interface() || (t->is_array() && t->fields.array->is_array())) { for (unsigned i = 0; i < t->length; i++) { @@ -461,7 +461,7 @@ check_location_aliasing(struct explicit_location_info explicit_locations[][4], gl_shader_stage stage) { unsigned last_comp; - if (type->without_array()->is_record()) { + if (type->without_array()->is_struct()) { /* The component qualifier can't be used on structs so just treat * all component slots as used. */ @@ -1619,7 +1619,7 @@ varying_matches::is_varying_packing_safe(const glsl_type *type, producer_stage == MESA_SHADER_TESS_CTRL) return false; - return xfb_enabled && (type->is_array() || type->is_record() || + return xfb_enabled && (type->is_array() || type->is_struct() || type->is_matrix() || var->data.is_xfb_only); } @@ -1926,7 +1926,7 @@ varying_matches::store_locations() const if (enhanced_layouts_enabled) { const glsl_type *type = get_varying_type(producer_var, producer_stage); - if (type->is_array() || type->is_matrix() || type->is_record() || + if (type->is_array() || type->is_matrix() || type->is_struct() || type->is_double()) { unsigned comp_slots = type->component_slots() + offset; unsigned slots = comp_slots / 4; @@ -2158,7 +2158,7 @@ private: const enum glsl_interface_packing, bool /* last_field */) { - assert(!type->without_array()->is_record()); + assert(!type->without_array()->is_struct()); assert(!type->without_array()->is_interface()); tfeedback_candidate *candidate diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index 5a950950b7c..53887ab71da 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -4303,7 +4303,7 @@ get_array_stride(struct gl_context *ctx, struct gl_uniform_storage *uni, if (GLSL_INTERFACE_PACKING_STD140 == iface-> get_internal_ifc_packing(ctx->Const.UseSTD430AsDefaultPacking)) { - if (array_type->is_record() || array_type->is_array()) + if (array_type->is_struct() || array_type->is_array()) return glsl_align(array_type->std140_size(row_major), 16); else return MAX2(array_type->std140_base_alignment(row_major), 16); diff --git a/src/compiler/glsl/lower_buffer_access.cpp b/src/compiler/glsl/lower_buffer_access.cpp index ff6f9c1fcfe..52ffa887c48 100644 --- a/src/compiler/glsl/lower_buffer_access.cpp +++ b/src/compiler/glsl/lower_buffer_access.cpp @@ -63,7 +63,7 @@ lower_buffer_access::emit_access(void *mem_ctx, enum glsl_interface_packing packing, unsigned int write_mask) { - if (deref->type->is_record()) { + if (deref->type->is_struct()) { unsigned int field_offset = 0; for (unsigned i = 0; i < deref->type->length; i++) { @@ -214,7 +214,7 @@ lower_buffer_access::is_dereferenced_thing_row_major(const ir_rvalue *deref) case GLSL_MATRIX_LAYOUT_COLUMN_MAJOR: return false; case GLSL_MATRIX_LAYOUT_ROW_MAJOR: - return matrix || deref->type->without_array()->is_record(); + return matrix || deref->type->without_array()->is_struct(); } break; @@ -241,7 +241,7 @@ lower_buffer_access::is_dereferenced_thing_row_major(const ir_rvalue *deref) case GLSL_MATRIX_LAYOUT_COLUMN_MAJOR: return false; case GLSL_MATRIX_LAYOUT_ROW_MAJOR: - return matrix || deref->type->without_array()->is_record(); + return matrix || deref->type->without_array()->is_struct(); } unreachable("invalid matrix layout"); @@ -414,7 +414,7 @@ lower_buffer_access::setup_buffer_access(void *mem_ctx, * of the member following the sub-structure is rounded up to * the next multiple of the base alignment of the structure." */ - if (type->without_array()->is_record()) { + if (type->without_array()->is_struct()) { intra_struct_offset = glsl_align(intra_struct_offset, field_align); diff --git a/src/compiler/glsl/lower_packed_varyings.cpp b/src/compiler/glsl/lower_packed_varyings.cpp index 5bd6c92ed99..d15a45960b3 100644 --- a/src/compiler/glsl/lower_packed_varyings.cpp +++ b/src/compiler/glsl/lower_packed_varyings.cpp @@ -521,7 +521,7 @@ lower_packed_varyings_visitor::lower_rvalue(ir_rvalue *rvalue, */ assert(!gs_input_toplevel || rvalue->type->is_array()); - if (rvalue->type->is_record()) { + if (rvalue->type->is_struct()) { for (unsigned i = 0; i < rvalue->type->length; i++) { if (i != 0) rvalue = rvalue->clone(this->mem_ctx, NULL); @@ -776,7 +776,7 @@ lower_packed_varyings_visitor::needs_lowering(ir_variable *var) */ const glsl_type *type = var->type; if (disable_varying_packing && !var->data.is_xfb_only && - !((type->is_array() || type->is_record() || type->is_matrix()) && + !((type->is_array() || type->is_struct() || type->is_matrix()) && xfb_enabled)) return false; diff --git a/src/compiler/glsl/lower_ubo_reference.cpp b/src/compiler/glsl/lower_ubo_reference.cpp index 5e1f281174c..5fc936007e8 100644 --- a/src/compiler/glsl/lower_ubo_reference.cpp +++ b/src/compiler/glsl/lower_ubo_reference.cpp @@ -884,7 +884,7 @@ lower_ubo_reference_visitor::check_for_buffer_struct_copy(ir_assignment *ir) return false; /* LHS and RHS must be records */ - if (!ir->lhs->type->is_record() || !ir->rhs->type->is_record()) + if (!ir->lhs->type->is_struct() || !ir->rhs->type->is_struct()) return false; /* RHS must be a buffer-backed variable. This is what can cause the problem diff --git a/src/compiler/glsl/opt_structure_splitting.cpp b/src/compiler/glsl/opt_structure_splitting.cpp index f7562df39c8..c573d07c266 100644 --- a/src/compiler/glsl/opt_structure_splitting.cpp +++ b/src/compiler/glsl/opt_structure_splitting.cpp @@ -103,7 +103,7 @@ ir_structure_reference_visitor::get_variable_entry(ir_variable *var) { assert(var); - if (!var->type->is_record() || + if (!var->type->is_struct() || var->data.mode == ir_var_uniform || var->data.mode == ir_var_shader_storage || var->data.mode == ir_var_shader_in || var->data.mode == ir_var_shader_out) return NULL; @@ -206,7 +206,7 @@ ir_structure_splitting_visitor::get_splitting_entry(ir_variable *var) { assert(var); - if (!var->type->is_record()) + if (!var->type->is_struct()) return NULL; foreach_in_list(variable_entry, entry, this->variable_list) { |