Jump to content
  • Advertisement
Sign in to follow this  
jefferytitan

Texture/Buffer persistence in VRAM

This topic is 554 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all,

I've written the odd shader but I must admit my overall understanding of the pipeline is lacking. I'm wondering how VRAM memory management works. In particular:

  • Which objects persist in VRAM between frames? I assume textures and vertex info?
  • Can a framebuffer be persisted on the GPU between frames, e.g. if you have a bunch of security cameras in your game that don't need to be updated every frame? Or for temporal reprojection for fancy screen-space effects.
  • What happens if you have too much in VRAM? Does it get paged out, or something worse?

If you can answer any of the above it would be much appreciated.

Thanks,

JT

Share this post


Link to post
Share on other sites
Advertisement

@MJP

Thanks for the in-depth explanation! It definitely demystifies a lot of things for me.

Do you happen to know whether frame buffers can remain in VRAM between frames? And whether you can copy a buffer to another buffer purely on the GPU? I'm wondering whether a big bank of static security cameras could be rendered on the cheap by keeping pre-rendered low res frame buffers (with depth) and simply drawing dynamic objects on top of them. My guesstimate is that it may work well due to:

  1. Low number of meshes
  2. Low pixel coverage
  3. The majority of pixels failing the Z Test

Share this post


Link to post
Share on other sites

frame buffers will most likely remain in VRAM. You would have to use specific tools/APIs to be sure though. It all depends on the amount of memory you use, you can have 100s of frame buffers in the GPU as long as the memory they occupy isn't needed for other resources/applications. It is good idea to allocate large resources (like framebuffers) as soon as possible to prevent eviction)

Yes, you can 'freely' copy resources (buffers, texture, ..) on the GPU. notice the quotes are all API depened. for example some APIs have the constrain that textures need to have the same dimension and a compatible format while other APIs are pretty mutch memcpy style (very powerful but possible headache introducing :) )

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!