for p in self.parameters:
if p.is_output:
return 'sync'
- if p.is_pointer() and not (p.count or p.counter) and not (self.marshal == 'draw' and p.name == 'indices'):
+ if (p.is_pointer() and not (p.count or p.counter)
+ and not (self.marshal == 'draw'
+ and (p.name == 'indices' or p.name == 'indirect'))):
return 'sync'
if p.count_parameter_list:
# Parameter size is determined by enums; haven't
* buffer) binding is in a VBO.
*/
bool element_array_is_vbo;
+ bool draw_indirect_buffer_is_vbo;
};
void _mesa_glthread_init(struct gl_context *ctx);
*/
glthread->element_array_is_vbo = (buffer != 0);
break;
+ case GL_DRAW_INDIRECT_BUFFER:
+ glthread->draw_indirect_buffer_is_vbo = buffer != 0;
+ break;
}
}
return ctx->API != API_OPENGL_CORE && !glthread->element_array_is_vbo;
}
+static inline bool
+_mesa_glthread_is_non_vbo_draw_arrays_indirect(const struct gl_context *ctx)
+{
+ struct glthread_state *glthread = ctx->GLThread;
+
+ return ctx->API != API_OPENGL_CORE &&
+ !glthread->draw_indirect_buffer_is_vbo;
+}
+
+static inline bool
+_mesa_glthread_is_non_vbo_draw_elements_indirect(const struct gl_context *ctx)
+{
+ struct glthread_state *glthread = ctx->GLThread;
+
+ return ctx->API != API_OPENGL_CORE &&
+ (!glthread->draw_indirect_buffer_is_vbo ||
+ !glthread->element_array_is_vbo);
+}
+
#define DEBUG_MARSHAL_PRINT_CALLS 0
/**