Godot version:
4.0.dev
OS/device including version:
Windows 10 with AMD Radeon RX 550
Issue description:
Error messages in System Console and Editor:
ERROR: Cant find layer: VK_LAYER_LUNARG_standard_validation
at: VulkanContext::_check_layers (driversvulkanvulkan_context.cpp:158)
ERROR: Cant find layer: VK_LAYER_GOOGLE_threading
at: VulkanContext::_check_layers (driversvulkanvulkan_context.cpp:158)
WARNING: GENERAL - Message Id Number: 0 | Message Id Name: Loader Message
ReadDataFilesInRegistry: Registry lookup failed to get layer manifest files.
Objects - 1
Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 1334774679840
at: VulkanContext::_debug_messenger_callback (driversvulkanvulkan_context.cpp:134)
Steps to reproduce:
Windows 10 + AMD Radeon RX 550 driver version 20.2.2.
Minimal reproduction project:
Not included as errors appear in System Console before any project is loaded.
Do you have the latest drivers for your hardware?
If you are unsure, please update your drivers and try again.
I get a similar message on linux/nvidia:
NVidia GTX1060, ubuntu 19.10
nvidia-driver-430 430.50-0ubuntu2
release_debug
cce0a27ec7dd7
ERROR: Cant find layer: VK_LAYER_LUNARG_standard_validation
at: _check_layers (drivers/vulkan/vulkan_context.cpp:158)
ERROR: Cant find layer: VK_LAYER_GOOGLE_threading
at: _check_layers (drivers/vulkan/vulkan_context.cpp:158)
Godot runs fine, though I do have to specify the ICD:
VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json bin/godot.x11.opt.tools.64
I have the same problem on my Manjaro Linux with GTX970 with nvidia-440xx 440.64-1 driver.
Seems we need better error handling for people who don't have Vulkan validation layers installed.
For Ubuntu/Manjaro, you can install the package vulkan-validationlayers (Debian-based) or vulkan-validation-layers (Arch-based).
For Windows, I guess they might only be included in the Vulkan SDK.
Relevant code:
https://github.com/godotengine/godot/blob/dbb3f992a4f4a145c46df69e0e900262b956f0e3/drivers/vulkan/vulkan_context.cpp#L165-L211
I can confirm that installing vulkan-validation-layers package on Manjaro fixed the problem for me. Thanks for the help! :)
Some docs:
https://vulkan-tutorial.com/Drawing_a_triangle/Setup/Validation_layers
Summary: "Vulkan does not come with any validation layers built-in, but the LunarG Vulkan SDK provides a nice set of layers that check for common errors."
and the VVL sources :
https://github.com/KhronosGroup/Vulkan-ValidationLayers
On Ubuntu 16, the standard repos dont seem to have vulkan-validationlayers.
But installing libvulkan1 and/or vulkan-utils seems to resolve the issue:
vulkaninfo
...
VK_LAYER_LUNARG_standard_validation (LunarG Standard Validation) Vulkan version 1.1.73, layer version 1
Layer Extensions count = 1
VK_EXT_debug_report : extension revision 6
Devices count = 1
GPU id : 0 (GeForce GTX 1060)
Layer-Device Extensions count = 2
VK_EXT_debug_marker : extension revision 4
VK_EXT_validation_cache : extension revision 1
Same here, I've tried installing the last Vulkan SDK. One thing I've noticed is that in 1.1.106 VK_LAYER_KHRONOS_validation is introduced so VK_LAYER_LUNARG_standard_validation is deprecated. If I install an older version of Vulkan SDK godot still crash but without showing the layer errors.
Godot version:
4.0.dev
OS/device including version:
Windows 10 with Intel HD graphics 4600
@blueice08 True. In _create_validation_layers. I replaced
const char *instance_validation_layers_alt1[] = { "VK_LAYER_LUNARG_standard_validation" };
with
const char *instance_validation_layers_alt1[] = { "VK_LAYER_KHRONOS_validation" };
and it works.
OS: Manjaro Kyria 19.0.2
Vulkan-validation-layers v1.2.135-1
Since VK_LAYER_KHRONOS_validation encompasses all of the functionality that used to be contained in VK_LAYER_LUNARG_standard_validation, VK_LAYER_GOOGLE_threading, VK_LAYER_LUNARG_parameter_validation, VK_LAYER_LUNARG_object_tracker, and VK_LAYER_LUNARG_core_validation.
@varshard I tested your branch https://github.com/varshard/godot/tree/update-vk-layer
Godot still crashes, but no mention about validator though, so I guess this is another problem.
$ bin/godot.linuxbsd.tools.64
Godot Engine v4.0.dev.custom_build.29a455b2e - https://godotengine.org
X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)
Major opcode of failed request: 149 ()
Minor opcode of failed request: 4
Resource id in failed request: 0x6e00008
Serial number of failed request: 98
Current serial number in output stream: 104
I'm also having this issue.
Version: 7899b3e
OS: Kubuntu 20.04 LTS
Graphics Card: GeForce GTX 950M/PCIe/SSE2 (nvidia-driver-440)
My output log:
./godot.linuxbsd.tools.64.llvm -d
Godot Engine v4.0.dev.custom_build.7899b3e73 - https://godotengine.org
ERROR: Cant find layer: VK_LAYER_LUNARG_standard_validation
at: _check_layers (drivers/vulkan/vulkan_context.cpp:158)
ERROR: Cant find layer: VK_LAYER_GOOGLE_threading
at: _check_layers (drivers/vulkan/vulkan_context.cpp:158)
X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)
Major opcode of failed request: 149 ()
Minor opcode of failed request: 4
Resource id in failed request: 0x5800006
Serial number of failed request: 66
Current serial number in output stream: 72
@TheFlamyy Did you install the layers as described by akien above? https://github.com/godotengine/godot/issues/37102#issuecomment-602165032
@tinmanjuggernaut I indeed have not done so. After installing vulkan-validationlayers (and rebooting the system) the error message changed to the following
./godot.linuxbsd.tools.64.llvm
Godot Engine v4.0.dev.custom_build.7899b3e73 - https://godotengine.org
X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)
Major opcode of failed request: 149 ()
Minor opcode of failed request: 4
Resource id in failed request: 0x3600006
Serial number of failed request: 66
Current serial number in output stream: 72
To clarify: the absence of validation layers is not an issue to run Godot, so anyone coming here because the engine crashes on start is looking at a red herring. This issue here is just cosmetic for end users, and relevant only for developers who want to use validation layers for debugging.
And so that means anyone posting because Godot 4 is crashing, should be posting in a different issue.
If installing the Vulkan SDK is meant to be optional for end users then these errors really shouldn't be printed at all.
Most helpful comment
Seems we need better error handling for people who don't have Vulkan validation layers installed.
For Ubuntu/Manjaro, you can install the package
vulkan-validationlayers(Debian-based) orvulkan-validation-layers(Arch-based).For Windows, I guess they might only be included in the Vulkan SDK.
Relevant code:
https://github.com/godotengine/godot/blob/dbb3f992a4f4a145c46df69e0e900262b956f0e3/drivers/vulkan/vulkan_context.cpp#L165-L211