优化函数定义
This commit is contained in:
parent
9b961ffe08
commit
d50a70cfb9
@ -76,18 +76,14 @@ public:
|
|||||||
return fp;
|
return fp;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsOptimalTilingFeatures(const VkFormat format,const VkFormatFeatureFlags flag)const
|
bool OptimalSupport (const VkFormat format,const VkFormatFeatureFlags flag)const{return((format<VK_FORMAT_BEGIN_RANGE||format>VK_FORMAT_END_RANGE)?false:(format_properties[format].optimalTilingFeatures&flag));}
|
||||||
{
|
bool LinearSupport (const VkFormat format,const VkFormatFeatureFlags flag)const{return((format<VK_FORMAT_BEGIN_RANGE||format>VK_FORMAT_END_RANGE)?false:(format_properties[format].linearTilingFeatures&flag));}
|
||||||
if(format<VK_FORMAT_BEGIN_RANGE||format>VK_FORMAT_END_RANGE)
|
bool BufferSupport (const VkFormat format,const VkFormatFeatureFlags flag)const{return((format<VK_FORMAT_BEGIN_RANGE||format>VK_FORMAT_END_RANGE)?false:(format_properties[format].bufferFeatures&flag));}
|
||||||
return(false);
|
|
||||||
|
|
||||||
return(format_properties[format].optimalTilingFeatures&flag);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IsColorAttachmentOptimal(const VkFormat format)const{return IsOptimalTilingFeatures(format,VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT);}
|
bool IsColorAttachmentOptimal(const VkFormat format)const{return OptimalSupport(format,VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT);}
|
||||||
bool IsDepthAttachmentOptimal(const VkFormat format)const{return IsOptimalTilingFeatures(format,VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT);}
|
bool IsDepthAttachmentOptimal(const VkFormat format)const{return OptimalSupport(format,VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT);}
|
||||||
|
|
||||||
VkFormat GetDepthFormat(bool lower_to_high=true)const;
|
VkFormat GetDepthFormat(bool lower_to_high=true)const;
|
||||||
VkFormat GetDepthStencilFormat(bool lower_to_high=true)const;
|
VkFormat GetDepthStencilFormat(bool lower_to_high=true)const;
|
||||||
};//class PhysicalDevice
|
};//class PhysicalDevice
|
||||||
VK_NAMESPACE_END
|
VK_NAMESPACE_END
|
||||||
|
Loading…
x
Reference in New Issue
Block a user