xenia-project / xenia

Xbox 360 Emulator Research Project
https://xenia.jp
Other
8.3k stars 1.14k forks source link

Vulkan Issues / Discussion #578

Closed DrChat closed 7 years ago

DrChat commented 8 years ago

Note: Add the flag --gpu=vulkan to enable the Vulkan backend!

SakataGintokiYT commented 8 years ago

1.Dragon Ball Z: Battle of Z- https://www.youtube.com/watch?v=lI7i18Q8DQ0

2.Fist of the North Star - https://www.youtube.com/watch?v=i_l1SwB-ebw

3.Rayman Origins- https://www.youtube.com/watch?v=jkcWgQxLB7M&feature=youtu.be

Razzile commented 8 years ago

I haven't got any logs or videos, but I've noticed that many games have inverted colours on the vulkan build. Seemingly only effecting red and blue colours.

image opengl left, vulkan right image vulkan left, opengl right

admittedly my OpenGL build of xenia is relatively old.

DrChat commented 8 years ago

Okay that's not too good - it's crashing trying to compile a shader. I wonder if it's related to this.

Edit: On second thought - it isn't related to that thread. It's crashing trying to compile simple shaders.

DrChat commented 8 years ago

@Gamedev1909 Okay, make it crash again then go to Debug -> Save Dump As..., then save the minidump and upload it.

DrChat commented 8 years ago

Could you select "Minidump" in the save-as type instead of the one with the heap?

DrChat commented 8 years ago

Awesome - thanks!

DrChat commented 8 years ago

Can you regenerate the dump using the build I provided here?

SonofUgly commented 8 years ago

The red/blue issue looks the same as xenia-project/game-compatibility/issues/206 and #460

jonatino commented 8 years ago

@DrChat Crashing with Jun 6 build (attempting to load Red Dead Redemption).

Screenshot: https://dl.dropboxusercontent.com/u/91292881/ShareX/2016/06/2016-06-06_19-35-09.png

i7 4790k gtx 980

https://www.dropbox.com/s/ncbfnx6j0q0qb6c/xenia.dmp?dl=0

sephiroth99 commented 8 years ago

I also have been trying Vulkan on AMD.

Tried today with the latest everything. (Xenia-vulkan commit b01903cc and Crimson 16.6.1)

Some quick observations (that you may already know):

Anyway, I'm not that surprised Vulkan crashes. The GLSL version of the translated shaders on AMD still have issues (see #416 for example). As the generated SPIR-V shaders have a very similar approach as the generated GLSL shaders (I assume, unless I'm wrong?), my guess is that it is the same bug, but manifesting differently because of the different backend.

DrChat commented 8 years ago

@sephiroth99 If you can figure this out - that would be wonderful. I can't install AMD drivers on this computer which cripples my debugging capabilities.

Set a memory breakpoint on that internal data structure and see if you can find where the drivers touch it. May not be too straightforward unfortunately if it's allocated in different regions of memory every time Xenia is restarted. If it's touched by another API call - wonderful! If not, we might need to submit a dump to AMD and get their help.

Parovozik commented 8 years ago

Hey. I tried Bomberman Live! and results: http://imagehost.spark-media.ru/i4/BA2BB199-C99D-1EB9-B174-C666818D74D3.jpg Original Xbox 360 Picture http://imagehost.spark-media.ru/i4/11B2A8AA-3016-8E0F-B4D9-FE95808E4713.jpg OpenGL Picture http://imagehost.spark-media.ru/i4/BEC1F320-3435-B932-31D3-29E5E2802584.jpg Vulkan api Picture Xenia builds from June 6, 2016 p.s. 'Bomberman Battlefest' on Vulkan make crash after load game level (OpenGL work equally Bomberman Live!)

DrChat commented 8 years ago

@sephiroth99 / @Gamedev1909 Can you generate a crash dump from Banjo Kazooie/Tooie and upload it with amdvlk64.dll? I'm gonna try and collect some information to post a thread on AMD's forums.

DrChat commented 8 years ago

@Gamedev1909 The file you uploaded appears to be corrupted - could you try it again?

DrChat commented 8 years ago

@Gamedev1909 Thanks - but looks like your drivers have been updated since you created that last dump. Can you recreate the dump and upload it again?

Nmzik commented 8 years ago

@DrChat Mafia 2 demo goes in-game in latest "master build". In "vulkan build" it's just black screen (no intro + no gameplay but it still goes in-game) pic

sephiroth99 commented 8 years ago

I tried to see from where the NULL value came from, but it does not seem straight forward, at that point it's practically reverse engineering AMD's driver...

I tried the trick I try with the OpenGL backend to disable the geometry shader (on OpenGL AMD it shows something instead of a black screen), but it did not change anything on the Vulkan side (still crashes).

I don't have Banjo games, I do my tests with Forza 2. If you have it I can send you a minidump and my vulkan dll.

DrChat commented 8 years ago

@sephiroth99: I've got forza motorsport 2 - Go ahead and send me a minidump and amdvlk64.dll

krzysztof860 commented 8 years ago

@DrChat I generated a crash dump from Banjo Tooie. http://www88.zippyshare.com/v/e1oNUIE2/file.html Also I have a amdvlk64.dll - http://www63.zippyshare.com/v/2QLUcdfc/file.html Drivers are newest (16.6.1). My gpu is R9 290.

DrChat commented 8 years ago

@krzysztof860 Thanks! But I also need xenia.exe and xenia.pdb too since you built it yourself :P

krzysztof860 commented 8 years ago

@DrChat Here you go: http://www69.zippyshare.com/v/Yk64As64/file.html (exe and pdb) I also tried Banjo Kazooie. Dump: http://www52.zippyshare.com/v/wEwWOePP/file.html

DrChat commented 8 years ago

Excellent - thanks.

DrChat commented 8 years ago

@krzysztof860 If you can - do me a favor: set a breakpoint in amdvlk64.dll where it crashes and restart Xenia so it hits the breakpoint before it crashes, then dump that.

I see a pointer to pVertexInputState right before the NULL pointer making me think this isn't the shader compiler.

DrChat commented 8 years ago

Okay AMD people - try it again with 7ef7cc39f586f4c06f0801955bcbac243f32b46a.

DrChat commented 8 years ago

What games are you trying? For now you should keep it limited to games that are proven to work already.

NuclearC commented 8 years ago

vulkan no difference on my gpu. it crashes on vkCreateGraphicsPipeline GL4.5 shows black screen with sound. gpu amd radeon 8750m game Sonic CD

krzysztof860 commented 8 years ago

@DrChat I don't know if I did it properly (Debug>New Breakpoint>Function Breakpoint and I entered pVertexInputState in Function Name). There is dump from Banjo Tooie: http://www107.zippyshare.com/v/DQRaCUQN/file.html Exe and pdb: http://www18.zippyshare.com/v/G2gLHKwl/file.html

SakataGintokiYT commented 8 years ago

@Gamedev1909 @nulcearc @krzysztof860

Try --> http://www22.zippyshare.com/v/6NNkYVt2/file.html

Razzile commented 8 years ago

Whilst probably not related directly to vulkan, I've noticed in the latest code audio is quite a lot slower than before. This is odd as there hasn't been any commits to /apu for 6 months. Sorry I can't provide any more info on that

DrChat commented 8 years ago

@razzile Could you clarify which games you're seeing this behavior on? Does this slowdown also happen on the GL backend?

Razzile commented 8 years ago

Forza motorsport 2 and 3D Ultra Minigolf 2 are the games I tested, both didn't have audio slowdowns previously. let me just test opengl quick

Razzile commented 8 years ago

Okay I rebuilt xenia using the exact same commit and it's suddenly full speed again. Was likely a problem my end

ScorchEmber256 commented 8 years ago

This isn't directly related to the vulkan builds, but has anyone noticed that TLoS:DOTD crashes the videocard? No one has said anything about it, and its happened since mid January builds on the GL backend. It works in vulkan for some reason but not in the master builds. xenia.txt

ScorchEmber256 commented 8 years ago

Upon investigation I found the specific commits that messed up numerous things in almost every gameplay accessible game.

From commit #518 fixed some shader issues in spyro which was amazing however commit #514 caused the viewport to go out of whack before crashing within seconds. But it didn't crash the graphics card. After #520 it started crashing the graphics card with no visuals ingame. So I think maybe reviewing those commits would be beneficial for a number of games. Sorry if this is a bit indecisive, isolatig commits on Appveyor is annoying XD.

Prevent some divide by zeros in shaders : xenia detached_2e5c64f_jan 18 2016 - legend of spyro 19_06_2016 9_19_28 am

x64 Speedups (I think #524 may have been commited as well): xenia detached_0e11111_jan 14 2016 - legend of spyro 19_06_2016 9_18_39 am

JohnGodgames commented 8 years ago

@ScorchEmber256 I've mentioned broken TLoS:DOTD a long time ago, but only on IRC chat I think and then it was propably forgotten.Benvanik brokes it when he was trying to fix https://github.com/benvanik/xenia/issues/473 propably.

DrChat commented 8 years ago

Posted a thread on the AMD forums. Hopefully an AMD dev will lead me in the right direction.

dbz400 commented 8 years ago

It would be nice if can have a simply option to switch the GL and Vulkan backend

JohnGodgames commented 8 years ago

I will post some screenshots to current comparison ogl vs. vulkan backend.

Air Conflicts: Secret Wars air secret ogl vs vulkan

Asterix at the Olympic Games asterix ogl vs vulkan

Brave brave ogl vs vulkan

Catherine catherine ogl vs vulkan

Iron Man iron man ogl vs vulkan

Virtua Tennis 3 virtua tennis 3 ogl vs vulkan

gibbed commented 8 years ago

The darker colors in some games is likely due to swapped channels, so it could probably be considered all one issue.

ikki84 commented 8 years ago

How about a DX12 backend to windows 10 users?

gibbed commented 8 years ago

With GL being deprecated I don't think there are any plans to work on new GPU backends. Developing Vulkan is probably the priority currently.

DrChat commented 8 years ago

As I've said before - no existing contributors plan on creating a DX backend. You are completely free to do so if you want to.

Margen67 commented 8 years ago

Is Vulkan eventually going to replace OGL?

theoldsport commented 8 years ago

@Margen67 Eventually, yes

DrChat commented 8 years ago

AMD people: Try 036df2ce126c1ab8d1578d627c4b3e5ea4969be0 - it might be fixed now.

dbz400 commented 8 years ago

@DrChat , just wonder how to switch to Vulkan backend?

DrChat commented 8 years ago

@raven02 See OP.

woody2014 commented 8 years ago

where do we add --gpu=vulkan

woody2014 commented 8 years ago

still crashes

krzysztof860 commented 8 years ago

@DrChat Unfortunately it still crashing. Tested on Banjo Tooie. Minidump - http://www112.zippyshare.com/v/Pl2bTsD8/file.html Exe and pdb - http://www48.zippyshare.com/v/JFmAQ7SC/file.html