diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-01-19 08:00:17 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2019-01-19 08:00:17 +0100 |
commit | a9fcd574f4b018b2b9836c0929ad8ee7e85ddf20 (patch) | |
tree | 87471e0684698d9e693579fc7a14a60f60f4c729 /drivers/gles3 | |
parent | fdd7ed36bf8f23de6ecaae0ed0805ed9918b475b (diff) |
Only define GCC pragmas for GCC
Diffstat (limited to 'drivers/gles3')
-rw-r--r-- | drivers/gles3/rasterizer_scene_gles3.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index d1d063ad5b..6f1d6dcc66 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -2680,8 +2680,10 @@ void RasterizerSceneGLES3::_setup_environment(Environment *env, const CameraMatr // 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. +#ifdef __GNUC__ #pragma GCC push_options -#pragma GCC optimize ("-O2") +#pragma GCC optimize("-O2") +#endif void RasterizerSceneGLES3::_setup_directional_light(int p_index, const Transform &p_camera_inverse_transform, bool p_use_shadows) { LightInstance *li = directional_lights[p_index]; @@ -2799,7 +2801,9 @@ void RasterizerSceneGLES3::_setup_directional_light(int p_index, const Transform glBindBufferBase(GL_UNIFORM_BUFFER, 3, state.directional_ubo); } +#ifdef __GNUC__ #pragma GCC pop_options +#endif 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) { |