return &ctx->DrawIndirectBuffer;
}
break;
+ case GL_PARAMETER_BUFFER_ARB:
+ if (_mesa_has_ARB_indirect_parameters(ctx)) {
+ return &ctx->ParameterBuffer;
+ }
+ break;
case GL_DISPATCH_INDIRECT_BUFFER:
if (_mesa_has_compute_shaders(ctx)) {
return &ctx->DispatchIndirectBuffer;
_mesa_reference_buffer_object(ctx, &ctx->DrawIndirectBuffer,
ctx->Shared->NullBufferObj);
+ _mesa_reference_buffer_object(ctx, &ctx->ParameterBuffer,
+ ctx->Shared->NullBufferObj);
+
_mesa_reference_buffer_object(ctx, &ctx->DispatchIndirectBuffer,
ctx->Shared->NullBufferObj);
_mesa_reference_buffer_object(ctx, &ctx->DrawIndirectBuffer, NULL);
+ _mesa_reference_buffer_object(ctx, &ctx->ParameterBuffer, NULL);
+
_mesa_reference_buffer_object(ctx, &ctx->DispatchIndirectBuffer, NULL);
for (i = 0; i < MAX_COMBINED_UNIFORM_BUFFERS; i++) {
_mesa_BindBuffer( GL_DRAW_INDIRECT_BUFFER, 0 );
}
+ /* unbind ARB_indirect_parameters binding point */
+ if (ctx->ParameterBuffer == bufObj) {
+ _mesa_BindBuffer(GL_PARAMETER_BUFFER_ARB, 0);
+ }
+
/* unbind ARB_compute_shader binding point */
if (ctx->DispatchIndirectBuffer == bufObj) {
_mesa_BindBuffer(GL_DISPATCH_INDIRECT_BUFFER, 0);
EXTRA_EXT(ARB_tessellation_shader);
EXTRA_EXT(ARB_shader_subroutine);
EXTRA_EXT(ARB_shader_storage_buffer_object);
+EXTRA_EXT(ARB_indirect_parameters);
static const int
extra_ARB_color_buffer_float_or_glcore[] = {
case GL_DRAW_INDIRECT_BUFFER_BINDING:
v->value_int = ctx->DrawIndirectBuffer->Name;
break;
+ /* GL_ARB_indirect_parameters */
+ case GL_PARAMETER_BUFFER_BINDING_ARB:
+ v->value_int = ctx->ParameterBuffer->Name;
+ break;
/* GL_ARB_separate_shader_objects */
case GL_PROGRAM_PIPELINE_BINDING:
if (ctx->Pipeline.Current) {
# GL_ARB_shader_subroutine
[ "MAX_SUBROUTINES", "CONST(MAX_SUBROUTINES), extra_ARB_shader_subroutine" ],
[ "MAX_SUBROUTINE_UNIFORM_LOCATIONS", "CONST(MAX_SUBROUTINE_UNIFORM_LOCATIONS), extra_ARB_shader_subroutine" ],
+
+# GL_ARB_indirect_parameters
+ [ "PARAMETER_BUFFER_BINDING_ARB", "LOC_CUSTOM, TYPE_INT, 0, extra_ARB_indirect_parameters" ],
+
]}
]
struct gl_perf_monitor_state PerfMonitor;
struct gl_buffer_object *DrawIndirectBuffer; /** < GL_ARB_draw_indirect */
+ struct gl_buffer_object *ParameterBuffer; /** < GL_ARB_indirect_parameters */
struct gl_buffer_object *DispatchIndirectBuffer; /** < GL_ARB_compute_shader */
struct gl_buffer_object *CopyReadBuffer; /**< GL_ARB_copy_buffer */