Skip to content

iced_wgpu incorrectly selects Vulkan colour format on HDR display #3390

Description

@infiniwave

Is your issue REALLY a bug?

  • My issue is indeed a bug!
  • I am not crazy! I will not fill out this form just to ask a question or request a feature. Pinky promise.

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

While running any iced application on Linux, presumably since my display is HDR-capable, everything rendered looks washed out. This is due to the driver listing the Rgba16Float format before the usual Bgra8Unorm and Rgba8Unorm. Since iced_wgpu selects the first option out of this list that it determines to be appropriate, Rgba16Float is selected. Adding Rgba16Float to the blacklist in compositor.rs fixes the issue, allowing it to select the correct format and render properly. On the other hand, this issue did not occur on my other Linux computer not connected to an HDR display.

What is the expected behavior?

The application renders correctly.

Version

master

Operating System

Linux

Do you have any log output?

2026-07-10T23:02:22.238370Z  INFO iced_winit: System theme: Dark
2026-07-10T23:02:22.238505Z  INFO iced_winit: Window attributes for id `Id(
    1,
)`: WindowAttributes {
    inner_size: Some(
        Logical(
            LogicalSize {
                width: 1024.0,
                height: 768.0,
            },
        ),
    ),
    min_inner_size: None,
    max_inner_size: None,
    position: None,
    resizable: true,
    enabled_buttons: WindowButtons(
        CLOSE | MINIMIZE | MAXIMIZE,
    ),
    title: "Welcome - Iced",
    maximized: false,
    visible: false,
    transparent: false,
    blur: false,
    decorations: true,
    window_icon: None,
    preferred_theme: None,
    resize_increments: None,
    content_protected: false,
    window_level: Normal,
    active: true,
    cursor: Icon(
        Default,
    ),
    parent_window: None,
    fullscreen: None,
    platform_specific: PlatformSpecificWindowAttributes {
        name: Some(
            ApplicationName {
                general: "",
                instance: "",
            },
        ),
        activation_token: None,
        x11: X11WindowAttributes {
            visual_id: None,
            screen_id: None,
            base_size: None,
            override_redirect: false,
            x11_window_types: [
                Normal,
            ],
            embed_window: None,
        },
    },
}
2026-07-10T23:02:23.032696Z  INFO iced_wgpu::window::compositor: Settings {
    present_mode: AutoVsync,
    backends: Backends(
        NOOP | VULKAN | GL | METAL | DX12 | BROWSER_WEBGPU,
    ),
    power_preference: None,
    antialiasing: Some(
        MSAAx4,
    ),
}
2026-07-10T23:02:23.032909Z  INFO wgpu_hal::vulkan::adapter: Found 6 cooperative matrix configurations supported by wgpu
2026-07-10T23:02:23.035834Z  INFO iced_wgpu::window::compositor: Available adapters: [
    AdapterInfo {
        name: "NVIDIA GeForce RTX 4060 Laptop GPU",
        vendor: 4318,
        device: 10400,
        device_type: DiscreteGpu,
        device_pci_bus_id: "0000:01:00.0",
        driver: "NVIDIA",
        driver_info: "610.43.02",
        backend: Vulkan,
        subgroup_min_size: 32,
        subgroup_max_size: 32,
        transient_saves_memory: false,
    },
    AdapterInfo {
        name: "Mesa Intel(R) Arc(tm) Graphics (MTL)",
        vendor: 32902,
        device: 0,
        device_type: IntegratedGpu,
        device_pci_bus_id: "",
        driver: "",
        driver_info: "4.6 (Core Profile) Mesa 26.1.4-arch1.1",
        backend: Gl,
        subgroup_min_size: 4,
        subgroup_max_size: 128,
        transient_saves_memory: false,
    },
]
2026-07-10T23:02:23.036070Z  INFO wgpu_hal::vulkan::adapter: Found 6 cooperative matrix configurations supported by wgpu
2026-07-10T23:02:23.038654Z  INFO iced_wgpu::window::compositor: Selected: AdapterInfo {
    name: "NVIDIA GeForce RTX 4060 Laptop GPU",
    vendor: 4318,
    device: 10400,
    device_type: DiscreteGpu,
    device_pci_bus_id: "0000:01:00.0",
    driver: "NVIDIA",
    driver_info: "610.43.02",
    backend: Vulkan,
    subgroup_min_size: 32,
    subgroup_max_size: 32,
    transient_saves_memory: false,
}
2026-07-10T23:02:23.039160Z  INFO iced_wgpu::window::compositor: Available formats: Copied {
    it: Iter(
        [
            Bgra8UnormSrgb,
            Rgba8UnormSrgb,
            Rgba16Float,
            Rgb10a2Unorm,
            Bgra8Unorm,
            Rgba8Unorm,
        ],
    ),
}
2026-07-10T23:02:23.039187Z  INFO iced_wgpu::window::compositor: Available alpha modes: [
    Opaque,
    PreMultiplied,
]
2026-07-10T23:02:23.039199Z  INFO iced_wgpu::window::compositor: Selected format: Rgba16Float with alpha mode: PreMultiplied

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions