hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
11.38k stars 2.19k forks source link

Buffered render issue with PowerVR SGX 540, (updated) #1313

Closed vontman closed 3 years ago

vontman commented 11 years ago

let the screenshots describe the problem off Buffered Render Off 2

on Buffered Render On 2

off Buffered Render Off

on Buffered Render On

off Buffered Render On 3

on Buffered Render Off 3

other one i found Dissidia Final Fantasy, and dissidia 012

on https://f.cloud.github.com/assets/4175383/429926/e3487bd8-ae56-11e2-9487-3f022301b81e.png

off https://f.cloud.github.com/assets/4175383/429925/df73033e-ae56-11e2-9702-36ebc6720ef3.png

Tested on galaxy tab 2 7.0 and galaxy nexus this is becoming really annoying @_@

dbz400 commented 11 years ago

This is not an issue indeed as turn off buffered rendering suppose to lose graphics or some special effects .

vontman commented 11 years ago

but turning off buffered render makes the games much slower

unknownbrackets commented 11 years ago

If buffered rendering enabled makes it show broken graphics, this is definitely an issue.

Having it enabled normally makes it slower. Are you saying that disabling buffered rendering makes it slower for you, but more accurate? That is strange.

-[Unknown]

vontman commented 11 years ago

With the buffered rendering on , the image becomes very smooth and fast, but in some games I have broken graphics like the above, and I can't use frame skip as the screen turns black' but I noticed some thing in ultimate ninja impact, I tried it on xperia pro, and found that the buffered rendering works well with it , will this mean that it depends on the GPU? By the way my device is galaxy tab 2 7.0, p3100 Chipset Ti Omap 4430 GPU PowerVR SGX540 Processor is dual core 1ghz cortex a9

vontman commented 11 years ago

Any help here I can get?

hrydgard commented 11 years ago

@vontman, stop posting if you don't have anything to add. We'll get to it but are obviously working on other things right now.

vontman commented 11 years ago

another one i found Dissidia Final Fantasy

on Screenshot_2013-04-26-11-50-34

off Screenshot_2013-04-26-11-47-35

this is becoming really annoying @_@

vontman commented 11 years ago

I found out it is the same on google nexus which has the same power vr gpu, could this be like the mali400 problem?

unknownbrackets commented 11 years ago

Was this improved by any of the alphatest stuff? I have a feeling we have this bug open multiple times.

-[Unknown]

unknownbrackets commented 10 years ago

Seems this still does happen: http://forums.ppsspp.org/showthread.php?tid=8479

Here's a possibly related bug: https://bugzilla.mozilla.org/show_bug.cgi?id=950050

And then, here's something interesting: https://github.com/kakaroto/e17/blob/master/evas/src/modules/engines/gl_x11/evas_engine.c#L3369 Seems to be using a texture for stencil/depth when both are used instead of renderbuffers on SGX. It also sets depth after stencil. Oops, misread.

Some examples I see have glBindFramebuffer() called earlier but doesn't look likely to matter.

Maybe it's worth (kindly) asking for help on this forum: http://forum.imgtec.com/discussion/1979/how-to-create-gl-depth24-stencil8-oes-tex

-[Unknown]

hrydgard commented 10 years ago

Thanks for the links. Phew, what a mess this stuff is...

sum2012 commented 10 years ago

My qq freind 俺が!ガンダムだ also have problem (Buffered render) in Dainiji Super Robot Taisen Z Saiseihen 1

There is a small black box 2

The missle 's black line 3

edit:he test in v0.9.9-68-g404766c

unknownbrackets commented 10 years ago

Does this still happen on the latest build with default settings?

-[Unknown]

sum2012 commented 10 years ago

My friend said that solved black line but it is missing shadow http://postimg.org/image/62a6dcwcx

daniel229 commented 10 years ago

the missing shadows is this problem. https://github.com/hrydgard/ppsspp/issues/6858

unknownbrackets commented 10 years ago

So, now that that is fixed, are all the problems gone?

-[Unknown]

sum2012 commented 9 years ago

My friend still have problrem have this (PPSSPP v1.0-101-g1170331) https://cloud.githubusercontent.com/assets/2177532/3868276/d6bf2a44-2031-11e4-877c-eb52858a9c9f.jpg

https://cloud.githubusercontent.com/assets/2177532/3471442/c4d9f0b6-02c2-11e4-886a-80959857c9fd.jpg

unknownbrackets commented 9 years ago

And that's definitely with all speedhacks off (disable alpha test and disable slower effects must not be on, buffered rendering must be used, block transfers on, etc.)? Because that effect definitely requires all of that.

Even so, this is PowerVR 5, so I certainly don't trust it to be able to do the effects correctly in the shader anyway.

-[Unknown]

sum2012 commented 9 years ago

He used Texture coord speedhack and Timer hack . I have told him to re-test again

sum2012 commented 9 years ago

He turn off that two hack still same picture. PPSSPP version v1.0-101-g1170331 (disable alpha test and disable slower effects must not be on, buffered rendering must be used, block transfers on.)?

unknownbrackets commented 9 years ago

I would not be shocked if PowerVR 544 was not properly calculating the result of max(x, y), but don't have a device to verify this with. That affect uses a max equation.

-[Unknown]

unknownbrackets commented 9 years ago

I noticed that SGX 540 devices, specifically, are giving us quite a lot of shader compilation failures even for simple (as well as complex) shaders, like this one:

#version 100
precision lowp float;
 varying vec4 v_color0;
 varying vec3 v_color1;
void main() {
  vec4 s = vec4(v_color1, 0.0);
  vec4 v = v_color0  + s;
  gl_FragColor = v;
}

This is already software transform, and there's no error detail - just "Compile failed." My thought is, it may be simply running out of memory or something. It should still be showing a message on screen, though.

I wonder if that's related. We might even draw things wrong by not having space to upload the texture.

-[Unknown]

sum2012 commented 9 years ago

Can we make this test shader program in the "developer tools" ? Show in the screen of the error whether it compile failed

unknownbrackets commented 9 years ago

Well, the thing is, the UI basically already uses a shader that is very similar. So my point is, it must not be that this shader always fails, but rather that it's failing sometimes. And sometimes probably means memory/resources.

So a test in the developer tools wouldn't tell us much, since the UI working is already telling us the driver is capable of compiling basic shaders.

-[Unknown]

sum2012 commented 9 years ago

I see

shinemu commented 9 years ago

Please forgive me, i didn't know about that :( btw i want to report that there's no animation ( black screen) on queen blade spectral chaos on dev working version but work fine on stable 1.0.1.0 and most of the game got sound glitch or unclear sometimes ( stable and dev )

sum2012 commented 9 years ago

@shinemu Try to find out that which version start to broke (no animation)in
edit: http://buildbot.orphis.net/ppsspp/index.php?m=fulllist

shinemu commented 9 years ago

@sum2012 i try all build from latest to build 1.1.123 and i found the problem start at build 1.1.158 but it was fine on 1.1.152

shinemu commented 9 years ago

Sorry typo..i mean i try all build from latest to build 1.0.1-123 and found the problem start at build 1.0.1-158 but works fine on 1.0.1-152

sum2012 commented 9 years ago

That mean v1.0.1-152-g9db4c5f is good v1.0.1-158-g33b291a bad

Edit:That is pull request #7567

sum2012 commented 9 years ago

@shinemu I need you test 4 times build from my build to easier fix. Does this work ? https://drive.google.com/file/d/0B3OaSdeV0L8kVzYxU0tBOVFqczg/view?usp=sharing

shinemu commented 9 years ago

@sum2012 gladly ^_^ and i'll come back with the report right away

shinemu commented 9 years ago

tmp_11300-screenshot_2015-07-09-17-58-40626649139 tmp_11300-screenshot_2015-07-09-17-58-57-883956894 tmp_11300-screenshot_2015-07-09-17-57-19-183537329 tmp_11300-screenshot_2015-07-09-17-59-13-1859232061

sum2012 commented 9 years ago

@shinemu I mean I will make 4 build then you need test them. Anyway,seem bad last build. Here is another build test. https://drive.google.com/file/d/0B3OaSdeV0L8kTmxWRVQwX1pPWk0/view?usp=sharing

shinemu commented 9 years ago

@sum2012 aye aye sir ^_^ btw how bout super robot wars Z 1 and 2 ? Do we have a fix too?

sum2012 commented 9 years ago

@shinemu No,we don't have a fix for super robot wars Z 1 and 2 Anyway , what is this build result ? https://drive.google.com/file/d/0B3OaSdeV0L8kTmxWRVQwX1pPWk0/view?usp=sharing

shinemu commented 9 years ago

@sum2012 understood sir..second build have the same problem with first,okey i'll test the third ^_^

sum2012 commented 9 years ago

@shinemu ok.How about this build ? https://drive.google.com/file/d/0B3OaSdeV0L8kTnFkd2dhSjd6blU/view?usp=sharing

shinemu commented 9 years ago

@sum2012 the third have the same issue too sir,btw is there any connection with the gpu-blend Use framebuffer fetch more and on more devices that have been applied on ver 1.0.1-158-g33b291a sir? I'll test the fourth right away sir

shinemu commented 9 years ago

tmp_16327-screenshot_2015-07-10-05-28-01-693328193

![Uploading tmp_16327-Screenshot2015-07-10-05-30-431014147793.jpg…]() The fourth working good sir! ^^ even the sound are clearer than before

shinemu commented 9 years ago

tmp_16327-screenshot_2015-07-10-05-30-43945491200

shinemu commented 9 years ago

tmp_16327-screenshot_2015-07-10-05-30-28-401864585

sum2012 commented 9 years ago

I have some confuse.Please confirm again.Thanks. good: https://drive.google.com/file/d/0B3OaSdeV0L8kTnFkd2dhSjd6blU/view?usp=sharing bad: https://drive.google.com/file/d/0B3OaSdeV0L8kTmxWRVQwX1pPWk0/view?usp=sharing

shinemu commented 9 years ago

@sum2012 confirm,the good one is your fourth upload ( ver 1.0.1-118 on your good upload https://drive.google.com/file/d/0B3OaSdeV0L8kTnFkd2dhSjd6blU/view?usp=sharing ) and the one that are have the issue or bad ( ver 1.0.1-119 on your bad upload ) btw can we have this fix on next dev update?

unknownbrackets commented 9 years ago

If #7567 is causing problems, it probably means EXT_shader_framebuffer_fetch is not working right on that device or driver, possibly only with certain blending modes. We can blacklist older devices or something, but unfortunately this may break other effects that started working correctly due to that change on the same devices.

-[Unknown]

shinemu commented 9 years ago

@Unknownbrackets So that's why the same issue happen on ios device too..and that means no fix for the next dev updates sir unknown?

sum2012 commented 9 years ago

@unknownbrackets git bisect result 1 this commit https://github.com/unknownbrackets/ppsspp/commit/2344760018f995a4195d7d1daffd95995ac6828c

hrydgard commented 9 years ago

Seems clear we need to disable it on some devices. The question is which ones..

sum2012 commented 9 years ago

EXT_shader_framebuffer_fetch is not PowerVR devices only ?

hrydgard commented 9 years ago

It's also available on Tegra 3 and Tegra 4, but not on X1/K1.