mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-31 19:08:30 +00:00
c/main: Tidy code in comp_target_swapchain (NFC)
This commit is contained in:
parent
5915318654
commit
2efd2f543f
|
@ -118,9 +118,7 @@ comp_target_swapchain_create_images(struct comp_target *ct,
|
||||||
// Sanity check.
|
// Sanity check.
|
||||||
ret = vk->vkGetPhysicalDeviceSurfaceSupportKHR(vk->physical_device, 0, cts->surface.handle, &supported);
|
ret = vk->vkGetPhysicalDeviceSurfaceSupportKHR(vk->physical_device, 0, cts->surface.handle, &supported);
|
||||||
if (!supported) {
|
if (!supported) {
|
||||||
COMP_ERROR(ct->c,
|
COMP_ERROR(ct->c, "vkGetPhysicalDeviceSurfaceSupportKHR: surface not supported! '%s'",
|
||||||
"vkGetPhysicalDeviceSurfaceSupportKHR: surface not "
|
|
||||||
"supported! '%s'",
|
|
||||||
vk_result_string(ret));
|
vk_result_string(ret));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,9 +152,7 @@ comp_target_swapchain_create_images(struct comp_target *ct,
|
||||||
|
|
||||||
if (surface_caps.currentTransform & VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR ||
|
if (surface_caps.currentTransform & VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR ||
|
||||||
surface_caps.currentTransform & VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR) {
|
surface_caps.currentTransform & VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR) {
|
||||||
COMP_DEBUG(ct->c,
|
COMP_DEBUG(ct->c, "Swapping width and height, since we are going to pre rotate");
|
||||||
"Swapping width and height,"
|
|
||||||
"since we are going to pre rotate");
|
|
||||||
uint32_t w2 = extent.width;
|
uint32_t w2 = extent.width;
|
||||||
uint32_t h2 = extent.height;
|
uint32_t h2 = extent.height;
|
||||||
extent.width = h2;
|
extent.width = h2;
|
||||||
|
|
Loading…
Reference in a new issue