|
Bicameral Engine
GPU-resident engine for a magic-research open-world game
|
#include <readback_ring.h>
Public Member Functions | |
| D3D12_GPU_VIRTUAL_ADDRESS | GpuAddress () const |
| uint32_t | SlotCount () const |
| uint64_t | Bytes () const |
| ID3D12Resource * | Buffer () const |
| void | RecordBegin (ID3D12GraphicsCommandList *list) const |
| void | RecordReadbackAndReset (ID3D12GraphicsCommandList *list, uint32_t slot, uint64_t copyBytes=UINT64_MAX) const |
| bool | Read (uint32_t slot, std::span< std::byte > destination) const |
Static Public Member Functions | |
| static std::expected< ReadbackRing, std::string > | Create (ID3D12Device *device, uint64_t bytes, uint64_t headerBytes, uint32_t slotCount, std::wstring_view name) |
Private Member Functions | |
| ReadbackRing ()=default | |
Private Attributes | |
| ComPtr< ID3D12Resource > | m_buffer |
| ComPtr< ID3D12Resource > | m_zeros |
| std::vector< ComPtr< ID3D12Resource > > | m_readbacks |
| uint64_t | m_bytes = 0 |
| uint64_t | m_headerBytes = 0 |
Definition at line 23 of file readback_ring.h.
|
privatedefault |
|
inlinenodiscard |
Definition at line 33 of file readback_ring.h.
References m_buffer.
|
inlinenodiscard |
Definition at line 32 of file readback_ring.h.
References m_bytes.
|
staticnodiscard |
Definition at line 11 of file readback_ring.cpp.
References bicameral::gpu::CreateBuffer(), m_buffer, m_bytes, m_headerBytes, m_readbacks, m_zeros, bicameral::gpu::Readback, ReadbackRing(), and bicameral::gpu::UnorderedAccess.
Referenced by bicameral::gpu::DebugRing::Create(), bicameral::gpu::GraphTrace::Create(), bicameral::gpu::WorkGraphStats::Create(), and bicameral::sim::ProbeSim::Create().
|
inlinenodiscard |
Definition at line 30 of file readback_ring.h.
References m_buffer.
|
nodiscard |
Definition at line 61 of file readback_ring.cpp.
References m_readbacks, and bicameral::gpu::ReadBuffer().
| void bicameral::gpu::ReadbackRing::RecordBegin | ( | ID3D12GraphicsCommandList * | list | ) | const |
Definition at line 36 of file readback_ring.cpp.
References m_buffer, and bicameral::gpu::Transition().
| void bicameral::gpu::ReadbackRing::RecordReadbackAndReset | ( | ID3D12GraphicsCommandList * | list, |
| uint32_t | slot, | ||
| uint64_t | copyBytes = UINT64_MAX ) const |
Definition at line 42 of file readback_ring.cpp.
References m_buffer, m_bytes, m_headerBytes, m_readbacks, m_zeros, and bicameral::gpu::Transition().
|
inlinenodiscard |
Definition at line 31 of file readback_ring.h.
References m_readbacks.
|
private |
Definition at line 50 of file readback_ring.h.
Referenced by Buffer(), Create(), GpuAddress(), RecordBegin(), and RecordReadbackAndReset().
|
private |
Definition at line 53 of file readback_ring.h.
Referenced by Bytes(), Create(), and RecordReadbackAndReset().
|
private |
Definition at line 54 of file readback_ring.h.
Referenced by Create(), and RecordReadbackAndReset().
|
private |
Definition at line 52 of file readback_ring.h.
Referenced by Create(), Read(), RecordReadbackAndReset(), and SlotCount().
|
private |
Definition at line 51 of file readback_ring.h.
Referenced by Create(), and RecordReadbackAndReset().