"the current scope.\n", ubo->Name);
}
+ if (this->layout.flags.q.shared) {
+ ubo->_Packing = ubo_packing_shared;
+ } else if (this->layout.flags.q.packed) {
+ ubo->_Packing = ubo_packing_packed;
+ } else {
+ /* The default layout is std140.
+ */
+ ubo->_Packing = ubo_packing_std140;
+ }
+
unsigned int num_variables = 0;
foreach_list_typed(ast_declarator_list, decl_list, link, &declarations) {
foreach_list_const(node, &decl_list->declarations) {
GLboolean RowMajor;
};
+enum gl_uniform_block_packing {
+ ubo_packing_std140,
+ ubo_packing_shared,
+ ubo_packing_packed
+};
+
struct gl_uniform_block
{
/** Declared name of the uniform block */
* (GL_UNIFORM_BLOCK_DATA_SIZE).
*/
GLuint UniformBufferSize;
+
+ /**
+ * Layout specified in the shader
+ *
+ * This isn't accessible through the API, but it is used while
+ * cross-validating uniform blocks.
+ */
+ enum gl_uniform_block_packing _Packing;
};
/**