-
Notifications
You must be signed in to change notification settings - Fork 7
Troubleshooting
This page lists common problems and pitfalls and ways how to avoid them.
This error may occur for example when trying to build the DirectX 12 backend, samples or custom DirectX 12 shaders. It looks similar to this:
EXEC : error : validation errors EXEC : error : Container part 'Pipeline State Validation' does not match expected for module. Use /Zi for source location.
Validation failed.
This is caused by mismatching dxc.exe and dxil.dll files. When a shader is built, it will be validated with the validation logic residing in the dxil.dll file. This file is part of the Windows SDK, but not the Vulkan SDK. Windows SDK also ships with a proper build of the dxc compiler, however this build does not contain the SPIR-V compiler that is required to build the Vulkan backend. If you only want to use the DirectX 12 backend, you can overwrite the BUILD_DXC_COMPILER
variable to point to the Windows SDK version. An easy way to do this is to use:
FIND_PROGRAM(BUILD_DXC_COMPILER dxc REQUIRED)
This will prefer system directories over others (for example directories listed in the PATH
environment variable). If you need both backends, you either have to downgrade to an older Windows SDK version that contains the dxil.dll for the compiler that is shipped with your target Vulkan SDK, or the other way around. To help you find the proper version, you can execute the following command for both compilers and check their output:
dxc.exe -help | findstr Version
If you are not sure where the currently installed compiler is located, you can run the following command from PowerShell:
where.exe dxc.exe
Alternatively, you can also use an custom build of dxc or a full release installed to a custom location. Again, point to the installation directory by overwriting the BUILD_DXC_COMPILER
variable.
The contents of this Wiki, including text, images and other resources are licensed under a Creative Commons Attribution 4.0 International License.