[Mesa-dev] [PATCH 9/9] glsl: simplify an assertion in lower_ubo_reference

Nicolai Hähnle nhaehnle at gmail.com
Mon May 15 09:27:33 UTC 2017


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

Struct types are now equal when they're structurally equal.
---
 src/compiler/glsl/lower_ubo_reference.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/glsl/lower_ubo_reference.cpp b/src/compiler/glsl/lower_ubo_reference.cpp
index 7118845..163c25e 100644
--- a/src/compiler/glsl/lower_ubo_reference.cpp
+++ b/src/compiler/glsl/lower_ubo_reference.cpp
@@ -886,21 +886,21 @@ lower_ubo_reference_visitor::check_for_buffer_struct_copy(ir_assignment *ir)
     * register pressure
     */
    ir_dereference *rhs_deref = ir->rhs->as_dereference();
    if (!rhs_deref)
       return false;
 
    ir_dereference *lhs_deref = ir->lhs->as_dereference();
    if (!lhs_deref)
       return false;
 
-   assert(lhs_deref->type->record_compare(rhs_deref->type));
+   assert(lhs_deref->type == rhs_deref->type);
    void *mem_ctx = ralloc_parent(shader->ir);
 
    for (unsigned i = 0; i < lhs_deref->type->length; i++) {
       const char *field_name = lhs_deref->type->fields.structure[i].name;
       ir_dereference *lhs_field =
          new(mem_ctx) ir_dereference_record(lhs_deref->clone(mem_ctx, NULL),
                                             field_name);
       ir_dereference *rhs_field =
          new(mem_ctx) ir_dereference_record(rhs_deref->clone(mem_ctx, NULL),
                                             field_name);
-- 
2.9.3



More information about the mesa-dev mailing list