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
path: root/intern
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2015-02-16 23:19:12 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-02-23 15:35:57 +0300
commitfed61d50c77130bc59849b067d9f7a502908003f (patch)
tree45490b30746b24809c4b126460913ac5704cf535 /intern
parent34479d8b63c9ef04ec14d99647f0c46b676b6ca6 (diff)
Debug GPU functionality from soc-viewport_fx by Jason Wilkins
patch number D706 with changes: - WITH_GPU_DEBUG just creates a debug context (and enables the debug messaging system functions) but leaves the checks we had intact. Old patch added the debug functionality only if we had the flag on to save some performance. Rationale here is that we might not want to recompile blender just to get the extra information, and having users start blender with a -d flag to get the extra information is also useful for bug reports. Those checks already existed and most expensive ones are hidden behind a debug mode check so performance should not be that bad. - Did some cleanup of existing functionality: When things go wrong blender side, just print the error, don't check for GL errors first. - Did not port changes needed for GLES to regular glew.h - Got rid of duplicate or very similar new functionality. Generally, code is more moving things around/cleanup and should work exactly as before apart from the debug context, so it's safe to add even now. It also provides a nice substitute function for glu error descriptions
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_ContextGLX.h6
-rw-r--r--intern/ghost/intern/GHOST_ContextSDL.h6
-rw-r--r--intern/ghost/intern/GHOST_ContextWGL.h6
3 files changed, 15 insertions, 3 deletions
diff --git a/intern/ghost/intern/GHOST_ContextGLX.h b/intern/ghost/intern/GHOST_ContextGLX.h
index e2169ac6adb..b33c0b5252a 100644
--- a/intern/ghost/intern/GHOST_ContextGLX.h
+++ b/intern/ghost/intern/GHOST_ContextGLX.h
@@ -46,7 +46,11 @@ extern "C" GLXEWContext *glxewContext;
#ifndef GHOST_OPENGL_GLX_CONTEXT_FLAGS
-#define GHOST_OPENGL_GLX_CONTEXT_FLAGS 0
+# ifdef WITH_GPU_DEBUG
+# define GHOST_OPENGL_GLX_CONTEXT_FLAGS GLX_CONTEXT_DEBUG_BIT_ARB
+# else
+# define GHOST_OPENGL_GLX_CONTEXT_FLAGS 0
+# endif
#endif
#ifndef GHOST_OPENGL_GLX_RESET_NOTIFICATION_STRATEGY
diff --git a/intern/ghost/intern/GHOST_ContextSDL.h b/intern/ghost/intern/GHOST_ContextSDL.h
index c151d8e9f9d..61f339c1bc2 100644
--- a/intern/ghost/intern/GHOST_ContextSDL.h
+++ b/intern/ghost/intern/GHOST_ContextSDL.h
@@ -40,7 +40,11 @@ extern "C" {
#ifndef GHOST_OPENGL_SDL_CONTEXT_FLAGS
-#define GHOST_OPENGL_SDL_CONTEXT_FLAGS 0
+# ifdef WITH_GPU_DEBUG
+# define GHOST_OPENGL_SDL_CONTEXT_FLAGS SDL_GL_CONTEXT_DEBUG_FLAG
+# else
+# define GHOST_OPENGL_SDL_CONTEXT_FLAGS 0
+# endif
#endif
#ifndef GHOST_OPENGL_SDL_RESET_NOTIFICATION_STRATEGY
diff --git a/intern/ghost/intern/GHOST_ContextWGL.h b/intern/ghost/intern/GHOST_ContextWGL.h
index 189121d7d5d..98a8059b242 100644
--- a/intern/ghost/intern/GHOST_ContextWGL.h
+++ b/intern/ghost/intern/GHOST_ContextWGL.h
@@ -45,7 +45,11 @@ extern "C" WGLEWContext *wglewContext;
#endif
#ifndef GHOST_OPENGL_WGL_CONTEXT_FLAGS
-#define GHOST_OPENGL_WGL_CONTEXT_FLAGS 0
+# ifdef WITH_GPU_DEBUG
+# define GHOST_OPENGL_WGL_CONTEXT_FLAGS WGL_CONTEXT_DEBUG_BIT_ARB
+# else
+# define GHOST_OPENGL_WGL_CONTEXT_FLAGS 0
+# endif
#endif
#ifndef GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY