diff options
author | Timothy Arceri <[email protected]> | 2017-07-21 11:42:33 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-07-23 10:06:01 +1000 |
commit | d91108b1f4265d69961df01cc0e02c1f64bccc01 (patch) | |
tree | 7cda1a6c9be762f898adcb86249911d0e862c65f | |
parent | 316b4c9ada2fd0df262d02c993a3884b368864e8 (diff) |
glsl: rework misleading block layout code
From the ARB_uniform_buffer_object spec:
""shared" uniform blocks, the default layout, ..."
This doesn't fix anything as the default layout is already applied
at this point but fixes the misleading code/comment.
Reviewed-by: Samuel Pitoiset <[email protected]>
-rw-r--r-- | src/compiler/glsl/ast_to_hir.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index 7de164cebbf..4916b1590a0 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -7678,16 +7678,16 @@ ast_interface_block::hir(exec_list *instructions, this->block_name); enum glsl_interface_packing packing; - if (this->layout.flags.q.shared) { - packing = GLSL_INTERFACE_PACKING_SHARED; + if (this->layout.flags.q.std140) { + packing = GLSL_INTERFACE_PACKING_STD140; } else if (this->layout.flags.q.packed) { packing = GLSL_INTERFACE_PACKING_PACKED; } else if (this->layout.flags.q.std430) { packing = GLSL_INTERFACE_PACKING_STD430; } else { - /* The default layout is std140. + /* The default layout is shared. */ - packing = GLSL_INTERFACE_PACKING_STD140; + packing = GLSL_INTERFACE_PACKING_SHARED; } ir_variable_mode var_mode; |