Commit: 7f95d780e872c4ee01a5b7db2b97e74b3a0bc978 Author: Clément Foucault Date: Mon Aug 31 23:14:42 2020 +0200 Branches: master https://developer.blender.org/rB7f95d780e872c4ee01a5b7db2b97e74b3a0bc978
GLImmediate: Use CL_CHECK_ERROR This provides a bit more debugging info on MacOS. =================================================================== M source/blender/gpu/opengl/gl_immediate.cc =================================================================== diff --git a/source/blender/gpu/opengl/gl_immediate.cc b/source/blender/gpu/opengl/gl_immediate.cc index ff598f79b3f..6a461cc87fe 100644 --- a/source/blender/gpu/opengl/gl_immediate.cc +++ b/source/blender/gpu/opengl/gl_immediate.cc @@ -30,6 +30,7 @@ #include "gpu_vertex_format_private.h" #include "gl_context.hh" +#include "gl_debug.hh" #include "gl_primitive.hh" #include "gl_vertex_array.hh" @@ -87,6 +88,8 @@ uchar *GLImmediate::begin() /* Does the current buffer have enough room? */ const size_t available_bytes = buffer_size() - buffer_offset(); + GL_CHECK_ERROR("Immediate Pre-Begin"); + glBindBuffer(GL_ARRAY_BUFFER, vbo_id()); bool recreate_buffer = false; @@ -129,6 +132,7 @@ uchar *GLImmediate::begin() } void *data = glMapBufferRange(GL_ARRAY_BUFFER, buffer_offset(), bytes_needed, access); BLI_assert(data != NULL); + GL_CHECK_ERROR("Immediate Post-Begin"); bytes_mapped_ = bytes_needed; return (uchar *)data; @@ -150,6 +154,8 @@ void GLImmediate::end(void) } glUnmapBuffer(GL_ARRAY_BUFFER); + GL_CHECK_ERROR("Immediate Post-Unmap"); + if (vertex_len > 0) { GPU_context_active_get()->state_manager->apply_state(); @@ -173,6 +179,8 @@ void GLImmediate::end(void) * They are not required so just comment them. (T55722) */ // glBindBuffer(GL_ARRAY_BUFFER, 0); // glBindVertexArray(0); + + GL_CHECK_ERROR("Immediate Post-drawing"); } buffer_offset() += buffer_bytes_used; _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs