瀏覽代碼

Make deviceRank an Uint64 to avoid potential overflow issues in case of future GPUs with huge VRAM

suleyth 1 月之前
父節點
當前提交
618f85fafe
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/gpu/vulkan/SDL_gpu_vulkan.c

+ 2 - 2
src/gpu/vulkan/SDL_gpu_vulkan.c

@@ -11252,7 +11252,7 @@ static Uint8 VULKAN_INTERNAL_IsDeviceSuitable(
     VkPhysicalDevice physicalDevice,
     VulkanExtensions *physicalDeviceExtensions,
     Uint32 *queueFamilyIndex,
-    Uint16 *deviceRank)
+    Uint64 *deviceRank)
 {
     Uint32 queueFamilyCount, queueFamilyRank, queueFamilyBest;
     VkQueueFamilyProperties *queueProps;
@@ -11411,7 +11411,7 @@ static Uint8 VULKAN_INTERNAL_DeterminePhysicalDevice(VulkanRenderer *renderer)
     Uint32 i, physicalDeviceCount;
     Sint32 suitableIndex;
     Uint32 queueFamilyIndex, suitableQueueFamilyIndex;
-    Uint16 deviceRank, highestRank;
+    Uint64 deviceRank, highestRank;
 
     vulkanResult = renderer->vkEnumeratePhysicalDevices(
         renderer->instance,