split standalone VKUUID.h/DebugOutProperties.h
This commit is contained in:
52
src/SceneGraph/Vulkan/DebugOutProperties.h
Normal file
52
src/SceneGraph/Vulkan/DebugOutProperties.h
Normal file
@@ -0,0 +1,52 @@
|
||||
#include<hgl/type/List.h>
|
||||
#include<hgl/graph/VKNamespace.h>
|
||||
#include<iostream>
|
||||
|
||||
VK_NAMESPACE_BEGIN
|
||||
|
||||
inline void debug_out_vk_version(const uint32_t version)
|
||||
{
|
||||
std::cout<<VK_VERSION_MAJOR(version)<<"."
|
||||
<<VK_VERSION_MINOR(version)<<"."
|
||||
<<VK_VERSION_PATCH(version);
|
||||
}
|
||||
|
||||
inline void debug_out(const char *front,const hgl::List<VkLayerProperties> &layer_properties)
|
||||
{
|
||||
const int property_count=layer_properties.GetCount();
|
||||
|
||||
if(property_count<=0)return;
|
||||
|
||||
const VkLayerProperties *lp=layer_properties.GetData();
|
||||
|
||||
for(int i=0;i<property_count;i++)
|
||||
{
|
||||
std::cout<<front<<" Layer Propertyes ["<<i<<"] : "<<lp->layerName<<" [spec: ";
|
||||
debug_out_vk_version(lp->specVersion);
|
||||
|
||||
std::cout<<", impl: ";
|
||||
debug_out_vk_version(lp->implementationVersion);
|
||||
|
||||
std::cout<<"] desc: "<<lp->description<<std::endl;
|
||||
++lp;
|
||||
}
|
||||
}
|
||||
|
||||
inline void debug_out(const char *front,const hgl::List<VkExtensionProperties> &extension_properties)
|
||||
{
|
||||
const int extension_count=extension_properties.GetCount();
|
||||
|
||||
if(extension_count<=0)return;
|
||||
|
||||
VkExtensionProperties *ep=extension_properties.GetData();
|
||||
for(int i=0;i<extension_count;i++)
|
||||
{
|
||||
std::cout<<front<<" Extension Propertyes ["<<i<<"] : "<<ep->extensionName<<" ver: ";
|
||||
|
||||
debug_out_vk_version(ep->specVersion);
|
||||
|
||||
std::cout<<std::endl;
|
||||
++ep;
|
||||
}
|
||||
}
|
||||
VK_NAMESPACE_END
|
@@ -7,6 +7,7 @@
|
||||
#include<hgl/graph/VKTexture.h>
|
||||
#include<hgl/graph/VKDevice.h>
|
||||
#include<hgl/graph/VKDebugMaker.h>
|
||||
#include<hgl/graph/VKUUID.h>
|
||||
|
||||
#include<iostream>
|
||||
#include<iomanip>
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include<hgl/graph/VKPhysicalDevice.h>
|
||||
#include<hgl/graph/VKInstance.h>
|
||||
#include"DebugOutProperties.h"
|
||||
|
||||
VK_NAMESPACE_BEGIN
|
||||
namespace
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#include<hgl/graph/VK.h>
|
||||
#include<hgl/graph/VKUUID.h>
|
||||
#include<hgl/filesystem/FileSystem.h>
|
||||
#include<hgl/type/StringList.h>
|
||||
#include<hgl/type/StrChar.h>
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include<hgl/graph/VK.h>
|
||||
#include<hgl/graph/VKInstance.h>
|
||||
#include"DebugOutProperties.h"
|
||||
|
||||
VK_NAMESPACE_BEGIN
|
||||
|
||||
|
Reference in New Issue
Block a user