diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-09-16 17:04:12 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-09-16 17:04:12 +0300 |
commit | 2d16622068d4662a24ab58a08f899b5228d5a81a (patch) | |
tree | 50362354020eab01a4b3b2397585a84fd47d69c8 /source/blender/gpu/intern/gpu_compositing.c | |
parent | e3ff9b2044666ae04fc614a37e59e3dd01eeab4f (diff) |
Fix T46105, disable viewport compositing when non power of two texture
support is missing.
Supporting those (really) old GPUs requires us to make shaders more
expensive by converting between real and scaled coordinates and be wary
of such conversion caveats when handling uv coordinates in shaders. Not
worth the cost for supporting hardware that old.
Diffstat (limited to 'source/blender/gpu/intern/gpu_compositing.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_compositing.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/gpu/intern/gpu_compositing.c b/source/blender/gpu/intern/gpu_compositing.c index 2bafee0fb52..da5db73d382 100644 --- a/source/blender/gpu/intern/gpu_compositing.c +++ b/source/blender/gpu/intern/gpu_compositing.c @@ -306,6 +306,9 @@ bool GPU_fx_compositor_initialize_passes( fx->effects = 0; + if (!GPU_non_power_of_two_support() || !GLEW_EXT_framebuffer_object || !GLEW_ARB_fragment_shader) + return false; + if (!fx_settings) { cleanup_fx_gl_data(fx, true); return false; @@ -340,16 +343,18 @@ bool GPU_fx_compositor_initialize_passes( if (fx_flag & GPU_FX_FLAG_SSAO) num_passes++; - if (!fx->gbuffer) + if (!fx->gbuffer) { fx->gbuffer = GPU_framebuffer_create(); + if (!fx->gbuffer) { + return false; + } + } + /* try creating the jitter texture */ if (!fx->jitter_buffer) fx->jitter_buffer = create_jitter_texture(); - if (!fx->gbuffer) - return false; - /* check if color buffers need recreation */ if (!fx->color_buffer || !fx->depth_buffer || w != fx->gbuffer_dim[0] || h != fx->gbuffer_dim[1]) { cleanup_fx_gl_data(fx, false); |