mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-21 06:01:43 +00:00
aux/vk: Rename vk_[color_]format_string
This commit is contained in:
parent
96314d4f76
commit
8cfe941c01
|
@ -44,8 +44,8 @@ check_feature(VkFormat format,
|
||||||
{
|
{
|
||||||
if ((format_features & flag) == 0) {
|
if ((format_features & flag) == 0) {
|
||||||
U_LOG_E("vk_csci_get_image_usage_flags: %s requested but %s not supported for format %s (%08x) (%08x)",
|
U_LOG_E("vk_csci_get_image_usage_flags: %s requested but %s not supported for format %s (%08x) (%08x)",
|
||||||
xrt_swapchain_usage_string(usage), vk_format_feature_string(flag),
|
xrt_swapchain_usage_string(usage), vk_format_feature_string(flag), vk_format_string(format),
|
||||||
vk_color_format_string(format), format_features, flag);
|
format_features, flag);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -235,7 +235,7 @@ vk_csci_get_image_usage_flags(struct vk_bundle *vk, VkFormat format, enum xrt_sw
|
||||||
VkFormatFeatureFlags flag = VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT;
|
VkFormatFeatureFlags flag = VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT;
|
||||||
if ((format_features & flag) == 0) {
|
if ((format_features & flag) == 0) {
|
||||||
U_LOG_E("%s: Compositor needs %s but not supported for format %s (%08x) (%08x)", __func__,
|
U_LOG_E("%s: Compositor needs %s but not supported for format %s (%08x) (%08x)", __func__,
|
||||||
vk_format_feature_string(flag), vk_color_format_string(format), format_features, flag);
|
vk_format_feature_string(flag), vk_format_string(format), format_features, flag);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ vk_result_string(VkResult code)
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
vk_color_format_string(VkFormat code)
|
vk_format_string(VkFormat code)
|
||||||
{
|
{
|
||||||
switch (code) {
|
switch (code) {
|
||||||
ENUM_TO_STR(VK_FORMAT_B8G8R8A8_UNORM);
|
ENUM_TO_STR(VK_FORMAT_B8G8R8A8_UNORM);
|
||||||
|
|
|
@ -352,7 +352,7 @@ const char *
|
||||||
vk_result_string(VkResult code);
|
vk_result_string(VkResult code);
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
vk_color_format_string(VkFormat code);
|
vk_format_string(VkFormat code);
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
vk_present_mode_string(VkPresentModeKHR code);
|
vk_present_mode_string(VkPresentModeKHR code);
|
||||||
|
|
|
@ -377,7 +377,7 @@ _find_surface_format(struct comp_target_swapchain *cts, VkSurfaceKHR surface, Vk
|
||||||
|
|
||||||
// Dump formats
|
// Dump formats
|
||||||
for (uint32_t i = 0; i < format_count; i++) {
|
for (uint32_t i = 0; i < format_count; i++) {
|
||||||
COMP_SPEW(cts->base.c, "VkSurfaceFormatKHR: %i [%s, %s]", i, vk_color_format_string(formats[i].format),
|
COMP_SPEW(cts->base.c, "VkSurfaceFormatKHR: %i [%s, %s]", i, vk_format_string(formats[i].format),
|
||||||
vk_color_space_string(formats[i].colorSpace));
|
vk_color_space_string(formats[i].colorSpace));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -464,9 +464,9 @@ cleanup:
|
||||||
"VkSurfaceFormatKHR"
|
"VkSurfaceFormatKHR"
|
||||||
"\n\tpicked: [format = %s, colorSpace = %s]"
|
"\n\tpicked: [format = %s, colorSpace = %s]"
|
||||||
"\n\tpreferred: [format = %s, colorSpace = %s]",
|
"\n\tpreferred: [format = %s, colorSpace = %s]",
|
||||||
vk_color_format_string(format->format), //
|
vk_format_string(format->format), //
|
||||||
vk_color_space_string(format->colorSpace), //
|
vk_color_space_string(format->colorSpace), //
|
||||||
vk_color_format_string(cts->preferred.color_format), //
|
vk_format_string(cts->preferred.color_format), //
|
||||||
vk_color_space_string(cts->preferred.color_space)); //
|
vk_color_space_string(cts->preferred.color_space)); //
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -292,7 +292,7 @@ comp_swapchain_create(struct vk_bundle *vk,
|
||||||
|
|
||||||
VK_DEBUG(vk, "CREATE %p %dx%d %s (%ld)", (void *)sc, //
|
VK_DEBUG(vk, "CREATE %p %dx%d %s (%ld)", (void *)sc, //
|
||||||
info->width, info->height, //
|
info->width, info->height, //
|
||||||
vk_color_format_string(info->format), info->format);
|
vk_format_string(info->format), info->format);
|
||||||
|
|
||||||
// Use the image helper to allocate the images.
|
// Use the image helper to allocate the images.
|
||||||
ret = vk_ic_allocate(vk, info, image_count, &sc->vkic);
|
ret = vk_ic_allocate(vk, info, image_count, &sc->vkic);
|
||||||
|
|
Loading…
Reference in a new issue