From 1bee77b77ad625111489e4d44531e8fdc5107e7c Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Mon, 23 Mar 2015 19:23:49 +0100 Subject: Disable high quality depth of field for GPUs that don't support it, system will fall back to low quality depth of field. Also add check in case some of the errors are caused by crappy framebuffer object support. --- source/blender/gpu/intern/gpu_compositing.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/blender/gpu/intern/gpu_compositing.c b/source/blender/gpu/intern/gpu_compositing.c index 7b2aca65324..a12b9c8a05b 100644 --- a/source/blender/gpu/intern/gpu_compositing.c +++ b/source/blender/gpu/intern/gpu_compositing.c @@ -469,7 +469,7 @@ bool GPU_fx_compositor_initialize_passes( } } - fx->dof_high_quality = dof_high_quality; + fx->dof_high_quality = dof_high_quality && GPU_geometry_shader_support() && GPU_instanced_drawing_support(); } else { /* cleanup unnecessary buffers */ @@ -851,6 +851,8 @@ bool GPU_fx_do_composite_pass(GPUFX *fx, float projmat[4][4], bool is_persp, str /* binding takes care of setting the viewport to the downsampled size */ GPU_framebuffer_slots_bind(fx->gbuffer, 0); + GPU_framebuffer_check_valid(fx->gbuffer); + glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); /* disable bindings */ GPU_texture_filter_mode(src, false, true); -- cgit v1.2.3