vkCreateSwapchainKHR fails with VK_ERROR_OUT_OF_DE

2019-08-17 08:41发布

I am attempting to create a swapchain after successfully creating an instance, surface, and device. However, vkCreateSwapchainKHR is failing with VK_ERROR_OUT_OF_DEVICE_MEMORY.

What does this mean and what are the possible causes?

Device info:

  • Device Name: GeForce GTX 970
  • Driver Version: 1602764800
  • Vulkan API Version: 4194346

API dump: https://pastebin.com/pXebGX5t

EDIT: I think it may be related to pNext having a value here. It is set to NULL in my code so something deeper might be happening like a problem with my binding...

vkCreateDevice(physicalDevice, pCreateInfo, pAllocator, pDevice) returns VkResult VK_SUCCESS (0):
    physicalDevice:                 VkPhysicalDevice = 0000000004D768D0
    pCreateInfo:                    const VkDeviceCreateInfo* = 000000000022EAD0:
        sType:                          VkStructureType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO (3)
        pNext:                          const void* = 000000000022EB20
        flags:                          VkDeviceCreateFlags = 0

标签: vulkan
1条回答
该账号已被封号
2楼-- · 2019-08-17 09:27

Based on the dump your swapchain requested format is a depth format (VK_FORMAT_D24_UNORM_S8_UINT).

That is highly suspicious.
Also something the validation layers probably check (there should be supported vs requested format check). So do yourself a favor and enable them.

查看更多
登录 后发表回答