vulkan: default renderpass and framebuffers

Since these objects basically get used every frame
we shouldn't store them in a hashmap with potentially
worse performance.
Instead storing them in member variables should be better.
This commit is contained in:
niki
2022-08-25 18:15:18 +02:00
parent a577be8a6d
commit 77f75648e8
4 changed files with 69 additions and 37 deletions
+9
View File
@@ -606,6 +606,15 @@ VkStencilOp Vulkan::getStencilOp(StencilAction action) {
}
}
VkIndexType Vulkan::getVulkanIndexBufferType(IndexDataType type) {
switch (type) {
case INDEX_UINT16: return VK_INDEX_TYPE_UINT16;
case INDEX_UINT32: return VK_INDEX_TYPE_UINT32;
default:
throw love::Exception("unknown Index Data type");
}
}
void Vulkan::cmdTransitionImageLayout(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout oldLayout, VkImageLayout newLayout,
uint32_t baseLevel, uint32_t levelCount, uint32_t baseLayer, uint32_t layerCount) {
VkImageMemoryBarrier barrier{};