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

Flycast on the/my Rpi4 is a graphical glitchfest. #572

Closed
namanix opened this issue Jul 1, 2019 · 9 comments
Closed

Flycast on the/my Rpi4 is a graphical glitchfest. #572

namanix opened this issue Jul 1, 2019 · 9 comments

Comments

@namanix
Copy link

namanix commented Jul 1, 2019

I've been trying to get Flycast to work on the Rpi4 but always run into the same problem.
The graphics are all glitched (2d graphics, textures) 3d models are fine (See screenshots at bottom of the issue).

I've tried building with: platform=classic_armv7_a7 make -j4
and platform=classic_armv8_a35 make -j4

After that I decided to add the rpi4 to the makefile and it looks like this:

else ifneq (,$(findstring rpi4,$(platform)))
      		CFLAGS += -march=armv8-a+crc -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard
		CXXFLAGS += -march=armv8-a+crc -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard
		HAVE_LTCG = 0
        endif

HAVE_LTCG=0 is needed because otherwise it won't compile.
These 3 builds succesfully built but all give me the same problem (See screenshots below).
Tested it with 2 different bios files. Both have the correct MD5

Did I do anything wrong? Or is this a bug on the Rpi4?

Soul Calibur - DCRES  replayers org -190701-094723
Soul Calibur - DCRES  replayers org -190701-095255

@namanix namanix changed the title Flycast on the Rpi4 is a graphical glitchfest. Flycast on the/my Rpi4 is a graphical glitchfest. Jul 1, 2019
@flyinghead
Copy link

I wish I could help but I've never seen anything like this. Could be an issue with the GL driver or the way flycast uses it. There are some differences between GL and GLES with regards to texture formats but this wouldn't cause such a corruption.

Can you post a log?

@namanix
Copy link
Author

namanix commented Jul 1, 2019

Yeah sure! Here you go!
http://paste.debian.net/1089867/

@ceb33
Copy link

ceb33 commented Jul 6, 2019

issue is due to the shader caching
i'm not an expert of GL ES but my understanding is that the shader caching currently implemented also cache the uniforms

adding at the end of PipelineShader *GetProgram(...)
glcache.UseProgram(shader->program);
ShaderUniforms.Set(shader);
(and also commenting ShaderUniforms.Set(s); line 584 in bool CompilePipelineShader(PipelineShader *s))
did solved the issue completely on RPI4

@ceb33
Copy link

ceb33 commented Jul 10, 2019

made a pull request to flycast
#582
not sure if those must be done to flycast or reicast, patch is there anyway with rpi4 makefle and more robust fix to handle fog

@flyinghead
Copy link

This should now be fixed. Please reopen if needed.

@joolswills
Copy link

I disabled this workaround on the RPI4 with raspbian buster and Mesa 19.3.2 which is now included and couldn't see any issues, so this may no longer be required. To be sure, what is a good test case? (I wasn't sure what the shots were from in the original post).

@darksaviorx
Copy link

@joolswills Those glitches were happening to all the games that I tried at the time, but the game from the screenshot is Soul Calibur (I googled the name of the song that's shown).

@joolswills
Copy link

Thanks. I'm pretty sure this workaround isn't needed then anymore as that game looked fine. Ikaruga and Rez also.

@barbudreadmon
Copy link
Collaborator

I removed the flag in 8288fae

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

No branches or pull requests

6 participants