Skip to content

Commit

Permalink
Add fallback if GPU/User Selection Fails
Browse files Browse the repository at this point in the history
  • Loading branch information
thr3343 committed Dec 5, 2023
1 parent a7aab27 commit 0538fcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/net/vulkanmod/vulkan/Device.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static void pickPhysicalDevice(VkInstance instance) {
final int selectedGPU = Math.min(Initializer.CONFIG.selectedGPU, ppPhysicalDevices.length-1);
if(selectedGPU !=-1) {
GPUCandidate ppPhysicalDevice = ppPhysicalDevices[selectedGPU];
currentDevice = isDeviceSuitable(ppPhysicalDevice) ? ppPhysicalDevice : null;
currentDevice = isDeviceSuitable(ppPhysicalDevice) ? ppPhysicalDevice : enumerateGPUCandidates(ppPhysicalDevices);
}
else currentDevice = enumerateGPUCandidates(ppPhysicalDevices);

Expand Down

0 comments on commit 0538fcc

Please sign in to comment.