added subpass_count at GPUDevice::AcquireRenderPass function.

This commit is contained in:
hyzboy 2021-11-22 16:12:01 +08:00
parent b1808e580d
commit 6b6edc9d7c
2 changed files with 3 additions and 3 deletions

View File

@ -216,7 +216,7 @@ public: //Command Buffer 相关
public: public:
RenderPass * AcquireRenderPass( const RenderbufferInfo *); RenderPass * AcquireRenderPass( const RenderbufferInfo *,const uint subpass_count=2);
GPUFence * CreateFence(bool); GPUFence * CreateFence(bool);
GPUSemaphore * CreateGPUSemaphore(); GPUSemaphore * CreateGPUSemaphore();

View File

@ -19,7 +19,7 @@ void GPUDevice::ClearRenderPassManage()
SAFE_CLEAR(render_pass_manage); SAFE_CLEAR(render_pass_manage);
} }
RenderPass *GPUDevice::AcquireRenderPass(const RenderbufferInfo *rbi) RenderPass *GPUDevice::AcquireRenderPass(const RenderbufferInfo *rbi,const uint subpass_count)
{ {
for(const VkFormat &fmt:rbi->GetColorFormatList()) for(const VkFormat &fmt:rbi->GetColorFormatList())
if(!attr->physical_device->IsColorAttachmentOptimal(fmt)) if(!attr->physical_device->IsColorAttachmentOptimal(fmt))
@ -29,6 +29,6 @@ RenderPass *GPUDevice::AcquireRenderPass(const RenderbufferInfo *rbi)
if(!attr->physical_device->IsDepthAttachmentOptimal(rbi->GetDepthFormat())) if(!attr->physical_device->IsDepthAttachmentOptimal(rbi->GetDepthFormat()))
return(nullptr); return(nullptr);
return render_pass_manage->AcquireRenderPass(rbi); return render_pass_manage->AcquireRenderPass(rbi,subpass_count);
} }
VK_NAMESPACE_END VK_NAMESPACE_END