removed GPUDevice::device_render_pass
This commit is contained in:
parent
6080422f3a
commit
ea6c009c70
2
CMCore
2
CMCore
@ -1 +1 @@
|
||||
Subproject commit 5aad7d81419d02141b3b3f53661e2c8e3e763163
|
||||
Subproject commit 11e32b77f1136bcb552abb406cf73db799720e11
|
@ -38,7 +38,6 @@ class GPUDevice
|
||||
private:
|
||||
|
||||
DeviceRenderPassManage *render_pass_manage;
|
||||
RenderPass *device_render_pass;
|
||||
|
||||
RTSwapchain *sc_rt;
|
||||
|
||||
@ -79,7 +78,7 @@ public:
|
||||
const VkColorSpaceKHR GetColorSpace ()const {return attr->surface_format.colorSpace;}
|
||||
VkQueue GetGraphicsQueue () {return attr->graphics_queue;}
|
||||
|
||||
RenderPass * GetRenderPass () {return device_render_pass;}
|
||||
RenderPass * GetRenderPass () {return sc_rt->GetRenderPass();}
|
||||
|
||||
RTSwapchain * GetSwapchainRT () {return sc_rt;}
|
||||
|
||||
|
@ -36,6 +36,8 @@ public:
|
||||
VkSurfaceFormatKHR surface_format;
|
||||
VkFormat depth_format;
|
||||
|
||||
RenderPass * render_pass =nullptr;
|
||||
|
||||
uint32_t image_count =0;
|
||||
|
||||
SwapchainImage * sc_image =nullptr;
|
||||
|
@ -7,15 +7,6 @@ VK_NAMESPACE_BEGIN
|
||||
void GPUDevice::InitRenderPassManage()
|
||||
{
|
||||
render_pass_manage=new DeviceRenderPassManage(attr->device,attr->pipeline_cache);
|
||||
|
||||
SwapchainRenderbufferInfo rbi(attr->surface_format.format,attr->physical_device->GetDepthFormat());
|
||||
|
||||
device_render_pass=render_pass_manage->AcquireRenderPass(&rbi);
|
||||
|
||||
#ifdef _DEBUG
|
||||
if(attr->debug_utils)
|
||||
attr->debug_utils->SetRenderPass(device_render_pass->GetVkRenderPass(),"MainDeviceRenderPass");
|
||||
#endif//_DEBUG
|
||||
}
|
||||
|
||||
void GPUDevice::ClearRenderPassManage()
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include<hgl/graph/VKDevice.h>
|
||||
#include<hgl/graph/VKDeviceRenderPassManage.h>
|
||||
|
||||
VK_NAMESPACE_BEGIN
|
||||
RenderTarget *GPUDevice::CreateRT(const FramebufferInfo *fbi,RenderPass *rp,const uint32_t fence_count)
|
||||
@ -73,7 +74,7 @@ RTSwapchain *GPUDevice::CreateSwapchainRenderTarget()
|
||||
q,
|
||||
render_complete_semaphore,
|
||||
present_complete_semaphore,
|
||||
device_render_pass
|
||||
sc->render_pass
|
||||
);
|
||||
|
||||
return srt;
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include<hgl/graph/VKDevice.h>
|
||||
#include<hgl/graph/VKDeviceAttribute.h>
|
||||
#include<hgl/graph/VKPhysicalDevice.h>
|
||||
#include<hgl/graph/VKDeviceRenderPassManage.h>
|
||||
#include<iostream>
|
||||
|
||||
VK_NAMESPACE_BEGIN
|
||||
@ -106,7 +107,7 @@ bool GPUDevice::CreateSwapchainFBO(Swapchain *swapchain)
|
||||
if(!swapchain->sc_image[i].depth)
|
||||
return(false);
|
||||
|
||||
swapchain->sc_image[i].fbo=CreateFBO( device_render_pass,
|
||||
swapchain->sc_image[i].fbo=CreateFBO( swapchain->render_pass,
|
||||
swapchain->sc_image[i].color->GetImageView(),
|
||||
swapchain->sc_image[i].depth->GetImageView());
|
||||
|
||||
@ -136,6 +137,15 @@ Swapchain *GPUDevice::CreateSwapchain(const VkExtent2D &acquire_extent)
|
||||
swapchain->surface_format =attr->surface_format;
|
||||
swapchain->depth_format =attr->physical_device->GetDepthFormat();
|
||||
|
||||
SwapchainRenderbufferInfo rbi(swapchain->surface_format.format,swapchain->depth_format);
|
||||
|
||||
swapchain->render_pass =render_pass_manage->AcquireRenderPass(&rbi);
|
||||
|
||||
#ifdef _DEBUG
|
||||
if(attr->debug_utils)
|
||||
attr->debug_utils->SetRenderPass(swapchain->render_pass->GetVkRenderPass(),"MainDeviceRenderPass");
|
||||
#endif//_DEBUG
|
||||
|
||||
swapchain->swap_chain =CreateSwapChain(attr,acquire_extent);
|
||||
|
||||
if(swapchain->swap_chain)
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include<hgl/graph/VKSwapchain.h>
|
||||
#include<hgl/graph/VKFramebuffer.h>
|
||||
#include<hgl/graph/VKRenderPass.h>
|
||||
|
||||
VK_NAMESPACE_BEGIN
|
||||
Swapchain::~Swapchain()
|
||||
|
Loading…
x
Reference in New Issue
Block a user