Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2015-07-02 20:30:50 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-07-02 20:30:50 +0300
commit5709b9951eed094f6bcfb00ba22b4807dd81873b (patch)
tree4a15613b3ff953e572c5a1624cf6e19f0a921fd6 /source/blender/gpu/intern
parent1d930382e67e4779b3c87ccdd311a043b89ca107 (diff)
parent00808eb39ac04c484fcabac6b18666cb2a0191e7 (diff)
Merge branch 'master' into gooseberry
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r--source/blender/gpu/intern/gpu_debug.c16
-rw-r--r--source/blender/gpu/intern/gpu_init_exit.c9
-rw-r--r--source/blender/gpu/intern/gpu_private.h13
3 files changed, 13 insertions, 25 deletions
diff --git a/source/blender/gpu/intern/gpu_debug.c b/source/blender/gpu/intern/gpu_debug.c
index 21d7eb4370b..3066467517a 100644
--- a/source/blender/gpu/intern/gpu_debug.c
+++ b/source/blender/gpu/intern/gpu_debug.c
@@ -153,8 +153,6 @@ const char* gpuErrorString(GLenum err)
}
-#ifdef WITH_GPU_DEBUG
-
/* Debug callbacks need the same calling convention as OpenGL functions.
*/
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
@@ -194,7 +192,7 @@ void gpu_debug_init(void)
glEnable(GL_DEBUG_OUTPUT);
glDebugMessageCallback(gpu_debug_proc, mxGetCurrentContext());
glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, NULL, GL_TRUE);
- GPU_STRING_MARKER(sizeof(success), success);
+ GPU_string_marker(sizeof(success), success);
return;
}
#endif
@@ -203,7 +201,7 @@ void gpu_debug_init(void)
#ifndef GLEW_ES_ONLY
glDebugMessageCallback(gpu_debug_proc, mxGetCurrentContext());
glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, NULL, GL_TRUE);
- GPU_STRING_MARKER(sizeof(success), success);
+ GPU_string_marker(sizeof(success), success);
#endif
return;
}
@@ -212,7 +210,7 @@ void gpu_debug_init(void)
if (GLEW_ARB_debug_output) {
glDebugMessageCallbackARB(gpu_debug_proc, mxGetCurrentContext());
glDebugMessageControlARB(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, NULL, GL_TRUE);
- GPU_STRING_MARKER(sizeof(success), success);
+ GPU_string_marker(sizeof(success), success);
return;
}
@@ -220,7 +218,7 @@ void gpu_debug_init(void)
if (GLEW_AMD_debug_output) {
glDebugMessageCallbackAMD(gpu_debug_proc_amd, mxGetCurrentContext());
glDebugMessageEnableAMD(GL_DONT_CARE, GL_DONT_CARE, 0, NULL, GL_TRUE);
- GPU_STRING_MARKER(sizeof(success), success);
+ GPU_string_marker(sizeof(success), success);
return;
}
@@ -268,7 +266,7 @@ void gpu_debug_exit(void)
return;
}
-void gpu_string_marker(size_t length, const char *buf)
+void GPU_string_marker(size_t length, const char *buf)
{
#ifndef WITH_GLEW_ES
#ifndef GLEW_ES_ONLY
@@ -310,8 +308,6 @@ void gpu_string_marker(size_t length, const char *buf)
return;
}
-#endif /* WITH_GPU_DEBUG */
-
void GPU_print_error_debug(const char *str)
{
if (G.debug & G_DEBUG)
@@ -319,7 +315,7 @@ void GPU_print_error_debug(const char *str)
}
-void gpu_assert_no_gl_errors(const char* file, int line, const char* str)
+void GPU_assert_no_gl_errors(const char* file, int line, const char* str)
{
if (G.debug) {
GLboolean gl_ok = gpu_report_gl_errors(file, line, str);
diff --git a/source/blender/gpu/intern/gpu_init_exit.c b/source/blender/gpu/intern/gpu_init_exit.c
index a93c1a21130..aefddc774be 100644
--- a/source/blender/gpu/intern/gpu_init_exit.c
+++ b/source/blender/gpu/intern/gpu_init_exit.c
@@ -32,6 +32,8 @@
#include "BLI_sys_types.h"
#include "GPU_init_exit.h" /* interface */
+#include "BKE_global.h"
+
#include "intern/gpu_codegen.h"
#include "intern/gpu_private.h"
@@ -54,14 +56,17 @@ void GPU_init(void)
gpu_codegen_init();
- GPU_DEBUG_INIT();
+ if (G.debug & G_DEBUG_GPU)
+ gpu_debug_init();
+
}
void GPU_exit(void)
{
- GPU_DEBUG_EXIT();
+ if (G.debug & G_DEBUG_GPU)
+ gpu_debug_exit();
gpu_codegen_exit();
gpu_extensions_exit(); /* must come last */
diff --git a/source/blender/gpu/intern/gpu_private.h b/source/blender/gpu/intern/gpu_private.h
index 188a2d16abc..72627e3563e 100644
--- a/source/blender/gpu/intern/gpu_private.h
+++ b/source/blender/gpu/intern/gpu_private.h
@@ -29,21 +29,8 @@
void gpu_extensions_init(void);
void gpu_extensions_exit(void);
-
/* gpu_debug.c */
-#ifdef WITH_GPU_DEBUG
-
void gpu_debug_init(void);
void gpu_debug_exit(void);
-# define GPU_DEBUG_INIT() gpu_debug_init()
-# define GPU_DEBUG_EXIT() gpu_debug_exit()
-
-#else
-
-# define GPU_DEBUG_INIT() ((void)0)
-# define GPU_DEBUG_EXIT() ((void)0)
-
-#endif
-
#endif /* __GPU_PRIVATE_H__ */