From dc374c0fc715e4cbc3f018ac3d099470828cbfd6 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Sun, 20 Oct 2024 01:19:06 +0800 Subject: [PATCH] added CheckColorAttachmentFormatSupport/CheckDepthStencilAttachFormatSupport in GPUDevice --- inc/hgl/graph/VKDevice.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inc/hgl/graph/VKDevice.h b/inc/hgl/graph/VKDevice.h index 65ce7ef4..7fd8d23e 100644 --- a/inc/hgl/graph/VKDevice.h +++ b/inc/hgl/graph/VKDevice.h @@ -191,6 +191,9 @@ public: //Texture bool CheckTextureFormatSupport(const VkFormat fmt,ImageTiling tiling=ImageTiling::Optimal)const{return CheckFormatSupport(fmt,VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT,tiling);} + bool CheckColorAttachmentFormatSupport(const VkFormat fmt)const{return CheckFormatSupport(fmt,VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT,ImageTiling::Optimal);} + bool CheckDepthStencilAttachFormatSupport(const VkFormat fmt)const{return CheckFormatSupport(fmt,VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT,ImageTiling::Optimal);} + Texture2D *CreateTexture2D(TextureData *); Texture2D *CreateTexture2D(TextureCreateInfo *ci);