diff options
author | Juan Linietsky <reduzio@gmail.com> | 2019-01-18 12:32:30 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-18 12:32:30 -0300 |
commit | e3ef52a270d5c778244768bf18eeb5ede89cf0ed (patch) | |
tree | 560c293750dd98451ed933b86e2ad2a95ece21fb /drivers/gles3/rasterizer_scene_gles3.cpp | |
parent | 7ae4cb7f7dc9913f6b1c7e9c9ff90a481ce93ba7 (diff) | |
parent | 6793908a3f243c846c516f9b0c4a05d1a6dedd25 (diff) |
Merge pull request #25101 from hpvb/fix-19633
Work around a GCC optimizer bug at -O3
Diffstat (limited to 'drivers/gles3/rasterizer_scene_gles3.cpp')
-rw-r--r-- | drivers/gles3/rasterizer_scene_gles3.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index 0e030d13a5..d1d063ad5b 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -2677,6 +2677,11 @@ void RasterizerSceneGLES3::_setup_environment(Environment *env, const CameraMatr glBindBuffer(GL_UNIFORM_BUFFER, 0); } +// Drop -O3 for this function as it triggers a GCC bug up until at least GCC 8.2.1. +// This refers to GH issue #19633. +// The bug has been reported to the GCC project. +#pragma GCC push_options +#pragma GCC optimize ("-O2") void RasterizerSceneGLES3::_setup_directional_light(int p_index, const Transform &p_camera_inverse_transform, bool p_use_shadows) { LightInstance *li = directional_lights[p_index]; @@ -2794,6 +2799,7 @@ void RasterizerSceneGLES3::_setup_directional_light(int p_index, const Transform glBindBufferBase(GL_UNIFORM_BUFFER, 3, state.directional_ubo); } +#pragma GCC pop_options void RasterizerSceneGLES3::_setup_lights(RID *p_light_cull_result, int p_light_cull_count, const Transform &p_camera_inverse_transform, const CameraMatrix &p_camera_projection, RID p_shadow_atlas) { |