Tegra3 and GPU memory, texture size

How many 2048x2048 textures can be loaded on OUYA before the GPU memory is full? Does anyone know? For my game I will probably have to have 3 or 4 such textures loaded if I don't want to compromise quality (it's 2D platformer in high resolution).

Comments

  • KonajuGamesKonajuGames Posts: 560Member
    What pixel format?  Full 32-bit?  16-bit?  DXT1?  DXT5?  That will be a large factor in the answer.
  • MagnesusMagnesus Posts: 304Member
    edited January 2013
    Full 32-bit. Edit: Am I counting it right that the texture will take 16MB? So it shouldn't be a problem to load 4-8 of such textures.
    Post edited by Magnesus on

  • KonajuGamesKonajuGames Posts: 560Member
    16MB per texture, plus another 5.5MB if mipmaps are enabled.
  • KonajuGamesKonajuGames Posts: 560Member
    You also need to consider texture cache.  A large texture like that won't fit into a texture cache, so you may end up incurring a cost from texture cache thrashing as it invalidates the cache constantly.  It is difficult to find out the size of the texture cache though on the Tegra 3.
  • MagnesusMagnesus Posts: 304Member
    edited January 2013
    Well, I doubt I will use more than 3 such textures at a time so I should be fine. No mipmaps. I think I will just proceed and worry about problems if they occur. I have Tegra2 device on which I can test - if it will be fast on Tegra2 it will be flawless on Tegra3 I think. Thanks for you help.

    PS. If a texture is not used during the game - because it's a large background for menus and mainscreen - should I dispose of it? Or just because it is not used it won't affect anything because it will be thrown out of cache until needed?
    Post edited by Magnesus on

  • KonajuGamesKonajuGames Posts: 560Member
    If you don't reference the texture in a GPU operation, it shouldn't matter other than occupying memory.
  • MagnesusMagnesus Posts: 304Member
    OK, thanks.

  • imaginaryhumanimaginaryhuman Posts: 55Member
    I asked the Ouya staff about memory available and they emailed me back. They're recommending for now that you use no more than 512mb of ram. They say 4-500mb are used for system processes although they're working to reduce that footprint. So it's `safe` to use half of the memory at the moment. That memory gets used for everything - holding your app in memory, any memory it allocates, memory for graphics you load into main memory, memory that the `gpu` uses to hold graphics in `video ram`, etc.. all shared.

    2048x2048 textures, ARGB 32-bit format, you can store about 30 in memory at the most, so long as you use *absolutely no memory* for anything else.. .. and given each texture is 16mb you probably can't get more than about 20-25 once your app is loaded, and if your app also holds a copy of the texture in main memory (e.g. like in Unity when you create a runtime texture it also has a duplicate in main ram) then you have to halve that... unless of course you use compressed textures or less bits in the format.
  • MagnesusMagnesus Posts: 304Member
    Thanks. It's much more than I need anyway. :)

  • TristTrist Posts: 71Member
    wow android is a heavy OS when you step back and look at it. You kind of have to give it to Sony and Microsoft in terms of how small the their OS footprint is.
  • Killa_MaakiKilla_Maaki Posts: 504Member

    Trist said:
    wow android is a heavy OS when you step back and look at it. You kind of have to give it to Sony and Microsoft in terms of how small the their OS footprint is.
    Especially Microsoft, considering their Xbox OS is pretty tiny but Windows takes like 2G all by itself.
    You didn't remember the plot of the Doctor Who movie because there was none; Just a bunch of plot holes strung together.
  • jbanesjbanes Posts: 45Member
    Especially Microsoft, considering their Xbox OS is pretty tiny but Windows takes like 2G all by itself.
    I think their work on Windows 8 more than makes up for it. 16GB of a 32GB Surface is used up by the OS? That's just not ok.

  • KonajuGamesKonajuGames Posts: 560Member
    Now you're comparing runtime memory use with install size?  Come on.  All hope of sensible discussion just went out the door.  And before you start making claims about Windows memory use, check some facts first.

    Comparing Android to Xbox 360 or PS3 is also an oranges vs. apples comparison.  Android is designed for a completely different target.  Xbox 360 and PS3 are designed for one process to be in control of the system at any one time.  That is why on Xbox 360 we could allocate all available memory at launch except for 40MB for the OS to use.  Android must deal with who knows how many processes running in the background, an activity lifecycle that allows any other activity to start at almost any time, and many other factors that make it nothing like Xbox 360 or PS3.
  • Killa_MaakiKilla_Maaki Posts: 504Member
    Yeah, I mean OUYA does give us 512MB to play around with for our games.... the PS3 only has 256MB without even counting OS requirements.
    You didn't remember the plot of the Doctor Who movie because there was none; Just a bunch of plot holes strung together.
  • jbanesjbanes Posts: 45Member
    Now you're comparing runtime memory use with install size?  Come on.  All hope of sensible discussion just went out the door.  And before you start making claims about Windows memory use, check some facts first.
    Sorry, that's my fault. I lost track of the context. In terms of memory usage, Windows 8 is just fine. These days the runtime footprint of an OS is often driven as much by graphics as any video game. Strip all that away and most OSes use relatively insignificant amounts of memory.

    With that being said, one has to be aware that modern OSes do cheat when they report their memory usage. The paging system can keep all kinds of things in memory, ready for access while still reporting no memory usage. Yes, all that gets flushed when the system is under pressure and yes you do fall back on your (very, very slow) I/O channels. The problem is that your system can take a performance nose-dive if that happens. So it's still important to leave a bit of "free" memory.

    Of course, we're talking about video games which go out of their way to eliminate the OS interface. So the amount of memory that needs to be in reserve is very little. Unless you're pushing the system exceptionally hard (in which case you probably already know how to read the paging fault count to help tune things) you're unlikely to feel the memory pressure. 
Sign In or Register to comment.