aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/mtypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/mtypes.h')
-rw-r--r--mesalib/src/mesa/main/mtypes.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h
index d52ab151a..def0db1aa 100644
--- a/mesalib/src/mesa/main/mtypes.h
+++ b/mesalib/src/mesa/main/mtypes.h
@@ -2709,6 +2709,9 @@ struct gl_program_constants
/* ES 2.0 and GL_ARB_ES2_compatibility */
struct gl_precision LowFloat, MediumFloat, HighFloat;
struct gl_precision LowInt, MediumInt, HighInt;
+ /* GL_ARB_uniform_buffer_object */
+ GLuint MaxUniformBlocks;
+ GLuint MaxCombinedUniformComponents;
};
@@ -2774,6 +2777,15 @@ struct gl_constants
GLuint MaxVertexVaryingComponents; /**< Between vert and geom shader */
GLuint MaxGeometryVaryingComponents; /**< Between geom and frag shader */
+ /** @{
+ * GL_ARB_uniform_buffer_object
+ */
+ GLuint MaxCombinedUniformBlocks;
+ GLuint MaxUniformBufferBindings;
+ GLuint MaxUniformBlockSize;
+ GLuint UniformBufferOffsetAlignment;
+ /** @} */
+
/** GL_ARB_geometry_shader4 */
GLuint MaxGeometryOutputVertices;
GLuint MaxGeometryTotalOutputComponents;
@@ -3283,6 +3295,20 @@ struct gl_driver_flags
GLbitfield NewArray; /**< Vertex array state */
};
+struct gl_uniform_buffer_binding
+{
+ struct gl_buffer_object *BufferObject;
+ /** Start of uniform block data in the buffer */
+ GLintptr Offset;
+ /** Size of data allowed to be referenced from the buffer (in bytes) */
+ GLsizeiptr Size;
+ /**
+ * glBindBufferBase() indicates that the Size should be ignored and only
+ * limited by the current size of the BufferObject.
+ */
+ GLboolean AutomaticSize;
+};
+
/**
* Mesa rendering context.
*
@@ -3418,6 +3444,21 @@ struct gl_context
struct gl_buffer_object *CopyReadBuffer; /**< GL_ARB_copy_buffer */
struct gl_buffer_object *CopyWriteBuffer; /**< GL_ARB_copy_buffer */
+
+ /**
+ * Current GL_ARB_uniform_buffer_object binding referenced by
+ * GL_UNIFORM_BUFFER target for glBufferData, glMapBuffer, etc.
+ */
+ struct gl_buffer_object *UniformBuffer;
+
+ /**
+ * Array of uniform buffers for GL_ARB_uniform_buffer_object and GL 3.1.
+ * This is set up using glBindBufferRange() or glBindBufferBase(). They are
+ * associated with uniform blocks by glUniformBlockBinding()'s state in the
+ * shader program.
+ */
+ struct gl_uniform_buffer_binding *UniformBufferBindings;
+
/*@}*/
struct gl_meta_state *Meta; /**< for "meta" operations */