diff options
author | Timothy Arceri <[email protected]> | 2016-01-08 22:49:24 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-03-05 19:38:49 +1100 |
commit | 802262c0afe1a45abc4920b61641c774a8f9792a (patch) | |
tree | 1eb839ae3d4745dc4717606264572732b914aee4 | |
parent | 96527c3cf29acaa74a0e7b8624f29e514a76e42e (diff) |
glsl: use explicit offset when lowering buffer access
Reviewed-by: Edward O'Callaghan <[email protected]>
-rw-r--r-- | src/compiler/glsl/lower_buffer_access.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/glsl/lower_buffer_access.cpp b/src/compiler/glsl/lower_buffer_access.cpp index 9ad811de9f1..f85b421cf27 100644 --- a/src/compiler/glsl/lower_buffer_access.cpp +++ b/src/compiler/glsl/lower_buffer_access.cpp @@ -440,6 +440,10 @@ lower_buffer_access::setup_buffer_access(void *mem_ctx, else field_align = type->std140_base_alignment(field_row_major); + if (struct_type->fields.structure[i].offset != -1) { + intra_struct_offset = struct_type->fields.structure[i].offset; + } + intra_struct_offset = glsl_align(intra_struct_offset, field_align); if (strcmp(struct_type->fields.structure[i].name, |