split standalone VKUUID.h/DebugOutProperties.h
This commit is contained in:
parent
165f9d2a5f
commit
f748301787
@ -1 +1 @@
|
||||
Subproject commit 3d5c287da5b5d5a52d73e80d9cc828a0f6f87a80
|
||||
Subproject commit d4999fb44535f0aa3d52295bad9a3f931d09f3a9
|
@ -2,10 +2,8 @@
|
||||
#define HGL_GRAPH_VULKAN_INCLUDE
|
||||
|
||||
#include<hgl/math/Math.h>
|
||||
#include<hgl/type/List.h>
|
||||
#include<hgl/type/String.h>
|
||||
#include<hgl/type/Map.h>
|
||||
#include<iostream>
|
||||
#include<hgl/graph/VKNamespace.h>
|
||||
#include<hgl/graph/VKFormat.h>
|
||||
#include<hgl/graph/VKPrimitiveType.h>
|
||||
@ -187,61 +185,5 @@ inline void copy(VkExtent3D &e3d,const VkExtent2D &e2d,const uint32 depth=1)
|
||||
e3d.height =e2d.height;
|
||||
e3d.depth =depth;
|
||||
}
|
||||
|
||||
inline void debug_out_vk_version(const uint32_t version)
|
||||
{
|
||||
std::cout<<VK_VERSION_MAJOR(version)<<"."
|
||||
<<VK_VERSION_MINOR(version)<<"."
|
||||
<<VK_VERSION_PATCH(version);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline hgl::String<T> VkUUID2String(const uint8_t *pipelineCacheUUID)
|
||||
{
|
||||
T *hstr=new T[VK_UUID_SIZE*2+1];
|
||||
|
||||
DataToLowerHexStr(hstr,pipelineCacheUUID,VK_UUID_SIZE);
|
||||
|
||||
return hgl::String<T>::newOf(hstr,VK_UUID_SIZE*2);
|
||||
}
|
||||
|
||||
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
|
||||
#endif//HGL_GRAPH_VULKAN_INCLUDE
|
||||
|
@ -17,9 +17,9 @@ protected:
|
||||
|
||||
uint32_t shader_stage; ///<着色器阶段
|
||||
|
||||
MaterialDescriptorInfo mdm; ///<材质描述符管理器
|
||||
MaterialDescriptorInfo mdm; ///<材质描述符管理器
|
||||
|
||||
ShaderCreateInfoMap shader_map; ///<着色器列表
|
||||
ShaderCreateInfoMap shader_map; ///<着色器列表
|
||||
|
||||
ShaderCreateInfoVertex *vert;
|
||||
ShaderCreateInfoGeometry *geom;
|
||||
|
@ -148,7 +148,8 @@ SET(VK_DEVICE_SOURCE ${SG_INCLUDE_PATH}/VKDevice.h
|
||||
|
||||
SET(VK_PHYSICAL_DEVICE_SOURCE ${SG_INCLUDE_PATH}/VKPhysicalDevice.h
|
||||
Vulkan/VKPhysicalDevice.cpp
|
||||
Vulkan/VKProperties.cpp)
|
||||
Vulkan/VKProperties.cpp
|
||||
Vulkan/DebugOutProperties.h)
|
||||
|
||||
SOURCE_GROUP("Vulkan\\Device" FILES ${VK_DEVICE_SOURCE})
|
||||
SOURCE_GROUP("Vulkan\\Device\\Debug" FILES ${VK_DEBUG_SOURCE})
|
||||
|
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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user