|
| D3D11CompatBufferInterface (size_t vboPoolIdx, ID3D11Buffer *d3dBuffer, D3D11Device &device) |
|
| ~D3D11CompatBufferInterface () override |
|
void | _ensureDelayedImmutableBuffersAreReady () override |
|
virtual void | _notifyBuffer (BufferPacked *buffer) |
|
void | advanceFrame () override |
|
void | copyTo (BufferInterface *dstBuffer, size_t dstOffsetBytes, size_t srcOffsetBytes, size_t sizeBytes) override |
|
BufferPacked * | getBufferPacked () |
|
ID3D11Buffer * | getVboName () const |
|
size_t | getVboPoolIndex () |
|
void *RESTRICT_ALIAS_RETURN | map (size_t elementStart, size_t elementCount, MappingState prevMappingState, bool advanceFrame=true) override |
|
void | regressFrame () override |
|
void | unmap (UnmapOptions unmapOption, size_t flushStartElem=0, size_t flushSizeElem=0) override |
|
void | upload (const void *data, size_t elementStart, size_t elementCount) |
|
In D3D11, const buffers can't be bound by offset.
Their size at creation defines the size to be bound to the shader, and the max limit is 64kb. This is unless we're using D3D11.1 on Windows 8.1; which for simplicity we treat it the same as D3D11.
- This limitation prevents us from allocating 3x size for triple buffering.
- Therefore we need the traditional scheme of mapping with NO_OVERWRITE and then use DISCARD when we've filled the buffer.
- In D3D11.0, only index and vertex buffers can be mapped with NO_OVERWRITE. That leaves only DISCARD to be used on those systems. NO_OVERWRITE is used if used D3D 11.1 though.
- This buffer interface is for compatibility with these systems.