mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-11 20:00:38 +01:00
Merge branch 'headless-sRGB-fix' into 'main'
Adding sRGB support to headless surfaces by adding the format to the list See merge request mesa/mesa!40275
This commit is contained in:
commit
f304b5e2bd
1 changed files with 32 additions and 0 deletions
|
|
@ -178,6 +178,14 @@ wsi_headless_surface_get_formats(VkIcdSurfaceBase *icd_surface,
|
|||
out_fmt->format = VK_FORMAT_R8G8B8A8_UNORM;
|
||||
out_fmt->colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
|
||||
}
|
||||
vk_outarray_append_typed(VkSurfaceFormatKHR, &out, out_fmt) {
|
||||
out_fmt->format = VK_FORMAT_B8G8R8A8_SRGB;
|
||||
out_fmt->colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
|
||||
}
|
||||
vk_outarray_append_typed(VkSurfaceFormatKHR, &out, out_fmt) {
|
||||
out_fmt->format = VK_FORMAT_R8G8B8A8_SRGB;
|
||||
out_fmt->colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
|
||||
}
|
||||
} else {
|
||||
vk_outarray_append_typed(VkSurfaceFormatKHR, &out, out_fmt) {
|
||||
out_fmt->format = VK_FORMAT_R8G8B8A8_UNORM;
|
||||
|
|
@ -187,6 +195,14 @@ wsi_headless_surface_get_formats(VkIcdSurfaceBase *icd_surface,
|
|||
out_fmt->format = VK_FORMAT_B8G8R8A8_UNORM;
|
||||
out_fmt->colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
|
||||
}
|
||||
vk_outarray_append_typed(VkSurfaceFormatKHR, &out, out_fmt) {
|
||||
out_fmt->format = VK_FORMAT_R8G8B8A8_SRGB;
|
||||
out_fmt->colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
|
||||
}
|
||||
vk_outarray_append_typed(VkSurfaceFormatKHR, &out, out_fmt) {
|
||||
out_fmt->format = VK_FORMAT_B8G8R8A8_SRGB;
|
||||
out_fmt->colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
|
||||
}
|
||||
}
|
||||
|
||||
return vk_outarray_status(&out);
|
||||
|
|
@ -210,6 +226,14 @@ wsi_headless_surface_get_formats2(VkIcdSurfaceBase *icd_surface,
|
|||
out_fmt->surfaceFormat.format = VK_FORMAT_R8G8B8A8_UNORM;
|
||||
out_fmt->surfaceFormat.colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
|
||||
}
|
||||
vk_outarray_append_typed(VkSurfaceFormat2KHR, &out, out_fmt) {
|
||||
out_fmt->surfaceFormat.format = VK_FORMAT_B8G8R8A8_SRGB;
|
||||
out_fmt->surfaceFormat.colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
|
||||
}
|
||||
vk_outarray_append_typed(VkSurfaceFormat2KHR, &out, out_fmt) {
|
||||
out_fmt->surfaceFormat.format = VK_FORMAT_R8G8B8A8_SRGB;
|
||||
out_fmt->surfaceFormat.colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
|
||||
}
|
||||
} else {
|
||||
vk_outarray_append_typed(VkSurfaceFormat2KHR, &out, out_fmt) {
|
||||
out_fmt->surfaceFormat.format = VK_FORMAT_R8G8B8A8_UNORM;
|
||||
|
|
@ -219,6 +243,14 @@ wsi_headless_surface_get_formats2(VkIcdSurfaceBase *icd_surface,
|
|||
out_fmt->surfaceFormat.format = VK_FORMAT_B8G8R8A8_UNORM;
|
||||
out_fmt->surfaceFormat.colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
|
||||
}
|
||||
vk_outarray_append_typed(VkSurfaceFormat2KHR, &out, out_fmt) {
|
||||
out_fmt->surfaceFormat.format = VK_FORMAT_R8G8B8A8_SRGB;
|
||||
out_fmt->surfaceFormat.colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
|
||||
}
|
||||
vk_outarray_append_typed(VkSurfaceFormat2KHR, &out, out_fmt) {
|
||||
out_fmt->surfaceFormat.format = VK_FORMAT_B8G8R8A8_SRGB;
|
||||
out_fmt->surfaceFormat.colorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;
|
||||
}
|
||||
}
|
||||
|
||||
return vk_outarray_status(&out);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue