15class ComputeSystemDX12;
24 ComputeBufferDX12(ComputeSystemDX12 *inComputeSystem, EType inType,
uint64 inSize,
uint inStride);
26 bool Initialize(
const void *inData);
28 ID3D12Resource * GetResourceCPU()
const {
return mBufferCPU.Get(); }
29 ID3D12Resource * GetResourceGPU()
const {
return mBufferGPU.Get(); }
30 ComPtr<ID3D12Resource> ReleaseResourceCPU()
const {
return std::move(mBufferCPU); }
32 bool Barrier(ID3D12GraphicsCommandList *inCommandList, D3D12_RESOURCE_STATES inTo)
const;
33 void RWBarrier(ID3D12GraphicsCommandList *inCommandList);
34 bool SyncCPUToGPU(ID3D12GraphicsCommandList *inCommandList)
const;
42 ComputeSystemDX12 * mComputeSystem;
43 mutable ComPtr<ID3D12Resource> mBufferCPU;
44 ComPtr<ID3D12Resource> mBufferGPU;
45 mutable bool mNeedsSync =
false;
46 mutable D3D12_RESOURCE_STATES mCurrentState = D3D12_RESOURCE_STATE_COPY_DEST;
#define JPH_EXPORT
Definition Core.h:275
std::uint64_t uint64
Definition Core.h:504
unsigned int uint
Definition Core.h:500
#define JPH_NAMESPACE_END
Definition Core.h:425
#define JPH_NAMESPACE_BEGIN
Definition Core.h:419
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition Memory.h:50
Buffer that can be read from / written to by a compute shader.
Definition ComputeBuffer.h:18
virtual ComputeBufferResult CreateReadBackBuffer() const =0
virtual void * MapInternal(EMode inMode)=0
virtual void UnmapInternal()=0
Helper class that either contains a valid result or an error.
Definition Result.h:12