[UI/D3D12] Small refactoring, allow BeginSwap to return false if no surface
This commit is contained in:
@@ -141,7 +141,7 @@ bool VulkanContext::MakeCurrent() {
|
||||
|
||||
void VulkanContext::ClearCurrent() {}
|
||||
|
||||
void VulkanContext::BeginSwap() {
|
||||
bool VulkanContext::BeginSwap() {
|
||||
SCOPE_profile_cpu_f("gpu");
|
||||
auto provider = static_cast<VulkanProvider*>(provider_);
|
||||
auto device = provider->device();
|
||||
@@ -170,6 +170,8 @@ void VulkanContext::BeginSwap() {
|
||||
// TODO(benvanik): use a fence instead? May not be possible with target image.
|
||||
std::lock_guard<std::mutex> queue_lock(device->primary_queue_mutex());
|
||||
status = vkQueueWaitIdle(device->primary_queue());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void VulkanContext::EndSwap() {
|
||||
|
||||
Reference in New Issue
Block a user