RPCS3 / rpcs3

PlayStation 3 emulator and debugger
https://rpcs3.net/
GNU General Public License v2.0
15.43k stars 1.92k forks source link

Nvidia : vulkan resize and full screen crash #1770

Closed dbz400 closed 8 years ago

dbz400 commented 8 years ago

This one is affected Nvidia only . AMD works perfectly fine.

@kd-11 , let's track this issue here

dbz400 commented 8 years ago

@SakataGintokiYT , are you using Nvidia card ? if yes , can you see if you can reproduce.

https://ci.appveyor.com/project/kd-11/rpcs3/build/1.0.138

SakataGintokiYT commented 8 years ago

@kd-11 @raven02 Crash when resizing screen

Fotoszok.pl
Nezarn commented 8 years ago

@raven02 same here (i have a gtx 970)

kd-11 commented 8 years ago

@SakataGintokiYT https://ci.appveyor.com/project/kd-11/rpcs3/build/1.0.141 NV users can test this. It will very likely crash, but i 'm more interested in RPCS3.log it generates. Thanks.

SakataGintokiYT commented 8 years ago

@kd-11

{rsx::thread} RSX: Window resize request start... {rsx::thread} RSX: Waiting for device to idle {rsx::thread} RSX: Requesting a present surface from the presnentation engine {rsx::thread} RSX: Wait finished. Begin window resize {rsx::thread} RSX: ERROR: [Driver] Code 0 : vkCreateSwapchainKHR: internal drawable creation failed

Log : https://gist.github.com/SakataGintokiYT/dbae18f8fcaaa11271b49fe0257ad775

kd-11 commented 8 years ago

Thanks. Thats more useful.

kd-11 commented 8 years ago

@SakataGintokiYT @raven02 Can you test https://ci.appveyor.com/project/kd-11/rpcs3/build/1.0.154 when it's done building? I'm hoping it stops the emulator rather than crashing. I'm assuming when resizing fails the emulator hard crashes (rpcs3 has stopped working). If it only freezes please let me know.

Nezarn commented 8 years ago

@kd-11 just tried that build that you linked, it still crashes (rpcs3 has stopped working), i have a gtx 970.

kd-11 commented 8 years ago

@Nezarn log?

Nezarn commented 8 years ago

@kd-11 now at second run it didn't crash https://gist.github.com/Nezarn/037125eb9c82fdecf700037b95b6d456

·F {rsx::thread} class fmt::exception thrown: vk::swap_chain::init_swapchain(): Assertion failed! Result is C4650B07h (in file c:\rpcs3\rpcs3\emu\rsx\vk\VKHelpers.h:838)

edit: looks like its game dependant, hatsune miku project diva F just crashes without anything unusual in log.

kd-11 commented 8 years ago

@Nezarn Test this https://ci.appveyor.com/project/kd-11/rpcs3/build/1.0.155 after it finishes building. It will cause a ~2-second freeze when resizing. Try maximizing rpcs3 (not fullscreen) so that I can get a look at what is happening to the window surface.

SakataGintokiYT commented 8 years ago

@kd-11 Yes it works

Log : https://gist.github.com/SakataGintokiYT/396581d971fd105c8f07a32627af1cf7

kd-11 commented 8 years ago

Seems concurrent access was still happening even after waiting for device idle. Whats odd is that the nvidia driver should in theory be the easiest to resize since it creates a swapchain with 16k x 16k dimensions and handling resizes should be as easy as changing image dimensions.

Anyway, thanks for testing guys. I'll try to force hard sync points at different points and see how we can quickly resize without stalling the CPU thread. Hopefully the next build will work okay now.

kd-11 commented 8 years ago

Try https://ci.appveyor.com/project/kd-11/rpcs3/build/1.0.156. Hopefully it will block in a better manner than before before trying to resize.

SakataGintokiYT commented 8 years ago

@kd-11 Works good

Log : https://gist.github.com/SakataGintokiYT/4550ec17185faf355e9b8156f647198d

kd-11 commented 8 years ago

Okay. I'll submit as a new pull request after I clean the code up a bit.

dbz400 commented 8 years ago

Just tested , it looks a lot better and full screen works prefectly.