Restore VkResult return value to vkAllocDescriptorSets

This commit is contained in:
baldurk
2016-02-07 18:42:50 +01:00
parent d2c725040f
commit d7d766e21a
3 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -811,7 +811,7 @@ public:
VkDevice device,
VkDescriptorPool descriptorPool);
IMPLEMENT_FUNCTION_SERIALISED(void, vkAllocDescriptorSets,
IMPLEMENT_FUNCTION_SERIALISED(VkResult, vkAllocDescriptorSets,
VkDevice device,
VkDescriptorPool descriptorPool,
VkDescriptorSetUsage setUsage,
+1 -1
View File
@@ -209,7 +209,7 @@
HookDefine2(void, vkDestroyDescriptorSetLayout, VkDevice, device, VkDescriptorSetLayout, descriptorSetLayout); \
HookDefine3(VkResult, vkCreateDescriptorPool, VkDevice, device, const VkDescriptorPoolCreateInfo*, pCreateInfo, VkDescriptorPool*, pDescriptorPool); \
HookDefine2(void, vkDestroyDescriptorPool, VkDevice, device, VkDescriptorPool, descriptorPool); \
HookDefine6(void, vkAllocDescriptorSets, VkDevice, device, VkDescriptorPool, descriptorPool, VkDescriptorSetUsage, setUsage, uint32_t, count, const VkDescriptorSetLayout*, pSetLayouts, VkDescriptorSet*, pDescriptorSets); \
HookDefine6(VkResult, vkAllocDescriptorSets, VkDevice, device, VkDescriptorPool, descriptorPool, VkDescriptorSetUsage, setUsage, uint32_t, count, const VkDescriptorSetLayout*, pSetLayouts, VkDescriptorSet*, pDescriptorSets); \
HookDefine5(void, vkUpdateDescriptorSets, VkDevice, device, uint32_t, writeCount, const VkWriteDescriptorSet*, pDescriptorWrites, uint32_t, copyCount, const VkCopyDescriptorSet*, pDescriptorCopies); \
HookDefine4(VkResult, vkFreeDescriptorSets, VkDevice, device, VkDescriptorPool, descriptorPool, uint32_t, count, const VkDescriptorSet*, pDescriptorSets); \
HookDefine3(VkResult, vkCreateCommandPool, VkDevice, device, const VkCmdPoolCreateInfo*, pCreateInfo, VkCmdPool*, pCmdPool); \
@@ -232,7 +232,7 @@ bool WrappedVulkan::Serialise_vkAllocDescriptorSets(
return true;
}
void WrappedVulkan::vkAllocDescriptorSets(
VkResult WrappedVulkan::vkAllocDescriptorSets(
VkDevice device,
VkDescriptorPool descriptorPool,
VkDescriptorSetUsage setUsage,
@@ -243,7 +243,9 @@ void WrappedVulkan::vkAllocDescriptorSets(
VkDescriptorSetLayout *unwrapped = GetTempArray<VkDescriptorSetLayout>(count);
for(uint32_t i=0; i < count; i++) unwrapped[i] = Unwrap(pSetLayouts[i]);
ObjDisp(device)->AllocDescriptorSets(Unwrap(device), Unwrap(descriptorPool), setUsage, count, unwrapped, pDescriptorSets);
VkResult ret = ObjDisp(device)->AllocDescriptorSets(Unwrap(device), Unwrap(descriptorPool), setUsage, count, unwrapped, pDescriptorSets);
if(ret != VK_SUCCESS) return ret;
for(uint32_t i=0; i < count; i++)
{
@@ -284,6 +286,8 @@ void WrappedVulkan::vkAllocDescriptorSets(
GetResourceManager()->AddLiveResource(id, pDescriptorSets[i]);
}
}
return ret;
}
VkResult WrappedVulkan::vkFreeDescriptorSets(