#include <DxContextManagerCallback.h>
Public Member Functions | |
virtual void | acquireContext ()=0 |
Acquire the D3D context for the current thread. | |
virtual ID3D11DeviceContext * | getContext () const =0 |
Return the D3D context to use for compute work. | |
virtual ID3D11Device * | getDevice () const =0 |
Return the D3D device to use for compute work. | |
virtual void | releaseContext ()=0 |
Release the D3D context from the current thread. | |
virtual bool | synchronizeResources () const =0 |
Return if exposed buffers (only cloth particles at the moment) are created with D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX. | |
virtual | ~DxContextManagerCallback () |
virtual nv::cloth::DxContextManagerCallback::~DxContextManagerCallback | ( | ) | [inline, virtual] |
virtual void nv::cloth::DxContextManagerCallback::acquireContext | ( | ) | [pure virtual] |
Acquire the D3D context for the current thread.
Acquisitions are allowed to be recursive within a single thread. You can acquire the context multiple times so long as you release it the same count.
virtual ID3D11DeviceContext* nv::cloth::DxContextManagerCallback::getContext | ( | ) | const [pure virtual] |
Return the D3D context to use for compute work.
virtual ID3D11Device* nv::cloth::DxContextManagerCallback::getDevice | ( | ) | const [pure virtual] |
Return the D3D device to use for compute work.
virtual void nv::cloth::DxContextManagerCallback::releaseContext | ( | ) | [pure virtual] |
Release the D3D context from the current thread.
virtual bool nv::cloth::DxContextManagerCallback::synchronizeResources | ( | ) | const [pure virtual] |
Return if exposed buffers (only cloth particles at the moment) are created with D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX.
The user is responsible to query and acquire the mutex of all corresponding buffers. todo: We should acquire the mutex locally if we continue to allow resource sharing across devices.