OGRE
1.12.13
Object-Oriented Graphics Rendering Engine
|
A staging buffer is a buffer that resides on the GPU and be written to/from both CPU & GPU However the access in both cases is limited. More...
#include <OgreMetalStagingBuffer.h>
Public Member Functions | |
MetalStagingBuffer (size_t internalBufferStart, size_t sizeBytes, bool uploadOnly, id< MTLBuffer > vboName, MetalDevice *device) | |
virtual | ~MetalStagingBuffer () |
virtual size_t | _asyncDownloadV1 (MetalHardwareBufferCommon *source, size_t srcOffset, size_t srcLength) |
const void * | _mapForRead (size_t offset, size_t sizeBytes) |
void | _notifyDeviceStalled (void) |
void | _unmapToV1 (MetalHardwareBufferCommon *hwBuffer, size_t lockStart, size_t lockSize) |
void | cleanUnfencedHazards (void) |
id< MTLBuffer > | getBufferName (void) const |
void * | map (size_t sizeBytes) |
Maps the given amount of bytes. More... | |
virtual StagingStallType | uploadWillStall (size_t sizeBytes) |
A staging buffer is a buffer that resides on the GPU and be written to/from both CPU & GPU However the access in both cases is limited.
GPUs can only copy (i.e. memcpy) to another real buffer (can't be used directly as i.e. texture or vertex buffer) and CPUs can only map it. In other words, a staging buffer is an intermediate buffer to transfer data between CPU & GPU
Ogre::MetalStagingBuffer::MetalStagingBuffer | ( | size_t | internalBufferStart, |
size_t | sizeBytes, | ||
bool | uploadOnly, | ||
id< MTLBuffer > | vboName, | ||
MetalDevice * | device | ||
) |
|
virtual |
|
virtual |
void Ogre::MetalStagingBuffer::cleanUnfencedHazards | ( | void | ) |
void Ogre::MetalStagingBuffer::_notifyDeviceStalled | ( | void | ) |
void Ogre::MetalStagingBuffer::_unmapToV1 | ( | MetalHardwareBufferCommon * | hwBuffer, |
size_t | lockStart, | ||
size_t | lockSize | ||
) |
|
virtual |
|
inline |
const void* Ogre::MetalStagingBuffer::_mapForRead | ( | size_t | offset, |
size_t | sizeBytes | ||
) |
void* Ogre::MetalStagingBuffer::map | ( | size_t | sizeBytes | ) |
Maps the given amount of bytes.
May block if not ready.