diff --git a/drivers/gles3/rasterizer_gles3.cpp b/drivers/gles3/rasterizer_gles3.cpp index 95ddf17529..61eeb064e6 100644 --- a/drivers/gles3/rasterizer_gles3.cpp +++ b/drivers/gles3/rasterizer_gles3.cpp @@ -207,11 +207,6 @@ typedef void(GLAPIENTRY *DebugMessageCallbackARB)(DEBUGPROCARB callback, const v void RasterizerGLES3::initialize() { 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())); - - // FLIP XY Bug: Are more devices affected? - // Confirmed so far: all Adreno 3xx with old driver (until 2018) - // ok on some tested Adreno devices: 4xx, 5xx and 6xx - flip_xy_workaround = GLES3::Config::get_singleton()->flip_xy_workaround; } void RasterizerGLES3::finalize() { @@ -431,19 +426,11 @@ void RasterizerGLES3::_blit_render_target_to_screen(DisplayServer::WindowID p_sc Vector2 screen_rect_end = p_blit.dst_rect.get_end(); - // Adreno (TM) 3xx devices have a bug that create wrong Landscape rotation of 180 degree - // Reversing both the X and Y axis is equivalent to rotating 180 degrees - bool flip_x = false; - if (flip_xy_workaround && screen_rect_end.x > screen_rect_end.y) { - flip_y = !flip_y; - flip_x = !flip_x; - } - - 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); - 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); + Vector2 p1 = Vector2(p_blit.dst_rect.position.x, flip_y ? screen_rect_end.y : p_blit.dst_rect.position.y); + Vector2 p2 = Vector2(screen_rect_end.x, flip_y ? p_blit.dst_rect.position.y : screen_rect_end.y); Vector2 size = p2 - p1; - 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)); + Rect2 screenrect = Rect2(Vector2(0.0, flip_y ? 1.0 : 0.0), Vector2(1.0, flip_y ? -1.0 : 1.0)); glViewport(int(MIN(p1.x, p2.x)), int(MIN(p1.y, p2.y)), Math::abs(size.x), Math::abs(size.y)); diff --git a/drivers/gles3/rasterizer_gles3.h b/drivers/gles3/rasterizer_gles3.h index 36d7716ff0..375a15888e 100644 --- a/drivers/gles3/rasterizer_gles3.h +++ b/drivers/gles3/rasterizer_gles3.h @@ -56,7 +56,6 @@ private: float delta = 0; double time_total = 0.0; - bool flip_xy_workaround = false; #ifdef WINDOWS_ENABLED static bool screen_flipped_y; diff --git a/drivers/gles3/storage/config.cpp b/drivers/gles3/storage/config.cpp index 9816061eb4..5c50aed954 100644 --- a/drivers/gles3/storage/config.cpp +++ b/drivers/gles3/storage/config.cpp @@ -212,7 +212,6 @@ Config::Config() { //Adreno 3xx Compatibility const String rendering_device_name = String::utf8((const char *)glGetString(GL_RENDERER)); if (rendering_device_name.left(13) == "Adreno (TM) 3") { - flip_xy_workaround = true; disable_particles_workaround = true; // ignore driver version 331+ @@ -229,8 +228,6 @@ Config::Config() { // OpenGL ES 3.0 V@0502.0 (GIT@09fef447e8, I1fe547a144, 1661493934) (Date:08/25/22) String driver_version = gl_version.get_slice("V@", 1).get_slicec(' ', 0); if (driver_version.is_valid_float() && driver_version.to_float() >= 331.0) { - flip_xy_workaround = false; - //TODO: also 'GPUParticles'? //https://github.com/godotengine/godot/issues/92662#issuecomment-2161199477 //disable_particles_workaround = false; diff --git a/drivers/gles3/storage/config.h b/drivers/gles3/storage/config.h index 60753d2312..4e478a0caf 100644 --- a/drivers/gles3/storage/config.h +++ b/drivers/gles3/storage/config.h @@ -98,7 +98,6 @@ public: // Adreno 3XX compatibility. bool disable_particles_workaround = false; // Set to 'true' to disable 'GPUParticles'. - bool flip_xy_workaround = false; // PowerVR GE 8320 workaround. bool disable_transform_feedback_shader_cache = false;