Skip to content

Commit 1e6de08

Browse files
committed
Move explanation to FAQ page and reword
1 parent e6996cb commit 1e6de08

File tree

1 file changed

+42
-9
lines changed

1 file changed

+42
-9
lines changed

en/90_FAQ.md

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
This page lists solutions to common problems that you may encounter while
22
developing Vulkan applications.
33

4-
* **I get an access violation error in the core validation layer**: Make sure
4+
## I get an access violation error in the core validation layer
5+
6+
Make sure
57
that MSI Afterburner / RivaTuner Statistics Server is not running, because it
68
has some compatibility problems with Vulkan.
79

8-
* **I don't see any messages from the validation layers / Validation layers are not available**: First make sure that
9-
the validation layers get a chance to print errors by keeping the terminal open
10-
after your program exits. You can do this from Visual Studio by running your
11-
program with Ctrl-F5 instead of F5, and on Linux by executing your program from
12-
a terminal window. If there are still no messages and you are sure that
13-
validation layers are turned on, then you should ensure that your Vulkan SDK is
14-
correctly installed by following the "Verify the Installation" instructions [on this page](https://vulkan.lunarg.com/doc/view/1.2.135.0/windows/getting_started.html). Also ensure that your SDK version is at least 1.1.106.0 to support the `VK_LAYER_KHRONOS_validation` layer.
10+
## I don't see any messages from the validation layers / Validation layers are not available
11+
12+
First make sure that the validation layers get a chance to print errors by keeping the
13+
terminal open after your program exits. You can do this from Visual Studio by running
14+
your program with Ctrl-F5 instead of F5, and on Linux by executing your program from
15+
a terminal window. If there are still no messages and you are sure that validation
16+
layers are turned on, then you should ensure that your Vulkan SDK is correctly
17+
installed by following the "Verify the Installation" instructions [on this page](https://vulkan.lunarg.com/doc/view/1.2.135.0/windows/getting_started.html). Also ensure that your SDK version is at least 1.1.106.0 to support the `VK_LAYER_KHRONOS_validation` layer.
18+
19+
## vkCreateSwapchainKHR triggers an error in SteamOverlayVulkanLayer64.dll
1520

16-
* **vkCreateSwapchainKHR triggers an error in SteamOverlayVulkanLayer64.dll**:
1721
This appears to be a compatibility problem in the Steam client beta. There are a
1822
few possible workarounds:
1923
* Opt out of the Steam beta program.
@@ -23,3 +27,32 @@ few possible workarounds:
2327
Example:
2428

2529
![](/images/steam_layers_env.png)
30+
31+
## vkCreateInstance fails with VK_ERROR_INCOMPATIBLE_DRIVER
32+
33+
If you are using MacOS with the latest MoltenVK SDK then `vkCreateInstance` may return the `VK_ERROR_INCOMPATIBLE_DRIVER` error. This is because [Vulkan SDK version 1.3.216 or newer](https://vulkan.lunarg.com/doc/sdk/1.3.216.0/mac/getting_started.html) requires you to enable the `VK_KHR_PORTABILITY_subset` extension to use MoltenVK, because it is currently not fully conformant.
34+
35+
You have to add the `VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR` flag to your `VkInstanceCreateInfo` and add `VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME` to your instance extension list.
36+
37+
Code example:
38+
39+
```c++
40+
...
41+
42+
std::vector<const char*> requiredExtensions;
43+
44+
for(uint32_t i = 0; i < glfwExtensionCount; i++) {
45+
requiredExtensions.emplace_back(glfwExtensions[i]);
46+
}
47+
48+
requiredExtensions.emplace_back(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME);
49+
50+
createInfo.flags |= VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
51+
52+
createInfo.enabledExtensionCount = (uint32_t) requiredExtensions.size();
53+
createInfo.ppEnabledExtensionNames = requiredExtensions.data();
54+
55+
if (vkCreateInstance(&createInfo, nullptr, &instance) != VK_SUCCESS) {
56+
throw std::runtime_error("failed to create instance!");
57+
}
58+
```

0 commit comments

Comments
 (0)