Sign in to follow this  
Aqua Costa

DirectX pointer and cache

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:
[code] pDeviceContext->IASetIndexBuffer(m_pIndexBuffer, DXGI_FORMAT_R32_UINT, m_IndexBufferOffset);[/code]
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?

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

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