03-11-2013, 12:07 AM
No, that game is drawing 8x times, it's a timing issue or something not blocking, etc.
-[Unknown]
-[Unknown]
|
power vr
|
|
03-11-2013, 12:07 AM
No, that game is drawing 8x times, it's a timing issue or something not blocking, etc.
-[Unknown]
03-11-2013, 01:35 AM
this sound promising thanks carter 07 u made my day m8
(03-10-2013, 11:35 PM)Henrik Wrote: Ah, interestingAh so it's not possible to use Alpha Blend Mode instead? I found this: "It should also be noted that if a shader contains the ‘discard’ keyword then any object that shader is applied to will suffer the cost of alpha test, even if the keyword is inside a conditional block that the developer knows will not be hit for a draw call. The GPU cannot know the result of the conditional without executing the fragment shader and so has to assume that the ‘discard’ keyword may be hit. The solution to this is to move the use of ‘discard’ into a separate shader. Under fixed function APIs it is essential that ‘alpha test’ be disabled for objects that do not require it. It is common for ‘alpha test’ to be switched on at the beginning of a scene and left on for the entire scene. This is strongly discouraged is it may severely harm performance. The same visual effect as ‘discard’ can often be achieved through the use of the correct Alpha Blend Mode, and setting the Alpha value to ‘0’ where ‘discard’ would be used. If ‘discard’ or ‘alpha test’ cannot be avoided then objects using these techniques should be submitted after all opaque geometry is submitted." Hope something can be done because it's a worth opt for a lot of mobile phones since powervr are widely used , even apple users will like this when the jit works for them.
03-11-2013, 06:50 AM
Well, it's already only compiled in when the game specifies it wants an alpha test, that's the trouble - games say yes because this performance problem doesn't exist on the PSP. So the trick is finding a way to know that the game is being lazy and it's safe to ignore it.
-[Unknown]
03-11-2013, 02:26 PM
Ah damm, so it's more tricky to fix this.
Hope a good solution can be found.
We can easily detect and remove a few silly cases like if the game enables the test, but sets the test function to ">=" and specifies 0 (min) as the value to compare with. Hopefully the games do that a lot
03-11-2013, 04:53 PM
I added detection of very simple cases of this, and it triggers on Lumines, so that should now work faster on your PowerVR device.
thx Henrik I never realised how much hard work went into developing an emulator.. enouph respect for all contributing.
if I had more than one device I would donate again.
Well done! thanks Henrik
![]() Here some testing (all with ubuffered rendering) sorted by efficacy: Great increase (perf as not using discard at all): Lumines: 25 fps -> 60 fps Tenchu: 35 fps: -> 44 fps (now cpu limited) Asterix: 36 fps -> 44 fps (now cpu limited) Modest increase: Ridge Racer: 17 fps -> 25 fps (was doing 37 with no discard) No or little change: Dead to Rights: 17 fps -> 18 fps (was doing 40 with no discard) Obscure: 21 fps (was doing 34 with no discard) So it definitevely solved the gpu perf problem on some games, you were right that most games abuse of alpha test. Hope there is more to do.
03-11-2013, 05:19 PM
Thanks for finding the issue, always fun to get easy speed gains
![]() Will look into other methods of detecting this later, but that's pretty good already for like 10 minutes of work!
Ahaha, 10 minutes..you're a genius.
![]() Yep now it's better to focus on final fixes before releasing 0.7, no hurry. ![]() EDIT: Emh, with last version perf returned exactly back to normal, not a single fps more, even Lumines is again at 25 fps.
03-11-2013, 06:28 PM
It caused some breakage so I had to disable parts of it, apparently the parts that mattered
![]() We'll simply have to look at the texture data to determine if it's opaque before applying the optimization. That will have to wait until after the 0.7 release though.
Arghh
![]() Umh in the games i tried i didn't see something broken, trasparency was also right (unlike when disabling completely alpha test). I agree, 0.7 first.
Just an idea:
Could be possible to break objects (particularly for sprites) into opaque sections to be rendered and alpha tested sections? or do you think that it may introduce too much overhead?
03-17-2013, 02:13 PM
Im havin half decent speeds now on some games but i feel im missin out due to my gpu, would be nice if there was a slution
|
|
« Next Oldest | Next Newest »
|