Misc. Vulkan features and fixes (#2417)

* Vulkan: add conservative rasterization

* Vulkan: check device features for caps and state

* Vulkan: add line AA

* Don't assert in init()

* Vulkan: fix swapchain reset logic and handle lost surface

* Vulkan: report dedicated memory info in Stats

* Vulkan: fix sRGB backbuffer pipeline hash

* Vulkan: check BGFX_RESET_SUSPEND
This commit is contained in:
pezcode 2021-03-03 03:23:55 +01:00 committed by GitHub
parent 58f0d55612
commit f9679fde50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 561 additions and 314 deletions

File diff suppressed because it is too large Load Diff

View File

@ -73,6 +73,7 @@
VK_IMPORT_INSTANCE_FUNC(false, vkGetPhysicalDeviceProperties); \
VK_IMPORT_INSTANCE_FUNC(false, vkGetPhysicalDeviceFormatProperties); \
VK_IMPORT_INSTANCE_FUNC(false, vkGetPhysicalDeviceFeatures); \
VK_IMPORT_INSTANCE_FUNC(false, vkGetPhysicalDeviceFeatures2KHR); \
VK_IMPORT_INSTANCE_FUNC(false, vkGetPhysicalDeviceImageFormatProperties); \
VK_IMPORT_INSTANCE_FUNC(false, vkGetPhysicalDeviceMemoryProperties); \
VK_IMPORT_INSTANCE_FUNC(true, vkGetPhysicalDeviceMemoryProperties2KHR); \
@ -516,8 +517,9 @@ VK_DESTROY
{
}
void init()
VkResult init()
{
return VK_SUCCESS;
}
void shutdown()
@ -677,10 +679,10 @@ VK_DESTROY
struct CommandQueueVK
{
void init(uint32_t _queueFamily, VkQueue _queue, uint32_t _numFramesInFlight);
void reset();
VkResult init(uint32_t _queueFamily, VkQueue _queue, uint32_t _numFramesInFlight);
VkResult reset();
void shutdown();
VkCommandBuffer alloc();
VkResult alloc(VkCommandBuffer* _commandBuffer);
void kick(VkSemaphore _waitSemaphore = VK_NULL_HANDLE, VkSemaphore _signalSemaphore = VK_NULL_HANDLE, bool _wait = false);
void finish(bool _finishAll = false);
void release(uint64_t _handle, VkObjectType _type);