summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNanley Chery <nanley.g.chery@intel.com>2016-10-19 16:15:57 -0700
committerNanley Chery <nanley.g.chery@intel.com>2016-10-19 16:19:34 -0700
commit0cb7b35756402d9c4b83f250a543a1f9ce9e015a (patch)
tree5e948ef575dfc61a48a0571f1faa7d82d1e0cff6
parentc87407b3e8d6ac8ad8494c44c69ad8f60652afeb (diff)
framework/t_phase_setup: Add asserts for vk function calls
-rw-r--r--src/framework/test/t_phase_setup.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/framework/test/t_phase_setup.c b/src/framework/test/t_phase_setup.c
index b3cd046..b558b4d 100644
--- a/src/framework/test/t_phase_setup.c
+++ b/src/framework/test/t_phase_setup.c
@@ -359,7 +359,7 @@ t_setup_vulkan(void)
{
GET_CURRENT_TEST(t);
- vkCreateInstance(
+ VkResult res = vkCreateInstance(
&(VkInstanceCreateInfo) {
.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,
.pApplicationInfo = &(VkApplicationInfo) {
@@ -367,12 +367,13 @@ t_setup_vulkan(void)
.apiVersion = VK_MAKE_VERSION(1, 0, 0),
},
}, &test_alloc_cb, &t->vk.instance);
+ t_assert(res == VK_SUCCESS);
t_cleanup_push_vk_instance(t->vk.instance, &test_alloc_cb);
t_setup_phys_dev();
t_setup_phys_dev_mem_props();
- vkCreateDevice(t->vk.physical_dev,
+ res = vkCreateDevice(t->vk.physical_dev,
&(VkDeviceCreateInfo) {
.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO,
.queueCreateInfoCount = 1,
@@ -383,7 +384,7 @@ t_setup_vulkan(void)
.pQueuePriorities = (float[]) {1.0f},
},
}, NULL, &t->vk.device);
-
+ t_assert(res == VK_SUCCESS);
t_cleanup_push_vk_device(t->vk.device, NULL);
t_setup_descriptor_pool();
@@ -394,7 +395,7 @@ t_setup_vulkan(void)
t->vk.pipeline_cache = qoCreatePipelineCache(t->vk.device);
- VkResult res = vkCreateCommandPool(t->vk.device,
+ res = vkCreateCommandPool(t->vk.device,
&(VkCommandPoolCreateInfo) {
.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO,
.queueFamilyIndex = 0,