summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/genX_pipeline.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-08-29 08:30:37 -0700
committerJason Ekstrand <[email protected]>2016-08-30 15:08:23 -0700
commitd5945bec124ab21606d0d2719abbae8c44a70cf1 (patch)
tree6063c9ce94e76626a97f5c9f5bbe4df5b4167027 /src/intel/vulkan/genX_pipeline.c
parenta0f5c496e348b918a556dd275289d4dda63b94c9 (diff)
anv/pipeline: Properly handle OOM during shader compilation
Signed-off-by: Jason Ekstrand <[email protected]> Cc: "12.0" <[email protected]>
Diffstat (limited to 'src/intel/vulkan/genX_pipeline.c')
-rw-r--r--src/intel/vulkan/genX_pipeline.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c
index 5cbcfd2e48a..8cf801fe1f9 100644
--- a/src/intel/vulkan/genX_pipeline.c
+++ b/src/intel/vulkan/genX_pipeline.c
@@ -76,9 +76,13 @@ genX(compute_pipeline_create)(
assert(pCreateInfo->stage.stage == VK_SHADER_STAGE_COMPUTE_BIT);
ANV_FROM_HANDLE(anv_shader_module, module, pCreateInfo->stage.module);
- anv_pipeline_compile_cs(pipeline, cache, pCreateInfo, module,
- pCreateInfo->stage.pName,
- pCreateInfo->stage.pSpecializationInfo);
+ result = anv_pipeline_compile_cs(pipeline, cache, pCreateInfo, module,
+ pCreateInfo->stage.pName,
+ pCreateInfo->stage.pSpecializationInfo);
+ if (result != VK_SUCCESS) {
+ anv_free2(&device->alloc, pAllocator, pipeline);
+ return result;
+ }
pipeline->use_repclear = false;