Vulkan: Assert on some creates failing.

Before was only checking in debug builds.
This commit is contained in:
Unknown W. Brackets committed 2018-06-24 07:35:19 -07:00
1 parent 5028486630
commit 81f74e4287
4 files changed
+23 -12

No files matched your search

+4 -4
View File
@@ -661,7 +661,7 @@ public:
s.mipmapMode = desc.mipFilter == TextureFilter::LINEAR ? VK_SAMPLER_MIPMAP_MODE_LINEAR : VK_SAMPLER_MIPMAP_MODE_NEAREST;
s.maxLod = desc.maxLod;
VkResult res = vkCreateSampler(vulkan_->GetDevice(), &s, nullptr, &sampler_);
assert(VK_SUCCESS == res);
_assert_(VK_SUCCESS == res);
}
~VKSamplerState() {
vulkan_->Delete().QueueDeleteSampler(sampler_);
@@ -788,7 +788,7 @@ VKContext::VKContext(VulkanContext *vulkan, bool splitSubmit)
for (int i = 0; i < VulkanContext::MAX_INFLIGHT_FRAMES; i++) {
frame_[i].pushBuffer = new VulkanPushBuffer(vulkan_, 1024 * 1024);
VkResult res = vkCreateDescriptorPool(device_, &dp, nullptr, &frame_[i].descriptorPool);
assert(res == VK_SUCCESS);
_assert_(res == VK_SUCCESS);
}
// binding 0 - uniform data
@@ -862,7 +862,7 @@ void VKContext::BeginFrame() {
frame.descSets_.clear();
VkResult result = vkResetDescriptorPool(device_, frame.descriptorPool, 0);
assert(result == VK_SUCCESS);
_assert_(result == VK_SUCCESS);
}
void VKContext::WaitRenderCompletion(Framebuffer *fbo) {
@@ -903,7 +903,7 @@ VkDescriptorSet VKContext::GetOrCreateDescriptorSet(VkBuffer buf) {
alloc.pSetLayouts = &descriptorSetLayout_;
alloc.descriptorSetCount = 1;
VkResult res = vkAllocateDescriptorSets(device_, &alloc, &descSet);
assert(VK_SUCCESS == res);
_assert_(VK_SUCCESS == res);
VkDescriptorBufferInfo bufferDesc;
bufferDesc.buffer = buf;