Determining which memory was used for a Vertex Buffer

Started by
3 comments, last by 21st Century Moose 12 years, 5 months ago
Hi there,

Is there a way to know once a vertex buffer is created (when using D3DPOOL_DEFAULT) in which memory (system, agp, local video memory) the driver allocated it?

Thank you
Advertisement

Hi there,

Is there a way to know once a vertex buffer is created (when using D3DPOOL_DEFAULT) in which memory (system, agp, local video memory) the driver allocated it?

Thank you


From the docs: "When creating resources with [color="#ffffff"]D3DPOOL_DEFAULT, if video card memory is already committed, managed resources will be evicted to free enough memory to satisfy the request."

So they are stored in VRAM.

Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, theHunter, theHunter: Primal, Mad Max, Watch Dogs: Legion

Hi NightCreature,



From the docs: "When creating resources with [color="#ffffff"]D3DPOOL_DEFAULT, if video card memory is already committed, managed resources will be evicted to free enough memory to satisfy the request."

So they are stored in VRAM.


Yes I know that but there's a way to know where it's located after the creation of the vertex buffer?

Hi NightCreature,


[quote name='NightCreature83' timestamp='1320242090' post='4879681']
From the docs: "When creating resources with [color="#ffffff"]D3DPOOL_DEFAULT, if video card memory is already committed, managed resources will be evicted to free enough memory to satisfy the request."

So they are stored in VRAM.


Yes I know that but there's a way to know where it's located after the creation of the vertex buffer?
[/quote]

Generally speaking no, but you could lock your vertex buffer and get the a pointer to where the data should be stored, but that could be a system memory mapped area. D3D hides this away from you and the driver will take care of where to put it on the GPU memory. Why do you need to know this.


Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, theHunter, theHunter: Primal, Mad Max, Watch Dogs: Legion


Generally speaking no, but you could lock your vertex buffer and get the a pointer to where the data should be stored, but that could be a system memory mapped area. D3D hides this away from you and the driver will take care of where to put it on the GPU memory. Why do you need to know this.


+1. The SDK defines the default pool as "driver optimal memory" in a number of places, meaning that the driver itself will place the resource in memory that it considers is going to be most suitable for your combination of usage flags. You worry about your own code and let the driver worry about things like this. ;)

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

This topic is closed to new replies.

Advertisement