CommandBuffer增加CopyImageToBuffer

This commit is contained in:
hyzboy 2019-06-21 16:44:22 +08:00
parent 8461f31b1a
commit 1924f6cf2c
2 changed files with 12 additions and 2 deletions

View File

@ -56,7 +56,7 @@ private:
void CreateRenderObject() void CreateRenderObject()
{ {
ro_sphere=CreateRenderableSphere(db,material,16); ro_sphere=CreateRenderableSphere(db,material,128);
} }
bool InitAtomsphereUBO(vulkan::DescriptorSets *desc_set,uint bindpoint) bool InitAtomsphereUBO(vulkan::DescriptorSets *desc_set,uint bindpoint)

View File

@ -66,11 +66,21 @@ public:
VkImage dstImage, VkImage dstImage,
VkImageLayout dstImageLayout, VkImageLayout dstImageLayout,
uint32_t regionCount, uint32_t regionCount,
const VkBufferImageCopy* pRegions) const VkBufferImageCopy * pRegions)
{ {
vkCmdCopyBufferToImage(cmd_buf,srcBuffer,dstImage,dstImageLayout,regionCount,pRegions); vkCmdCopyBufferToImage(cmd_buf,srcBuffer,dstImage,dstImageLayout,regionCount,pRegions);
} }
void CopyImageToBuffer(
VkImage srcImage,
VkImageLayout srcImageLayout,
VkBuffer dstBuffer,
uint32_t regionCount,
const VkBufferImageCopy * pRegions)
{
vkCmdCopyImageToBuffer(cmd_buf,srcImage,srcImageLayout,dstBuffer,regionCount,pRegions);
}
bool BeginRenderPass(RenderPass *rp,Framebuffer *fb); bool BeginRenderPass(RenderPass *rp,Framebuffer *fb);
bool Bind(Pipeline *p) bool Bind(Pipeline *p)