summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
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,