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
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2015-03-23 21:23:49 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-03-23 21:24:01 +0300
commit1bee77b77ad625111489e4d44531e8fdc5107e7c (patch)
tree5cebc4b52b146792dcc1c65db508c3c281eb7f11
parentddf58004c4a4ad7fc59f9cd1c3f6f0a800424ee3 (diff)
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.
-rw-r--r--source/blender/gpu/intern/gpu_compositing.c4
1 files changed, 3 insertions, 1 deletions
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);