case GL_UNIFORM_BUFFER_BINDING:
v->value_int = ctx->UniformBuffer->Name;
break;
+ /* GL_ARB_shader_storage_buffer_object */
+ case GL_SHADER_STORAGE_BUFFER_BINDING:
+ v->value_int = ctx->ShaderStorageBuffer->Name;
+ break;
/* GL_ARB_timer_query */
case GL_TIMESTAMP:
if (ctx->Driver.GetTimestamp) {
v->value_int = ctx->UniformBufferBindings[index].Size;
return TYPE_INT;
+ /* ARB_shader_storage_buffer_object */
+ case GL_SHADER_STORAGE_BUFFER_BINDING:
+ if (!ctx->Extensions.ARB_shader_storage_buffer_object)
+ goto invalid_enum;
+ if (index >= ctx->Const.MaxShaderStorageBufferBindings)
+ goto invalid_value;
+ v->value_int = ctx->ShaderStorageBufferBindings[index].BufferObject->Name;
+ return TYPE_INT;
+
+ case GL_SHADER_STORAGE_BUFFER_START:
+ if (!ctx->Extensions.ARB_shader_storage_buffer_object)
+ goto invalid_enum;
+ if (index >= ctx->Const.MaxShaderStorageBufferBindings)
+ goto invalid_value;
+ v->value_int = ctx->ShaderStorageBufferBindings[index].Offset < 0 ? 0 :
+ ctx->ShaderStorageBufferBindings[index].Offset;
+ return TYPE_INT;
+
+ case GL_SHADER_STORAGE_BUFFER_SIZE:
+ if (!ctx->Extensions.ARB_shader_storage_buffer_object)
+ goto invalid_enum;
+ if (index >= ctx->Const.MaxShaderStorageBufferBindings)
+ goto invalid_value;
+ v->value_int = ctx->ShaderStorageBufferBindings[index].Size < 0 ? 0 :
+ ctx->ShaderStorageBufferBindings[index].Size;
+ return TYPE_INT;
+
/* ARB_texture_multisample / GL3.2 */
case GL_SAMPLE_MASK_VALUE:
if (index != 0)