3 ms·
That all happens on the GPU. Do task managers show memory for both?
by throwaway3699 5y ago
That all happens on the GPU. Do task managers show memory for both?
- dale_glass 5y agoWhat do you mean, "on the GPU"? Where do you think the GPU gets the textures? I'm not familiar with DirectX, but OpenGL manages textures invisibly behind the developer's back, to the point that it's difficult for a developer to find out how much VRAM there is. OpenGL wants to invisibly manage VRAM on its own, which means that every texture you have exists at least twice: Once in RAM, and once in VRAM. And very possibly 3 times, if the application keeps the original texture data in its own buffer for a bunch of reasons. So when you look at google.com, that Google logo probably exists in memory at least 3 times: probably as a RGB bitmap (the actual image object the browser works with), in RAM managed by the graphics driver (in whatever format the graphics card likes best), and then on the card's VRAM possibly. It could be more, like if the browser can apply some sort of color correction or other transformation and therefore keeps both the original and retouched version. The original PNG is also probably in the cache, and there exists the possibility of extra copies because some particular part of the system needs images to be in some specific format. Graphics are memory hungry, and it adds up fast. The nice thing about this is that your GUI doesn't get a whole bunch of horrible artifacts if you hook up a 4K monitor to a laptop that allocates 128MB VRAM to graphics. The 3D rendering layer simply makes do with what VRAM there is by constantly copying stuff from RAM as needed, with the applications not noticing anything. The bad thing is that this convenience has a cost in RAM. But really, for the better. Can you imagine the pain it would be to program a GUI if every single application had to allocate VRAM for itself and could break the system by exhausting it?