wined3d: Use the core version of the debug messages functions.

Reported and tested by Andrey Gusev.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Matteo Bruni 2015-10-22 00:21:00 +02:00 committed by Alexandre Julliard
parent a3432432a0
commit 08bd0ba28c
2 changed files with 16 additions and 8 deletions

View File

@ -1676,27 +1676,27 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
if (context_debug_output_enabled(gl_info)) if (context_debug_output_enabled(gl_info))
{ {
GL_EXTCALL(glDebugMessageCallbackARB(wined3d_debug_callback, ret)); GL_EXTCALL(glDebugMessageCallback(wined3d_debug_callback, ret));
if (TRACE_ON(d3d_synchronous)) if (TRACE_ON(d3d_synchronous))
gl_info->gl_ops.gl.p_glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB); gl_info->gl_ops.gl.p_glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
GL_EXTCALL(glDebugMessageControlARB(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, NULL, GL_FALSE)); GL_EXTCALL(glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, NULL, GL_FALSE));
if (ERR_ON(d3d)) if (ERR_ON(d3d))
{ {
GL_EXTCALL(glDebugMessageControlARB(GL_DONT_CARE, GL_DEBUG_TYPE_ERROR_ARB, GL_EXTCALL(glDebugMessageControl(GL_DONT_CARE, GL_DEBUG_TYPE_ERROR,
GL_DONT_CARE, 0, NULL, GL_TRUE)); GL_DONT_CARE, 0, NULL, GL_TRUE));
} }
if (FIXME_ON(d3d)) if (FIXME_ON(d3d))
{ {
GL_EXTCALL(glDebugMessageControlARB(GL_DONT_CARE, GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB, GL_EXTCALL(glDebugMessageControl(GL_DONT_CARE, GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR,
GL_DONT_CARE, 0, NULL, GL_TRUE)); GL_DONT_CARE, 0, NULL, GL_TRUE));
GL_EXTCALL(glDebugMessageControlARB(GL_DONT_CARE, GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB, GL_EXTCALL(glDebugMessageControl(GL_DONT_CARE, GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR,
GL_DONT_CARE, 0, NULL, GL_TRUE)); GL_DONT_CARE, 0, NULL, GL_TRUE));
GL_EXTCALL(glDebugMessageControlARB(GL_DONT_CARE, GL_DEBUG_TYPE_PORTABILITY_ARB, GL_EXTCALL(glDebugMessageControl(GL_DONT_CARE, GL_DEBUG_TYPE_PORTABILITY,
GL_DONT_CARE, 0, NULL, GL_TRUE)); GL_DONT_CARE, 0, NULL, GL_TRUE));
} }
if (WARN_ON(d3d_perf)) if (WARN_ON(d3d_perf))
{ {
GL_EXTCALL(glDebugMessageControlARB(GL_DONT_CARE, GL_DEBUG_TYPE_PERFORMANCE_ARB, GL_EXTCALL(glDebugMessageControl(GL_DONT_CARE, GL_DEBUG_TYPE_PERFORMANCE,
GL_DONT_CARE, 0, NULL, GL_TRUE)); GL_DONT_CARE, 0, NULL, GL_TRUE));
} }
} }

View File

@ -2924,6 +2924,9 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info)
USE_GL_FUNC(glCompressedTexSubImage3D) /* OpenGL 1.3 */ USE_GL_FUNC(glCompressedTexSubImage3D) /* OpenGL 1.3 */
USE_GL_FUNC(glCreateProgram) /* OpenGL 2.0 */ USE_GL_FUNC(glCreateProgram) /* OpenGL 2.0 */
USE_GL_FUNC(glCreateShader) /* OpenGL 2.0 */ USE_GL_FUNC(glCreateShader) /* OpenGL 2.0 */
USE_GL_FUNC(glDebugMessageCallback) /* OpenGL 4.3 */
USE_GL_FUNC(glDebugMessageControl) /* OpenGL 4.3 */
USE_GL_FUNC(glDebugMessageInsert) /* OpenGL 4.3 */
USE_GL_FUNC(glDeleteBuffers) /* OpenGL 1.5 */ USE_GL_FUNC(glDeleteBuffers) /* OpenGL 1.5 */
USE_GL_FUNC(glDeleteProgram) /* OpenGL 2.0 */ USE_GL_FUNC(glDeleteProgram) /* OpenGL 2.0 */
USE_GL_FUNC(glDeleteQueries) /* OpenGL 1.5 */ USE_GL_FUNC(glDeleteQueries) /* OpenGL 1.5 */
@ -2944,6 +2947,7 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info)
USE_GL_FUNC(glGetAttribLocation) /* OpenGL 2.0 */ USE_GL_FUNC(glGetAttribLocation) /* OpenGL 2.0 */
USE_GL_FUNC(glGetBufferSubData) /* OpenGL 1.5 */ USE_GL_FUNC(glGetBufferSubData) /* OpenGL 1.5 */
USE_GL_FUNC(glGetCompressedTexImage) /* OpenGL 1.3 */ USE_GL_FUNC(glGetCompressedTexImage) /* OpenGL 1.3 */
USE_GL_FUNC(glGetDebugMessageLog) /* OpenGL 4.3 */
USE_GL_FUNC(glGetProgramInfoLog) /* OpenGL 2.0 */ USE_GL_FUNC(glGetProgramInfoLog) /* OpenGL 2.0 */
USE_GL_FUNC(glGetProgramiv) /* OpenGL 2.0 */ USE_GL_FUNC(glGetProgramiv) /* OpenGL 2.0 */
USE_GL_FUNC(glGetQueryiv) /* OpenGL 1.5 */ USE_GL_FUNC(glGetQueryiv) /* OpenGL 1.5 */
@ -3041,6 +3045,9 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info)
MAP_GL_FUNCTION(glCompressedTexSubImage3D, glCompressedTexSubImage3DARB); MAP_GL_FUNCTION(glCompressedTexSubImage3D, glCompressedTexSubImage3DARB);
MAP_GL_FUNCTION(glCreateProgram, glCreateProgramObjectARB); MAP_GL_FUNCTION(glCreateProgram, glCreateProgramObjectARB);
MAP_GL_FUNCTION(glCreateShader, glCreateShaderObjectARB); MAP_GL_FUNCTION(glCreateShader, glCreateShaderObjectARB);
MAP_GL_FUNCTION(glDebugMessageCallback, glDebugMessageCallbackARB);
MAP_GL_FUNCTION(glDebugMessageControl, glDebugMessageControlARB);
MAP_GL_FUNCTION(glDebugMessageInsert, glDebugMessageInsertARB);
MAP_GL_FUNCTION(glDeleteBuffers, glDeleteBuffersARB); MAP_GL_FUNCTION(glDeleteBuffers, glDeleteBuffersARB);
MAP_GL_FUNCTION(glDeleteProgram, glDeleteObjectARB); MAP_GL_FUNCTION(glDeleteProgram, glDeleteObjectARB);
MAP_GL_FUNCTION(glDeleteQueries, glDeleteQueriesARB); MAP_GL_FUNCTION(glDeleteQueries, glDeleteQueriesARB);
@ -3058,6 +3065,7 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info)
MAP_GL_FUNCTION(glGetAttribLocation, glGetAttribLocationARB); MAP_GL_FUNCTION(glGetAttribLocation, glGetAttribLocationARB);
MAP_GL_FUNCTION(glGetBufferSubData, glGetBufferSubDataARB); MAP_GL_FUNCTION(glGetBufferSubData, glGetBufferSubDataARB);
MAP_GL_FUNCTION(glGetCompressedTexImage, glGetCompressedTexImageARB); MAP_GL_FUNCTION(glGetCompressedTexImage, glGetCompressedTexImageARB);
MAP_GL_FUNCTION(glGetDebugMessageLog, glGetDebugMessageLogARB);
MAP_GL_FUNCTION(glGetProgramInfoLog, glGetInfoLogARB); MAP_GL_FUNCTION(glGetProgramInfoLog, glGetInfoLogARB);
MAP_GL_FUNCTION(glGetProgramiv, glGetObjectParameterivARB); MAP_GL_FUNCTION(glGetProgramiv, glGetObjectParameterivARB);
MAP_GL_FUNCTION(glGetQueryiv, glGetQueryivARB); MAP_GL_FUNCTION(glGetQueryiv, glGetQueryivARB);