Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

-force-vulkan seems not working on windows

Discussion in 'Universal Render Pipeline' started by sammtan, May 29, 2021.

  1. sammtan

    sammtan

    Joined:
    Jul 2, 2019
    Posts:
    14
    hi guys

    I have seen that we can use the command line to set the force graphics API. I've also seen that we can manually control the graphics API from Project Settings> Player.

    hdrp force gapi.PNG

    then I want to try the Force Graphics API on hdrp 10. In Unity Hub, I set the command line to -force-vulkan. but when the editor window opens, the graphics API still says <DX11> is being used, also editor scene view is all white. meanwhile when I tried other graphics APIs, like GLES, GLCore, the window title changed according to the command line.

    hdrp no vulkan.PNG

    is this a bug? or am I using the command line incorrectly? do i need to sync command line and graphics api in project settings? or hdrp does not support vulkan?

    sorry for bad english
    thx for help :D
     
  2. XRA

    XRA

    Joined:
    Aug 26, 2010
    Posts:
    265
    @nath7 Are you running on a laptop with multiple GPU's ? Unity does not correctly switch to Vulkan on multi-gpu setups, I've confirmed this myself on a laptop with an integrated Radeon GPU and an Nvidia RTX GPU. Both gpus are supported when checking vulkaninfo.

    I've reported it as a bug to unity. Despite showing <DX11> in the title bar, the shader compiler will still attempt to compile shaders to Vulkan. When attaching Renderdoc to confirm the API, Unity will momentarily switch to <Vulkan> in the title bar, before crashing.

    When disabling the Radeon gpu Unity will load with <Vulkan> in the title bar, but this is not the correct solution as Windows 10 performance degrades. Also Renderdoc will attach without Unity crashing.

    If you are not running on a multi-gpu machine, ensure you have Vulkan supported drivers installed, and run vulkaninfo from the command prompt, it should list a bunch of stuff if the Vulkan runtime/drivers are installed correctly.
     

    Attached Files: