Debug GPU functionality from soc-viewport_fx by Jason Wilkins
authorAntony Riakiotakis <kalast@gmail.com>
Mon, 16 Feb 2015 20:19:12 +0000 (21:19 +0100)
committerAntony Riakiotakis <kalast@gmail.com>
Mon, 23 Feb 2015 12:35:57 +0000 (13:35 +0100)
commitfed61d50c77130bc59849b067d9f7a502908003f
tree45490b30746b24809c4b126460913ac5704cf535
parent34479d8b63c9ef04ec14d99647f0c46b676b6ca6
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
15 files changed:
CMakeLists.txt
intern/ghost/intern/GHOST_ContextGLX.h
intern/ghost/intern/GHOST_ContextSDL.h
intern/ghost/intern/GHOST_ContextWGL.h
source/blender/gpu/CMakeLists.txt
source/blender/gpu/GPU_debug.h [new file with mode: 0644]
source/blender/gpu/GPU_draw.h
source/blender/gpu/GPU_extensions.h
source/blender/gpu/intern/gpu_codegen.c
source/blender/gpu/intern/gpu_debug.c [new file with mode: 0644]
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_extensions.c
source/blender/gpu/intern/gpu_init_exit.c
source/blender/gpu/intern/gpu_private.h [moved from source/blender/gpu/intern/gpu_extensions_private.h with 73% similarity]
source/blender/windowmanager/intern/wm_event_system.c