diff options
author | Ilia Mirkin <[email protected]> | 2016-01-18 00:08:24 -0500 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-01-29 21:05:46 -0500 |
commit | 688003669469d787847d58572956e9d3fcecaf3c (patch) | |
tree | 4afd17896eef8b6ec4aaf375504b8a9341df67a3 /src/mesa/state_tracker/st_extensions.c | |
parent | 9d6f9ccf6b7ca7c9d1ac40354d6ae47c130e2024 (diff) |
st/mesa: add support for SSBO binding and GLSL intrinsics
Signed-off-by: Ilia Mirkin <[email protected]>
v1 -> v2: some 80 char reformatting
Diffstat (limited to 'src/mesa/state_tracker/st_extensions.c')
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 016d07d3411..5695f2718b0 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -220,7 +220,8 @@ void st_init_limits(struct pipe_screen *screen, pc->MaxAtomicCounters = MAX_ATOMIC_COUNTERS; pc->MaxAtomicBuffers = screen->get_shader_param( - screen, sh, PIPE_SHADER_CAP_MAX_SHADER_BUFFERS); + screen, sh, PIPE_SHADER_CAP_MAX_SHADER_BUFFERS) / 2; + pc->MaxShaderStorageBlocks = pc->MaxAtomicBuffers; /* Gallium doesn't really care about local vs. env parameters so use the * same limits. @@ -350,6 +351,17 @@ void st_init_limits(struct pipe_screen *screen, if (c->MaxCombinedAtomicBuffers > 0) extensions->ARB_shader_atomic_counters = GL_TRUE; + + c->MaxCombinedShaderOutputResources = c->MaxDrawBuffers; + c->ShaderStorageBufferOffsetAlignment = + screen->get_param(screen, PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT); + if (c->ShaderStorageBufferOffsetAlignment) { + c->MaxCombinedShaderStorageBlocks = c->MaxShaderStorageBufferBindings = + c->MaxCombinedAtomicBuffers; + c->MaxCombinedShaderOutputResources += + c->MaxCombinedShaderStorageBlocks; + c->MaxShaderStorageBlockSize = 1 << 27; + } } |