2
0

BsCommandBufferManager.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsCorePrerequisites.h"
  5. #include "BsModule.h"
  6. namespace BansheeEngine
  7. {
  8. /** @addtogroup RenderAPI-Internal
  9. * @{
  10. */
  11. /**
  12. * Handles creation of command buffers. See CommandBuffer.
  13. *
  14. * @note Core thread only.
  15. */
  16. class BS_CORE_EXPORT CommandBufferManager : public Module<CommandBufferManager>
  17. {
  18. public:
  19. /**
  20. * Creates a new CommandBuffer.
  21. *
  22. * @param[in] type Determines what type of commands can be added to the command buffer.
  23. * @param[in] deviceIdx Index of the GPU the command buffer will be used to queue commands on. 0 is always
  24. * the primary available GPU.
  25. * @param[in] syncMask Determines how is concurrency handled between multiple command buffers on the same
  26. * device. If buffers don't share the same bits in the sync mask they are allowed to
  27. * execute concurrently on the GPU, however it is up to the user to ensure that they
  28. * do not contain any resources depended on each other. Leave on default to ensure
  29. * no concurrency is possible (safest).
  30. * @param[in] secondary If true the command buffer will not be allowed to execute on its own, but it can
  31. * be appended to a primary command buffer.
  32. * @return New CommandBuffer instance.
  33. *
  34. */
  35. virtual SPtr<CommandBuffer> create(CommandBufferType type, UINT32 deviceIdx = 0, UINT32 syncMask = 0xFFFFFFFF,
  36. bool secondary = false) = 0;
  37. };
  38. /** @} */
  39. }