video ram on graphics card

Started by
14 comments, last by Krohm 14 years, 1 month ago
I read about half of the replies. Like everyone has said, nobody really knows. I would assume that most cards can swap between VRAM and PC RAM if the card gets full.

1.) When you call glBindTexture, you are not moving textures between the PC RAM and VRAM. Once the texture is stored on the video card, it is going to stay there (unless you over-fill VRAM).

Quote:
glBindTexture doesn't move anything.


2.) glBindTexture is actually moving the texture from normal VRAM to a texture-unit on the video card. There is a thing called "Texture-Bandwidth" basically like a CPU cache. You want your texture that is being accessed right now, to be in fast-cache memory. This is why DXT compression is good because it keeps the bandwidth down when you bind textures to the faster cache-like VRAM.

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

Advertisement
Thanks everybody.
Quote:Original post by dpadam450
I read about half of the replies. Like everyone has said, nobody really knows. I would assume that most cards can swap between VRAM and PC RAM if the card gets full.

1.) When you call glBindTexture, you are not moving textures between the PC RAM and VRAM. Once the texture is stored on the video card, it is going to stay there (unless you over-fill VRAM).


Slightly simplified, but correct.

Quote:
Quote:
glBindTexture doesn't move anything.


2.) glBindTexture is actually moving the texture from normal VRAM to a texture-unit on the video card. There is a thing called "Texture-Bandwidth" basically like a CPU cache. You want your texture that is being accessed right now, to be in fast-cache memory. This is why DXT compression is good because it keeps the bandwidth down when you bind textures to the faster cache-like VRAM.


Nope, Yann is correct: glBindTexture doesn't move anything, it merely binds the texture id to a texture sampler. The actual texture data isn't touched until the GPU starts reading from that sampler (and real bandwidth usage depends on sampler state, i.e. filtering type, mip-mapping and bias). Consider this: if you bind a texture but don't render any object with it, will texture bandwidth be used up? The answer is no: you'll use up a small amount of CPU time and bus bandwidth (for state change / validation and command submission, respectively), but you won't use up any VRAM bandwidth at all.

Any given texture may reside in VRAM, system memory on any combination of the two, according to what the driver/OS think is best right now. Since VRAM (if it exists) will always be shared among many programs and will always contain shaders, buffers and a lot of stuff other than textures, it is evident that there's no way to know whether a given texture will be "resident" at any given point in time. As Yann said, the correct approach is to make indirect measurements (, i.e. keep adding textures and see when performance starts dropping) and provide different quality settings.

[OpenTK: C# OpenGL 4.4, OpenGL ES 3.0 and OpenAL 1.1. Now with Linux/KMS support!]

Quote:Lets say my graphics card only has 512 MB of VRAM
Quote:Original post by 16bit_port
"Moving textures in and out of VRAM can happen at any time, whenever the driver or OS feels like it." seems a little random and vague to me, there has to be a reason or a purpose for sending texture to VRAM by the driver? Is it whenever a texture matrix is being applied onto a texture or when it needs to be rendered?

And then it stays in VRAM until the driver decides to move it out even if it's done using that texture?


The answer to that question depends on many factors. In general a resource is moved to VRAM (if necessary, most hardware can texture from system memory and some can render to it) when it's needed, i.e. when you issue a draw command (or more accurately, then the driver's command buffer is flushed). A resource is generally moved out when the driver needs to make space for other resources being used by you or another program. Sometimes it's moved out because the CPU needs access to it. That's about as general an answer as you will get.
Quote:Original post by zedz
Quote:Lets say my graphics card only has 512 MB of VRAM
There's definetly something very wrong here (especially for somebody which is 16bit).

Previously "Krohm"

This topic is closed to new replies.

Advertisement