Skip to content

Commit

Permalink
gpu: relax queue requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
DHrpcs3 committed Oct 17, 2024
1 parent f6fa292 commit f5b883a
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions rpcsx/gpu/lib/vk/src/vk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,16 +518,13 @@ void vk::Context::createDevice(VkSurfaceKHR surface, int gpuIndex,
}

if (familyProperty.queueFamilyProperties.queueFlags &
VK_QUEUE_SPARSE_BINDING_BIT) {
if (familyProperty.queueFamilyProperties.queueFlags &
VK_QUEUE_GRAPHICS_BIT) {
queueFamiliesWithGraphicsSupport.insert(queueFamiliesCount);
}
VK_QUEUE_GRAPHICS_BIT) {
queueFamiliesWithGraphicsSupport.insert(queueFamiliesCount);
}

if (familyProperty.queueFamilyProperties.queueFlags &
VK_QUEUE_COMPUTE_BIT) {
queueFamiliesWithComputeSupport.insert(queueFamiliesCount);
}
if (familyProperty.queueFamilyProperties.queueFlags &
VK_QUEUE_COMPUTE_BIT) {
queueFamiliesWithComputeSupport.insert(queueFamiliesCount);
}

if (familyProperty.queueFamilyProperties.queueFlags &
Expand All @@ -538,8 +535,12 @@ void vk::Context::createDevice(VkSurfaceKHR surface, int gpuIndex,
queueFamiliesCount++;
}

rx::dieIf(queueFamiliesWithPresentSupport.empty(), "not found queue family with present support");
rx::dieIf(queueFamiliesWithGraphicsSupport.empty(), "not found queue family with graphics support");
rx::dieIf(queueFamiliesWithPresentSupport.empty(),
"not found queue family with present support");

if (queueFamiliesWithGraphicsSupport.empty()) {
queueFamiliesWithGraphicsSupport = queueFamiliesWithPresentSupport;
}

this->surface = surface;

Expand Down

0 comments on commit f5b883a

Please sign in to comment.