ULRE/inc/hgl/graph/VKDeviceAttribute.h

50 lines
1.7 KiB
C
Raw Normal View History

#pragma once
#include<hgl/graph/VKTexture.h>
VK_NAMESPACE_BEGIN
2019-04-11 20:24:09 +08:00
constexpr uint32_t ERROR_FAMILY_INDEX=UINT32_MAX;
2020-10-21 12:09:15 +08:00
struct RenderDeviceAttribute
{
2019-07-06 16:46:19 +08:00
VkInstance instance =VK_NULL_HANDLE;
2020-10-21 12:09:15 +08:00
const PhysicalRenderDevice * physical_device =nullptr;
2019-07-06 16:46:19 +08:00
VkSurfaceKHR surface =VK_NULL_HANDLE;
VkSurfaceCapabilitiesKHR surface_caps;
2019-04-11 20:24:09 +08:00
uint32_t graphics_family =ERROR_FAMILY_INDEX;
uint32_t present_family =ERROR_FAMILY_INDEX;
2019-07-06 16:46:19 +08:00
VkQueue graphics_queue =VK_NULL_HANDLE;
VkQueue present_queue =VK_NULL_HANDLE;
List<VkQueueFamilyProperties> family_properties;
List<VkBool32> supports_present;
List<VkSurfaceFormatKHR> surface_formts;
2019-04-11 20:24:09 +08:00
VkFormat format;
List<VkPresentModeKHR> present_modes;
2019-04-11 20:24:09 +08:00
VkSurfaceTransformFlagBitsKHR preTransform;
VkCompositeAlphaFlagBitsKHR compositeAlpha =VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;
2019-07-06 16:46:19 +08:00
VkDevice device =VK_NULL_HANDLE;
VkCommandPool cmd_pool =VK_NULL_HANDLE;
2019-04-11 21:12:54 +08:00
2019-07-06 16:46:19 +08:00
VkDescriptorPool desc_pool =VK_NULL_HANDLE;
2019-07-06 16:46:19 +08:00
VkPipelineCache pipeline_cache =VK_NULL_HANDLE;
2019-04-12 16:35:44 +08:00
public:
2020-10-21 12:09:15 +08:00
RenderDeviceAttribute(VkInstance inst,const PhysicalRenderDevice *pd,VkSurfaceKHR s);
~RenderDeviceAttribute();
bool CheckMemoryType(uint32_t typeBits,VkMemoryPropertyFlags properties,uint32_t *typeIndex) const;
void Refresh();
2020-10-21 12:09:15 +08:00
};//class RenderDeviceAttribute
VK_NAMESPACE_END