class CommandBuffer : public VkManaged
{
friend class CommandPool;
+ friend class CommandBufferPool;
public:
void CopyBufferToImage( BufferRef srcBuffer, ImageRef dstImage, vk::ImageLayout dstLayout,
std::vector<vk::BufferImageCopy> regions );
- void OnRelease( uint32_t refcount ) override;
-
/**
* Creates layout transition barrier
* @return
* @return
*/
vk::ImageMemoryBarrier ImageLayoutTransitionBarrier( ImageRef image,
+ vk::ImageLayout olsLayout,
vk::ImageLayout newLayout,
vk::ImageAspectFlags aspectMask
) const;
+ /**
+ * Implements VkManaged::OnDestroy
+ * @return
+ */
+ bool OnDestroy() override;
+
private:
- // Constructor called by the CommandPool only
- CommandBuffer( CommandPool& commandPool, const vk::CommandBufferAllocateInfo& allocateInfo, vk::CommandBuffer vkCommandBuffer );
+ /**
+ * Returns allocation index
+ * @return
+ */
+ uint32_t GetPoolAllocationIndex() const;
+private:
+
+ // Constructor called by the CommandPool only
+ CommandBuffer( CommandPool& commandPool, uint32_t poolIndex, const vk::CommandBufferAllocateInfo& allocateInfo, vk::CommandBuffer vkCommandBuffer );
class Impl;
std::unique_ptr<Impl> mImpl;