From a13986ec5cb7de2fdcb7e86dd9f4a10c3b336f8a Mon Sep 17 00:00:00 2001 From: kd-11 Date: Sat, 5 Jan 2019 21:01:21 +0300 Subject: [PATCH] vk: Spec fixups - Forgot to update descriptor pool init sizes over time - Also clamp swapchain resources to allowable surface extents --- rpcs3/Emu/RSX/VK/VKGSRender.cpp | 6 +++--- rpcs3/Emu/RSX/VK/VKHelpers.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rpcs3/Emu/RSX/VK/VKGSRender.cpp b/rpcs3/Emu/RSX/VK/VKGSRender.cpp index 84502c4ab6..13380b0f93 100644 --- a/rpcs3/Emu/RSX/VK/VKGSRender.cpp +++ b/rpcs3/Emu/RSX/VK/VKGSRender.cpp @@ -634,8 +634,8 @@ VKGSRender::VKGSRender() : GSRender() m_occlusion_query_data[n].driver_handle = n; //Generate frame contexts - VkDescriptorPoolSize uniform_buffer_pool = { VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER , 3 * DESCRIPTOR_MAX_DRAW_CALLS }; - VkDescriptorPoolSize uniform_texel_pool = { VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER , 16 * DESCRIPTOR_MAX_DRAW_CALLS }; + VkDescriptorPoolSize uniform_buffer_pool = { VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER , 6 * DESCRIPTOR_MAX_DRAW_CALLS }; + VkDescriptorPoolSize uniform_texel_pool = { VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER , 2 * DESCRIPTOR_MAX_DRAW_CALLS }; VkDescriptorPoolSize texture_pool = { VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER , 20 * DESCRIPTOR_MAX_DRAW_CALLS }; std::vector sizes{ uniform_buffer_pool, uniform_texel_pool, texture_pool }; @@ -2690,7 +2690,7 @@ void VKGSRender::load_program_env() } else { - m_fragment_constants_buffer_info = { m_fragment_constants_ring_info.heap->value, 0, VK_WHOLE_SIZE }; + m_fragment_constants_buffer_info = { m_fragment_constants_ring_info.heap->value, 0, 32 }; } } diff --git a/rpcs3/Emu/RSX/VK/VKHelpers.h b/rpcs3/Emu/RSX/VK/VKHelpers.h index bea7c0cd69..ecab3f612b 100644 --- a/rpcs3/Emu/RSX/VK/VKHelpers.h +++ b/rpcs3/Emu/RSX/VK/VKHelpers.h @@ -1946,8 +1946,8 @@ public: swap_info.oldSwapchain = old_swapchain; swap_info.clipped = true; - swap_info.imageExtent.width = m_width; - swap_info.imageExtent.height = m_height; + swap_info.imageExtent.width = std::max(m_width, surface_descriptors.minImageExtent.width); + swap_info.imageExtent.height = std::max(m_height, surface_descriptors.minImageExtent.height); createSwapchainKHR(dev, &swap_info, nullptr, &m_vk_swapchain);