[Mesa-dev] [PATCH 4/6] glsl: remove remaining tabs in link_uniform_initializers.cpp

Timothy Arceri timothy.arceri at collabora.com
Sun Jul 24 23:36:21 UTC 2016


---
 src/compiler/glsl/link_uniform_initializers.cpp | 78 ++++++++++++-------------
 1 file changed, 39 insertions(+), 39 deletions(-)

diff --git a/src/compiler/glsl/link_uniform_initializers.cpp b/src/compiler/glsl/link_uniform_initializers.cpp
index 1d7c207..db5e899 100644
--- a/src/compiler/glsl/link_uniform_initializers.cpp
+++ b/src/compiler/glsl/link_uniform_initializers.cpp
@@ -46,31 +46,31 @@ get_storage(struct gl_shader_program *prog, const char *name)
 
 void
 copy_constant_to_storage(union gl_constant_value *storage,
-			 const ir_constant *val,
-			 const enum glsl_base_type base_type,
+                         const ir_constant *val,
+                         const enum glsl_base_type base_type,
                          const unsigned int elements,
                          unsigned int boolean_true)
 {
    for (unsigned int i = 0; i < elements; i++) {
       switch (base_type) {
       case GLSL_TYPE_UINT:
-	 storage[i].u = val->value.u[i];
-	 break;
+         storage[i].u = val->value.u[i];
+         break;
       case GLSL_TYPE_INT:
       case GLSL_TYPE_SAMPLER:
-	 storage[i].i = val->value.i[i];
-	 break;
+         storage[i].i = val->value.i[i];
+         break;
       case GLSL_TYPE_FLOAT:
-	 storage[i].f = val->value.f[i];
-	 break;
+         storage[i].f = val->value.f[i];
+         break;
       case GLSL_TYPE_DOUBLE:
          /* XXX need to check on big-endian */
          storage[i * 2].u = *(uint32_t *)&val->value.d[i];
          storage[i * 2 + 1].u = *(((uint32_t *)&val->value.d[i]) + 1);
          break;
       case GLSL_TYPE_BOOL:
-	 storage[i].b = val->value.b[i] ? boolean_true : 0;
-	 break;
+         storage[i].b = val->value.b[i] ? boolean_true : 0;
+         break;
       case GLSL_TYPE_ARRAY:
       case GLSL_TYPE_STRUCT:
       case GLSL_TYPE_IMAGE:
@@ -80,11 +80,11 @@ copy_constant_to_storage(union gl_constant_value *storage,
       case GLSL_TYPE_SUBROUTINE:
       case GLSL_TYPE_FUNCTION:
       case GLSL_TYPE_ERROR:
-	 /* All other types should have already been filtered by other
-	  * paths in the caller.
-	  */
-	 assert(!"Should not get here.");
-	 break;
+         /* All other types should have already been filtered by other
+          * paths in the caller.
+          */
+         assert(!"Should not get here.");
+         break;
       }
    }
 }
@@ -103,9 +103,9 @@ set_opaque_binding(void *mem_ctx, gl_shader_program *prog,
       const glsl_type *const element_type = type->fields.array;
 
       for (unsigned int i = 0; i < type->length; i++) {
-	 const char *element_name = ralloc_asprintf(mem_ctx, "%s[%d]", name, i);
+         const char *element_name = ralloc_asprintf(mem_ctx, "%s[%d]", name, i);
 
-	 set_opaque_binding(mem_ctx, prog, element_type,
+         set_opaque_binding(mem_ctx, prog, element_type,
                             element_name, binding);
       }
    } else {
@@ -173,7 +173,7 @@ set_block_binding(gl_shader_program *prog, const char *block_name,
 
 void
 set_uniform_initializer(void *mem_ctx, gl_shader_program *prog,
-			const char *name, const glsl_type *type,
+                        const char *name, const glsl_type *type,
                         ir_constant *val, unsigned int boolean_true)
 {
    const glsl_type *t_without_array = type->without_array();
@@ -183,12 +183,12 @@ set_uniform_initializer(void *mem_ctx, gl_shader_program *prog,
       field_constant = (ir_constant *)val->components.get_head();
 
       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,
-					    type->fields.structure[i].name);
-	 set_uniform_initializer(mem_ctx, prog, field_name,
+         const glsl_type *field_type = type->fields.structure[i].type;
+         const char *field_name = ralloc_asprintf(mem_ctx, "%s.%s", name,
+                                            type->fields.structure[i].name);
+         set_uniform_initializer(mem_ctx, prog, field_name,
                                  field_type, field_constant, boolean_true);
-	 field_constant = (ir_constant *)field_constant->next;
+         field_constant = (ir_constant *)field_constant->next;
       }
       return;
    } else if (t_without_array->is_record() ||
@@ -196,9 +196,9 @@ set_uniform_initializer(void *mem_ctx, gl_shader_program *prog,
       const glsl_type *const element_type = type->fields.array;
 
       for (unsigned int i = 0; i < type->length; i++) {
-	 const char *element_name = ralloc_asprintf(mem_ctx, "%s[%d]", name, i);
+         const char *element_name = ralloc_asprintf(mem_ctx, "%s[%d]", name, i);
 
-	 set_uniform_initializer(mem_ctx, prog, element_name,
+         set_uniform_initializer(mem_ctx, prog, element_name,
                                  element_type, val->array_elements[i],
                                  boolean_true);
       }
@@ -212,25 +212,25 @@ set_uniform_initializer(void *mem_ctx, gl_shader_program *prog,
 
    if (val->type->is_array()) {
       const enum glsl_base_type base_type =
-	 val->array_elements[0]->type->base_type;
+         val->array_elements[0]->type->base_type;
       const unsigned int elements = val->array_elements[0]->type->components();
       unsigned int idx = 0;
       unsigned dmul = glsl_base_type_is_64bit(base_type) ? 2 : 1;
 
       assert(val->type->length >= storage->array_elements);
       for (unsigned int i = 0; i < storage->array_elements; i++) {
-	 copy_constant_to_storage(& storage->storage[idx],
-				  val->array_elements[i],
-				  base_type,
+         copy_constant_to_storage(& storage->storage[idx],
+                                  val->array_elements[i],
+                                  base_type,
                                   elements,
                                   boolean_true);
 
-	 idx += elements * dmul;
+         idx += elements * dmul;
       }
    } else {
       copy_constant_to_storage(storage->storage,
-			       val,
-			       val->type->base_type,
+                               val,
+                               val->type->base_type,
                                val->type->components(),
                                boolean_true);
 
@@ -259,17 +259,17 @@ link_set_uniform_initializers(struct gl_shader_program *prog,
       struct gl_linked_shader *shader = prog->_LinkedShaders[i];
 
       if (shader == NULL)
-	 continue;
+         continue;
 
       foreach_in_list(ir_instruction, node, shader->ir) {
-	 ir_variable *const var = node->as_variable();
+         ir_variable *const var = node->as_variable();
 
-	 if (!var || (var->data.mode != ir_var_uniform &&
-	     var->data.mode != ir_var_shader_storage))
-	    continue;
+         if (!var || (var->data.mode != ir_var_uniform &&
+             var->data.mode != ir_var_shader_storage))
+            continue;
 
-	 if (!mem_ctx)
-	    mem_ctx = ralloc_context(NULL);
+         if (!mem_ctx)
+            mem_ctx = ralloc_context(NULL);
 
          if (var->data.explicit_binding) {
             const glsl_type *const type = var->type;
-- 
2.7.4



More information about the mesa-dev mailing list