summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl_types.cpp
diff options
context:
space:
mode:
authorTimothy Arceri <timothy.arceri@collabora.com>2016-02-24 16:06:00 +1100
committerTimothy Arceri <timothy.arceri@collabora.com>2016-03-31 12:50:19 +1100
commit733f1b2a55aa396dd01ec516f93339d95ef32a42 (patch)
tree3e225ccceb5b39b0b701f2cc340983151d9258b9 /src/compiler/glsl_types.cpp
parent2dbcecb7a9f483e70875d60d9f18811088122861 (diff)
downloadexternal_mesa3d-733f1b2a55aa396dd01ec516f93339d95ef32a42.zip
external_mesa3d-733f1b2a55aa396dd01ec516f93339d95ef32a42.tar.gz
external_mesa3d-733f1b2a55aa396dd01ec516f93339d95ef32a42.tar.bz2
glsl: add xfb_* qualifiers to glsl_struct_field
These will be used to hold qualifier values for interface and struct members. Support is added to the struct/interface constructors to copy these fields upon creation. We also update record_compare() to ensure we don't reuse a glsl_type with the wrong xfb_* qualifier values. Reviewed-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/compiler/glsl_types.cpp')
-rw-r--r--src/compiler/glsl_types.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp
index 2421bd6..3b77b5e 100644
--- a/src/compiler/glsl_types.cpp
+++ b/src/compiler/glsl_types.cpp
@@ -132,6 +132,8 @@ glsl_type::glsl_type(const glsl_struct_field *fields, unsigned num_fields,
this->fields.structure[i].image_volatile = fields[i].image_volatile;
this->fields.structure[i].image_restrict = fields[i].image_restrict;
this->fields.structure[i].precision = fields[i].precision;
+ this->fields.structure[i].xfb_buffer = fields[i].xfb_buffer;
+ this->fields.structure[i].xfb_stride = fields[i].xfb_stride;
}
mtx_unlock(&glsl_type::mutex);
@@ -172,6 +174,8 @@ glsl_type::glsl_type(const glsl_struct_field *fields, unsigned num_fields,
this->fields.structure[i].image_volatile = fields[i].image_volatile;
this->fields.structure[i].image_restrict = fields[i].image_restrict;
this->fields.structure[i].precision = fields[i].precision;
+ this->fields.structure[i].xfb_buffer = fields[i].xfb_buffer;
+ this->fields.structure[i].xfb_stride = fields[i].xfb_stride;
}
mtx_unlock(&glsl_type::mutex);
@@ -915,6 +919,12 @@ glsl_type::record_compare(const glsl_type *b) const
if (this->fields.structure[i].precision
!= b->fields.structure[i].precision)
return false;
+ if (this->fields.structure[i].xfb_buffer
+ != b->fields.structure[i].xfb_buffer)
+ return false;
+ if (this->fields.structure[i].xfb_stride
+ != b->fields.structure[i].xfb_stride)
+ return false;
}
return true;