-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DX12 and Vulkan backends? #1047
Comments
Maybe gabest will show up again and provide a dx12 backend (as he does from time to time). I guess no other active dev would consider this. Also this is a typical question for a forum and was answered there several times to all extends. |
Vulkan would be better for obvious reasons. But still it's not like PCSX2 needs fast GPU that much. |
Okay I ping gabest @gabest11 |
idk what i am talking about, but i will ask you. |
Maybe once I move to Windows 10. |
You guys heard the man - he will randomly probably add it when he randomly moves to Windows 10 XD IMO Vulkan is a much better choice because of portability. |
I disagree, better to focus on cross-platform stuff |
DX12 must exist both with vulkan because some manufacturers have poor outside opengl/ vulkan api in windows version and that's the harsh reality . |
It's not like those very some manufacturers aren't the same manufacturer that released Mantle spec the whole Vulkan api is based upon. tl;dr: there's no correlation between GL and vulkan. |
So far we've found 2 games that might benefit from newer API.
|
How'd you find them? Based on # of draw calls? |
AMD people would also benefit, as the current opengl backend runs very poorly :( |
@Sarania more or less. I profile them too. If I have a high usages of function 0x2351521, I infer the driver is busy. (note that I need to double check ZoE, I debug/profile some much dump). However those games are very heavy on texture/state change. So you don't have any guarantee that new API will really improve the situation (as you still need to flush your GPU). @nicman23 |
@gregory38 Vulkan and DX12 reduce the strain on an AMD CPU. If they chose to implement Async Compute in the plugin you'd see quite an increase. Newer APIs would absolutely provide a significant performance boost to AMD GPU setups. |
I'd say Vulkan, as there's no real point implementing both DX12 and Vulkan when they do the same thing, but the advantage of Vulkan would be that it would work cross-platform (whereas DX12 would be limited to Windows 10 exclusively). |
As far as I know, Dolphin itself isn't using DX12 Feature level, the rewrite of the graphic backend itself discovered some severe bugs in dolphin, which so got solved. DX12 hasn't been totally tested out. |
Iirc a dev team just randomly, posted the patches to dolphin. The initial effort wasn't by the dolphin devs |
As I said. |
The Ratchet and Clank games would likely see a benefit as well as those games really stress the CPU, unless you heavily underclock the EE which can cause the in-game FPS to dip at times. Any reduction in CPU overhead would help, honestly. |
But are you sure that the issue is the overhead of the driver. And not the GSdx overhead. It is really a complex topic.
Sure but it doesn't come for free. I'm pretty sure people prefer a slow openGL rendering with nice mipmap texture and shadows rather than a fast Vulkan mipmap garbage. |
I'm not saying that the issue is the driver, just that the reduction in Well of course people would prefer a more full features yet slower renderer
|
No. The driver is running is own thread. If you're not limited by the driver overhead, it could be 10x time faster that you will barely notice any speed impact on the emulation. Well you're right that it will reduce the load on 2 core CPU but it is maybe time (and faster) to upgrade to a 4 core CPU (with AMD comes back, I hope it will become more standard).
There is no Vulkan backend but emulation of Ratchet and Clank games is nearly perfect. So it isn't moot, I already made the choice to improve the quality over |
I've looked through your github contribution history and it seems you're more of a tester/issue commiter than an actual coder. I'm of a somewhat similar ilk. Just be sure you know that gregory38 is an actual coder and intimately involved deep in the nuts and bolts of maintaining a PCSX2 codebase that has been around for several years and has over 95% compatibility with PS2 games. That said, perhaps you should realize that neither Vulkan nor DX12 are 'magic bullets' when it comes to improving performance. The primary benefit comes from those who have the HARDWARE to handle things and that hardware isn't going to happen from people who (time and again) complain their Intel Integrated HD-shit graphics have bugs or won't run X game despite bold stickied caps threads on the PCSX2 forums. The overwhelming majority of users are not on Win10 nor have any inclination of 'updating' to Win10. I've made this comparison elsewhere but Win7 is your rock solid STABLE OS while Win8.1 is a BETA OS and Win10 is your DEV/ALPHA OS that isn't ready for prime time and won't be ready for at least another year or two. Microsoft fired most of their testing team and the buggy broken garbage 'updates' they've released to break people's systems time and again have unfortunately caused a backlash where NOBODY is updating their computers even for crucial security updates. GG, Micro$oft. Win10 is not the answer and DX12 is not the answer. It would be utterly insane to bother with DX12 support for less than 20% of the market and have that 'support' change on a near-daily basis with every random forced untested Windows Update for Win10 causing nothing but headaches for both users and developers of programs like PCSX2. And all that said, Vulkan is by far the most promising of the APIs but from personal experience and poking around it is NOT ready for prime time. Maybe 85% ready but still not quite there yet. I know of Doom being one of the few high-profile games that have Vulkan support and that is because John Carmack is a programming genius and managed to get it done within a reasonable amount of time. Not every project has a John Carmack on staff (if only we were so lucky) so we work with what we have. DX12 is a lost cause and Win10-only while Vulkan is still at least a year away from being a mature-enough API for regular production use. Neither of those APIs are going to provide a significant performance increase in enough PS2 games to justify the (unpaid volunteer) coders here to set aside significant time & resources to work on it. TLDR: Please do your research before spewing your ignorant vomit all over this project, thanks. Here's a video that even a simpleton like you can understand; you should do an internet search for more detail if you like: |
Well, closed AMD driver is irrelevant for Linux, unless you need it for a supercomputer render cluster or something. I'm sure such implementation will not be blocked from merging for RADV… but it will not be written by AMD staff either :(
You say that but in all the years to today upscaling factor has have not been changing a single fps for me and my RX580 and previous HD6870. Strangely, same thing happens with RPCS3: changing rendering resolution from 720 to 1440p with same other settings doesn't change anything other than picture quality, it's entirely bottlenecked by something else. I tested recent git snapshots of PCSX2 with MGS2 (intro cutscene, particularly wide shots of the ship and view of upper deck) and RPCS3 with MGS4 (main menu and training range) and they both exude this behaviour while erratically loading the CPU. You may remember me getting on your nerves previously on some other issue with screenshots with driver performance overlay of PS2 and GC versions of RE4 where PCSX2 completely failed on lowest resolution of famously gimped PS2 RE4 version while Dolphin was giving out perfect 60 on highest upscaling of the original. You were blaming "bad drivers" but now Mesa's AMD OpenGL implementation is probably the most exemplary implementation there is (missing optional extensions such as this notwithstanding). And OpenGL spec is deprecated, driver implementations are largely on life-support while Vulkan drivers are developed, if there were new GPU makers (in a world where blatant global oligopolies are not welcomed by corrupt politicians) they would probably skip making their own OpenGL implementation and use a OpenGL->Vulkan shim. You may try to quickly benchmark apps in Mesa with these (per-core CPU usage matters over overall stat though) environmental variables.GALLIUM_HUD_VISIBLE=false
# SIGUSR1, use `kill -10 $(pidof <proc-name>)`
GALLIUM_HUD_TOGGLE_SIGNAL=10
# per-frame accounting
GALLIUM_HUD_PERIOD=0
# tune for >96 DPI display
#GALLIUM_HUD_SCALE=1
# use `GALLIUM_HUD=help glxgears` for options
GALLIUM_HUD="cpu+GPU-load,.dfps+.dframetime,.dbuffer-wait-time;requested-VRAM+VRAM-vis-usage+mapped-VRAM+requested-GTT+GTT-usage+GFX-IB-size,GPU-shaders-busy+GPU-ta-busy+GPU-vgt-busy+GPU-sx-busy+GPU-wd-busy+GPU-sc-busy+GPU-pa-busy+GPU-db-busy+GPU-cp-busy+GPU-cb-busy;.dprimitives-generated+.dclipper-primitives-generated+.ddraw-calls,.dsamples-passed+.dps-invocations"
GALLIUM_PRINT_OPTIONS=true
GALLIUM_DUMP_CPU=true Well, now Dolphin has Vulkan with genius "async shader compilation / ubershaders" and still rocking with perfection. It's different architecture with different hurdles, sure, but how much is it really the drivers and how much is it inoptimal approach ? Is that use-case is so unique that no driver dev stumbled on it otherwise while not bothering with emulation their whole lives and keeping that one code-path extremely, orders-of-magnitude sucky but not completely broken ? |
Windows users with AMD GPUs desperatly needs Vulkan backend on PCXS2. |
@OtavioRaposo you can try to install: maybe opengl on top of mesa on top of DX12 is faster xD. Not sure if I am talking seriously or if this is a joke. |
"OpenGL version 3.3 and earlier" PCSX2 is needing features from GL 4.5 iirc Cool that it's on the store, was wondering where it was going to turnup Edit: maybe it will support newer OpenGL versions in the future, not been able to find roadmap regarding it |
I find DX11 to perform alright on an RX 580, though I'm certain Vulkan could do so much better. Most games run perfectly fluent on 2560x1440 (custom), however they end up looking blurry due to the PS2 Interlacing thing. If I choose the 5K preset the Interlace-Blurryness is completely negated but some games don't run fluently anymore. Also there is this issue of playing in Windowed vs Fullscreen mode (for me at least). In Windowed Mode the game overall will appear much more fluent while on Fullscreen it'll look like it's at 30 FPS or lower. I assume Vulkan would be able to get fully rid of those issues on AMD, while in general being the best option for both AMD and nVidia graphics cards. |
Have you tried this? At this point, I'm accepting any suggestions.
My main problem with DX11 is that it's full of glitches and innacuracies. It's a big turnoff for me. |
You should read into what Vulkan does and what benefit it gives to PCSX2. Vulkan is not Superman carrying everything, sure there is some benefit but AMD isn't implementing fragment shader interlock. You can be as certain as much as you want ofcourse. Same thing that happened to x64, if you don't believe me then wait till it's here and compare between the renderers. |
Windows + AMD + Opengl = unplayable. These words are fact, not opinion. |
@OtavioRaposo sorry, i havent tried It. |
Still hoping for that. |
Continue hoping my friend 😉 |
Yeah, it's easy to blame AMD for crappy OpenGL drivers on Windows, but the same can be said about Nvidia on Linux. To sum up, Vulkan will provide same good performance for both GPU teams, some emulators already have, so why not? |
Because it's work, and not any kind of work: it is hard work. |
@GovanifY sure it's work, that's not doubt. But as I read these comments, it's rather abandoned and blamed on AMD. I'd definitely consider contributing with support and bounty if this will be picked up in the future! |
@divadsn Only very early work has been done on a vulkan backend. I myself cannot say anything about the state of affairs with AMD as I didn't get involved much with the GPU side of things but that'll change rather quickly. We do not do bounties, if there's one thing that has been constant for the project it's that we haven't asked for any kind of financial support. Money won't do us any good if we don't have the people to work on that nor if it isn't a priority. I am giving out a talk about PCSX2 at FOSDEM which will highlight the current state of the project and our current and future priorities if you are interested to see what we are working on, some of those features are, arguably, more important than vulkan from an end user perspective! |
Part of our issue is this GPUOpen-Drivers/AMDVLK#108 This functionality is something we use on PCSX2 to emulate the blending on the PS2, so if we were to do the easiest method of implementing Vulkan by copying existing functionality, while AMD would be much faster than on their OpenGL driver, the Blending would not work properly and would be as compatible as DX11 currently is. So once again, AMD lets us down. There is other ways of doing things like Per Pixel Linked Lists, however none of the team currently knows how to implement it and if it will even be any good, part of the problem is it requires a buffer of a known size, something you can't do with PS2 emulation (because the whole memory is like one big texture buffer), but it might be a possible solution but it's not going to be something we can throw together in 5 minutes, and it very well may just suck. We would like to get some more modern API's working, but we have other things which are a priority right now. |
Could you guys at least let us know what are your projections, maybe how much estimated time until you start working on improving the API side of the emulator? |
We don't have a set timeline, but it won't be before the next release, which will happen sometime this year |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I'm v happy that Vulkan support is planned. Can't wait! |
+1 hopping for the Vulkan support. |
Even if they added it it wouldn't do much better then DX11 because AMD doesn't support a critical feature needed for shading |
I understand that, but any performance improvement is welcome, since not everyone can have the option to use an discrete graphics card and are stuck with integrated Radeon Vega. |
Vulkan is not a magic bullet to get something like a 300% performance uplift. It can have some benefits but not as drastic without Fragment_Shader_Interlock. Besides it is not helpful bumping threads, it will be here when it's here not sooner or later. |
VK doesn't need FSI, it's just easier (and accurate) to do with it. Anyway I'm sure there are things we all want to see done, but it's kind of a waste of everyone's time to keep bumping threads. We haven't forgotten this thread or any number of threads exists, I mean how could we we only get bothered about this once a week on basically every platform. If all you have to say is "I want this" then there's not much point in adding it to the list of thousands of other people expressing the exact same idea all over the place. I'm kind of getting tired of people bumping threads with useless or redundant information and creating urgency over stuff that doesn't need it. The thread will be updated when we have more information. |
Closing as Vulkan has been implemented. |
I wonder if there is a chance for DX12 backend in PCSX2 it gives huge performance increase.
dolphin-emu/dolphin#3364
https://forums.dolphin-emu.org/Thread-unofficial-dolphin-dx12-backend?page=5
The text was updated successfully, but these errors were encountered: