diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/mtypes.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index b39a8dcd75b..3d59dc68ec1 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2216,6 +2216,15 @@ struct gl_shader */ unsigned num_uniform_components; + /** + * This shader's uniform block information. + * + * The offsets of the variables are assigned only for shaders in a program's + * _LinkedShaders[]. + */ + struct gl_uniform_block *UniformBlocks; + unsigned NumUniformBlocks; + struct exec_list *ir; struct glsl_symbol_table *symbols; @@ -2254,6 +2263,19 @@ struct gl_uniform_block /** Array of supplemental information about UBO ir_variables. */ struct gl_uniform_buffer_variable *Uniforms; GLuint NumUniforms; + + /** + * Index (GL_UNIFORM_BLOCK_BINDING) into ctx->UniformBufferBindings[] to use + * with glBindBufferBase to bind a buffer object to this uniform block. When + * updated in the program, _NEW_BUFFER_OBJECT will be set. + */ + GLuint Binding; + + /** + * Minimum size of a buffer object to back this uniform buffer + * (GL_UNIFORM_BLOCK_DATA_SIZE). + */ + GLuint UniformBufferSize; }; /** @@ -2338,6 +2360,18 @@ struct gl_shader_program unsigned NumUserUniformStorage; struct gl_uniform_storage *UniformStorage; + struct gl_uniform_block *UniformBlocks; + unsigned NumUniformBlocks; + + /** + * Indices into the _LinkedShaders's UniformBlocks[] array for each stage + * they're used in, or -1. + * + * This is used to maintain the Binding values of the stage's UniformBlocks[] + * and to answer the GL_UNIFORM_BLOCK_REFERENCED_BY_*_SHADER queries. + */ + int *UniformBlockStageIndex[MESA_SHADER_TYPES]; + /** * Map of active uniform names to locations * |