aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/mtypes.h49
1 files changed, 48 insertions, 1 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index f62ad3416ea..f7118c1e7a6 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2284,13 +2284,35 @@ struct gl_shader
unsigned num_combined_uniform_components;
/**
- * This shader's uniform block information.
+ * This shader's uniform/ssbo block information.
*
* These fields are only set post-linking.
+ *
+ * BufferInterfaceBlocks is a list containing both UBOs and SSBOs. This is
+ * useful during the linking process so that we don't have to handle SSBOs
+ * specifically.
+ *
+ * UniformBlocks is a list of UBOs. This is useful for backends that need
+ * or prefer to see separate index spaces for UBOS and SSBOs like the GL
+ * API specifies.
+ *
+ * ShaderStorageBlocks is a list of SSBOs. This is useful for backends that
+ * need or prefer to see separate index spaces for UBOS and SSBOs like the
+ * GL API specifies.
+ *
+ * UniformBlocks and ShaderStorageBlocks only have pointers into
+ * BufferInterfaceBlocks so the actual resource information is not
+ * duplicated.
*/
unsigned NumBufferInterfaceBlocks;
struct gl_uniform_block *BufferInterfaceBlocks;
+ unsigned NumUniformBlocks;
+ struct gl_uniform_block **UniformBlocks;
+
+ unsigned NumShaderStorageBlocks;
+ struct gl_uniform_block **ShaderStorageBlocks;
+
struct exec_list *ir;
struct exec_list *packed_varyings;
struct glsl_symbol_table *symbols;
@@ -2687,9 +2709,34 @@ struct gl_shader_program
*/
unsigned LastClipDistanceArraySize;
+ /**
+ * This shader's uniform/ssbo block information.
+ *
+ * BufferInterfaceBlocks is a list containing both UBOs and SSBOs. This is
+ * useful during the linking process so that we don't have to handle SSBOs
+ * specifically.
+ *
+ * UniformBlocks is a list of UBOs. This is useful for backends that need
+ * or prefer to see separate index spaces for UBOS and SSBOs like the GL
+ * API specifies.
+ *
+ * ShaderStorageBlocks is a list of SSBOs. This is useful for backends that
+ * need or prefer to see separate index spaces for UBOS and SSBOs like the
+ * GL API specifies.
+ *
+ * UniformBlocks and ShaderStorageBlocks only have pointers into
+ * BufferInterfaceBlocks so the actual resource information is not
+ * duplicated and are only set after linking.
+ */
unsigned NumBufferInterfaceBlocks;
struct gl_uniform_block *BufferInterfaceBlocks;
+ unsigned NumUniformBlocks;
+ struct gl_uniform_block **UniformBlocks;
+
+ unsigned NumShaderStorageBlocks;
+ struct gl_uniform_block **ShaderStorageBlocks;
+
/**
* Indices into the _LinkedShaders's UniformBlocks[] array for each stage
* they're used in, or -1.