mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 05:13:58 +00:00
Format all C++ and Java code via clang-format
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
@@ -24,7 +24,7 @@ static bool gUse32bitDepth8bitStencil = false;
|
||||
void DebugName::Init(VkInstance instance, VkDevice device)
|
||||
{
|
||||
vkSetDebugUtilsObjectNameEXT =
|
||||
(PFN_vkSetDebugUtilsObjectNameEXT)vkGetInstanceProcAddr(instance, "vkSetDebugUtilsObjectNameEXT");
|
||||
(PFN_vkSetDebugUtilsObjectNameEXT)vkGetInstanceProcAddr(instance, "vkSetDebugUtilsObjectNameEXT");
|
||||
m_device = device;
|
||||
}
|
||||
|
||||
@@ -33,13 +33,11 @@ void DebugName::Set(VkObjectType type, uint64_t handle, char const * name)
|
||||
if (vkSetDebugUtilsObjectNameEXT == nullptr)
|
||||
return;
|
||||
|
||||
VkDebugUtilsObjectNameInfoEXT const info = {
|
||||
.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT,
|
||||
.pNext = nullptr,
|
||||
.objectType = type,
|
||||
.objectHandle = handle,
|
||||
.pObjectName = name
|
||||
};
|
||||
VkDebugUtilsObjectNameInfoEXT const info = {.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT,
|
||||
.pNext = nullptr,
|
||||
.objectType = type,
|
||||
.objectHandle = handle,
|
||||
.pObjectName = name};
|
||||
CHECK_VK_CALL(vkSetDebugUtilsObjectNameEXT(m_device, &info));
|
||||
}
|
||||
|
||||
@@ -109,9 +107,7 @@ VkFormat VulkanFormatUnpacker::m_bestDepthFormat = VK_FORMAT_UNDEFINED;
|
||||
// static
|
||||
bool VulkanFormatUnpacker::Init(VkPhysicalDevice gpu)
|
||||
{
|
||||
std::array<VkFormat, 3> depthFormats = {{VK_FORMAT_D32_SFLOAT,
|
||||
VK_FORMAT_X8_D24_UNORM_PACK32,
|
||||
VK_FORMAT_D16_UNORM}};
|
||||
std::array<VkFormat, 3> depthFormats = {{VK_FORMAT_D32_SFLOAT, VK_FORMAT_X8_D24_UNORM_PACK32, VK_FORMAT_D16_UNORM}};
|
||||
VkFormatProperties formatProperties;
|
||||
for (auto depthFormat : depthFormats)
|
||||
{
|
||||
@@ -141,8 +137,7 @@ bool VulkanFormatUnpacker::Init(VkPhysicalDevice gpu)
|
||||
}
|
||||
}
|
||||
|
||||
std::array<VkFormat, 2> framebufferColorFormats = {{Unpack(TextureFormat::RGBA8),
|
||||
Unpack(TextureFormat::RedGreen)}};
|
||||
std::array<VkFormat, 2> framebufferColorFormats = {{Unpack(TextureFormat::RGBA8), Unpack(TextureFormat::RedGreen)}};
|
||||
for (auto colorFormat : framebufferColorFormats)
|
||||
{
|
||||
vkGetPhysicalDeviceFormatProperties(gpu, colorFormat, &formatProperties);
|
||||
@@ -167,12 +162,11 @@ VkFormat VulkanFormatUnpacker::Unpack(TextureFormat format)
|
||||
#if defined(OMIM_OS_MAC)
|
||||
case TextureFormat::DepthStencil: return VK_FORMAT_D32_SFLOAT_S8_UINT;
|
||||
#else
|
||||
case TextureFormat::DepthStencil: return gUse32bitDepth8bitStencil ? VK_FORMAT_D32_SFLOAT_S8_UINT : VK_FORMAT_D24_UNORM_S8_UINT;
|
||||
case TextureFormat::DepthStencil:
|
||||
return gUse32bitDepth8bitStencil ? VK_FORMAT_D32_SFLOAT_S8_UINT : VK_FORMAT_D24_UNORM_S8_UINT;
|
||||
#endif
|
||||
case TextureFormat::Depth: return m_bestDepthFormat;
|
||||
case TextureFormat::Unspecified:
|
||||
CHECK(false, ());
|
||||
return VK_FORMAT_UNDEFINED;
|
||||
case TextureFormat::Unspecified: CHECK(false, ()); return VK_FORMAT_UNDEFINED;
|
||||
}
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user