aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-01-08 22:49:24 +1100
committerTimothy Arceri <[email protected]>2016-03-05 19:38:49 +1100
commit802262c0afe1a45abc4920b61641c774a8f9792a (patch)
tree1eb839ae3d4745dc4717606264572732b914aee4 /src/compiler
parent96527c3cf29acaa74a0e7b8624f29e514a76e42e (diff)
glsl: use explicit offset when lowering buffer access
Reviewed-by: Edward O'Callaghan <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/lower_buffer_access.cpp4
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,