-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
rsx: Implement shader interpreters #8106
Conversation
Works like a charm on GT5 BCES00569 with Shader Interpreter set to Enabled. When the shaders are being interpreted performance is low as expected, but the graphics are all there. Once the shaders have been compiled (or some specific heavy shader?) performance goes back to normal. RX 580 on Windows 10. |
Well I fired up Demon's Souls on my laptop just to see. You weren't kidding about those long pauses! |
Archlinux, r9 fury, mesa. |
GOW OF WAR 3 all Games Crash and boot compiler Cache New |
@toccata10 Are you using ACO? ACO is known to have problems with complex shaders. |
Yes, I was using ACO. With the traditionnal llvm radv, it works fine on teken tag tournament 2 (and a few other games I tested). Some stalls of course, but looks like a very nice improvement. |
On SoulCalibur IV [BLES00296], with Ogl, with hybrid: the screen displays either garbage or is dark.
|
- Adds basic interpreter functionality. - Flow control and other instructions not yet implemented.
- Must statically write the gl_ClipDistance registers else you get uninitialized trash. This problem is more readily apparent on NVIDIA technology but even AMD is not completely immune.
- Fix DIV instruction - Add EXP_TEX modifier - Implement WPOS register read - Swap 3D and Cubemap enums to match RSX ids - Adds two extra instruction classes: flow control and packing control - Implement remaining FP instructions with exception of the rare projected texture lookups - Fix typo causing output color index > 0 to not work - Fix KIL instruction - Implement conditional vertex program writes
- merge disable_asynchronous_shader_compiler and interpreter_mode - removes disable_asynchronous_shader_compiler setting - Adds the resulting settings as radio buttons to the gui tab
Overview
This PR adds shader interpreters to rpcs3 to take over for the normal rendering pipeline when no shader is available and the compiler has yet to finish generating one. In this case, the interpreter is invoked to render the missing graphics while the compilation is ongoing in the background.
How to test
A new config option is added called "Shader Interpreter Mode". It takes 3 values, "Enabled", "Disabled" and "Forced". For this initial testing phase, it will default to "Disabled" for reasons I will discuss briefly which means everything should work the same as master. "Enabled" enables hybrid rendering and "Forced" is for developers only and redirects all rendering to the interpreters. Note that "Forced" mode will likely pin your GPU usage at 100% at very poor performance.
Known issues
Currently there are two major problems keeping things from moving forward:
Notes
Accuracy of the interpreters is intentionally kept lower than the properly recompiled shaders. This is to keep performance from taking too much of a hit.