• Advertisement
Sign in to follow this  

Determining which memory was used for a Vertex Buffer

This topic is 2305 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 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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

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.


Share this post


Link to post
Share on other sites

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. ;)

Share this post


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

  • Advertisement