2
0

BsVulkanCommandBuffer.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsVulkanPrerequisites.h"
  5. #include "BsCommandBuffer.h"
  6. #include "BsVulkanRenderAPI.h"
  7. #include "BsVulkanResource.h"
  8. #include "BsVulkanGpuPipelineState.h"
  9. namespace bs { namespace ct
  10. {
  11. class VulkanOcclusionQuery;
  12. class VulkanTimerQuery;
  13. class VulkanImage;
  14. /** @addtogroup Vulkan
  15. * @{
  16. */
  17. #define BS_MAX_VULKAN_CB_PER_QUEUE_FAMILY BS_MAX_QUEUES_PER_TYPE * 32
  18. // Maximum number of command buffers that another command buffer can be dependant on (via a sync mask)
  19. #define BS_MAX_VULKAN_CB_DEPENDENCIES 2
  20. /** Wrapper around a Vulkan semaphore object that manages its usage and lifetime. */
  21. class VulkanSemaphore : public VulkanResource
  22. {
  23. public:
  24. VulkanSemaphore(VulkanResourceManager* owner);
  25. ~VulkanSemaphore();
  26. /** Returns the internal handle to the Vulkan object. */
  27. VkSemaphore getHandle() const { return mSemaphore; }
  28. private:
  29. VkSemaphore mSemaphore;
  30. };
  31. class VulkanCmdBuffer;
  32. /** Pool that allocates and distributes Vulkan command buffers. */
  33. class VulkanCmdBufferPool
  34. {
  35. public:
  36. VulkanCmdBufferPool(VulkanDevice& device);
  37. ~VulkanCmdBufferPool();
  38. /**
  39. * Attempts to find a free command buffer, or creates a new one if not found. Caller must guarantee the provided
  40. * queue family is valid.
  41. */
  42. VulkanCmdBuffer* getBuffer(UINT32 queueFamily, bool secondary);
  43. private:
  44. /** Command buffer pool and related information. */
  45. struct PoolInfo
  46. {
  47. VkCommandPool pool = VK_NULL_HANDLE;
  48. VulkanCmdBuffer* buffers[BS_MAX_VULKAN_CB_PER_QUEUE_FAMILY];
  49. UINT32 queueFamily = -1;
  50. };
  51. /** Creates a new command buffer. */
  52. VulkanCmdBuffer* createBuffer(UINT32 queueFamily, bool secondary);
  53. VulkanDevice& mDevice;
  54. UnorderedMap<UINT32, PoolInfo> mPools;
  55. UINT32 mNextId;
  56. };
  57. /** Determines where are the current descriptor sets bound to. */
  58. enum class DescriptorSetBindFlag
  59. {
  60. None = 0,
  61. Graphics = 1 << 0,
  62. Compute = 1 << 1
  63. };
  64. typedef Flags<DescriptorSetBindFlag> DescriptorSetBindFlags;
  65. BS_FLAGS_OPERATORS(DescriptorSetBindFlag)
  66. /**
  67. * Represents a direct wrapper over an internal Vulkan command buffer. This is unlike VulkanCommandBuffer which is a
  68. * higher level class, and it allows for re-use by internally using multiple low-level command buffers.
  69. */
  70. class VulkanCmdBuffer
  71. {
  72. /** Possible states a command buffer can be in. */
  73. enum class State
  74. {
  75. /** Buffer is ready to be re-used. */
  76. Ready,
  77. /** Buffer is currently recording commands, but isn't recording a render pass. */
  78. Recording,
  79. /** Buffer is currently recording render pass commands. */
  80. RecordingRenderPass,
  81. /** Buffer is done recording but hasn't been submitted. */
  82. RecordingDone,
  83. /** Buffer is done recording and is currently submitted on a queue. */
  84. Submitted
  85. };
  86. public:
  87. VulkanCmdBuffer(VulkanDevice& device, UINT32 id, VkCommandPool pool, UINT32 queueFamily, bool secondary);
  88. ~VulkanCmdBuffer();
  89. /** Returns an unique identifier of this command buffer. */
  90. UINT32 getId() const { return mId; }
  91. /** Returns the index of the queue family this command buffer is executing on. */
  92. UINT32 getQueueFamily() const { return mQueueFamily; }
  93. /** Returns the index of the device this command buffer will execute on. */
  94. UINT32 getDeviceIdx() const;
  95. /** Makes the command buffer ready to start recording commands. */
  96. void begin();
  97. /** Ends command buffer command recording (as started with begin()). */
  98. void end();
  99. /** Begins render pass recording. Must be called within begin()/end() calls. */
  100. void beginRenderPass();
  101. /** Ends render pass recording (as started with beginRenderPass(). */
  102. void endRenderPass();
  103. /**
  104. * Submits the command buffer for execution.
  105. *
  106. * @param[in] queue Queue to submit the command buffer on.
  107. * @param[in] queueIdx Index of the queue the command buffer was submitted on. Note that this may be different
  108. * from the actual VulkanQueue index since multiple command buffer queue indices can map
  109. * to the same queue.
  110. * @param[in] syncMask Mask that controls which other command buffers does this command buffer depend upon
  111. * (if any). See description of @p syncMask parameter in RenderAPI::executeCommands().
  112. */
  113. void submit(VulkanQueue* queue, UINT32 queueIdx, UINT32 syncMask);
  114. /** Returns the handle to the internal Vulkan command buffer wrapped by this object. */
  115. VkCommandBuffer getHandle() const { return mCmdBuffer; }
  116. /** Returns a fence that can be used for tracking when the command buffer is done executing. */
  117. VkFence getFence() const { return mFence; }
  118. /**
  119. * Returns a semaphore that may be used for synchronizing execution between command buffers executing on the same
  120. * queue.
  121. */
  122. VulkanSemaphore* getIntraQueueSemaphore() const { return mIntraQueueSemaphore; }
  123. /**
  124. * Returns a semaphore that may be used for synchronizing execution between command buffers executing on different
  125. * queues. Note that these semaphores get used each time they are requested, and there is only a fixed number
  126. * available. If all are used up, null will be returned. New semaphores are generated when allocateSemaphores()
  127. * is called.
  128. */
  129. VulkanSemaphore* requestInterQueueSemaphore() const;
  130. /**
  131. * Allocates a new set of semaphores that may be used for synchronizing execution between different command buffers.
  132. * Releases the previously allocated semaphores, if they exist. Use getIntraQueueSemaphore() &
  133. * requestInterQueueSemaphore() to retrieve latest allocated semaphores.
  134. *
  135. * @param[out] semaphores Output array to place all allocated semaphores in. The array must be of size
  136. * (BS_MAX_VULKAN_CB_DEPENDENCIES + 1).
  137. */
  138. void allocateSemaphores(VkSemaphore* semaphores);
  139. /** Returns true if the command buffer is currently being processed by the device. */
  140. bool isSubmitted() const { return mState == State::Submitted; }
  141. /** Returns true if the command buffer is currently recording (but not within a render pass). */
  142. bool isRecording() const { return mState == State::Recording; }
  143. /** Returns true if the command buffer is ready to be submitted to a queue. */
  144. bool isReadyForSubmit() const { return mState == State::RecordingDone; }
  145. /** Returns true if the command buffer is currently recording a render pass. */
  146. bool isInRenderPass() const { return mState == State::RecordingRenderPass; }
  147. /**
  148. * Checks the internal fence if done executing.
  149. *
  150. * @param[in] block If true, the system will block until the fence is signaled.
  151. */
  152. bool checkFenceStatus(bool block) const;
  153. /**
  154. * Resets the command buffer back in Ready state. Should be called when command buffer is done executing on a
  155. * queue.
  156. */
  157. void reset();
  158. /**
  159. * Lets the command buffer know that the provided resource has been queued on it, and will be used by the
  160. * device when the command buffer is submitted. If a resource is an image or a buffer use the more specific
  161. * registerResource() overload.
  162. */
  163. void registerResource(VulkanResource* res, VulkanUseFlags flags);
  164. /**
  165. * Lets the command buffer know that the provided image resource has been queued on it, and will be used by the
  166. * device when the command buffer is submitted. Executes a layout transition to @p newLayout (if needed), and
  167. * updates the externally visible image layout field to @p finalLayout (once submitted).
  168. *
  169. * @param[in] res Image to register with the command buffer.
  170. * @param[in] range Range of sub-resources to register.
  171. * @param[in] newLayout Layout the image needs to be transitioned in before use. Set to undefined
  172. * layout if no transition is required.
  173. * @param[in] finalLayout Determines what value the externally visible image layout will be set after
  174. * submit() is called. Normally this will be same as @p newLayout, but can be
  175. * different if some form of automatic layout transitions are happening.
  176. * @param[in] flags Flags that determine how will be command buffer be using the buffer.
  177. * @param[in] isFBAttachment Determines if the image is being used as a framebuffer attachment (if true),
  178. * or just as regular shader input (if false).
  179. */
  180. void registerResource(VulkanImage* res, const VkImageSubresourceRange& range, VkImageLayout newLayout,
  181. VkImageLayout finalLayout, VulkanUseFlags flags, bool isFBAttachment = false);
  182. /**
  183. * Lets the command buffer know that the provided image resource has been queued on it, and will be used by the
  184. * device when the command buffer is submitted. Performs no layout transitions on the image, they must be performed
  185. * by the caller, or not required at all.
  186. */
  187. void registerResource(VulkanImage* res, const VkImageSubresourceRange& range, VulkanUseFlags flags);
  188. /**
  189. * Lets the command buffer know that the provided image resource has been queued on it, and will be used by the
  190. * device when the command buffer is submitted.
  191. */
  192. void registerResource(VulkanBuffer* res, VkAccessFlags accessFlags, VulkanUseFlags flags);
  193. /**
  194. * Lets the command buffer know that the provided framebuffer resource has been queued on it, and will be used by
  195. * the device when the command buffer is submitted.
  196. */
  197. void registerResource(VulkanFramebuffer* res, RenderSurfaceMask loadMask, UINT32 readMask);
  198. /** Notifies the command buffer that the provided query has been queued on it. */
  199. void registerQuery(VulkanOcclusionQuery* query) { mOcclusionQueries.insert(query); }
  200. /** Notifies the command buffer that the provided query has been queued on it. */
  201. void registerQuery(VulkanTimerQuery* query) { mTimerQueries.insert(query); }
  202. /************************************************************************/
  203. /* COMMANDS */
  204. /************************************************************************/
  205. /**
  206. * Assigns a render target the the command buffer. This render target's framebuffer and render pass will be used
  207. * when beginRenderPass() is called. Command buffer must not be currently recording a render pass.
  208. */
  209. void setRenderTarget(const SPtr<RenderTarget>& rt, UINT32 readOnlyFlags, RenderSurfaceMask loadMask);
  210. /** Clears the entirety currently bound render target. */
  211. void clearRenderTarget(UINT32 buffers, const Color& color, float depth, UINT16 stencil, UINT8 targetMask);
  212. /** Clears the viewport portion of the currently bound render target. */
  213. void clearViewport(UINT32 buffers, const Color& color, float depth, UINT16 stencil, UINT8 targetMask);
  214. /** Assigns a pipeline state to use for subsequent draw commands. */
  215. void setPipelineState(const SPtr<GraphicsPipelineState>& state);
  216. /** Assigns a pipeline state to use for subsequent dispatch commands. */
  217. void setPipelineState(const SPtr<ComputePipelineState>& state);
  218. /** Assign GPU params to the GPU programs bound by the pipeline state. */
  219. void setGpuParams(const SPtr<GpuParams>& gpuParams);
  220. /** Sets the current viewport which determine to which portion of the render target to render to. */
  221. void setViewport(const Rect2& area);
  222. /**
  223. * Sets the scissor rectangle area which determines in which area if the viewport are the fragments allowed to be
  224. * generated. Only relevant if enabled on the pipeline state.
  225. */
  226. void setScissorRect(const Rect2I& area);
  227. /** Sets a stencil reference value that will be used for comparisons in stencil operations, if enabled. */
  228. void setStencilRef(UINT32 value);
  229. /** Changes how are primitives interpreted as during rendering. */
  230. void setDrawOp(DrawOperationType drawOp);
  231. /** Sets one or multiple vertex buffers that will be used for subsequent draw() or drawIndexed() calls. */
  232. void setVertexBuffers(UINT32 index, SPtr<VertexBuffer>* buffers, UINT32 numBuffers);
  233. /** Sets an index buffer that will be used for subsequent drawIndexed() calls. */
  234. void setIndexBuffer(const SPtr<IndexBuffer>& buffer);
  235. /** Sets a declaration that determines how are vertex buffer contents interpreted. */
  236. void setVertexDeclaration(const SPtr<VertexDeclaration>& decl);
  237. /** Executes a draw command using the currently bound graphics pipeline, vertex buffer and render target. */
  238. void draw(UINT32 vertexOffset, UINT32 vertexCount, UINT32 instanceCount);
  239. /** Executes a draw command using the currently bound graphics pipeline, index & vertex buffer and render target. */
  240. void drawIndexed(UINT32 startIndex, UINT32 indexCount, UINT32 vertexOffset, UINT32 instanceCount);
  241. /** Executes a dispatch command using the currently bound compute pipeline. */
  242. void dispatch(UINT32 numGroupsX, UINT32 numGroupsY, UINT32 numGroupsZ);
  243. /**
  244. * Registers a command that signals the event when executed. Will be delayed until the end of the current
  245. * render pass, if any.
  246. */
  247. void setEvent(VulkanEvent* event);
  248. /**
  249. * Registers a command that resets the query. The command will be delayed until the next submit() if a render
  250. * pass is currently in progress, but is guaranteed to execute before this command buffer is submitted.
  251. */
  252. void resetQuery(VulkanQuery* query);
  253. /**
  254. * Issues a pipeline barrier on the provided buffer. See vkCmdPipelineBarrier in Vulkan spec. for usage
  255. * information.
  256. */
  257. void memoryBarrier(VkBuffer buffer, VkAccessFlags srcAccessFlags, VkAccessFlags dstAccessFlags,
  258. VkPipelineStageFlags srcStage, VkPipelineStageFlags dstStage);
  259. /**
  260. * Issues a pipeline barrier on the provided image. See vkCmdPipelineBarrier in Vulkan spec. for usage
  261. * information.
  262. */
  263. void memoryBarrier(VkImage image, VkAccessFlags srcAccessFlags, VkAccessFlags dstAccessFlags,
  264. VkPipelineStageFlags srcStage, VkPipelineStageFlags dstStage, VkImageLayout layout,
  265. const VkImageSubresourceRange& range);
  266. /**
  267. * Issues a pipeline barrier on the provided image, changing its layout. See vkCmdPipelineBarrier in Vulkan spec.
  268. * for usage information.
  269. */
  270. void setLayout(VkImage image, VkAccessFlags srcAccessFlags, VkAccessFlags dstAccessFlags,
  271. VkImageLayout oldLayout, VkImageLayout newLayout, const VkImageSubresourceRange& range);
  272. private:
  273. friend class VulkanCmdBufferPool;
  274. friend class VulkanCommandBuffer;
  275. friend class VulkanQueue;
  276. /** Contains information about a single Vulkan resource bound/used on this command buffer. */
  277. struct ResourceUseHandle
  278. {
  279. bool used;
  280. VulkanUseFlags flags;
  281. };
  282. /** Contains information about a single Vulkan buffer resource bound/used on this command buffer. */
  283. struct BufferInfo
  284. {
  285. VkAccessFlags accessFlags;
  286. ResourceUseHandle useHandle;
  287. /**
  288. * True if the buffer was at some point written to by the shader during the current render pass, and barrier
  289. * wasn't issued yet.
  290. */
  291. bool needsBarrier;
  292. };
  293. /** Contains information about a single Vulkan image resource bound/used on this command buffer. */
  294. struct ImageInfo
  295. {
  296. ResourceUseHandle useHandle;
  297. UINT32 subresourceInfoIdx;
  298. UINT32 numSubresourceInfos;
  299. };
  300. /** Contains information about a range of Vulkan image sub-resources bound/used on this command buffer. */
  301. struct ImageSubresourceInfo
  302. {
  303. VkImageSubresourceRange range;
  304. // Only relevant for layout transitions
  305. VkImageLayout initialLayout;
  306. VkImageLayout currentLayout;
  307. VkImageLayout requiredLayout;
  308. VkImageLayout finalLayout;
  309. bool isFBAttachment : 1;
  310. bool isShaderInput : 1;
  311. bool hasTransitioned : 1;
  312. bool isReadOnly : 1;
  313. bool isInitialReadOnly : 1;
  314. /**
  315. * True if the buffer was at some point written to by the shader during the current render pass, and barrier
  316. * wasn't issued yet.
  317. */
  318. bool needsBarrier : 1;
  319. };
  320. /** Checks if all the prerequisites for rendering have been made (e.g. render target and pipeline state are set.) */
  321. bool isReadyForRender();
  322. /** Marks the command buffer as submitted on a queue. */
  323. void setIsSubmitted() { mState = State::Submitted; }
  324. /** Binds the current graphics pipeline to the command buffer. Returns true if bind was successful. */
  325. bool bindGraphicsPipeline();
  326. /**
  327. * Binds any dynamic states to the pipeline, as required.
  328. *
  329. * @param[in] forceAll If true all states will be bound. If false only states marked as dirty will be bound.
  330. */
  331. void bindDynamicStates(bool forceAll);
  332. /** Binds the currently stored GPU parameters object, if dirty. */
  333. void bindGpuParams();
  334. /** Clears the specified area of the currently bound render target. */
  335. void clearViewport(const Rect2I& area, UINT32 buffers, const Color& color, float depth, UINT16 stencil,
  336. UINT8 targetMask);
  337. /** Starts and ends a render pass, intended only for a clear operation. */
  338. void executeClearPass();
  339. /** Executes any queued layout transitions by issuing a pipeline barrier. */
  340. void executeLayoutTransitions();
  341. /**
  342. * Updates final layouts for images used by the current framebuffer, reflecting layout changes performed by render
  343. * pass' automatic layout transitions.
  344. */
  345. void updateFinalLayouts();
  346. /**
  347. * Updates an existing sub-resource info range with new layout, use flags and framebuffer flag. Returns true if
  348. * the bound sub-resource is a read-only framebuffer attachment.
  349. */
  350. bool updateSubresourceInfo(VulkanImage* image, UINT32 imageInfoIdx, ImageSubresourceInfo& subresourceInfo,
  351. VkImageLayout newLayout, VkImageLayout finalLayout, VulkanUseFlags flags, bool isFBAttachment);
  352. /** Finds a subresource info structure containing the specified face and mip level of the provided image. */
  353. ImageSubresourceInfo& findSubresourceInfo(VulkanImage* image, UINT32 face, UINT32 mip);
  354. /** Gets all queries registered on this command buffer that haven't been ended. */
  355. void getInProgressQueries(Vector<VulkanTimerQuery*>& timer, Vector<VulkanOcclusionQuery*>& occlusion) const;
  356. UINT32 mId;
  357. UINT32 mQueueFamily;
  358. State mState;
  359. VulkanDevice& mDevice;
  360. VkCommandPool mPool;
  361. VkCommandBuffer mCmdBuffer;
  362. VkFence mFence;
  363. VulkanSemaphore* mIntraQueueSemaphore;
  364. VulkanSemaphore* mInterQueueSemaphores[BS_MAX_VULKAN_CB_DEPENDENCIES];
  365. mutable UINT32 mNumUsedInterQueueSemaphores;
  366. VulkanFramebuffer* mFramebuffer;
  367. UINT32 mRenderTargetWidth;
  368. UINT32 mRenderTargetHeight;
  369. UINT32 mRenderTargetReadOnlyFlags;
  370. RenderSurfaceMask mRenderTargetLoadMask;
  371. UnorderedMap<VulkanResource*, ResourceUseHandle> mResources;
  372. UnorderedMap<VulkanResource*, UINT32> mImages;
  373. UnorderedMap<VulkanResource*, BufferInfo> mBuffers;
  374. UnorderedSet<VulkanOcclusionQuery*> mOcclusionQueries;
  375. UnorderedSet<VulkanTimerQuery*> mTimerQueries;
  376. Vector<ImageInfo> mImageInfos;
  377. Vector<ImageSubresourceInfo> mSubresourceInfoStorage;
  378. Set<UINT32> mPassTouchedSubresourceInfos; // All subresource infos touched by the current render pass
  379. UINT32 mGlobalQueueIdx;
  380. SPtr<VulkanGraphicsPipelineState> mGraphicsPipeline;
  381. SPtr<VulkanComputePipelineState> mComputePipeline;
  382. SPtr<VertexDeclaration> mVertexDecl;
  383. Rect2 mViewport;
  384. Rect2I mScissor;
  385. UINT32 mStencilRef;
  386. DrawOperationType mDrawOp;
  387. UINT32 mNumBoundDescriptorSets;
  388. bool mGfxPipelineRequiresBind : 1;
  389. bool mCmpPipelineRequiresBind : 1;
  390. bool mViewportRequiresBind : 1;
  391. bool mStencilRefRequiresBind : 1;
  392. bool mScissorRequiresBind : 1;
  393. bool mBoundParamsDirty : 1;
  394. DescriptorSetBindFlags mDescriptorSetsBindState;
  395. SPtr<VulkanGpuParams> mBoundParams;
  396. std::array<VkClearValue, BS_MAX_MULTIPLE_RENDER_TARGETS + 1> mClearValues;
  397. ClearMask mClearMask;
  398. Rect2I mClearArea;
  399. Vector<VulkanSemaphore*> mSemaphoresTemp;
  400. VkBuffer mVertexBuffersTemp[BS_MAX_BOUND_VERTEX_BUFFERS];
  401. VkDeviceSize mVertexBufferOffsetsTemp[BS_MAX_BOUND_VERTEX_BUFFERS];
  402. VkDescriptorSet* mDescriptorSetsTemp;
  403. UnorderedMap<UINT32, TransitionInfo> mTransitionInfoTemp;
  404. Vector<VkImageMemoryBarrier> mLayoutTransitionBarriersTemp;
  405. UnorderedMap<VulkanImage*, UINT32> mQueuedLayoutTransitions;
  406. Vector<VulkanEvent*> mQueuedEvents;
  407. Vector<VulkanQuery*> mQueuedQueryResets;
  408. UnorderedSet<VulkanSwapChain*> mSwapChains;
  409. };
  410. /** CommandBuffer implementation for Vulkan. */
  411. class VulkanCommandBuffer : public CommandBuffer
  412. {
  413. public:
  414. /**
  415. * Submits the command buffer for execution.
  416. *
  417. * @param[in] syncMask Mask that controls which other command buffers does this command buffer depend upon
  418. * (if any). See description of @p syncMask parameter in RenderAPI::executeCommands().
  419. */
  420. void submit(UINT32 syncMask);
  421. /**
  422. * Returns the internal command buffer.
  423. *
  424. * @note This buffer will change after a submit() call.
  425. */
  426. VulkanCmdBuffer* getInternal() const { return mBuffer; }
  427. private:
  428. friend class VulkanCommandBufferManager;
  429. VulkanCommandBuffer(VulkanDevice& device, GpuQueueType type, UINT32 deviceIdx, UINT32 queueIdx,
  430. bool secondary);
  431. ~VulkanCommandBuffer();
  432. /**
  433. * Tasks the command buffer to find a new internal command buffer. Call this after the command buffer has been
  434. * submitted to a queue (it's not allowed to be used until the queue is done with it).
  435. */
  436. void acquireNewBuffer();
  437. VulkanCmdBuffer* mBuffer;
  438. VulkanDevice& mDevice;
  439. VulkanQueue* mQueue;
  440. UINT32 mIdMask;
  441. };
  442. /** @} */
  443. }}