• Advertisement
Sign in to follow this  

DirectX pointer and cache

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