mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-06 20:03:12 +00:00
Fixed upside-down webcam in group calls on Linux QRhi path.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user