#pragma once #include "Betriebssystem.h" // DirectX12 Datentypen struct ID3D12CommandAllocator; struct ID3D12CommandQueue; struct ID3D12Fence; struct ID3D12Device2; struct ID3D12GraphicsCommandList2; namespace Framework { class DX12Command; class DX12CommandQueue { protected: ID3D12CommandAllocator *allocator; ID3D12GraphicsCommandList2 *commandList; ID3D12CommandQueue *queue; ID3D12Fence *fence; ID3D12Device2 *device; HANDLE event; unsigned __int64 fenceValue; int ref; DX12CommandQueue( int typ, ID3D12Device2 *device ); public: virtual ~DX12CommandQueue(); unsigned __int64 addSignalFromGPU(); void whaitForGPUSignal(); void whaitForGPUSignal( unsigned __int64 value ); void flush(); ID3D12CommandAllocator *getAllocator() const; ID3D12GraphicsCommandList2 *getCommandList() const; ID3D12CommandQueue *getQueue() const; void execute(); DX12CommandQueue *getThis(); DX12CommandQueue *release(); }; class DX12DirectCommandQueue : public DX12CommandQueue { public: DX12DirectCommandQueue( ID3D12Device2 *device ); }; class DX12CopyCommandQueue : public DX12CommandQueue { public: DX12CopyCommandQueue( ID3D12Device2 *device ); }; class DX12ComputeCommandQueue : public DX12CommandQueue { public: DX12ComputeCommandQueue( ID3D12Device2 *device ); }; };