33#ifndef DVD_SHADER_BUFFER_H_
34#define DVD_SHADER_BUFFER_H_
41struct ShaderBufferDescriptor;
44 class ShaderBufferBind;
53 friend class Attorney::ShaderBufferBind;
58 void readData(
BufferRange range, std::pair<bufferPtr, size_t> outData);
59 void readBytes(
BufferRange range, std::pair<bufferPtr, size_t> outData);
68 [[nodiscard]]
FORCE_INLINE I32 getStartIndex(const
bool read) const noexcept {
return (read ? queueReadIndex() : queueWriteIndex()); }
79 [[nodiscard]]
static size_t AlignmentRequirement(
BufferUsageType usage)
noexcept;
93 size_t _maxSize{ 0u };
94 U64 _lastWriteFrameNumber{ 0u };
Rough around the edges Adapter pattern abstracting the actual rendering API and access to the GPU.
Utility class that adds basic GUID management to objects.
virtual void readBytesInternal(BufferRange range, std::pair< bufferPtr, size_t > outData)=0
PROPERTY_R(U64, lastReadFrame, 0u)
PROPERTY_R(size_t, alignmentRequirement, sizeof(U32))
FORCE_INLINE BufferLock writeData(const bufferPtr data)
FORCE_INLINE BufferUsageType getUsage() const noexcept
FORCE_INLINE U32 getPrimitiveCount() const noexcept
virtual LockableBuffer * getBufferImpl()=0
PROPERTY_R(size_t, alignedBufferSize, 0u)
FORCE_INLINE size_t getPrimitiveSize() const noexcept
FORCE_INLINE size_t getStartOffset(const bool read) const noexcept
virtual BufferLock writeBytesInternal(BufferRange range, const bufferPtr data)=0
FORCE_INLINE BufferLock clearData()
PROPERTY_R(U64, lastWrittenFrame, 0u)
Handle console commands that start with a forward slash.
constexpr size_t to_size(const T value)
std::pair< bufferPtr, size_t > _initialData
BufferParams _bufferParams
bool _separateReadWrite
Use a separate read/write index based on queue length.