Common buffer operations for most v1 buffer interfaces used in Metal This implementation treats: Ignores STATIC and DYNAMIC bit in buffers Lack of WRITE_ONLY and DISCARDABLE buffer puts it in slowest path.
More...
#include <OgreMetalHardwareBufferCommon.h>
|
| MetalHardwareBufferCommon (size_t sizeBytes, HardwareBuffer::Usage usage, uint16 alignment, MetalDiscardBufferManager *discardBufferManager, MetalDevice *device) |
|
virtual | ~MetalHardwareBufferCommon () |
|
void | _notifyDeviceStalled () |
|
void | copyData (MetalHardwareBufferCommon *srcBuffer, size_t srcOffset, size_t dstOffset, size_t length, bool discardWholeBuffer=false) |
|
id< MTLBuffer > | getBufferName (size_t &outOffset) |
| Returns the actual API buffer, but first sets mLastFrameUsed as we assume you're calling this function to use the buffer in the GPU. More...
|
|
id< MTLBuffer > | getBufferNameForGpuWrite () |
|
size_t | getSizeBytes () const |
|
void * | lockImpl (size_t offset, size_t length, HardwareBuffer::LockOptions options, bool isLocked) |
|
void | readData (size_t offset, size_t length, void *pDest) |
|
void | unlockImpl (size_t lockStart, size_t lockSize) |
|
void | writeData (size_t offset, size_t length, const void *pSource, bool discardWholeBuffer=false) |
|
Common buffer operations for most v1 buffer interfaces used in Metal This implementation treats: Ignores STATIC and DYNAMIC bit in buffers Lack of WRITE_ONLY and DISCARDABLE buffer puts it in slowest path.
Puts WRITE_ONLY in device memory and uses staging buffers to avoid blocking. Use WRITE_ONLY when possible. When DISCARDABLE bit is set, it uses MetalDiscardBuffer.
◆ MetalHardwareBufferCommon()
◆ ~MetalHardwareBufferCommon()
virtual Ogre::v1::MetalHardwareBufferCommon::~MetalHardwareBufferCommon |
( |
| ) |
|
|
virtual |
◆ _notifyDeviceStalled()
void Ogre::v1::MetalHardwareBufferCommon::_notifyDeviceStalled |
( |
| ) |
|
◆ copyData()
void Ogre::v1::MetalHardwareBufferCommon::copyData |
( |
MetalHardwareBufferCommon * |
srcBuffer, |
|
|
size_t |
srcOffset, |
|
|
size_t |
dstOffset, |
|
|
size_t |
length, |
|
|
bool |
discardWholeBuffer = false |
|
) |
| |
◆ getBufferName()
id<MTLBuffer> Ogre::v1::MetalHardwareBufferCommon::getBufferName |
( |
size_t & |
outOffset | ) |
|
Returns the actual API buffer, but first sets mLastFrameUsed as we assume you're calling this function to use the buffer in the GPU.
- Parameters
-
outOffset | Out. Guaranteed to be written. Used by HBU_DISCARDABLE buffers which need an offset to the internal ring buffer we've allocated. |
- Returns
- The MTLBuffer in question.
◆ getBufferNameForGpuWrite()
id<MTLBuffer> Ogre::v1::MetalHardwareBufferCommon::getBufferNameForGpuWrite |
( |
| ) |
|
◆ getSizeBytes()
size_t Ogre::v1::MetalHardwareBufferCommon::getSizeBytes |
( |
| ) |
const |
|
inline |
◆ lockImpl()
void* Ogre::v1::MetalHardwareBufferCommon::lockImpl |
( |
size_t |
offset, |
|
|
size_t |
length, |
|
|
HardwareBuffer::LockOptions |
options, |
|
|
bool |
isLocked |
|
) |
| |
◆ readData()
void Ogre::v1::MetalHardwareBufferCommon::readData |
( |
size_t |
offset, |
|
|
size_t |
length, |
|
|
void * |
pDest |
|
) |
| |
◆ unlockImpl()
void Ogre::v1::MetalHardwareBufferCommon::unlockImpl |
( |
size_t |
lockStart, |
|
|
size_t |
lockSize |
|
) |
| |
◆ writeData()
void Ogre::v1::MetalHardwareBufferCommon::writeData |
( |
size_t |
offset, |
|
|
size_t |
length, |
|
|
const void * |
pSource, |
|
|
bool |
discardWholeBuffer = false |
|
) |
| |
The documentation for this class was generated from the following file: