diff --git a/rpcs3/Emu/RSX/VK/VKGSRender.cpp b/rpcs3/Emu/RSX/VK/VKGSRender.cpp index bfd18be026..6c1b26505d 100644 --- a/rpcs3/Emu/RSX/VK/VKGSRender.cpp +++ b/rpcs3/Emu/RSX/VK/VKGSRender.cpp @@ -2757,9 +2757,9 @@ void VKGSRender::update_vertex_env(u32 id, const vk::vertex_upload_info& vertex_ if (m_vertex_layout_storage) m_current_frame->buffer_views_to_clean.push_back(std::move(m_vertex_layout_storage)); - // View 64M blocks at a time (different drivers will only allow a fixed viewable heap size, 64M should be safe) - const size_t view_size = (base_offset + m_texbuffer_view_size) > m_vertex_layout_ring_info.size() ? m_vertex_layout_ring_info.size() - base_offset : m_texbuffer_view_size; - m_vertex_layout_storage = std::make_unique(*m_device, m_vertex_layout_ring_info.heap->value, VK_FORMAT_R32G32_UINT, base_offset, view_size); + const size_t alloc_addr = m_vertex_layout_stream_info.offset; + const size_t view_size = (alloc_addr + m_texbuffer_view_size) > m_vertex_layout_ring_info.size() ? m_vertex_layout_ring_info.size() - alloc_addr : m_texbuffer_view_size; + m_vertex_layout_storage = std::make_unique(*m_device, m_vertex_layout_ring_info.heap->value, VK_FORMAT_R32G32_UINT, alloc_addr, view_size); base_offset = 0; }