新增VulkanInstanceLayer可自定义指定
This commit is contained in:
@@ -52,8 +52,6 @@ class VertexAttributeBinding;
|
||||
|
||||
class Renderable;
|
||||
|
||||
using CharPointerList=hgl::List<const char *>;
|
||||
|
||||
enum class ShaderStage
|
||||
{
|
||||
Vertex =VK_SHADER_STAGE_VERTEX_BIT,
|
||||
@@ -104,11 +102,5 @@ inline void debug_out(const hgl::List<VkExtensionProperties> &extension_properti
|
||||
++ep;
|
||||
}
|
||||
}
|
||||
|
||||
void InitVulkanProperties();
|
||||
const List<VkLayerProperties> & GetLayerProperties();
|
||||
const List<VkExtensionProperties> & GetExtensionProperties();
|
||||
const bool CheckLayerSupport(const char *);
|
||||
|
||||
VK_NAMESPACE_END
|
||||
#endif//HGL_GRAPH_VULKAN_INCLUDE
|
||||
|
@@ -8,6 +8,47 @@
|
||||
#include<hgl/graph/vulkan/VKDebugOut.h>
|
||||
|
||||
VK_NAMESPACE_BEGIN
|
||||
#define VK_BOOL1BIT(name) bool name:1;
|
||||
struct CreateInstanceLayerInfo
|
||||
{
|
||||
struct
|
||||
{
|
||||
VK_BOOL1BIT(api_dump)
|
||||
VK_BOOL1BIT(device_simulation)
|
||||
VK_BOOL1BIT(monitor)
|
||||
VK_BOOL1BIT(screenshot)
|
||||
VK_BOOL1BIT(standard_validation)
|
||||
VK_BOOL1BIT(vktrace)
|
||||
}lunarg;
|
||||
|
||||
struct
|
||||
{
|
||||
VK_BOOL1BIT(validation)
|
||||
}khronos;
|
||||
|
||||
struct
|
||||
{
|
||||
VK_BOOL1BIT(optimus)
|
||||
}nv;
|
||||
|
||||
struct
|
||||
{
|
||||
VK_BOOL1BIT(steam_overlay)
|
||||
VK_BOOL1BIT(steam_fossilize)
|
||||
}valve;
|
||||
|
||||
struct
|
||||
{
|
||||
VK_BOOL1BIT(Capture)
|
||||
}RenderDoc;
|
||||
|
||||
struct
|
||||
{
|
||||
VK_BOOL1BIT(helper);
|
||||
}bandicam;
|
||||
};
|
||||
#undef VK_BOOL1BIT
|
||||
|
||||
class Instance
|
||||
{
|
||||
VkInstance inst;
|
||||
@@ -18,7 +59,7 @@ VK_NAMESPACE_BEGIN
|
||||
|
||||
private:
|
||||
|
||||
friend Instance *CreateInstance(const UTF8String &app_name,VKDebugOut *out=nullptr);
|
||||
friend Instance *CreateInstance(const UTF8String &app_name,VKDebugOut *out=nullptr,CreateInstanceLayerInfo *cili=nullptr);
|
||||
|
||||
Instance(VkInstance,VKDebugOut *);
|
||||
|
||||
@@ -31,7 +72,12 @@ VK_NAMESPACE_BEGIN
|
||||
const ObjectList<PhysicalDevice> &GetDeviceList ()const {return physical_devices;}
|
||||
const PhysicalDevice * GetDevice (VkPhysicalDeviceType)const;
|
||||
};//class Instance
|
||||
|
||||
void InitVulkanProperties();
|
||||
const List<VkLayerProperties> & GetLayerProperties();
|
||||
const List<VkExtensionProperties> & GetExtensionProperties();
|
||||
const bool CheckLayerSupport(const char *);
|
||||
|
||||
Instance *CreateInstance(const UTF8String &,VKDebugOut *); ///<创建一个Vulkan实例
|
||||
Instance *CreateInstance(const UTF8String &,VKDebugOut *,CreateInstanceLayerInfo *); ///<创建一个Vulkan实例
|
||||
VK_NAMESPACE_END
|
||||
#endif//HGL_GRAPH_VULKAN_INSTANCE_INCLUDE
|
||||
|
Reference in New Issue
Block a user