diff options
author | Mike Erwin <significant.bit@gmail.com> | 2016-08-19 07:52:52 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2016-08-19 07:52:52 +0300 |
commit | 7e02d335c0ce9e88fb08d1e499b6563980d0d8e9 (patch) | |
tree | b2947ed9ff95766abf6d652a0c9aab2eff08f760 /source/blender/gpu/intern/gpu_material.c | |
parent | d8f036efd6a57c9bd2e1ed626eee7d73bd73965b (diff) |
OpenGL: don't poll for errors, rely on KHR_debug
Errors are caught & reported by our GL debug callback. This gives us way more useful information than sporadic calls to glGetError.
I removed almost all use of glGetError, including our own GPU_ASSERT_NO_GL_ERRORS and GPU_CHECK_ERRORS_AROUND macros.
Still used in rna_Image_gl_load because it passes unvalidated input to OpenGL functions.
Still used in gpu_state_print_fl_ex as an exception handling hack -- will rewrite this soon.
The optimism embodied by this commit will not prevent OpenGL errors. We need to analyze what would cause GL to fail at certain points and proactively intercept these failures. Or guarantee they can't happen.
Diffstat (limited to 'source/blender/gpu/intern/gpu_material.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_material.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index 60df9e87cc0..440cfc0c814 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -2384,7 +2384,7 @@ GPULamp *GPU_lamp_from_blender(Scene *scene, Object *ob, Object *par) return lamp; } - if (!GPU_framebuffer_texture_attach(lamp->fb, lamp->depthtex, 0, NULL)) { + if (!GPU_framebuffer_texture_attach(lamp->fb, lamp->depthtex, 0)) { gpu_lamp_shadow_free(lamp); return lamp; } @@ -2396,7 +2396,7 @@ GPULamp *GPU_lamp_from_blender(Scene *scene, Object *ob, Object *par) return lamp; } - if (!GPU_framebuffer_texture_attach(lamp->fb, lamp->tex, 0, NULL)) { + if (!GPU_framebuffer_texture_attach(lamp->fb, lamp->tex, 0)) { gpu_lamp_shadow_free(lamp); return lamp; } @@ -2419,7 +2419,7 @@ GPULamp *GPU_lamp_from_blender(Scene *scene, Object *ob, Object *par) return lamp; } - if (!GPU_framebuffer_texture_attach(lamp->blurfb, lamp->blurtex, 0, NULL)) { + if (!GPU_framebuffer_texture_attach(lamp->blurfb, lamp->blurtex, 0)) { gpu_lamp_shadow_free(lamp); return lamp; } @@ -2441,7 +2441,7 @@ GPULamp *GPU_lamp_from_blender(Scene *scene, Object *ob, Object *par) return lamp; } - if (!GPU_framebuffer_texture_attach(lamp->fb, lamp->tex, 0, NULL)) { + if (!GPU_framebuffer_texture_attach(lamp->fb, lamp->tex, 0)) { gpu_lamp_shadow_free(lamp); return lamp; } |