diff options
author | Ian Romanick <[email protected]> | 2012-12-13 02:13:30 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2013-01-25 09:07:33 -0500 |
commit | 9a971ab695d8f3c58a5fb0f359443b6b053f0b97 (patch) | |
tree | d670b9613cc3b0089c7095e81ee4784e88387627 /src/mesa/main | |
parent | ecfb404e8d4fcd35524d1c4b3421e24980fe3976 (diff) |
mesa: Track the packing mode of a UBO in gl_uniform_buffer
This allows the next patch to verify that two uniform blocks match
without first calculating the locations of the fields.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/mtypes.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index d37e6c4c04d..4c7cc6099ca 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2278,6 +2278,12 @@ struct gl_uniform_buffer_variable 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 */ @@ -2299,6 +2305,14 @@ struct gl_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; }; /** |