summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/ast_to_hir.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index e76544a2c4c..b73e6205905 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -4136,6 +4136,16 @@ ast_uniform_block::hir(exec_list *instructions,
"the current scope.\n", ubo->Name);
}
+ if (this->layout.flags.q.shared) {
+ ubo->_Packing = ubo_packing_shared;
+ } else if (this->layout.flags.q.packed) {
+ ubo->_Packing = ubo_packing_packed;
+ } else {
+ /* The default layout is std140.
+ */
+ ubo->_Packing = ubo_packing_std140;
+ }
+
unsigned int num_variables = 0;
foreach_list_typed(ast_declarator_list, decl_list, link, &declarations) {
foreach_list_const(node, &decl_list->declarations) {