Vulkan/CommandBuffer: Add clear commands
Former-commit-id: 864dd930ae6514900eb28dfc19410ed4d02223ad [formerly 5f23a3dcf2387b85b606554e38e3809c25886139] Former-commit-id: 3f17750c2673273909752d1423422b5c9d8be164
This commit is contained in:
parent
6d737b07cc
commit
6e286ed2fe
|
|
@ -42,6 +42,15 @@ namespace Nz
|
|||
inline void BindVertexBuffer(UInt32 binding, const VkBuffer buffer, const VkDeviceSize offset);
|
||||
inline void BindVertexBuffers(UInt32 firstBinding, UInt32 bindingCount, const VkBuffer* buffer, const VkDeviceSize* offset);
|
||||
|
||||
inline void ClearAttachment(const VkClearAttachment& attachment, const VkClearRect& rect);
|
||||
inline void ClearAttachments(UInt32 attachmentCount, const VkClearAttachment* attachments, UInt32 rectCount, const VkClearRect* rects);
|
||||
|
||||
inline void ClearColorImage(VkImage image, VkImageLayout imageLayout, const VkClearColorValue& color, const VkImageSubresourceRange& range);
|
||||
inline void ClearColorImage(VkImage image, VkImageLayout imageLayout, const VkClearColorValue& color, UInt32 rangeCount, const VkImageSubresourceRange* ranges);
|
||||
|
||||
inline void ClearDepthStencilImage(VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue& depthStencil, const VkImageSubresourceRange& range);
|
||||
inline void ClearDepthStencilImage(VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue& depthStencil, UInt32 rangeCount, const VkImageSubresourceRange* ranges);
|
||||
|
||||
inline void Draw(UInt32 vertexCount, UInt32 instanceCount = 1, UInt32 firstVertex = 0, UInt32 firstInstance = 0);
|
||||
inline void DrawIndexed(UInt32 indexCount, UInt32 instanceCount = 1, UInt32 firstVertex = 0, Int32 vertexOffset = 0, UInt32 firstInstance = 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -163,6 +163,36 @@ namespace Nz
|
|||
return m_pool->GetDevice()->vkCmdBindVertexBuffers(m_handle, firstBinding, bindingCount, buffer, offset);
|
||||
}
|
||||
|
||||
inline void CommandBuffer::ClearAttachment(const VkClearAttachment& attachment, const VkClearRect& rect)
|
||||
{
|
||||
return ClearAttachments(1U, &attachment, 1U, &rect);
|
||||
}
|
||||
|
||||
inline void CommandBuffer::ClearAttachments(UInt32 attachmentCount, const VkClearAttachment* attachments, UInt32 rectCount, const VkClearRect* rects)
|
||||
{
|
||||
return m_pool->GetDevice()->vkCmdClearAttachments(m_handle, attachmentCount, attachments, rectCount, rects);
|
||||
}
|
||||
|
||||
inline void CommandBuffer::ClearColorImage(VkImage image, VkImageLayout imageLayout, const VkClearColorValue& color, const VkImageSubresourceRange& range)
|
||||
{
|
||||
return ClearColorImage(image, imageLayout, color, 1U, &range);
|
||||
}
|
||||
|
||||
inline void CommandBuffer::ClearColorImage(VkImage image, VkImageLayout imageLayout, const VkClearColorValue& color, UInt32 rangeCount, const VkImageSubresourceRange* ranges)
|
||||
{
|
||||
return m_pool->GetDevice()->vkCmdClearColorImage(m_handle, image, imageLayout, &color, rangeCount, ranges);
|
||||
}
|
||||
|
||||
inline void CommandBuffer::ClearDepthStencilImage(VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue& depthStencil, const VkImageSubresourceRange& range)
|
||||
{
|
||||
return ClearDepthStencilImage(image, imageLayout, depthStencil, 1U, &range);
|
||||
}
|
||||
|
||||
inline void CommandBuffer::ClearDepthStencilImage(VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue& depthStencil, UInt32 rangeCount, const VkImageSubresourceRange * ranges)
|
||||
{
|
||||
return m_pool->GetDevice()->vkCmdClearDepthStencilImage(m_handle, image, imageLayout, &depthStencil, rangeCount, ranges);
|
||||
}
|
||||
|
||||
inline void CommandBuffer::Draw(UInt32 vertexCount, UInt32 instanceCount, UInt32 firstVertex, UInt32 firstInstance)
|
||||
{
|
||||
return m_pool->GetDevice()->vkCmdDraw(m_handle, vertexCount, instanceCount, firstVertex, firstInstance);
|
||||
|
|
|
|||
Loading…
Reference in New Issue