summaryrefslogtreecommitdiffstats
path: root/src/vulkan/anv_pipeline.c
diff options
context:
space:
mode:
authorKristian Høgsberg Kristensen <[email protected]>2016-01-03 22:42:01 -0800
committerKristian Høgsberg Kristensen <[email protected]>2016-01-04 10:06:50 -0800
commitb2ad2a20b67645ac37b5f35daa47bfe454286d90 (patch)
tree882b0cd6cdced601e0bcd5af268c956b4a4f2586 /src/vulkan/anv_pipeline.c
parent3954594eb4385eef7cea606bc2bb0b92d19c1705 (diff)
vk: Handle allocation failure in anv_pipeline_init()
Fixes dEQP-VK.api.object_management.alloc_callback_fail.* failures.
Diffstat (limited to 'src/vulkan/anv_pipeline.c')
-rw-r--r--src/vulkan/anv_pipeline.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/vulkan/anv_pipeline.c b/src/vulkan/anv_pipeline.c
index 12430f824ad..ad47f9661e4 100644
--- a/src/vulkan/anv_pipeline.c
+++ b/src/vulkan/anv_pipeline.c
@@ -950,6 +950,8 @@ anv_pipeline_init(struct anv_pipeline *pipeline, struct anv_device *device,
const struct anv_graphics_pipeline_create_info *extra,
const VkAllocationCallbacks *alloc)
{
+ VkResult result;
+
anv_validate {
anv_pipeline_validate_create_info(pCreateInfo);
}
@@ -960,8 +962,9 @@ anv_pipeline_init(struct anv_pipeline *pipeline, struct anv_device *device,
pipeline->device = device;
pipeline->layout = anv_pipeline_layout_from_handle(pCreateInfo->layout);
- anv_reloc_list_init(&pipeline->batch_relocs, alloc);
- /* TODO: Handle allocation fail */
+ result = anv_reloc_list_init(&pipeline->batch_relocs, alloc);
+ if (result != VK_SUCCESS)
+ return result;
pipeline->batch.alloc = alloc;
pipeline->batch.next = pipeline->batch.start = pipeline->batch_data;