Added fix to work for versions 1.2.55+ of vulkan headers

This commit is contained in:
Alejandro Saucedo 2020-11-01 10:46:16 +00:00
parent 482aa29426
commit 8abac9fb58
6 changed files with 16 additions and 17 deletions

View file

@ -34,7 +34,7 @@ Algorithm::~Algorithm()
SPDLOG_ERROR("Kompute Algorithm Error requested to destroy "
"pipeline but it is null");
}
this->mDevice->destroy(*this->mPipeline);
this->mDevice->destroy(*this->mPipeline, (vk::Optional<const vk::AllocationCallbacks>)nullptr);
}
if (this->mFreePipelineCache) {
@ -43,7 +43,7 @@ Algorithm::~Algorithm()
SPDLOG_ERROR("Kompute Algorithm Error requested to destroy "
"pipeline cache but it is null");
}
this->mDevice->destroy(*this->mPipelineCache);
this->mDevice->destroy(*this->mPipelineCache, (vk::Optional<const vk::AllocationCallbacks>)nullptr);
}
if (this->mFreePipelineLayout) {
@ -52,7 +52,7 @@ Algorithm::~Algorithm()
SPDLOG_ERROR("Kompute Algorithm Error requested to destroy "
"pipeline layout but it is null");
}
this->mDevice->destroy(*this->mPipelineLayout);
this->mDevice->destroy(*this->mPipelineLayout, (vk::Optional<const vk::AllocationCallbacks>)nullptr);
}
if (this->mFreeShaderModule) {
@ -61,7 +61,7 @@ Algorithm::~Algorithm()
SPDLOG_ERROR("Kompute Algorithm Error requested to destroy shader "
"module but it is null");
}
this->mDevice->destroy(*this->mShaderModule);
this->mDevice->destroy(*this->mShaderModule, (vk::Optional<const vk::AllocationCallbacks>)nullptr);
}
if (this->mFreeDescriptorSet) {
@ -80,7 +80,7 @@ Algorithm::~Algorithm()
SPDLOG_ERROR("Kompute Algorithm Error requested to destroy "
"descriptor set layout but it is null");
}
this->mDevice->destroy(*this->mDescriptorSetLayout);
this->mDevice->destroy(*this->mDescriptorSetLayout, (vk::Optional<const vk::AllocationCallbacks>)nullptr);
}
if (this->mFreeDescriptorPool) {
@ -89,7 +89,7 @@ Algorithm::~Algorithm()
SPDLOG_ERROR("Kompute Algorithm Error requested to destroy "
"descriptor pool but it is null");
}
this->mDevice->destroy(*this->mDescriptorPool);
this->mDevice->destroy(*this->mDescriptorPool, (vk::Optional<const vk::AllocationCallbacks>)nullptr);
}
}

View file

@ -65,7 +65,7 @@ Manager::~Manager()
if (this->mFreeDevice) {
SPDLOG_INFO("Destroying device");
this->mDevice->destroy();
this->mDevice->destroy((vk::Optional<const vk::AllocationCallbacks>)nullptr);
SPDLOG_DEBUG("Kompute Manager Destroyed Device");
}
@ -86,7 +86,7 @@ Manager::~Manager()
#endif
if (this->mFreeInstance) {
this->mInstance->destroy();
this->mInstance->destroy((vk::Optional<const vk::AllocationCallbacks>)nullptr);
SPDLOG_DEBUG("Kompute Manager Destroyed Instance");
}
}
@ -175,7 +175,7 @@ Manager::createInstance()
std::vector<vk::LayerProperties> availableLayerProperties =
vk::enumerateInstanceLayerProperties();
for (vk::LayerProperties layerProperties : availableLayerProperties) {
std::string layerName(layerProperties.layerName);
std::string layerName(layerProperties.layerName.data());
uniqueLayerNames.insert(layerName);
}
for (const char* desiredLayerName : desiredLayerNames) {

View file

@ -52,7 +52,7 @@ Sequence::~Sequence()
"CommandPool pointer");
return;
}
this->mDevice->destroy(*this->mCommandPool);
this->mDevice->destroy(*this->mCommandPool, (vk::Optional<const vk::AllocationCallbacks>)nullptr);
SPDLOG_DEBUG("Kompute Sequence Destroyed CommandPool");
}
}
@ -186,7 +186,7 @@ Sequence::evalAwait(uint64_t waitFor)
vk::Result result =
this->mDevice->waitForFences(1, &this->mFence, VK_TRUE, waitFor);
this->mDevice->destroy(this->mFence);
this->mDevice->destroy(this->mFence, (vk::Optional<const vk::AllocationCallbacks>)nullptr);
this->mIsRunning = false;

View file

@ -2,7 +2,7 @@
#if DEBUG
#if KOMPUTE_ENABLE_SPDLOG
// Only enabled if spdlog is enabled
#include <fmt/ranges.h>
#include <spdlog/fmt/bundled/ranges.h>
#endif
#endif
@ -357,7 +357,7 @@ Tensor::freeMemoryDestroyGPUResources()
"Kompose Tensor expected to free buffer but got null buffer");
} else {
SPDLOG_DEBUG("Kompose Tensor destroying buffer");
this->mDevice->destroy(*this->mBuffer);
this->mDevice->destroy(*this->mBuffer, (vk::Optional<const vk::AllocationCallbacks>)nullptr);
this->mBuffer = nullptr;
}
}
@ -368,7 +368,7 @@ Tensor::freeMemoryDestroyGPUResources()
"Kompose Tensor expected to free buffer but got null memory");
} else {
SPDLOG_DEBUG("Kompose Tensor freeing memory");
this->mDevice->freeMemory(*this->mMemory);
this->mDevice->freeMemory(*this->mMemory, (vk::Optional<const vk::AllocationCallbacks>)nullptr);
this->mDevice = nullptr;
}
}