glsl: combine if blocks
authorTimothy Arceri <timothy.arceri@collabora.com>
Fri, 8 Jan 2016 04:25:36 +0000 (15:25 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Sun, 10 Jan 2016 22:18:45 +0000 (09:18 +1100)
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
src/glsl/link_uniforms.cpp

index 47bb7717f845e7da701bfb167d8eaf5416dd8889..33b2d4c8646bd417a8fdd7524208b7b99f6e20ca 100644 (file)
@@ -532,6 +532,8 @@ public:
           */
          if (var->is_interface_instance()) {
             ubo_byte_offset = 0;
+            process(var->get_interface_type(),
+                    var->get_interface_type()->name);
          } else {
             const struct gl_uniform_block *const block =
                &prog->BufferInterfaceBlocks[ubo_block_index];
@@ -542,13 +544,8 @@ public:
                &block->Uniforms[var->data.location];
 
             ubo_byte_offset = ubo_var->Offset;
-         }
-
-         if (var->is_interface_instance())
-            process(var->get_interface_type(),
-                    var->get_interface_type()->name);
-         else
             process(var);
+         }
       } else {
          /* Store any explicit location and reset data location so we can
           * reuse this variable for storing the uniform slot number.