diff --git a/src/xenia/gpu/vulkan/vulkan_command_processor.cc b/src/xenia/gpu/vulkan/vulkan_command_processor.cc index d1fbe58e5..235aa81ff 100644 --- a/src/xenia/gpu/vulkan/vulkan_command_processor.cc +++ b/src/xenia/gpu/vulkan/vulkan_command_processor.cc @@ -122,27 +122,12 @@ bool VulkanCommandProcessor::SetupContext() { return false; } - VkEventCreateInfo info = { - VK_STRUCTURE_TYPE_EVENT_CREATE_INFO, - nullptr, - 0, - }; - - status = vkCreateEvent(*device_, &info, nullptr, - reinterpret_cast(&swap_state_.backend_data)); - if (status != VK_SUCCESS) { - return false; - } - return true; } void VulkanCommandProcessor::ShutdownContext() { // TODO(benvanik): wait until idle. - vkDestroyEvent(*device_, reinterpret_cast(swap_state_.backend_data), - nullptr); - if (swap_state_.front_buffer_texture) { // Free swap chain image. DestroySwapImage(); @@ -504,10 +489,6 @@ void VulkanCommandProcessor::PerformSwap(uint32_t frontbuffer_ptr, std::lock_guard lock(swap_state_.mutex); swap_state_.width = frontbuffer_width; swap_state_.height = frontbuffer_height; - - auto swap_event = reinterpret_cast(swap_state_.backend_data); - vkCmdSetEvent(copy_commands, swap_event, - VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT); } status = vkEndCommandBuffer(copy_commands); diff --git a/src/xenia/gpu/vulkan/vulkan_graphics_system.cc b/src/xenia/gpu/vulkan/vulkan_graphics_system.cc index f2ccfe304..57c79912b 100644 --- a/src/xenia/gpu/vulkan/vulkan_graphics_system.cc +++ b/src/xenia/gpu/vulkan/vulkan_graphics_system.cc @@ -278,19 +278,6 @@ void VulkanGraphicsSystem::Swap(xe::ui::UIEvent* e) { // return; } - auto event = reinterpret_cast(swap_state.backend_data); - if (event == nullptr) { - // The command processor is currently uninitialized. - return; - } - - VkResult status = vkGetEventStatus(*device_, event); - if (status != VK_EVENT_SET) { - // The device has not finished processing the image. - // return; - } - - vkResetEvent(*device_, event); swap_state.pending = false; } @@ -304,11 +291,6 @@ void VulkanGraphicsSystem::Swap(xe::ui::UIEvent* e) { auto front_buffer = reinterpret_cast(swap_state.front_buffer_texture); - // Wait on and signal the swap semaphore. - // TODO(DrChat): Interacting with the window causes the device to be lost in - // some games. - // swap_chain->WaitAndSignalSemaphore(semaphore); - VkImageMemoryBarrier barrier; std::memset(&barrier, 0, sizeof(VkImageMemoryBarrier)); barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;