if(func)
uniform_calls.push_back(UniformCall(u->location, u->array_size, func));
}
+
+ if(i->data_size<=0)
+ {
+ const ReflectData::UniformInfo &last = *i->uniforms.back();
+ i->data_size = last.location*16+last.array_size*get_type_size(last.type);
+ }
}
}
finalize_uniforms();
- for(ReflectData::UniformBlockInfo &b: reflect_data.uniform_blocks)
- if(!b.data_size && !b.uniforms.empty())
- {
- const ReflectData::UniformInfo &uni = *b.uniforms.back();
- b.data_size = uni.location*16+uni.array_size*get_type_size(uni.type);
- }
-
for(const ReflectData::UniformInfo &u: reflect_data.uniforms)
require_type(u.type);
for(const ReflectData::AttributeInfo &a: reflect_data.attributes)