mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-07 03:40:07 +00:00
vk: Fix uninitialized (and wrong) variable access
This commit is contained in:
parent
b0708367c2
commit
479d92d075
@ -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<vk::buffer_view>(*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<vk::buffer_view>(*m_device, m_vertex_layout_ring_info.heap->value, VK_FORMAT_R32G32_UINT, alloc_addr, view_size);
|
||||
base_offset = 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user