diff --git a/Telegram/SourceFiles/calls/group/calls_group_viewport_rhi.cpp b/Telegram/SourceFiles/calls/group/calls_group_viewport_rhi.cpp index ecb32041f8..31696f3fad 100644 --- a/Telegram/SourceFiles/calls/group/calls_group_viewport_rhi.cpp +++ b/Telegram/SourceFiles/calls/group/calls_group_viewport_rhi.cpp @@ -952,12 +952,24 @@ void Viewport::RendererRhi::drawYuv2RgbPass( tileData.convertedSize = frameSize; } + // Y-flip the UV for Linux: QRhi/OpenGL on Linux lands YUV frames + // upside-down in the offscreen RGB target compared with Metal/D3D11 + // backends used on macOS/Windows, which already render correctly. +#ifdef Q_OS_LINUX + const float coords[] = { + -1.f, -1.f, 0.f, 0.f, + 1.f, -1.f, 1.f, 0.f, + -1.f, 1.f, 0.f, 1.f, + 1.f, 1.f, 1.f, 1.f, + }; +#else // Q_OS_LINUX const float coords[] = { -1.f, -1.f, 0.f, 1.f, 1.f, -1.f, 1.f, 1.f, -1.f, 1.f, 0.f, 0.f, 1.f, 1.f, 1.f, 0.f, }; +#endif // Q_OS_LINUX if (!_rub) { _rub = _rhi->nextResourceUpdateBatch();