This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

[Vulkan/Android] Mali GPU drivers do not expose other color spaces on Android devices with HDR10/HDR10+ display

Hello community, I've been having problems about how to "enable HDR10/HDR10+" in a Vulkan Android application. Due to the lack of content about this and strange behavior in Vulkan mobile drivers the confusion only increases.

I am aware that HDR and WCG are different things but they are related. HDR is about contrast depth and WCG is about color depth and is related to color space.

My doubts are:
1. Why the drivers provided by Arm for devices(with HDR10/HDR10+ display) do not expose surface formats with color space other than VK_KHR_SRGB_NONLINEAR_KHR (Samsung Galaxy S20/Exynos with VK_EXT_swapchain_colorspace extension properly enabled)?
2. Why do drivers provided by Arm for devices(with HDR10/HDR10+ display) expose surface formats with color space other than VK_KHR_SRGB_NONLINEAR_KHR (Samsung Galaxy Note 9/Exynos with VK_EXT_swapchain_colorspace extension properly enabled)?
3. Is there an alternative way on Android besides the one officially exposed by Vulkan to display HDR/WCG content on the display that supports it?

Thanks in advance for any additions, corrections, or responses.

Others: Enhance graphics with wide color content

Parents
  • Vulkan swapchain surface format availability requires support from two independent pieces of hardware. Both the GPU and the display controller must support the image surface format, and the display controller must support the color space. Note that the graphics driver itself does nothing with the color-space information, that's purely metadata passed to the Vulkan WSI and the display controller.

    The GPU surface format support required here is relatively simple, as there is little color space handling in the GPU itself defined in the Vulkan specification. Only swapchain images using the R8G8B8A8_SRGB image format require a non-linear transfer function for the GPU. All the others are defined as a linear transfer function from the point of view of the GPU, and if a transfer function is required to modify the data the application must implement it in shaders. The GPU can therefore support nearly all of the extended color spaces, as most are using commonly available image formats such as RGB565, RGBA8, RGB10A2 or RGBAf16. 

    The main limitation on availability to applications is whether the display controller in the device supports the format or color space, and whether they are exposed by the device manufacturer via their integration with the Vulkan WSI. This is not part of the Arm IP or the Arm driver code - this is handled by the Android Vulkan WSI layer, which is outside of the core driver, and the integration with it provided by the display controller vendor.

    There definitely are Mali devices that expose HDR color spaces e.g. Pixel 6: https://vulkan.gpuinfo.org/displayreport.php?id=20106#surfaceformats

    HTH, 
    Pete

Reply
  • Vulkan swapchain surface format availability requires support from two independent pieces of hardware. Both the GPU and the display controller must support the image surface format, and the display controller must support the color space. Note that the graphics driver itself does nothing with the color-space information, that's purely metadata passed to the Vulkan WSI and the display controller.

    The GPU surface format support required here is relatively simple, as there is little color space handling in the GPU itself defined in the Vulkan specification. Only swapchain images using the R8G8B8A8_SRGB image format require a non-linear transfer function for the GPU. All the others are defined as a linear transfer function from the point of view of the GPU, and if a transfer function is required to modify the data the application must implement it in shaders. The GPU can therefore support nearly all of the extended color spaces, as most are using commonly available image formats such as RGB565, RGBA8, RGB10A2 or RGBAf16. 

    The main limitation on availability to applications is whether the display controller in the device supports the format or color space, and whether they are exposed by the device manufacturer via their integration with the Vulkan WSI. This is not part of the Arm IP or the Arm driver code - this is handled by the Android Vulkan WSI layer, which is outside of the core driver, and the integration with it provided by the display controller vendor.

    There definitely are Mali devices that expose HDR color spaces e.g. Pixel 6: https://vulkan.gpuinfo.org/displayreport.php?id=20106#surfaceformats

    HTH, 
    Pete

Children