libretro / flycast

Flycast is a multiplatform Sega Dreamcast emulator. NOTE: No longer actively developed, use upstream repo for libretro from now on - https://github.com/flyinghead/flycast
http://reicast.com
GNU General Public License v2.0
152 stars 77 forks source link

No textures (everything is blue) on MALI-450 (GLES2) on certain stages of games, tested DC and NAOMI #716

Closed shantigilbert closed 4 years ago

shantigilbert commented 4 years ago

This is a long shot but here it goes.

On devices that I have tested that use Mali-450 (Amlogic s905, s905x mostly), in Android and in Linux ARM 32bit Using GLES2, some games that have snow in them like SNK vs Capcom 2 (both Naomi and DC versions) and DOA2 for example show only blue shadows (here is a small video showing the effect, https://youtu.be/IyBxQwe5WA4)

I also have an Amlogic s922x thats has a different GPU and it uses GLES3 the issue is not present there, I am not aware if this issue is present on any other devices that use GLES2.

I installed Retroarch with Flycast from the core updater on android and tested there with the same results, so I am sure its not something I am missing while compiling.

But since this also happens in Reicast, I did a back trace as to when this started happening and I came up with this commit https://github.com/libretro/flycast/commit/441dd29a42f43817332f300c0a2ce179584b926c from last year, in Reicast, before that commit everything on those games display as it should, I know this fixed an issue with fog ( I also tested Ecco on DC before and after and I can see the fix in action) but I was unable to compile the Libretro core before this commit, but it is the exact same issue, I know this was a long time ago and many changes have been made since then, but is there any chance for a fix on this issue?

If there is anything else I can provide to debug this, let me know

Thanks

flyinghead commented 4 years ago

Thanks for figuring out which commit is causing this. This greatly helps. I can reproduce the issue on a GLES2 android phone and it is a problem with fog. In standalone you can disable fog and that eliminates the problem (and the fog...) The prime suspect here is the depth calculation that's different in GL2/GLES2 from all other GL versions. And the fog level is calculated wrong because of this depth scaling.

ghost commented 4 years ago

Thanks for figuring out which commit is causing this. This greatly helps. I can reproduce the issue on a GLES2 android phone and it is a problem with fog. In standalone you can disable fog and that eliminates the problem (and the fog...) The prime suspect here is the depth calculation that's different in GL2/GLES2 from all other GL versions. And the fog level is calculated wrong because of this depth scaling.

i posted the same issue and you didnt ever bothered. can you please fix it on next version?

barbudreadmon commented 4 years ago

i posted the same issue and you didnt ever bothered. can you please fix it on next version?

Complaining then ordering around ? Impressive in a really bad way. I see a major difference between your 2 issues : @shantigilbert gave accurate informations which help figuring out the possible cause.

ghost commented 4 years ago

i posted the same issue and you didnt ever bothered. can you please fix it on next version?

Complaining then ordering around ? Impressive in a really bad way. I see a major difference between your 2 issues : @shantigilbert gave accurate informations which help figuring out the possible cause.

not every user is a developer. have a good day

ghost commented 4 years ago

i posted the same issue and you didnt ever bothered. can you please fix it on next version?

Complaining then ordering around ? Impressive in a really bad way. I see a major difference between your 2 issues : @shantigilbert gave accurate informations which help figuring out the possible cause.

and i'm not ordering around, i'm requesting a fix, thats how people contribute the project, they do test and inform errors

barbudreadmon commented 4 years ago

i'm not ordering around, i'm requesting a fix, thats how people contribute the project

Don't "request" a fix, we aren't workers, we aren't paid, this is a hobby for us. If you report an issue and we figure out something about it, we'll fix it & let you know. Never complain because we aren't answering fast enough for you, the issue here was answered quickly because there was important information leading to the cause of the problem.

ghost commented 4 years ago

i'm not ordering around, i'm requesting a fix, thats how people contribute the project

Don't "request" a fix, we aren't workers, we aren't paid, this is a hobby for us. If you report an issue and we figure out something about it, we'll fix it & let you know. Never complain because we aren't answering fast enough for you, the issue here was answered quickly because there was important information leading to the cause of the problem.

ok, keep it bugged then. good lucky.

shantigilbert commented 4 years ago

@flyinghead thanks for looking into it, if there is anything else I can provide let me known.

ghost commented 4 years ago

Honestly i'm not reporting or helping any project anymore, i'm super pissed off !

And i wish Emuelec and Flycast a good lucky with their own projects.

IT sucks that people cant accept any suggestions just because they have an project on github, i always wanted to HELP.

But as i said not every user is an developer, people should NEVER complain because they are not paid to do anything, if that's your hobby it should be your hobby to read feedbacks and fix things when possible, if possible( no pressure on this one but you got it) i wasnt complaining about " FIX IT NOW', i was saying that i reported the same thing and had no answer, and it can be terrible to the project, if you dont read or look into feedback, as i said, not everybody is an developer or know the properly way to do things, everybody helps the way they think they can, and that's what i was doing.

Again, i wish good lucky.

For me its over and there is no regret at all !

I end it up here and wont reply anymore.

flyinghead commented 4 years ago

Does this happen on other GLES2 platforms than Mail-400/Mali-450?

I'm on Mali-400 and the more I look into it, the more it smells like a driver bug.

shantigilbert commented 4 years ago

I am not sure if I have a device with another gpu, but I will look in my drawer and try to test it. Will report back

shantigilbert commented 4 years ago

Unfortunately it seems all my other devices use gles3.

If it is a driver issue as you suspect, is there a chance to implement the "Disable Fog" option like stand alone has? I think that could be a good compromise.

barbudreadmon commented 4 years ago

Unfortunately it seems all my other devices use gles3.

Might be worth testing anyway, flycast is using gles2 even on gles3 devices.

shantigilbert commented 4 years ago

Tested on android: S912 with Mali-T82 and s922x with Mali-G52, no issue present. both support GLES3

flyinghead commented 4 years ago

Can you give a shot at https://github.com/libretro/flycast/pull/717? It should hopefully take care of the issue.

shantigilbert commented 4 years ago

@flyinghead that indeed fixed the issue! and Ecco still has fog! amazing! I could only try it in ARM 32bit but I am positive it will also work on android! Thank you very much!

flyinghead commented 4 years ago

Great news! Thanks for your help on this matter. I initially thought it was a trivial issue but it took me the whole day to figure it out and come up with a fix.

shantigilbert commented 4 years ago

@flyinghead Thanks to you for the Amazing work! I will close the issue now

lokilokiad commented 3 years ago

people calm down no need to fight we all here to support & learn from each other ^.^ i want to ask if its possible to make fog option in retroarch flycast gles2 core ? T.T i hope u can help me i'm trying to help little kids in my family to play dynamite cop 2 lol i had the disc more than 10 yrs ago and made it to iso lol great game !!!