Jump to content
  • Advertisement
Sign in to follow this  
Aqua Costa

DirectX pointer and cache

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

When a DirectX device/buffer/etc is created the functions return pointers that should be used to access those objects. So since the programmer has no control over where D3D objects are allocated when I call the functions that create those objects, when a function like:
pDeviceContext->IASetIndexBuffer(m_pIndexBuffer, DXGI_FORMAT_R32_UINT, m_IndexBufferOffset);
is called what happens in the cache?
Are the objects pointed by pDeviceContext and m_pIndexBuffer fetched from memory to the cache

If so, since my game-specific-classes objects are all stored using a custom stack allocator and the D3D objects are most likely in a different region of memory will there be a lot of cache misses?

Like:
Some game object is loaded into cache to get a pointer to a D3D buffer.
Then cache as to be updated because the device context and the buffer are in a different region of memory

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!