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.18k stars 2.17k forks source link

Excess use of VRAM in NOVA #5351

Closed bhavin192 closed 8 years ago

bhavin192 commented 10 years ago

The mini game N.O.V.A. using a lot of GPU on my device I have 105 mb free from which some bytes or 0 remains when playing this game it causes the PPSSPP to work weird

http://i.imgur.com/4aN6hYy.jpg http://i.imgur.com/PmVXYXk.jpg

I have tried on other devices with more VRAM it works good but still uses more vram where CCFF VII uses only ~25 mb of vram

I have tried all texture related settings but it still using more GPU

bhavin192 commented 10 years ago

I just created log of gpu usage on windows

https://gist.github.com/bhavin192/f99ae6b9ac575e08debe/raw/4d5859c7b82c33ad7563d9b475265cd6a0e78411/N.O.V.A.+GPUz+log

~80 is when ppsspp starts ~105 when game is in menu and ~130 and up to ~400 when playing it's really greater value

nova1

Log when playing game final fantasy VII

https://gist.github.com/bhavin192/59b7c1bf2fd02b01e4e9/raw/d95bb87e3da0be624412ffe98e242b3db63d9adb/CCFF-VII+GPUz+log

it hits maximum ~150

unknownbrackets commented 10 years ago

Well, the game may just be doing more inefficient effects or something. Maybe it's creating all sorts of FBOs and textures. Also, maybe your texture cache options (do you have "retain changed textures" or "texture scaling" enabled?) are only making it worse.

Just because it's a mini doesn't mean it has lower system requirements. It means it had less time put into it. All games get the entire PSP to work with.

-[Unknown]

bhavin192 commented 10 years ago

"retain changed textures" is "off" "texture scaling" Upscale "off" level xBRZ deposterize "off"

is there any way to reduce the use ??

unknownbrackets commented 10 years ago

Has this changed at all with the latest framebuffer size stuff?

-[Unknown]

bhavin192 commented 10 years ago

still same amount of usage

unknownbrackets commented 9 years ago

There have been some changes to the way textures are invalidated. Does this still happen? Also, does it happen on Direct3D 9 or is it OpenGL specific?

-[Unknown]

unknownbrackets commented 9 years ago

I should clarify; I'm still not convinced that the usage is incorrect at all. For example, this game could use a lot of PSP compressed textures, which we have to decompress to render on non-PSP devices. In that case, it might use significantly more memory in PPSSPP than it really would on a PSP. That's just life.

Crisis Core does not use heavily compressed textures, and generally works differently. Whether NOVA uses compressed textures or not, the assumption that all games will use "approximately the same amount of vram" is, sorry to say, simply a bad one. The assumption that better looking games will be the ones, if any, that use more vram is definitely a bad one.

400 MB however does seem surprisingly high. Does it go down when you go to the pause screen?

Does it go back to normal levels when you quit the game? Assuming it does, it's not a leak. If that's the case, it may just be life. Maybe it's using a bunch of 4-bit clut and DXT textures and texturing from offsets in them in a way that is simply not efficient. Potentially we could detect overlapping textures like that, but it'd come at the cost of most likely making all games slower.

-[Unknown]

bhavin192 commented 9 years ago

I agree with you, PPSSPP needs more VRAM to run NOVA. The values are still high (little less usage though). Also when I pause game the usage remains same. If I pause game at 132mb it remains on 132mb. should I close this?

unknownbrackets commented 9 years ago

If you close it and it doesn't go down, that's not good. What if you play the game a little, save or something, close (don't exit PPSSPP), then relaunch the game, play some more, close, play again, etc. like 3-4 times? Does the memory usage keep increasing?

If it keeps going up then it's a leak of some kind.

-[Unknown]

bhavin192 commented 9 years ago

It goes on increasing if I do as you instructed.

daniel229 commented 9 years ago

That vram increasing after closing a game seems to be a comom case,FF4 and Zero no Kiseki 7th dragon,all have the problem.

unknownbrackets commented 9 years ago

Hmm, that isn't good. I'll try some, does it happen with v0.9.9.1? I thought we didn't have any memory leaks (even gpu) at one point...

-[Unknown]

unknownbrackets commented 9 years ago

Yeah, something is definitely leaking:

mb - status 332 - not open 368 - menu 367 - ff4 load 1, not started 396 - ff4 save point 1 394 - stop 1 393 - ff4 load 2 395 - ff4 save point 2 393 - stop 2 408 - ff4 save point 3 406 - stop 3 422 - ff4 save point 4 419 - stop 4

-[Unknown]

unknownbrackets commented 9 years ago

I pushed some leak fixes to master, I guess it was always broken? Anyway, after it's done building, I wonder if NOVA still leaks.

-[Unknown]

ppmeis commented 8 years ago

Tested with latest build. Game works fine for me.

unknownbrackets commented 8 years ago

Okay, cool. Closing then. Thanks for testing.

-[Unknown]