[Bf-blender-cvs] [1bee77b] master: Disable high quality depth of field for GPUs that don't support it, system will fall back to low quality depth of field.

Antony Riakiotakis noreply at git.blender.org
Mon Mar 23 19:24:12 CET 2015


Commit: 1bee77b77ad625111489e4d44531e8fdc5107e7c
Author: Antony Riakiotakis
Date:   Mon Mar 23 19:23:49 2015 +0100
Branches: master
https://developer.blender.org/rB1bee77b77ad625111489e4d44531e8fdc5107e7c

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.

===================================================================

M	source/blender/gpu/intern/gpu_compositing.c

===================================================================

diff --git a/source/blender/gpu/intern/gpu_compositing.c b/source/blender/gpu/intern/gpu_compositing.c
index 7b2aca6..a12b9c8 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);




More information about the Bf-blender-cvs mailing list