Sign in to follow this  
Rich76

Multiple texture sheets - How much memory?

Recommended Posts

Rich76    207
I have thirty 2048x2048 PNG (24 bit) texture sheets that are roughly 125KB in size. How do I determine how much memory would be used if I loaded all thirty?

Share this post


Link to post
Share on other sites
DieterVW    724
If your loading them into an uncompressed format such as r8g8b8, then the size will be the full 2048 * 2048 * 3(bytes). A bit over 12 megs each.

You can use the DXTextureTool in the SDK to convert the PNG's to a compressed format that the hardware can handle, and reduce the memory requirements of your 30 images.

Share this post


Link to post
Share on other sites
Rich76    207
Wow, you were right. I was able to load 30 DXT1 format files at around 103MB memory, though, it took forever to load. I'm guessing with the huge file size increase (2MB).

Share this post


Link to post
Share on other sites
DieterVW    724
I'm sure the load time is quite noticeable since you're loading the 103mb from disk, and then transferring it again across the PCIE/AGP bus to the graphics card.

Share this post


Link to post
Share on other sites
LogicalError    293
Quote:
Original post by DieterVW
If your loading them into an uncompressed format such as r8g8b8, then the size will be the full 2048 * 2048 * 3(bytes). A bit over 12 megs each.

You can use the DXTextureTool in the SDK to convert the PNG's to a compressed format that the hardware can handle, and reduce the memory requirements of your 30 images.


Keep in mind that most gpu's (all of them?) actually store r8g8b8 internally as r8g8b8a8 (32bit), so in that case it would actually be 2048 * 2048 * 4(bytes)

Share this post


Link to post
Share on other sites
DieterVW    724
Quote:
Original post by LogicalError
Quote:
Original post by DieterVW
If your loading them into an uncompressed format such as r8g8b8, then the size will be the full 2048 * 2048 * 3(bytes). A bit over 12 megs each.

You can use the DXTextureTool in the SDK to convert the PNG's to a compressed format that the hardware can handle, and reduce the memory requirements of your 30 images.


Keep in mind that most gpu's (all of them?) actually store r8g8b8 internally as r8g8b8a8 (32bit), so in that case it would actually be 2048 * 2048 * 4(bytes)


It's important that hardware store the format indicated when the resource is created, else it would be non-conformant with regards to DX10 and greater. In those cases the hardware should only store the requested format and anything else would be wrong. For instance, the compressed formats are very important since they are meant to save space. There would be little to no reason to invest in designing such formats if the hardware just loaded everything into r8g8b8a8 at its own discretion.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this