godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.22k stars 20.23k forks source link

Editor silently fails to render on Vulkan #69046

Open dzil123 opened 1 year ago

dzil123 commented 1 year ago

Godot version

v4.0.beta5.official.89a33d28f

System information

Windows 10, Vulkan, Intel UHD Graphics 620, 24.20.100.6025

Issue description

When running the editor or project manager with the Vulkan renderer, the window opens but is blank. It behaves as if everything is working correctly, including changing cursor when mousing over appropriate ui elements and responding to button presses with new windows. Sometimes, the editor will close on its own after a delay, with no interaction.

There are no relevant errors reported, even with --verbose. The drivers are updated to the latest version from the laptop manufacturer's website.

Everything is working as normal under the OpenGL renderer, this only happens with Vulkan.

Screenshot of the blank window, after blindly clicking the Import Project button: (The windows actually have the Godot-themed dark gray background color, but the screenshot tool failed to capture this)

Project manager

Video of the blank editor closing by itself after a delay with no interaction: (run on a default empty project)

https://user-images.githubusercontent.com/5725958/203510805-5cc8c169-c732-498e-a3bd-bcad360e7274.mp4

Output of vulkaninfo: vulkaninfo.txt

Expand output log: Note: the C:\ProgramData\obs-studio-hook\.\graphics-hook64.dll error is unrelated since this issue has occurred even before I installed OBS.
TextServer: Added interface "Dummy"
TextServer: Added interface "ICU / HarfBuzz / Graphite (Built-in)"
Godot Engine v4.0.beta5.official.89a33d28f - https://godotengine.org
Text-to-Speech: SAPI initialized.
WARNING: GENERAL - Message Id Number: 0 | Message Id Name: Loader Message
        loader_get_manifest_files: Registry lookup failed to get layer manifest files.
        Objects - 1
                Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 2374200852608
     at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:259)
Vulkan devices:
  #0: Intel Intel(R) UHD Graphics 620 - Supported, Integrated
Vulkan API 1.1.0 - Using Vulkan Device #0: Intel - Intel(R) UHD Graphics 620
- Vulkan Variable Rate Shading not supported
- Vulkan multiview supported:
  max view count: 16
  max instances: 268435454
- Vulkan subgroup:
  size: 32
  stages: STAGE_VERTEX, STAGE_TESSELLATION_CONTROL, STAGE_TESSELLATION_EVALUATION, STAGE_GEOMETRY, STAGE_FRAGMENT, STAGE_COMPUTE, STAGE_RAYGEN_KHR, STAGE_ANY_HIT_KHR, STAGE_CLOSEST_HIT_KHR, STAGE_MISS_KHR, STAGE_INTERSECTION_KHR, STAGE_CALLABLE_KHR, STAGE_TASK_NV, STAGE_MESH_NV
  supported ops: FEATURE_BASIC, FEATURE_VOTE, FEATURE_ARITHMETIC, FEATURE_BALLOT, FEATURE_SHUFFLE, FEATURE_SHUFFLE_RELATIVE, FEATURE_CLUSTERED, FEATURE_QUAD
  quad operations in all stages
ERROR: GENERAL - Message Id Number: 0 | Message Id Name: Loader Message
        loader_create_device_chain: Failed to find 'vkGetInstanceProcAddr' in layer C:\ProgramData\obs-studio-hook\.\graphics-hook64.dll.  Skipping layer.
        Objects - 1
                Object[0] - VK_OBJECT_TYPE_INSTANCE, Handle 2374200852608
   at: _debug_messenger_callback (drivers/vulkan/vulkan_context.cpp:262)
Using present mode: VK_PRESENT_MODE_FIFO_KHR
Using "winink" pen tablet driver...
Creating VMA small objects pool for memory type index 0
Shader 'CanvasSdfShaderRD' SHA256: 46b4446ac51ad055809ff1bd84252a135d3e59f7b3b996ae47ff83845c462dd1
Shader 'SkeletonShaderRD' SHA256: 0d5d7ad5d4e9488949e01ab50aa3ad0569458627be6114da5f0f2538ffbc2a19
Shader 'ParticlesShaderRD' SHA256: 9815f151031d1783f9c1c420e1d598e0ab7142b5b108d107c48cba5185a07f82
Shader 'ParticlesCopyShaderRD' SHA256: aa27f8ba492512f83e87e098890cee790c7b720844b12c3d63397a6aa255f305
Shader 'CanvasShaderRD' SHA256: e498be65db5becd2ec825ec94df1ed9f72d46ea25a353255994ec9ea4816d098
Shader 'CanvasOcclusionShaderRD' SHA256: a52cb22f0a6c9495be49612789a6a89e4a63c3d0a6f9c84e329bbe6050a1227c
Shader 'ClusterRenderShaderRD' SHA256: ff9c2fc527e7207c7edd4268ba9df8dc91590e9d1d82b8b671d718f504663f8b
Shader 'ClusterStoreShaderRD' SHA256: afb597115b5c702a722180fdeea3e72e35ea576720fae47f78f7aa166d52c80d
Shader 'ClusterDebugShaderRD' SHA256: e694f08db5b9d0eb6330c3f8f91265e85bc0e99d9d2fb80f0df2b14e029ec9f5
Shader 'SceneForwardClusteredShaderRD' SHA256: 4ec2d3d41ba0191a23ec2228e4f9afeef4a2b475c87ddc2fee32aaeacddd043b
Shader 'ResolveShaderRD' SHA256: e26743b1230a94c5b47b60440ebb1c7f7f49b926f8b147c1d2acc1e3f7ed2e9f
Shader 'TaaResolveShaderRD' SHA256: f6c4af5116f3c572fa716f83296e1faca2cbdff4af593f6d627f37004e523374
Shader 'SsEffectsDownsampleShaderRD' SHA256: d80b8f58630b28e15880c8ce180ec1657e328a9ada58221d0ec523f8a0f9af36
Shader 'SsilShaderRD' SHA256: 1b7f6c88a392d9362602c8d94902f214ceb000735488c9a24e7918216efa396a
Shader 'SsilImportanceMapShaderRD' SHA256: f253705f48b37f0d1241587700c940106bcd86c10b705fa66a144b9f0194e984
Shader 'SsilBlurShaderRD' SHA256: 30f0ee104cf99f8315f67084eb06061694d8ff9e29f2e3d0906e60435918c7f3
Shader 'SsilInterleaveShaderRD' SHA256: eee8bcd1e8f702b3489201d738469c2e22bf11de57a97d404db028f360741fdd
Shader 'SsaoShaderRD' SHA256: 75e6ca2f1750227dfaa0a9337e15ee3bd7a7a84a04e7267ba69ed5540b84e57b
Shader 'SsaoImportanceMapShaderRD' SHA256: f3475b863cab060893774e1665da1fa32ae4b00b33950f2dd2f95f6f24a42b42
Shader 'SsaoBlurShaderRD' SHA256: 2f769d6f7c06ecc17bcd438fdf14b8f6c4373e440f8a7f749d1e119f544906d6
Shader 'SsaoInterleaveShaderRD' SHA256: 346a1b3395f7b1e800042ab9cd71d9d438a9117234b6152188d4f535f3346659
Shader 'ScreenSpaceReflectionScaleShaderRD' SHA256: 0b29b3a10acdcab9e711fa41724516ca321690a0c255cfc60f957e8179616697
Shader 'ScreenSpaceReflectionShaderRD' SHA256: 4e6e6be2115e3c0933829225811ca24e9bfce4ca5f7fdbfcc762558faa1b240d
Shader 'ScreenSpaceReflectionFilterShaderRD' SHA256: 60e47f2a162d403b2b48c0a49fd515d5da336d9e52e072587de51f16a55d7d5f
Shader 'SubsurfaceScatteringShaderRD' SHA256: 33dea0ecd59827f5fc45f433c0dddfef97c34901a1d5e688caca60930ee029b0
Shader 'SkyShaderRD' SHA256: 027f4bb206042f4579df313e13a3ca762d5f1f8ea00fa4d5fc19c451cbcc4593
Shader 'VoxelGiShaderRD' SHA256: b1c85966201540182070430d34c75b9cff32480f1f8997843fe5ac5b80fd45ed
Shader 'VoxelGiDebugShaderRD' SHA256: 1c0b2d0213f6fdfaf2571f0015a0592f61a39e26e3c6168637793eef5cf7566e
Shader 'SdfgiPreprocessShaderRD' SHA256: 9e2747fc7ee178c7805702300ef60464b626da189b35e958975feb53e76fbeb2
Shader 'SdfgiDirectLightShaderRD' SHA256: 8adf48462893f342c9d5c779b039201365415fa60e1acc5f4132df5e71523193
Shader 'SdfgiIntegrateShaderRD' SHA256: 60040fbe0a131c7c3f06b60ac5fcdeccde17fd0ca559a29255877c15e39ca2ad
Shader 'GiShaderRD' SHA256: f1f3491ac5d5a66f6e6301de596a4231594095d2892f96959408e46f92e5e13d
Shader 'SdfgiDebugShaderRD' SHA256: ba202353645a04e9429ae61116ea79c7296fdae8a811040e88f359fb970551c9
Shader 'SdfgiDebugProbesShaderRD' SHA256: 0de21d4a7490c853740bb0a1b8d55f199296b18223a3237bbbcbe9b9d6da2d00
Shader 'VolumetricFogShaderRD' SHA256: 4b83917cb60f45fa29624fb68517d069d426f3e13b19f2d7691ce2381fad9587
Shader 'VolumetricFogProcessShaderRD' SHA256: 23e7c8843c03b7fbc029995caeccf825fb562284815aef0adf1b00ce7b181868
Shader 'BokehDofShaderRD' SHA256: b038b73ec8ed5650df9a5ed66105f3c2e1bb636888e7570e23fb6056e3ff606f
Shader 'CopyShaderRD' SHA256: 94ef5885efae1d72a227bff6ad6f1afc5ad8a83cf0c297a59f5514c4c2f2f256
Shader 'CopyToFbShaderRD' SHA256: 629ba5e32ef9eefef9329ea48201d8433dd929471bdfd1e6ec1ddf92537be28e
Shader 'CubeToDpShaderRD' SHA256: 9239335b68ed6c22483e11d654c06988862d14c5a61a60724a2c940424ab5f93
Shader 'CubemapDownsamplerShaderRD' SHA256: 5751e389a3a8b09cd1e52834de0bf32744b386da2589e861c4c5af07d9587825
Shader 'CubemapFilterShaderRD' SHA256: 7f36384ad104913732554a44dd2bec901d10d73d95c516527a59a93e967979b9
Shader 'CubemapRoughnessShaderRD' SHA256: 950cc59a8f4da136b71ddfc4f2d50bc27e30e20aba802af77a7f756699f2a5d4
Shader 'SpecularMergeShaderRD' SHA256: c22336d7fe9afffab6ca582f45981ae80c946dabf1d80f4a67e63c4207342c30
Shader 'TonemapShaderRD' SHA256: 11a50897b90ae59a19e29df3e00952c3477bedba0dbf2a370a52553297655ab2
Shader 'VrsShaderRD' SHA256: 0eb0b5d6851857e95243fd376f85627de22e308a2ef66131c1353cabafbc1fca
Shader 'FsrUpscaleShaderRD' SHA256: 0fda1fe06382938a89245896c9a3b458478ef351208fc60d07d93b3f4a3d5d61
Shader 'LuminanceReduceShaderRD' SHA256: 901103e5c2f089899537cec99759e5af5022894508f5f0ab6f5c927de41a4b86
Shader 'RoughnessLimiterShaderRD' SHA256: 04c45d4861ee8af7e28acf0552e06778791fcee46d44bbf93ac5c4e553d44deb
Shader 'SortShaderRD' SHA256: a014da0c6a170f2ab937b47a16123aa3d703a373be38ffd5ce38086da638c82e
Shader 'BlitShaderRD' SHA256: 7c4fd6999b779ac0d5948896c829ab47b1ca4d4ce976b41f4017d81f8857c9da
WASAPI: Activated device using IAudioClient3 interface
WASAPI: wFormatTag = 65534
WASAPI: nChannels = 2
WASAPI: nSamplesPerSec = 48000
WASAPI: nAvgBytesPerSec = 384000
WASAPI: nBlockAlign = 8
WASAPI: wBitsPerSample = 32
WASAPI: cbSize = 22
WASAPI: mix_rate = 48000
WASAPI: fundamental_period_frames = 1
WASAPI: min_period_frames = 96
WASAPI: max_period_frames = 480
WASAPI: selected a period frame size of 480
WASAPI: detected 2 channels
WASAPI: audio buffer frames: 480 calculated latency: 10ms

Using present mode: VK_PRESENT_MODE_FIFO_KHR
TextServer: Primary interface set to: "ICU / HarfBuzz / Graphite (Built-in)".
CORE API HASH: 3803610836
EDITOR API HASH: 2719475126
Class 'EditorPropertyNameProcessor' is not exposed, skipping.
Class 'FramebufferCacheRD' is not exposed, skipping.
Class 'GDScriptEditorTranslationParserPlugin' is not exposed, skipping.
Class 'GDScriptNativeClass' is not exposed, skipping.
Class 'GodotPhysicsDirectSpaceState2D' is not exposed, skipping.
Class 'GodotPhysicsDirectSpaceState3D' is not exposed, skipping.
Class 'GodotPhysicsServer2D' is not exposed, skipping.
Class 'GodotPhysicsServer3D' is not exposed, skipping.
Class 'IPUnix' is not exposed, skipping.
Class 'MovieWriterMJPEG' is not exposed, skipping.
Class 'MovieWriterPNGWAV' is not exposed, skipping.
Class 'ResourceImporterMP3' is not exposed, skipping.
Class 'ResourceImporterOggVorbis' is not exposed, skipping.
Class 'SceneCacheInterface' is not exposed, skipping.
Class 'SceneRPCInterface' is not exposed, skipping.
Class 'SceneReplicationInterface' is not exposed, skipping.
Class 'UniformSetCacheRD' is not exposed, skipping.
EditorSettings: Load OK!
WARNING: Case mismatch opening requested file 'SEGUIEMJ.TTF', stored as 'seguiemj.ttf' in the filesystem. This file will not open when exported to other case-sensitive platforms.
     at: open_internal (drivers/windows/file_access_windows.cpp:104)
WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
     at: _editor_init (modules/gltf/register_types.cpp:76)
WARNING: FBX file import is enabled in the project settings, but no FBX2glTF path is configured in the editor settings. FBX files will not be imported.
     at: _editor_init (modules/gltf/register_types.cpp:100)
Loaded builtin certs
Creating VMA small objects pool for memory type index 1
EditorSettings: Save OK!
Using present mode: VK_PRESENT_MODE_FIFO_KHR
Using present mode: VK_PRESENT_MODE_FIFO_KHR
Using present mode: VK_PRESENT_MODE_FIFO_KHR
Using present mode: VK_PRESENT_MODE_FIFO_KHR
Using present mode: VK_PRESENT_MODE_FIFO_KHR
Using present mode: VK_PRESENT_MODE_FIFO_KHR

Steps to reproduce

Project manager:

  1. Run godot.exe --rendering-driver vulkan -p

Editor:

  1. Open a project from the project manager, or
  2. Run godot.exe --rendering-driver vulkan --path ... -e

Command line used in video: Godot_v4.0-beta5_win64_console.exe --verbose --rendering-driver vulkan --path D:\godotproject1 -e

Minimal reproduction project

N/A

clayjohn commented 1 year ago

Were you able to run any of the alphas or betas on this hardware?

dzil123 commented 1 year ago

I tested alpha1 and beta1, both open a white window without the Godot icon in the title bar. Alpha1 closes by itself without any notable logs, but beta1 freezes and has this log: out.txt

ERROR: Condition "err" is true. Returning: ERR_CANT_CREATE
   at: _update_swap_chain (drivers/vulkan/vulkan_context.cpp:1864)
ERROR: Condition "err != OK" is true. Returning: ERR_CANT_CREATE
   at: _window_create (drivers/vulkan/vulkan_context.cpp:1479)
ERROR: vkCreateRenderPass2KHR failed with error -7.
   at: (drivers/vulkan/rendering_device_vulkan.cpp:3969)
clayjohn commented 1 year ago

@dzil123 Have you tried updating your drivers?

Also, can you please check that your GPU supports Vulkan by downloading the Vulkan SDK and running the vkcube example?

Ideally Godot would be able to detect if Vulkan is supported or not and give you an appropriate warning message while it falls back to OpenGL

dzil123 commented 1 year ago

When I try to update drivers from the Intel website, I get this error message:

A customized computer manufacturer driver is installed on your computer. The Intel Driver & Support Assistant is not able to update the driver. Installing a generic Intel driver instead of the customized computer manufacturer driver may cause technical issues. Contact Hewlett-Packard (HP) for the latest driver for your computer.

When I try to update drivers from the HP, it says that the driver version installed is already the latest version.

vkcube: image

Exported json from the Vulkan Capability Viewer: IntelR_UHD_Graphics_620.json.txt

Trying to run the Godot v4.0.beta6 editor from the Vulkan Configurator with validation layers and debug logging shows the Godot window opening and closing by itself, with this output: Godot_v4.txt

Is it possible that the drivers only support Vulkan 1.1 but Godot requires Vulkan 1.2? If that's the case, Godot should detect this and show an error message.

BastiaanOlij commented 1 year ago

Can you pull master and rerun with verbose? My PR for changing the extension handling just got merged and at the very least it will dump out all supported extensions now.

akien-mga commented 1 year ago

When I try to update drivers from the Intel website, I get this error message:

A customized computer manufacturer driver is installed on your computer. The Intel Driver & Support Assistant is not able to update the driver. Installing a generic Intel driver instead of the customized computer manufacturer driver may cause technical issues. Contact Hewlett-Packard (HP) for the latest driver for your computer.

When I try to update drivers from the HP, it says that the driver version installed is already the latest version.

Yeah this is very poor support from HP's side. This "customized" driver is BS, it just means that it's the version that HP tested on this hardware and confirmed that it works... back in 2018... https://www.intel.com/content/www/us/en/developer/articles/news/new-1006025-intel-graphics-driver-for-windows-10-64-bit-6th-7th-8th-generation.html

Then HP just stopped caring about this specific product and they never validated any further official Intel driver pack. But Intel still fully supports UHD Graphics 620 and you can install the latest Intel drivers, you just need to remove this needless roadblock that HP is putting in your way.

The latest for your hardware is: https://www.intel.com/content/www/us/en/download/19344/intel-graphics-windows-dch-drivers.html

Intel themselves mention the problem I outlined above in the fine print:

Installing this Intel generic graphics driver will overwrite your computer manufacturer (OEM) customized driver. OEM drivers are handpicked and include customized features and solutions to platform-specific issues. The generic Intel driver provides users the latest and greatest feature enhancements and bug fixes that OEMs may not have customized yet to address platform-specific needs. Users can check for matching OEM versions at OEM websites.

Are you still experiencing an error preventing the driver update? Look here for why and a solution.

That being said, we definitely want things to fail explicitly when the drivers do not support what we need, so indeed if you can test the latest master to see if it's better before upgrading drivers, that would be useful. You can get artifacts from master from the CI e.g. here: https://github.com/godotengine/godot/actions/runs/3544388277

dzil123 commented 1 year ago

Can you pull master and rerun with verbose?

Here's the output log from 3 back-to-back runs from the cdfef0c85 windows-editor CI artifact: message.txt. Now there's a handled crash, but no real backtrace. The log is different for each run.

https://www.intel.com/content/www/us/en/download/19344/intel-graphics-windows-dch-drivers.html

Yes, gfx_win_101.3790_101.2114.exe is what I tried the first time and what gave the "customized OEM driver" message and would not let me proceed. I will try a manual install with the zip.

When I try to update drivers from the HP, it says that the driver version installed is already the latest version.

So something weird happened with the drivers. As I said earlier, the installed driver version matched the version on HP's website, 24.20.100.6025. I decided to download HP's drivers anyway. When I installed them, Vulkan was completely removed from the system. There was no Vulkan loader, and everything from the Vulkan SDK and Godot gave a proper 'vulkan not found' error message (even though the listed driver version was the same!). I was able to restore the old drivers by going to Device Manager -> Update Drivers -> Browse my computer for drivers -> Let me pick from a list of available drivers on my computer. The above 3 tests are from after restoring the 24.20.100.6025 drivers with Vulkan.

dzil123 commented 1 year ago

After installing 31.0.101.2114 from the 'Update Drivers -> Browse my computer for drivers' on the extracted gfx_win_101.3790_101.2114.zip, Godot Vulkan works flawlessly. working.txt

papatv commented 1 year ago

Not solution yet, I tried all, but godot 4 beta 6 (and 1, 2, 3, 4, 5) dont´t work with vulkan 1.1

papatv commented 1 year ago

same problem in beta 7, dont´t work with vulkan 1.1

Calinou commented 1 year ago

@papatv Which GPU model do you have, and which driver version are you using?

papatv commented 1 year ago

Hi, I using a laptop Lenovo Edge 2 in this case... has Windows 10, Intel(R) HD Graphics 520 and Vulkan API 1.1.0

papatv commented 1 year ago

same problem in beta 8

Godot Engine v4.0.beta8.official.45cac42c0 - https://godotengine.org OpenGL Renderer: Intel(R) HD Graphics 520

Editing project: C:/Users/arqsa/Desktop/eje2godo4 Godot Engine v4.0.beta8.official.45cac42c0 - https://godotengine.org Vulkan API 1.1.70 - Using Vulkan Device #0: Intel - Intel(R) HD Graphics 520