summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/context.c
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2015-03-19 10:15:30 +0100
committerSamuel Iglesias Gonsalvez <[email protected]>2015-07-14 07:04:04 +0200
commitcd50906e0334d7ad0102e5733a152d55d672776b (patch)
treeeaf91bf1c5d461b56fecf5a1b174e141ae0744e8 /src/mesa/main/context.c
parentdf89ed1591c9d1c55e79fe8effb976c21b172a7d (diff)
mesa: Add shader storage buffer support to struct gl_context
This includes the array of bindings, the current buffer bound to the GL_SHADER_STORAGE_BUFFER target and a set of general limits and default values for shader storage buffers. v2: - Use spec values for the new defined constants (Jordan) Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r--src/mesa/main/context.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index faa1de739d9..5470c56bdea 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -597,6 +597,12 @@ _mesa_init_constants(struct gl_constants *consts, gl_api api)
consts->MaxUniformBlockSize = 16384;
consts->UniformBufferOffsetAlignment = 1;
+ /** GL_ARB_shader_storage_buffer_object */
+ consts->MaxCombinedShaderStorageBlocks = 8;
+ consts->MaxShaderStorageBufferBindings = 8;
+ consts->MaxShaderStorageBlockSize = 16 * 1024 * 1024;
+ consts->ShaderStorageBufferOffsetAlignment = 256;
+
/* GL_ARB_explicit_uniform_location, GL_MAX_UNIFORM_LOCATIONS */
consts->MaxUserAssignableUniformLocations =
4 * MESA_SHADER_STAGES * MAX_UNIFORMS;