this->offset, type->std140_base_alignment(row_major));
}
+ virtual void set_buffer_offset(unsigned offset)
+ {
+ this->offset = offset;
+ }
+
virtual void visit_field(const glsl_type *type, const char *name,
bool row_major, const glsl_type *,
const unsigned packing,
if (t->fields.structure[i].type->is_record())
this->visit_field(&t->fields.structure[i]);
+ if (t->is_interface() && t->fields.structure[i].offset != -1)
+ this->set_buffer_offset(t->fields.structure[i].offset);
+
/* Append '.field' to the current variable name. */
if (name_length == 0) {
ralloc_asprintf_rewrite_tail(name, &new_length, "%s", field);
{
}
+void
+program_resource_visitor::set_buffer_offset(unsigned)
+{
+}
+
void
program_resource_visitor::set_record_array_count(unsigned)
{
}
}
+ virtual void set_buffer_offset(unsigned offset)
+ {
+ this->ubo_byte_offset = offset;
+ }
+
virtual void set_record_array_count(unsigned record_array_count)
{
this->record_array_count = record_array_count;
virtual void leave_record(const glsl_type *type, const char *name,
bool row_major, const unsigned packing);
+ virtual void set_buffer_offset(unsigned offset);
+
virtual void set_record_array_count(unsigned record_array_count);
private: