turanszkij / WickedEngine

3D engine with modern graphics
https://wickedengine.net
Other
5.76k stars 605 forks source link

Motion blur broken with vulkan. #560

Open tdaven opened 2 years ago

tdaven commented 2 years ago

Motion blur appears to work with dx12 renderer but with the vulkan renderer it does not. Under Linux, I was frequently getting GPU resets and loss of screen contents (expected for Linux). Sometimes I would get output that was very similar to Windows.

Under Windows, I got the following image: image

Disabling motion blur makes the editor work as expected.

turanszkij commented 2 years ago

I couldn't repro this. Do you have non-Nvidia GPU? This might give a hint about the nature of issue.

tdaven commented 2 years ago

Yes, this was on non-nvidia. It was on an AMD RX 6700 XT. I had briefly tried the vulkan validation layers and saw some messages about buffers still in use but I wasn't sure if it was entirely caused by the motion blur or something else. I can try to capture the output again if it would be helpful.

turanszkij commented 2 years ago

The buffer validation errors shouldn't appear with the latest SDK validation layer, they were present in some older SDK. I think that was related to usage of timeline semaphores.

portaloffreedom commented 2 years ago

I've just tested the motion blur toggle on Linux and it crashed my entire graphic stack instantly, needed an hard reboot. AMD 5700xt graphic card, mesa drivers. It used to work, I've tried motion blur in the past, so something must have broken it.

turanszkij commented 2 years ago

I couldn't repro it still, but this commit is one fix to motion blur: https://github.com/turanszkij/WickedEngine/commit/9c1475236455ff4b809b7b0ecf9e37de2e867736 Maybe it helps

portaloffreedom commented 2 years ago

Took me some time to test it, because I wasn't eager to intentionally crash my system. I can happily state that it works now, my issue is gone. Probably @tdaven should test as well on windows.

tested on commit 768ad1f

tdaven commented 2 years ago

@portaloffreedom , what driver are you using on Linux (ie. version of amdvlk, amdgpu-pro or radv)? I just test latest git and it still causes a GPU reset. I'm not entirely convinced its an engine bug though and might be a driver issue.

portaloffreedom commented 2 years ago

@tdaven I've tested with the open source default of opensuse TW (mesa driver 22.2.0) which I don't remember which one of the 3 it is... Do you get a reset as soon as you press the "motion blur" button?

Also I'm testing on a Vega8 integrated graphics, but I can also double check on the 5700xt on my desktop (arch+mesa)