On the Working with Wide Color session Justin Stoyles mentioned that the brightest red(1.0, 0.0, 0.0, 1.0) in Display P3 gamut is represented in the Extended SRGB as 1.358, -0.074, -0.012, 1.0. Indeed to display the brightest red on the MTKView with bgra10_xr_srgb pixel format we need to use that values. But I couldn't find out what conversion techniques are used to get that value.
So can anyone tell me how to convert colors from normalized Display P3 gamut to extended range to use with MTKViews?