diff options
author | Timothy Arceri <[email protected]> | 2016-05-28 11:40:22 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-05-30 11:01:32 +1000 |
commit | 8f4ac20b6fc29b7739b2eb909491316bc51ca1c3 (patch) | |
tree | 26f3e9b63309618968274ad711465196a9d806dd /src/compiler | |
parent | 7398a32c501ed7fedb5619ee7505f9070551d4bd (diff) |
glsl: fix explicit uniform block alignment
This stops the offset being bumped again when and an explicit
alignment has already been applied.
Fixes alignment issues in:
GL44-CTS.enhanced_layouts.uniform_block_alignment
Note the test still fails due to unrelated issues with doubles.
Reviewed-by: Eduardo Lima Mitev <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/ast_to_hir.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index e1e26f8f6ac..c3af715b934 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -6811,9 +6811,7 @@ ast_process_struct_or_iface_block_members(exec_list *instructions, fields[i].offset = glsl_align(offset, expl_align); next_offset = glsl_align(fields[i].offset + size, align); } - } - - if (!qual->flags.q.explicit_offset) { + } else if (!qual->flags.q.explicit_offset) { if (align != 0 && size != 0) next_offset = glsl_align(next_offset + size, align); } |