vk: Remove pointless function (VKGSRender::open_command_buffer)

A relic of the past, back before we wrote wrappers for raw handles.
This commit is contained in:
kd-11 2022-02-20 17:32:21 +03:00 committed by kd-11
parent 83407c386c
commit 1f9ade0ab6
3 changed files with 4 additions and 13 deletions

View File

@ -409,6 +409,7 @@ VKGSRender::VKGSRender() : GSRender()
m_command_buffer_pool.create((*m_device), m_device->get_graphics_queue_family());
m_primary_cb_list.create(m_command_buffer_pool, vk::command_buffer::access_type_hint::flush_only);
m_current_command_buffer = m_primary_cb_list.get();
m_current_command_buffer->begin();
//Create secondary command_buffer for parallel operations
m_secondary_command_buffer_pool.create((*m_device), m_device->get_graphics_queue_family());
@ -507,8 +508,6 @@ VKGSRender::VKGSRender() : GSRender()
m_shaders_cache = std::make_unique<vk::shader_cache>(*m_prog_buffer, "vulkan", "v1.92");
open_command_buffer();
for (u32 i = 0; i < m_swapchain->get_swap_image_count(); ++i)
{
const auto target_layout = m_swapchain->get_optimal_present_layout();
@ -1451,7 +1450,7 @@ void VKGSRender::flush_command_queue(bool hard_sync, bool do_not_switch)
m_current_command_buffer->flags |= vk::command_buffer::cb_load_occluson_task;
}
open_command_buffer();
m_current_command_buffer->begin();
}
void VKGSRender::sync_hint(rsx::FIFO_hint hint, void* args)
@ -2144,11 +2143,6 @@ void VKGSRender::close_and_submit_command_buffer(vk::fence* pFence, VkSemaphore
m_queue_status.clear(flush_queue_state::flushing);
}
void VKGSRender::open_command_buffer()
{
m_current_command_buffer->begin();
}
void VKGSRender::prepare_rtts(rsx::framebuffer_creation_context context)
{
const bool clipped_scissor = (context == rsx::framebuffer_creation_context::context_draw);

View File

@ -198,7 +198,6 @@ public:
private:
void prepare_rtts(rsx::framebuffer_creation_context context);
void open_command_buffer();
void close_and_submit_command_buffer(
vk::fence* fence = nullptr,
VkSemaphore wait_semaphore = VK_NULL_HANDLE,

View File

@ -25,6 +25,7 @@ void VKGSRender::reinitialize_swapchain()
// NOTE: This operation will create a hard sync point
close_and_submit_command_buffer();
m_current_command_buffer->reset();
m_current_command_buffer->begin();
for (auto &ctx : frame_context_storage)
{
@ -46,13 +47,10 @@ void VKGSRender::reinitialize_swapchain()
{
rsx_log.warning("Swapchain initialization failed. Request ignored [%dx%d]", m_swapchain_dims.width, m_swapchain_dims.height);
swapchain_unavailable = true;
open_command_buffer();
return;
}
// Prepare new swapchain images for use
open_command_buffer();
for (u32 i = 0; i < m_swapchain->get_swap_image_count(); ++i)
{
const auto target_layout = m_swapchain->get_optimal_present_layout();
@ -73,7 +71,7 @@ void VKGSRender::reinitialize_swapchain()
vk::wait_for_fence(&resize_fence);
m_current_command_buffer->reset();
open_command_buffer();
m_current_command_buffer->begin();
swapchain_unavailable = false;
should_reinitialize_swapchain = false;