@@ -207,11 +207,6 @@ typedef void(GLAPIENTRY *DebugMessageCallbackARB)(DEBUGPROCARB callback, const v
207207
208208void RasterizerGLES3::initialize () {
209209 Engine::get_singleton ()->print_header (vformat (" OpenGL API %s - Compatibility - Using Device: %s - %s" , RS::get_singleton ()->get_video_adapter_api_version (), RS::get_singleton ()->get_video_adapter_vendor (), RS::get_singleton ()->get_video_adapter_name ()));
210-
211- // FLIP XY Bug: Are more devices affected?
212- // Confirmed so far: all Adreno 3xx with old driver (until 2018)
213- // ok on some tested Adreno devices: 4xx, 5xx and 6xx
214- flip_xy_workaround = GLES3::Config::get_singleton ()->flip_xy_workaround ;
215210}
216211
217212void RasterizerGLES3::finalize () {
@@ -431,19 +426,11 @@ void RasterizerGLES3::_blit_render_target_to_screen(DisplayServer::WindowID p_sc
431426
432427 Vector2 screen_rect_end = p_blit.dst_rect .get_end ();
433428
434- // Adreno (TM) 3xx devices have a bug that create wrong Landscape rotation of 180 degree
435- // Reversing both the X and Y axis is equivalent to rotating 180 degrees
436- bool flip_x = false ;
437- if (flip_xy_workaround && screen_rect_end.x > screen_rect_end.y ) {
438- flip_y = !flip_y;
439- flip_x = !flip_x;
440- }
441-
442- Vector2 p1 = Vector2 (flip_x ? screen_rect_end.x : p_blit.dst_rect .position .x , flip_y ? screen_rect_end.y : p_blit.dst_rect .position .y );
443- Vector2 p2 = Vector2 (flip_x ? p_blit.dst_rect .position .x : screen_rect_end.x , flip_y ? p_blit.dst_rect .position .y : screen_rect_end.y );
429+ Vector2 p1 = Vector2 (p_blit.dst_rect .position .x , flip_y ? screen_rect_end.y : p_blit.dst_rect .position .y );
430+ Vector2 p2 = Vector2 (screen_rect_end.x , flip_y ? p_blit.dst_rect .position .y : screen_rect_end.y );
444431 Vector2 size = p2 - p1;
445432
446- Rect2 screenrect = Rect2 (Vector2 (flip_x ? 1.0 : 0 .0 , flip_y ? 1.0 : 0.0 ), Vector2 (flip_x ? - 1.0 : 1.0 , flip_y ? -1.0 : 1.0 ));
433+ Rect2 screenrect = Rect2 (Vector2 (0 .0 , flip_y ? 1.0 : 0.0 ), Vector2 (1.0 , flip_y ? -1.0 : 1.0 ));
447434
448435 glViewport (int (MIN (p1.x , p2.x )), int (MIN (p1.y , p2.y )), Math::abs (size.x ), Math::abs (size.y ));
449436
0 commit comments