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.
This commit is contained in:
Antonis Ryakiotakis 2015-09-16 17:04:12 +03:00
parent e3ff9b2044
commit 2d16622068
Notes: blender-bot 2023-02-14 08:40:25 +01:00
Referenced by issue #46105, Viewport compositing error without NPOT support
1 changed files with 9 additions and 4 deletions

View File

@ -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);