RavEngine
Loading...
Searching...
No Matches
RGL::BufferD3D12 Struct Reference
Inheritance diagram for RGL::BufferD3D12:
[legend]
Collaboration diagram for RGL::BufferD3D12:
[legend]

Public Member Functions

 BufferD3D12 (decltype(owningDevice), const BufferConfig &)
 
void MapMemory () final
 
void UnmapMemory () final
 
void UpdateBufferData (untyped_span newData, decltype(BufferConfig::nElements) offset=0) final
 
void SetBufferData (untyped_span data, decltype(BufferConfig::nElements) offset=0) final
 
decltype(BufferConfig::nElements) getBufferSize () const
 
void * GetMappedDataPtr () final
 
void SignalRangeChanged (const Range &) final
 
uint32_t GetReadonlyBindlessGPUHandle () const final
 
uint32_t GetReadwriteBindlessGPUHandle () const final
 
ID3D12Resource * GetResource () const final
 

Public Attributes

Microsoft::WRL::ComPtr< ID3D12Resource > buffer
 
D3D12_VERTEX_BUFFER_VIEW vertexBufferView {}
 
D3D12_INDEX_BUFFER_VIEW indexBufferView {}
 
BufferConfig::Type myType
 
const RGL::BufferAccess accessType
 
bool isWritable = false
 
bool canBeTransitioned = true
 
uint32_t srvIdx = 0
 
uint32_t uavIdx = std::numeric_limits<uint32_t>::max()
 
std::string debugName
 
const std::shared_ptr< DeviceD3D12 > owningDevice
 
MutableSpan mappedMemory
 
- Public Attributes inherited from RGL::D3D12TrackedResource
D3D12_RESOURCE_STATES nativeState = D3D12_RESOURCE_STATE_COMMON
 

Member Function Documentation

◆ getBufferSize()

decltype(BufferConfig::nElements) RGL::BufferD3D12::getBufferSize ( ) const
virtual

Implements RGL::IBuffer.

◆ GetMappedDataPtr()

void * RGL::BufferD3D12::GetMappedDataPtr ( )
finalvirtual

Implements RGL::IBuffer.

◆ GetReadonlyBindlessGPUHandle()

uint32_t RGL::BufferD3D12::GetReadonlyBindlessGPUHandle ( ) const
finalvirtual

Implements RGL::IBuffer.

◆ GetReadwriteBindlessGPUHandle()

uint32_t RGL::BufferD3D12::GetReadwriteBindlessGPUHandle ( ) const
finalvirtual

Implements RGL::IBuffer.

◆ GetResource()

ID3D12Resource * RGL::BufferD3D12::GetResource ( ) const
inlinefinalvirtual

◆ MapMemory()

void RGL::BufferD3D12::MapMemory ( )
finalvirtual

Map system RAM for updating this buffer.

Implements RGL::IBuffer.

◆ SetBufferData()

void RGL::BufferD3D12::SetBufferData ( untyped_span  data,
decltype(BufferConfig::nElements)  offset = 0 
)
finalvirtual

Set the contents of this buffer. Intended to be used with VertexBuffers or other data that changes infrequently or never.

Parameters
newDatathe data to write into the buffer.

Implements RGL::IBuffer.

◆ SignalRangeChanged()

void RGL::BufferD3D12::SignalRangeChanged ( const Range &  )
finalvirtual

Implements RGL::IBuffer.

◆ UnmapMemory()

void RGL::BufferD3D12::UnmapMemory ( )
finalvirtual

Unmap system RAM for updating this buffer.

Implements RGL::IBuffer.

◆ UpdateBufferData()

void RGL::BufferD3D12::UpdateBufferData ( untyped_span  newData,
decltype(BufferConfig::nElements)  offset = 0 
)
finalvirtual

Update the contents of this buffer. If memory is not mapped, it will become mapped. The memory remains mapped. Intended to be used with UniformBuffers or other data that changes frequently.

Parameters
newDatathe data to write into the buffer.

Implements RGL::IBuffer.


The documentation for this struct was generated from the following file: