summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-01-08 15:25:36 +1100
committerTimothy Arceri <[email protected]>2016-01-11 09:18:45 +1100
commite4c5ace6a92f84b9b04cf7a85617da4aee6eb3e2 (patch)
treee4c0f46201663326eccc8cb143c736d3905a77ee /src/glsl
parent7b4f8c827d07032eab6a82b7fb7f6574084aacf6 (diff)
glsl: combine if blocks
Reviewed-by: Edward O'Callaghan <[email protected]>
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/link_uniforms.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp
index 47bb7717f84..33b2d4c8646 100644
--- a/src/glsl/link_uniforms.cpp
+++ b/src/glsl/link_uniforms.cpp
@@ -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.