diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-07 20:17:04 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-07 20:37:04 +0300 |
commit | a784e90be02548aa38ba7c6d48087a819ea8693d (patch) | |
tree | 01aa36baee73d53f4a551d26e88c0825cfa722aa /source/blender/gpu/opengl | |
parent | 171b36683a774d70a8f25529858b9c002a2a317e (diff) |
EEVEE: Try to allocate the lightcache and use fallback if failure
This is to remove an explicit opengl dependence to GPU_extension.
Diffstat (limited to 'source/blender/gpu/opengl')
-rw-r--r-- | source/blender/gpu/opengl/gl_shader.cc | 2 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_texture.cc | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/gpu/opengl/gl_shader.cc b/source/blender/gpu/opengl/gl_shader.cc index f125afeb535..76e20de1e51 100644 --- a/source/blender/gpu/opengl/gl_shader.cc +++ b/source/blender/gpu/opengl/gl_shader.cc @@ -113,7 +113,7 @@ char *GLShader::glsl_patch_get(void) STR_CONCAT(patch, slen, "#extension GL_ARB_shader_draw_parameters : enable\n"); STR_CONCAT(patch, slen, "#define GPU_ARB_shader_draw_parameters\n"); } - if (GPU_arb_texture_cube_map_array_is_supported()) { + if (GLContext::texture_cube_map_array_support) { STR_CONCAT(patch, slen, "#extension GL_ARB_texture_cube_map_array : enable\n"); STR_CONCAT(patch, slen, "#define GPU_ARB_texture_cube_map_array\n"); } diff --git a/source/blender/gpu/opengl/gl_texture.cc b/source/blender/gpu/opengl/gl_texture.cc index ba2e5844cc7..4c3d34a759f 100644 --- a/source/blender/gpu/opengl/gl_texture.cc +++ b/source/blender/gpu/opengl/gl_texture.cc @@ -71,8 +71,9 @@ bool GLTexture::init_internal(void) format_ = GPU_DEPTH32F_STENCIL8; } - if ((type_ == GPU_TEXTURE_CUBE_ARRAY) && !GPU_arb_texture_cube_map_array_is_supported()) { - debug::raise_gl_error("Attempt to create a cubemap array without hardware support!"); + if ((type_ == GPU_TEXTURE_CUBE_ARRAY) && (GLContext::texture_cube_map_array_support == false)) { + /* Silently fail and let the caller handle the error. */ + // debug::raise_gl_error("Attempt to create a cubemap array without hardware support!"); return false; } |