Mesa (master): glsl: fix broken indentation in do_structure_splitting()

Samuel Pitoiset hakzsam at kemper.freedesktop.org
Thu Jun 1 09:55:03 UTC 2017


Module: Mesa
Branch: master
Commit: 71efec290c8b28fa25c50a923b30a60cc38b934c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=71efec290c8b28fa25c50a923b30a60cc38b934c

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Thu May 25 18:29:50 2017 +0200

glsl: fix broken indentation in do_structure_splitting()

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>

---

 src/compiler/glsl/opt_structure_splitting.cpp | 29 ++++++++++++---------------
 1 file changed, 13 insertions(+), 16 deletions(-)

diff --git a/src/compiler/glsl/opt_structure_splitting.cpp b/src/compiler/glsl/opt_structure_splitting.cpp
index f4c129e625..eac98b74cc 100644
--- a/src/compiler/glsl/opt_structure_splitting.cpp
+++ b/src/compiler/glsl/opt_structure_splitting.cpp
@@ -316,13 +316,13 @@ do_structure_splitting(exec_list *instructions)
    /* Trim out variables we can't split. */
    foreach_in_list_safe(variable_entry, entry, &refs.variable_list) {
       if (debug) {
-	 printf("structure %s@%p: decl %d, whole_access %d\n",
-		entry->var->name, (void *) entry->var, entry->declaration,
-		entry->whole_structure_access);
+         printf("structure %s@%p: decl %d, whole_access %d\n",
+                entry->var->name, (void *) entry->var, entry->declaration,
+                entry->whole_structure_access);
       }
 
       if (!entry->declaration || entry->whole_structure_access) {
-	 entry->remove();
+         entry->remove();
       }
    }
 
@@ -339,20 +339,17 @@ do_structure_splitting(exec_list *instructions)
 
       entry->mem_ctx = ralloc_parent(entry->var);
 
-      entry->components = ralloc_array(mem_ctx,
-				       ir_variable *,
-				       type->length);
+      entry->components = ralloc_array(mem_ctx, ir_variable *, type->length);
 
       for (unsigned int i = 0; i < entry->var->type->length; i++) {
-	 const char *name = ralloc_asprintf(mem_ctx, "%s_%s",
-					    entry->var->name,
-					    type->fields.structure[i].name);
-
-	 entry->components[i] =
-	    new(entry->mem_ctx) ir_variable(type->fields.structure[i].type,
-					    name,
-					    (ir_variable_mode) entry->var->data.mode);
-	 entry->var->insert_before(entry->components[i]);
+         const char *name = ralloc_asprintf(mem_ctx, "%s_%s", entry->var->name,
+                                            type->fields.structure[i].name);
+
+         entry->components[i] =
+            new(entry->mem_ctx) ir_variable(type->fields.structure[i].type,
+                                            name,
+                                            (ir_variable_mode) entry->var->data.mode);
+         entry->var->insert_before(entry->components[i]);
       }
 
       entry->var->remove();




More information about the mesa-commit mailing list