godotengine / godot

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

LightmapGI baking corrupts video memory and something else #88012

Closed nklbdev closed 7 months ago

nklbdev commented 8 months ago

Tested versions

System information

Godot v4.3.dev2.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 760 (NVIDIA; 30.0.14.7430) - Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (12 Threads)

Issue description

Screenshot from my own project: image

Screenshot from Minimal reproduction project: image

Depending on the size and complexity of the meshes, artifacts may appear, as shown in the screenshot (highlighted in red).

Also, the progress bar becomes longer and goes beyond the modal window (highlighted in yellow in the screenshot).

If these artifacts appear, then I will not be able to continue working with the engine - it crashes with various errors or even freezes. Sometimes the computer freezes completely and only a hard reset helps.

Interfaces of other applications are not affected. Artifacts only appear on the Godot interface.

I think Godot is using already occupied areas of video memory to bake lighting.

Not a single application or game that makes heavy use of the video adapter produces such effects for me. I might suspect physical damage to the video memory, but this is not the case.

PS: I used to have a video adapter with memory corruption. It's impossible to forget. In this case, all textures are covered with spots of different colors, and vertices of the meshes fly off to infinity.

Steps to reproduce

Minimal reproduction project (MRP)

LightmapGIArtifactsTestProject.zip

Calinou commented 8 months ago

Vulkan on Kepler GPUs tends to be quite broken in practice, so we may not be able to fix this. (This combination was never supported by NVIDIA on Kepler mobile GPUs, and it was only minimally maintained on desktop before the drivers went EOL.)

cc @DarioSamo

DarioSamo commented 8 months ago

I agree with @Calinou's reasoning here, this GPU launched before Vulkan was even available so the driver support for it might be pretty spotty. Maybe you can give D3D12 a go? The lightmapper should work on it. Perhaps you're running out of VRAM and the renderer is not handling it gracefully? It should be possible to test that out with smaller lightmaps by changing the texel size.

The window stretching thing is some other bug that is unrelated and can be reproduced elsewhere.

darksylinc commented 8 months ago

Can you run with Vulkan Validations enabled (you need to install Vulkan SDK and launch Godot with --gpu-validation command line) and post the log output?.

While it's most likely the others are right (the driver / HW is just not good fit for advanced Vulkan) there's a slight chance Godot is assuming something is supported when it isn't (as is common with Kepler GPUs)

nklbdev commented 8 months ago

Thank you! I'll try to use more modern graphics card

nklbdev commented 7 months ago

Thank you! I tried using a different video card and now everything is fine!

NVIDIA GeForce RTX 4060 (NVIDIA; 31.0.15.5123)

octanejohn commented 7 months ago

maybe try this artifact for d3d12 https://github.com/godotengine/godot/suites/20637090996/artifacts/1235611016

nklbdev commented 7 months ago

Can you run with Vulkan Validations enabled (you need to install Vulkan SDK and launch Godot with --gpu-validation command line) and post the log output?.

@darksylinc, I am sorry, I can't.