forge
Explore
Log in

Don't you dare go Hollow

Color format for copy in multigpu setup

Browse files at this commit

0777769e719b7c9b7c980d4ea66288bfbb4da5b3Michael YangParent: ef5b737
  • fix
    • color format for copy in multigpu setup
Show full message
fix: color format for copy in multigpu setup

This fixes #4113 where copying from a rendering Nvidia GPU to a target
iGPU fails because the latter has chosen a color format the former does
not support. The `nvidia-drm` proprietary driver only supports XB30 and
AB30, not XR30/AR30. Therefore, the first two color formats are used.
src/backend/tty.rsmodified+3 -3
@@ -70,10 +70,10 @@ use crate::render_helpers::renderer::AsGlesRenderer;
7070 use crate::render_helpers::{resources, shaders, RenderCtx, RenderTarget};
7171 use crate::utils::{get_monotonic_time, is_laptop_panel, logical_output, PanelOrientation};
7272
73-const SUPPORTED_COLOR_FORMATS: [Fourcc; 8] = [
74- Fourcc::Xrgb2101010,
73+// specific 10-bit formats for multigpu setup,
74+// i.e. copying from rendering Nvidia dGPU to target iGPU.
75+const SUPPORTED_COLOR_FORMATS: [Fourcc; 6] = [
7576 Fourcc::Xbgr2101010,
76- Fourcc::Argb2101010,
7777 Fourcc::Abgr2101010,
7878 Fourcc::Xrgb8888,
7979 Fourcc::Xbgr8888,