remove about swapchain from GPUDevice class.

This commit is contained in:
2025-01-19 19:06:32 +08:00
parent 014d783e73
commit 96c3718b2a
2 changed files with 0 additions and 49 deletions

View File

@@ -1,50 +1,18 @@
#include<hgl/graph/VKDevice.h>
#include<hgl/type/Pair.h>
#include<hgl/graph/VKSemaphore.h>
#include<hgl/graph/VKTexture.h>
#include<hgl/graph/VKImageView.h>
#include<hgl/graph/VKPipeline.h>
#include<hgl/graph/VKCommandBuffer.h>
#include<hgl/graph/VKRenderPass.h>
#include<hgl/graph/VKFramebuffer.h>
#include<hgl/graph/VKDescriptorSet.h>
VK_NAMESPACE_BEGIN
GPUDevice::GPUDevice(GPUDeviceAttribute *da)
{
attr=da;
texture_queue=nullptr;
texture_cmd_buf=nullptr;
sc_rt=nullptr;
Resize(attr->surface_caps.currentExtent);
texture_cmd_buf=CreateTextureCommandBuffer(attr->physical_device->GetDeviceName()+AnsiString(":TexCmdBuffer"));
texture_queue=CreateQueue();
}
GPUDevice::~GPUDevice()
{
SAFE_CLEAR(sc_rt);
SAFE_CLEAR(texture_queue);
SAFE_CLEAR(texture_cmd_buf);
delete attr;
}
bool GPUDevice::Resize(const VkExtent2D &extent)
{
SAFE_CLEAR(sc_rt);
attr->RefreshSurfaceCaps();
sc_rt=CreateSwapchainRenderTarget();
return(sc_rt);
}
VkCommandBuffer GPUDevice::CreateCommandBuffer(const AnsiString &name)
{
if(!attr->cmd_pool)