Thanks, that's helpful to know if you're within VRAM budget.
But while it is helpful to know the amount of memory used, it still won't help much with what i'm after.
You see, what i mean to do is basically to keep track of how much memory i allocate for the various types of data that resides in the VRAM.
This can be textures, vertex/normal/texcoords data, the color/depth/stencil buffers, etc.
Again, i don't mean to track every single byte of memory that is in the GPU, i just want to keep an "in-house" estimate of the VRAM used.
As an example, think of how you would create your own memory (normal RAM) tracker, to get stats like:
And the VRAM equivalent could be:
Color Buffers: 503918214KB
Depth Buffer: 78216928KB
Note that i don't mean to query the GPU for the amount of data i sent, or the memory in use.
What i'd do is to calculate the amount of memory a resource would use when i create/upload it in/to the GPU.
Again, image i load a R8G8B8A8 128x128 (uncompressed) texture from disk, and upload it to the GPU. Here i'd calculate the memory required for the texture (which would be 128*128*4 -- assuming the internal storage is also RGBA, etc) and perhaps add it to a counter of the total texture memory used.
I know that the GPU can remove textures from the VRAM if you upload more textures than the available memory, among other issue, so it's just an estimate.
I don't (and never did) work at a game company before, and i'm sure others who did can answer this much better than me, but the companies that you're talking about, that invest millions, they have, literally, hundreds of people working on a single game (you have programmers, artists, 3d modelers, animators, designers, script writers, audio editors, voice actors, game testers, marketing staff, business staff, etc), during the spawn of years, as some games take a year to be finished, others take as much as 10 years (games like Skyrim (even though it didn't take 10 years, it still took a long development time compared to annualy games), Starcraft 2, Diablo 3, etc).
Then, even though i'm not familiar with it, i'd assume that maintaining a studio of this magnitude (game company, or at least a branch) is costly, even without the game specific staff (things like office maintenance, R&D (i think of R&D here, as researching and developing the technology used for future games/engines, as oposed to direct development of a specific game, though if i'm wrong, please correct me).
Like i said i'm no expert in this but i think you can get an idea of how costly it is to run a business this big.