|
| D3D11VaoManager (bool supportsIndirectBuffers, D3D11Device &device, D3D11RenderSystem *renderSystem) |
|
virtual | ~D3D11VaoManager () |
|
virtual void | _beginFrame (void) |
|
uint8 | _getDynamicBufferCurrentFrameNoWait (void) const |
|
void | _notifyStagingBufferEnteredZeroRef (StagingBuffer *stagingBuffer) |
|
void | _notifyStagingBufferLeftZeroRef (StagingBuffer *stagingBuffer) |
|
virtual void | _update (void) |
|
void | bindDrawId (uint32 bindSlotId) |
| Binds the Draw ID to the currently bound vertex array object.
|
|
virtual AsyncTicketPtr | createAsyncTicket (BufferPacked *creator, StagingBuffer *stagingBuffer, size_t elementStart, size_t elementCount) |
|
ConstBufferPacked * | createConstBuffer (size_t sizeBytes, BufferType bufferType, void *initialData, bool keepAsShadow) |
| Creates an constant buffer based on the given parameters.
|
|
ID3D11Query * | createFence (void) |
|
IndexBufferPacked * | createIndexBuffer (IndexBufferPacked::IndexType indexType, size_t numIndices, BufferType bufferType, void *initialData, bool keepAsShadow) |
| Creates an index buffer based on the given parameters.
|
|
IndirectBufferPacked * | createIndirectBuffer (size_t sizeBytes, BufferType bufferType, void *initialData, bool keepAsShadow) |
| Creates an indirect buffer.
|
|
MultiSourceVertexBufferPool * | createMultiSourceVertexBufferPool (const VertexElement2VecVec &vertexElementsBySource, size_t maxNumVertices, BufferType bufferType) |
|
virtual StagingBuffer * | createStagingBuffer (size_t sizeBytes, bool forUpload) |
| Creates a new staging buffer and adds it to the pool.
|
|
TexBufferPacked * | createTexBuffer (PixelFormat pixelFormat, size_t sizeBytes, BufferType bufferType, void *initialData, bool keepAsShadow) |
| Creates an constant buffer based on the given parameters.
|
|
UavBufferPacked * | createUavBuffer (size_t numElements, uint32 bytesPerElement, uint32 bindFlags, void *initialData, bool keepAsShadow) |
| Creates an UAV buffer based on the given parameters.
|
|
VertexArrayObject * | createVertexArrayObject (const VertexBufferPackedVec &vertexBuffers, IndexBufferPacked *indexBuffer, OperationType opType) |
| Creates a VertexArrayObject that binds all the vertex buffers with their respective declarations, and the index buffers.
|
|
VertexBufferPacked * | createVertexBuffer (const VertexElement2Vec &vertexElements, size_t numVertices, BufferType bufferType, void *initialData, bool keepAsShadow) |
| Creates a vertex buffer based on the given parameters.
|
|
void | destroyConstBuffer (ConstBufferPacked *constBuffer) |
| Destroys the given constant buffer created with createConstBuffer.
|
|
void | destroyIndexBuffer (IndexBufferPacked *indexBuffer) |
| Destroys the given index buffer created with createIndexBuffer.
|
|
void | destroyIndirectBuffer (IndirectBufferPacked *indirectBuffer) |
| Destroys the given indirect buffer created with createIndirectBuffer.
|
|
void | destroyTexBuffer (TexBufferPacked *texBuffer) |
| Destroys the given texture buffer created with createTexBuffer.
|
|
void | destroyUavBuffer (UavBufferPacked *uavBuffer) |
| Destroys the given UAV buffer created with createUavBuffer.
|
|
void | destroyVertexArrayObject (VertexArrayObject *vao) |
| Destroys the input pointer.
|
|
void | destroyVertexBuffer (VertexBufferPacked *vertexBuffer) |
| Destroys the given vertex buffer created with createVertexBuffer.
|
|
uint32 | getConstBufferAlignment (void) const |
|
size_t | getConstBufferMaxSize (void) const |
|
D3D11RenderSystem * | getD3D11RenderSystem (void) const |
|
uint32 | getDefaultStagingBufferLifetime (void) const |
|
uint32 | getDefaultStagingBufferUnfencedTime (void) const |
|
uint8 | getDynamicBufferMultiplier (void) const |
|
uint32 | getFrameCount (void) |
|
StagingBuffer * | getStagingBuffer (size_t minSizeBytes, bool forUpload) |
| Retrieves a staging buffer for use.
|
|
uint32 | getTexBufferAlignment (void) const |
|
size_t | getTexBufferMaxSize (void) const |
|
Timer * | getTimer (void) |
|
uint32 | getUavBufferAlignment (void) const |
|
size_t | getUavBufferMaxSize (void) const |
|
virtual bool | isFrameFinished (uint32 frameCount) |
| See VaoManager::isFrameFinished.
|
|
void | operator delete (void *ptr) |
|
void | operator delete (void *ptr, const char *, int, const char *) |
|
void | operator delete (void *ptr, void *) |
|
void | operator delete[] (void *ptr) |
|
void | operator delete[] (void *ptr, const char *, int, const char *) |
|
void * | operator new (size_t sz) |
|
void * | operator new (size_t sz, const char *file, int line, const char *func) |
| operator new, with debug line info
|
|
void * | operator new (size_t sz, void *ptr) |
| placement operator new
|
|
void * | operator new[] (size_t sz) |
|
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
| array operator new, with debug line info
|
|
void | setDefaultStagingBufferlifetime (uint32 lifetime, uint32 unfencedTime) |
| Sets the default time for staging buffers.
|
|
bool | supportsBaseInstance (void) const |
|
bool | supportsIndirectBuffers (void) const |
| When false, IndirectBufferPacked will emulate the mapping behavior, and we need to use the emulated calls in RenderSystem.
|
|
bool | supportsPersistentMapping (void) const |
|
ID3D11Query * | waitFor (ID3D11Query *fenceName) |
|
virtual void | waitForSpecificFrameToFinish (uint32 frameCount) |
| See VaoManager::waitForSpecificFrameToFinish.
|
|
virtual uint8 | waitForTailFrameToFinish (void) |
|
void Ogre::VaoManager::setDefaultStagingBufferlifetime |
( |
uint32 |
lifetime, |
|
|
uint32 |
unfencedTime |
|
) |
| |
|
inherited |
Sets the default time for staging buffers.
Staging buffers are recycled/reused. When their reference count reaches 0, this VaoManager will begin to track how long since the last time they've reached ref count 0. When the time threshold is met, the staging buffer gets removed.
- Small explanation on StagingBuffer lifetime management (so you can make sense on what we're doing here):
StagingBuffers may produce "pops" when created (due to API/driver stalls) so we reuse them. We keep track of how long StagingBuffers have been remained unused, and delete old ones. The intention is to be able to recycle old buffers, while getting rid of the excess if a sudden spike happened. That's what the lifetime threshold controls.
We also have the "unfenced threshold". This controls something very different. StagingBuffers usages need fences to check whether we're done using the buffer. But we don't issue a fence every time you do something with them, because that could result in a lot of fences (i.e. imagine you do a 1000 uploads of 16 bytes each, in succession, we shouldn't do 1000 fences); so we fence when certain upload/download thresholds are met (i.e. you've uploaded 1MB of data). So if you've uploaded 750kb so far, no fence will be issued. But if you upload 300kb more, we will fence. But what happens if you've only uploaded 750kb and then nothing more for the last 10 minutes? Since we haven't fenced, and now you need to upload a lot more, we don't know if those 750kb are done uploading because we never fenced it. It probably ended 10 minutes ago, but we won't know. We would have to fence now and perform a full stall waiting for that fence. To solve this edge case, we fence whenever X time has elapsed without fencing (and only if there's data that remains unfenced of course). That's what the unfenced threshold is for.
- Parameters
-
lifetime | Time in milliseconds. The default is 5 minutes. A staging buffer that remained at zero ref. count for lifetime milliseconds will be destroyed. |
unfencedTime | For efficiency reasons (API overhead), some staging buffers implementations will not track all hazards on fences. A staging buffer that remained at zero ref. count for unfencedTime milliseconds will be told to clean their hazards, creating the missing appropiate fences. unfencedTime can't be higher than lifetime. unfencedTime should not be too far away from lifetime, and not too soon either, to maximize the chances of no stalls when we finally destroy it and avoid excessive API overhead in keeping fences alive. The default is 4 minutes 59 seconds. |