DXCommandQueue.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #pragma once
  2. #include "Betriebssystem.h"
  3. // DirectX12 Datentypen
  4. struct ID3D12CommandAllocator;
  5. struct ID3D12CommandQueue;
  6. struct ID3D12Fence;
  7. struct ID3D12Device2;
  8. struct ID3D12GraphicsCommandList2;
  9. namespace Framework
  10. {
  11. class DX12Command;
  12. class DX12CommandQueue
  13. {
  14. protected:
  15. ID3D12CommandAllocator *allocator;
  16. ID3D12GraphicsCommandList2 *commandList;
  17. ID3D12CommandQueue *queue;
  18. ID3D12Fence *fence;
  19. ID3D12Device2 *device;
  20. HANDLE event;
  21. unsigned __int64 fenceValue;
  22. int ref;
  23. DX12CommandQueue( int typ, ID3D12Device2 *device );
  24. public:
  25. virtual ~DX12CommandQueue();
  26. unsigned __int64 addSignalFromGPU();
  27. void whaitForGPUSignal();
  28. void whaitForGPUSignal( unsigned __int64 value );
  29. void flush();
  30. ID3D12CommandAllocator *getAllocator() const;
  31. ID3D12GraphicsCommandList2 *getCommandList() const;
  32. ID3D12CommandQueue *getQueue() const;
  33. void execute();
  34. DX12CommandQueue *getThis();
  35. DX12CommandQueue *release();
  36. };
  37. class DX12DirectCommandQueue : public DX12CommandQueue
  38. {
  39. public:
  40. DX12DirectCommandQueue( ID3D12Device2 *device );
  41. };
  42. class DX12CopyCommandQueue : public DX12CommandQueue
  43. {
  44. public:
  45. DX12CopyCommandQueue( ID3D12Device2 *device );
  46. };
  47. class DX12ComputeCommandQueue : public DX12CommandQueue
  48. {
  49. public:
  50. DX12ComputeCommandQueue( ID3D12Device2 *device );
  51. };
  52. };