Common: Drop String, add SmallString

This commit is contained in:
Stenzek
2023-09-20 23:49:14 +10:00
parent 3c68543491
commit ac0601f408
55 changed files with 1500 additions and 2062 deletions

View File

@ -17,7 +17,7 @@
#include "common/log.h"
#include "common/path.h"
#include "common/scoped_guard.h"
#include "common/string.h"
#include "common/small_string.h"
#include "fmt/format.h"
@ -662,7 +662,7 @@ bool VulkanDevice::CreateCommandBuffers()
LOG_VULKAN_ERROR(res, "vkCreateCommandPool failed: ");
return false;
}
Vulkan::SetObjectName(m_device, resources.command_pool, TinyString::FromFmt("Frame Command Pool {}", frame_index));
Vulkan::SetObjectName(m_device, resources.command_pool, TinyString::from_fmt("Frame Command Pool {}", frame_index));
VkCommandBufferAllocateInfo buffer_info = {VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO, nullptr,
resources.command_pool, VK_COMMAND_BUFFER_LEVEL_PRIMARY,
@ -677,7 +677,7 @@ bool VulkanDevice::CreateCommandBuffers()
for (u32 i = 0; i < resources.command_buffers.size(); i++)
{
Vulkan::SetObjectName(m_device, resources.command_buffers[i],
TinyString::FromFmt("Frame {} {}Command Buffer", frame_index, (i == 0) ? "Init" : ""));
TinyString::from_fmt("Frame {} {}Command Buffer", frame_index, (i == 0) ? "Init" : ""));
}
VkFenceCreateInfo fence_info = {VK_STRUCTURE_TYPE_FENCE_CREATE_INFO, nullptr, VK_FENCE_CREATE_SIGNALED_BIT};
@ -688,7 +688,7 @@ bool VulkanDevice::CreateCommandBuffers()
LOG_VULKAN_ERROR(res, "vkCreateFence failed: ");
return false;
}
Vulkan::SetObjectName(m_device, resources.fence, TinyString::FromFmt("Frame Fence {}", frame_index));
Vulkan::SetObjectName(m_device, resources.fence, TinyString::from_fmt("Frame Fence {}", frame_index));
if (!m_optional_extensions.vk_khr_push_descriptor)
{
@ -707,7 +707,7 @@ bool VulkanDevice::CreateCommandBuffers()
return false;
}
Vulkan::SetObjectName(m_device, resources.descriptor_pool,
TinyString::FromFmt("Frame Descriptor Pool {}", frame_index));
TinyString::from_fmt("Frame Descriptor Pool {}", frame_index));
}
++frame_index;