diff --git a/.pick_status.json b/.pick_status.json index 34f988ded4d..cfe89bda3b8 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -247,7 +247,7 @@ "description": "anv: handle spirv parsing failure", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": null }, diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 5575e5f2029..79afde9b877 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -195,6 +195,11 @@ anv_shader_compile_to_nir(struct anv_device *device, spirv_to_nir(spirv, module->size / 4, spec_entries, num_spec_entries, stage, entrypoint_name, &spirv_options, nir_options); + if (!nir) { + free(spec_entries); + return NULL; + } + assert(nir->info.stage == stage); nir_validate_shader(nir, "after spirv_to_nir"); nir_validate_ssa_dominance(nir, "after spirv_to_nir"); @@ -1431,7 +1436,7 @@ anv_pipeline_compile_graphics(struct anv_graphics_pipeline *pipeline, pipeline_ctx, &stages[s]); if (stages[s].nir == NULL) { - result = vk_error(VK_ERROR_OUT_OF_HOST_MEMORY); + result = vk_error(VK_ERROR_UNKNOWN); goto fail; } @@ -1719,7 +1724,7 @@ anv_pipeline_compile_cs(struct anv_compute_pipeline *pipeline, stage.nir = anv_pipeline_stage_get_nir(&pipeline->base, cache, mem_ctx, &stage); if (stage.nir == NULL) { ralloc_free(mem_ctx); - return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY); + return vk_error(VK_ERROR_UNKNOWN); } NIR_PASS_V(stage.nir, anv_nir_add_base_work_group_id);