-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Remove D3D9 support, to make future changes easier #19951
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
Conversation
Could you release a last official build before deleting dx9? This way ppl with old computers will have a build for reference when dealing with dx9. ;) |
Well, I guess I can hold off on this until 1.19, since my planned graphics work won't likely happen until then anyway. |
Older DirectX 10 GPUs supports D3D11 backend but it's feature level is limited to 10_0. |
That would be fine to support though, just like we previously supported feature level 9 for Windows Phone. |
Note to self: For reference 5ee9cfe removed the D3D9 feature level support, but left in place feature level D3D10 from what I can tell. I don't think we use any functionality that's exclusive to D3D11, really. |
Does Windows Phones support D3D9? |
No, but they supported d3d11 with feature level 9. |
What is the last PPSSPP version that supports windows phones? |
About 6 years ago I'd say, and I never released official builds. It wasn't working well enough, JIT is broken on Windows Phone 7 (no way to invalidate the instruction cache), so it was very slow, plus the graphics drivers were total junk, had the weirdest graphical bugs. It will not be revived, not the least because the platform is completely dead. |
Just chiming in as someone that used DX9 previously. It was only due to being able to force better Anti-Aliasing on an Nvidia GPU (Because Nvidia being the eternal buttholes they have been for decades. They love to build features into drivers, leave them half ass implemented and abandon them later on. And they have me a hostage customer. Because there is no such thing on AMD/Intel cards.), and on my request some time ago you added MSAA/SGSSAA support to Vulkan which pretty much negates the need for DX9 as far as I can manage to think of for me. And if there's a game where the is a problem with modern builds, can always go back to an old build that has DX9. Enabling MSAA in Vulkan currently causes the character sprites to disappear outside of battle/world map in Star Ocean FD at anything other than 1x resolution. |
Thanks for letting me know! Seems there's nearly no reason to keep it indeed. And thanks for reporting the Star Ocean issue, I'll make a separate report of that, that needs to be fixed. |
the trick to force MSAA through the Nvidia Control Panel also should've worked on DX10 and 11 AFAIK. As for SGSSAA its a little trickier, I assume you mean the "enhance" option in the Control Panel, which is technically TrSSAA (I think??) which doesnt always work. In case you tried to force SGSSAA through Nvidia Profile Inspector, that probably works, I am sure that PPSSPP doesnt natively support SGSSAA (even though it would be hella based). I also agree with the removal of DX9, its pretty redundant as DX11 is the same but better, only DX12 would make a difference but that is likely not going to happen and why would it, Vulkan accomplishes effectively the same, except for Nvidia drivers apparently creating more efficient DirectX shaders as compared to Vulkan but considering its PSP emulation it will probably never matter. BTW I also believe I got sprite issues when using MSAA on ModNation Racers, part of the UI got yellow stretched stripes, making it look like a cartoony sun, even tho its supposed to be a clean blue circle |
Thanks for agreeing :) But please report MSAA compatibility issues directly in #20105 . |
No I mean that Nvidia doesn't actually have the code built into the driver for forcing SGSSAA in DX10/11. Only certain variations of OpenGL,DX8 AND DX9. There is nothing in the driver to shim into the rendering in terms of compatibility flags looking for certain buffer formats. It can enhance MSAA into SGSSAA in DX10/11 (but not Vulcan or DX12) games but it's dependant on the game having MSAA built in. And can vary in quality due to the implementation of MSAA on a per game basis. Once upon a time there was a stickied thread over a decade ago on Nvidia's forum asking for the same functionality be added to DX11 in the drivers and after some time they publicly stated they were declining to do so. So DX9 is the only back end you can use flags in the driver to force MSAA/SGSSAA. (If it isn't obvious by my user name I am the one who has been maintaining the spreadsheet for AA compatibility for the last decade + on Guru3D) During a separate issue with performance forcing AA in DX9 Hyrdgard being the awesome person they are , they added MSAA support to Vulkan AND SGSSAA support when you enable "auto max quality" under texture filtering. (Vulkan has it built into the spec under this Sample shading see quality improvements here Under A/B conditions it's identical to forcing it in DX9. If Intel or AMD were interested in adding such functionality to their drivers I would gladly buy their GPUs and test every game imaginable. Sorry off topic, removing DX9 if it's causing maintainability issues is the right thing to do. I'm glad there's an issue page for MSAA issues I'll have to make sure to test more games to see if there are issues. |
thanks a lot for the deeper insight. I always thought the driver level enhancement only requires a MSAA implementation, I had no idea it didnt work with DX10/ 11, I knew it was a coinflip whether it works properly tho. I never used the Profile Inspector so I never went hard on forcing flags and bits. Its kinda sad that Nvidia didnt go all the way with this, to me its a selling point for their cards, if you want to play older games with the highest fidelity possible. In general I wish they were more clear about the NVCP descriptions, some things only affect OpenGL or older DX but its pretty intransparent, you always have to consult some PCGamingWiki pages for it. Speaking of high fidelity, why is SGSSAA enabled under texture filtering, that doesnt really compute with me...SGSSAA should mostly affect geometry, not textures. Like dont get me wrong, I love hearing that we DO have a native implementation in PPSSPP (meaning I can turn off NVCP settings for PPSSPP) but shouldnt it be an AA setting only available when MSAA is checked, rather than "hidden" under a texture setting? |
What @OCRBonk says about the texture filtering is not accurate. We enable what today corresponds to full SGSSAA even if texture filtering is not set to auto max quality - but we only enable it for draws where discard is used (alpha testing is enabled on the PSP), which also is where it really makes a difference. What does this is setting the property We do not actually enable it for other draws, but since we don't do any sharp per pixel lighing or similar, it wouldn't have any effect anyway. None of this is affected by the texture filtering setting. Also, we do not enable this on some GPUs where it's simply not available, such as on Apple GPUs and many mobile ones. |
thanks for clearing that up, I was really confused here. SGSSAA is, roughly speaking, a blend of MSAA and SSAA so I was bewildered as to why a texture setting affected this. It wouldnt surprise me if some Vulkan extension had the ability to do the same thing as the Nvidia driver, SGSSAA originally was an exploit of Nvidias driver behavior anyway and thus it makes total sense that, if you can control resolution (effectively SuperSampling) AND MSAA, there would be a way to shoehorn SGSSAA in there. As for PPSSPP, the current best way to achieve the highest image quality still remains to crank the resolution to a desirable level (as you know, older games dont always look better at higher res), select Vulkan and use 4x or 8x MSAA, right? |
Yeah in Vulkan and DX12 the philosophy is to give full control to the app, and with today's complicated effects that can be long chains of complicated compute shaders, it's way too easy to break assumptions made by the game if a driver tries tricks like sneaking in MSAA where the game doesn't expect it, etc. So don't count on driver overrides ever really coming back... And indeed, a good resolution + 4xMSAA is probably gonna be the best bet (I'd say 8x is overkill, but YMMV) |
well yeah with the "low level" graphics APIs (DX12 and Vulkan) you have more fine grained control, the commands you fill the command list with are smaller things but it supports being fed by multiple threads, offsetting the fact you now need more draw calls, dispatches etc. It also forces you to create your own shader pipelines, which is the reason for the recent "#StutterStruggle" that many PC ports are plagued with. Why MSAA is mostly gone though (and thus the need for driver enhancements) is for another reason, its the rendering paradigm in general. MSAA is a "relict" of the OG Forward Rendering, where you have meshes and every light source causes calculation, thats why back then the active light sources in a given scene were limited to about 6 or 8 and some engines like Unity wouldnt even allow you to place more, as the increase in compute demand wasnt linear, it was exponential. To fix this the industry came up with what we now call Deferred Rendering, instead of iterating over meshes you now create so-called buffers for a frame, the aspects of a scene are essentially prepared and saved in individual containers, like a depth buffer or roughness (used for PBR). This has the advantage of letting you use as many light sources as you want, the upfront costs are higher but it scales really high without introducing much processing demand. Problem is, the buffers themselves are only "metadata" for the rendering engine and dont have any relation to one another, thus "real" transparency doesnt exist, its faked with dithering patterns or shader tricks AND since the meshes themselves dont really exist as a whole MSAA, anti-aliasing that works by multiplying/sampling geometry edges, cannot simply exist. Thats why game devs came up with post process AA (FXAA/ SMAA and all their derivatives), which led to the now dominant TAA. As for PPSSPP I just have the res set to 6x most of the time and MSAA to 8x because with my 4070Super I just dont care. Sometimes I drop the res though, because revealing the low polygon models alongside low res textures just doesnt always look good on a 1440p 165Hz monitor (btw some games, like MidnightClub LAR work beautifully with the increased refresh rate option), you'd need at least a texture pack. But aliasing is bad no matter what, so even lower res outputs deserve AA |
Sorry I was just basing what I remember when you initially added it and I obviously mis remembered what you said here As far as tricking modern applications causing problems, it was the same even with DX9 games because of the proliferation of non MSAA friendly rendering and I recall vividly people saying MSAA with deferred lighting/etc was basically impossible. The tons of DX9 games that use such techniques where they only offer either post process AA can actually still hack in both MSAA and SGSSAA in Nvidia's drivers just fine without major issues. (Though the performance cost of MSAA vs SGSSAA in those scenarios is actually not much of a delta. So not much reason to only use MSAA) And dear Lord does it improve image quality. And many of the modern games on DX11 at least that offer MSAA support enhancing to SGSSAA can often still have greater additional benefit. I'd like to think with some effort someone could come up with a modern configurable compatibility layer to hack in support to modern games. Even if the performance hit is large. It would be useful in the future and help mitigate the myriad problems TAA and temporal/ai upscaling introduce into the image. But I'm not smart and don't know shit about programming really. So enough being off topic. Sorry. I'm still very thankful years later for adding in support to your emulator that facilitates not having to support a 2 decade old API for random people like me. |
Since D3D9 is dropped, should we close all issues that only occurs for D3D9? |
Yes. I'll have a look at them |
Fixes #19949
Will merge after 1.19.