#include #include #include #include #include using namespace hgl; using namespace hgl::graph; VK_NAMESPACE_USING; VulkanInstance *InitVulkanInstance() { #ifdef _DEBUG if(!CheckStrideBytesByFormat()) { std::cerr<<"check stride bytes by format failed."<GetDevice(VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU); if(!physical_device) physical_device=inst->GetDevice(VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU); uint32_t count; const VulkanFormat *vf=GetVulkanFormatList(count); if(!count)return(255); for(uint32_t i=0;iformat<<"]["<name<<"]"; if(vf->depth!=VulkanBaseType::NONE) std::cout<<"[ Depth:"<depth)]<<"]"; if(vf->stencil!=VulkanBaseType::NONE) std::cout<<"[Stencil:"<stencil)]<<"]"; if((vf->depth==VulkanBaseType::NONE) &&(vf->stencil==VulkanBaseType::NONE)) std::cout<<"[ Color:"<color)]<<"]"; { const VkFormatProperties fp=physical_device->GetFormatProperties(vf->format); char olb[]="[ ]"; if(fp.optimalTilingFeatures&VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT )olb[1]='O'; if(fp.linearTilingFeatures&VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT )olb[2]='L'; if(fp.bufferFeatures&VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT )olb[2]='B'; std::cout<compress_type!=TextureCompressType::NONE) std::cout<<" use "<compress_type)]<<" compress."; else std::cout<bytes<<" bytes/pixel."; std::cout<