DiligentGraphics/DiligentCore

VK Error Code: ERROR_OUT_OF_DEVICE_MEMORY

IngoChow opened this issue · 7 comments

Failed to call pFactoryVk->CreateSwapChainVk(m_pDevice, m_pImmediateContext, SCDesc, window, &m_pSwapChain).
It works on D3D11 & D3D12.
Thanks.

Diligent Engine: Info: GPU dynamic heap created. Total buffer size: 8.00 MB
Diligent Engine: Info: VulkanMemoryManager 'Global resource memory manager': created new device-local page. (16.00 MB, type idx: 1). Current allocated size: 16.00 MB
Diligent Engine: Info: Requested color buffer format TEX_FORMAT_RGBA8_UNORM_SRGB is not supported by the surface and will be replaced with TEX_FORMAT_BGRA8_UNORM_SRGB
Diligent Engine: Info: Using SURFACE_TRANSFORM_IDENTITY swap chain pretransform
Diligent Engine: Info: Using VK_PRESENT_MODE_FIFO_RELAXED_KHR swap chain present mode
Diligent Engine: ERROR in Diligent::SwapChainVkImpl::CreateVulkanSwapChain() (SwapChainVkImpl.cpp, 473): Failed to create Vulkan swapchain
VK Error Code: ERROR_OUT_OF_DEVICE_MEMORY
Diligent Engine: ERROR in Diligent::`anonymous-namespace'::EngineFactoryVkImpl::CreateSwapChainVk() (EngineFactoryVk.cpp, 1376): Failed to create the swap chain
Debug expression failed:
m_pSwapChain != nullptr

  • Windows 10.0.19044
  • Visual Studio 2019 Debug x64 + CMake 3.24.2)

What GPU are you using?
Are your drivers up-to-date?

My GPU is NVIDIA GeForce RTX 2080.
My driver is the latest driver.

Thanks.

Diligent Engine: Info: Using physical device 'NVIDIA GeForce RTX 2080', API version 1.3.224, Driver version 16.8.0.
Diligent Engine: Info: Extensions supported by device 'NVIDIA GeForce RTX 2080':

VK_KHR_16bit_storage 0.0.1                         VK_KHR_8bit_storage 0.0.1                            VK_KHR_acceleration_structure 0.0.13
VK_KHR_bind_memory2 0.0.1                          VK_KHR_buffer_device_address 0.0.1                   VK_KHR_copy_commands2 0.0.1  ... ...

@IngoChow
Try running the application through the Vulkan Configurator and see what the validation layers write or you can run the application using this flag

Bool EnableValidation DEFAULT_INITIALIZER(false);

If there are no error messages from the validation layers, try reinstalling the GPU driver. I once had a similar problem with an RTX 2070, and reinstalling the driver helped.

One potential reason for the swap chain creation failure could be because your display is connected to the integrated GPU. Diligent currently does not support rendering on one GPU and presenting on another.

I checked the connected GPU info.
It is 'NVIDIA GeForce RTX 2080' , not the integrated GPU.

thanks.

Diligent Engine: Info: Using physical device 'NVIDIA GeForce RTX 2080', API version 1.3.224, Driver version 16.8.0.
Diligent Engine: Info: Extensions supported by device 'NVIDIA GeForce RTX 2080':
VK_KHR_16bit_storage 0.0.1 VK_KHR_8bit_storage 0.0.1 VK_KHR_acceleration_structure 0.0.13
... ...

I suggest installing the Vulkan SDK and enabling validation layers. It is hard to tell why swap chain creation fails without additional information.

@IngoChow Try running the application through the Vulkan Configurator and see what the validation layers write or you can run the application using this flag

Bool EnableValidation DEFAULT_INITIALIZER(false);

If there are no error messages from the validation layers, try reinstalling the GPU driver. I once had a similar problem with an RTX 2070, and reinstalling the driver helped.

There is no error message from the validation layers.
My driver is the latest driver.

Thanks