[Vulkan] Replace vulkan-loader with volk

This commit is contained in:
Dr. Chat
2018-05-04 16:49:46 -05:00
parent e971e38cdb
commit 61e47167c0
40 changed files with 106 additions and 21987 deletions

View File

@@ -16,6 +16,7 @@
#include <string>
#include "third_party/renderdoc/renderdoc_app.h"
#include "third_party/volk/volk.h"
#include "xenia/base/assert.h"
#include "xenia/base/logging.h"
@@ -72,6 +73,10 @@ VulkanInstance::~VulkanInstance() { DestroyInstance(); }
bool VulkanInstance::Initialize() {
auto version = Version::Parse(VK_API_VERSION);
XELOGVK("Initializing Vulkan %s...", version.pretty_string.c_str());
if (volkInitialize() != VK_SUCCESS) {
XELOGE("volkInitialize() failed!");
return false;
}
// Get all of the global layers and extensions provided by the system.
if (!QueryGlobals()) {
@@ -271,6 +276,9 @@ bool VulkanInstance::CreateInstance() {
return false;
}
// Load Vulkan entrypoints and extensions.
volkLoadInstance(handle);
// Enable debug validation, if needed.
EnableDebugValidation();