Skip to content
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

[TESTERS NEEDED] rsx: Shader decompiler improvements #16501

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

kd-11
Copy link
Contributor

@kd-11 kd-11 commented Jan 3, 2025

Gathers aliased registers when writing to output for ROP operations. This phenomenon was observed when messing around in real hardware a while ago. Technically you can do perfectly ok rendering without ever touching the output registers if the corresponding half-registers are written to (and vice-versa).

Closes #15651

@Megamouse Megamouse added the RSX label Jan 3, 2025
@kd-11 kd-11 changed the title rsx: Shader decompiler improvements [TESTERS NEEDED] rsx: Shader decompiler improvements Jan 3, 2025
@BrentPeterson2028
Copy link

Are testers still needed? I could help if so, just lemme know what to do.

@kd-11
Copy link
Contributor Author

kd-11 commented Jan 4, 2025

Are testers still needed? I could help if so, just lemme know what to do.

@BrentPeterson2028 Just try out random games and check that they still work.

@Darkhost1999
Copy link
Contributor

Darkhost1999 commented Jan 4, 2025

I tested Far Cry 3 and I seem to be getting a bunch of fatal errors
Master Working.log

E RSX: 
F {RSX Worker 10} SIG: Thread terminated due to fatal error: Failed to compile fragment shader
(in file D:\a\1\s\rpcs3\Emu\RSX\VK\VKProgramPipeline.cpp:30[:25], in function 'VkShaderModule_T *vk::glsl::shader::compile(void)')
E RSX: ERROR: 0:696: 'assign' :  cannot convert from ' temp highp 2-component vector of float' to ' global highp 4-component vector of float'
ERROR: 1 compilation errors.  No code generated.

RPCS3-PR.log
This all occurs at game boot before I even see an intro video.
Here is a test with a clean cache
RPCS3-PR.log

  • Games with error:
    LEGO Harry Potter: Years 1-4
    RPCS3.log
    Elder Scrolls Oblivion
    RPCS3.log
  • Working Games:
    Red Dead Redemption
    Call of Duty Black Ops
    Uncharted: Drake's Fortune

@kd-11
Copy link
Contributor Author

kd-11 commented Jan 4, 2025

Thanks.

@gamrXerus
Copy link

I tested 4 Games on fedora.
007gereloaded.log.gz
NFSCarbon.log.gz
Tekken6.log.gz

1.Call of Duty Black Ops splitscreen- works the same as before with the black flickering on the textures, so no change. It is hard to do an RSX capture of this because it is so quick.
2. Tekken 6- I get no audio with this pr for this game.
3. Need for Speed Carbon- The game does not boot with this pr. Compiling modules doesnt seem to work properly.
4. Goldeneye Reloaded. I get no ingame audio with this pr. The intro cutscenes play audio but the game does not.

@kd-11
Copy link
Contributor Author

kd-11 commented Jan 6, 2025

I've reworked the way writes are tracked, it shouldn't crash anymore. Please retest.

@Darkhost1999
Copy link
Contributor

Same error, Far Cry 3 tested with a clean cache
RPCS3.log
Lego HP errors upon boot
RPCS3.log
But Oblivion seems to work now
RPCS3.log.gz

@kd-11
Copy link
Contributor Author

kd-11 commented Jan 6, 2025

Remaining crashes should be fixed now. I'll fix the non-windows builds later.

@Darkhost1999
Copy link
Contributor

Remaining crashes should be fixed now. I'll fix the non-windows builds later.

All good now I'll keep testing more stuff

@ejams1
Copy link

ejams1 commented Jan 7, 2025

I tested Killzone 2, I played a skirmish match and everything was stable as on the current build.

@digant73
Copy link
Contributor

digant73 commented Jan 7, 2025

I also made some testing with my usual games (KZ2, KZ2, R1, R2, R3 etc.). With latest fixes it is ok

@Nekotekina
Copy link
Member

@kd-11 Hi, sorry for offtopic, please write me an e-mail if necessary, I don't know how to open Discord at the moment.

@kd-11
Copy link
Contributor Author

kd-11 commented Jan 8, 2025

@kd-11 Hi, sorry for offtopic, please write me an e-mail if necessary, I don't know how to open Discord at the moment.

No problem.

kd-11 added 4 commits January 9, 2025 01:55
- Always collapse register writes when exporting FS outputs
- Fixes a crash when RSXVertexProgram is default-initialized. This
  probably also fixes a whole class of crashes that occur when
  shader interpreter is in use since that pipeline uses a
  default-initialized stub.
- Also use more robust hashing to avoid collisions
@kd-11 kd-11 marked this pull request as ready for review January 9, 2025 00:34
@kd-11
Copy link
Contributor Author

kd-11 commented Jan 9, 2025

Final round of testing needed. The shader cache version has been upped, we're tracking some new variables that I need for some future optimization work.

@gamrXerus
Copy link

I retested call of duty, need for speed, goldeneye and tekken using the linux gcc build. All games work as before. My audio issues had to do with cubeb and the audio format settings in the emulator so should be good to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task] Shader with 16-bit writes only but f32 output flag set should write packed 32-bit output
9 participants