Sign in to follow this  
mrheisenberg

How does IASetVertexBuffers work?

Recommended Posts

Ok this might sound weird,but I never actually read anywhere how exactly resources are handled between the CPU on a lower level.I mean - does the vertex buffer stay in the system memory and when you call "IASetVertexBuffers" get sent to the GPU each time or are all the buffers/textures/shaders/whatever loaded directly in the video memory and then just given small commands from the cpu for which resource to set up for rendering?

Share this post


Link to post
Share on other sites
That depends on the type of resource you have created and what options you used when creating it. Normally the resources will reside in GPU memory, and you are just given a CPU COM based reference that is used to identify it. So when you bind it to the pipeline somehow, it is actually not being transferred to the GPU - it is already there.

In other cases, you can create resources that are able to be manipulated by the CPU. Those resources are probably going to reside in system memory, but they typically can't be directly bound to the pipeline. These are just general ideas though, because the implementation is dependent on the driver.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this