anv: set error in all failure paths
authorEric Engestrom <eric.engestrom@intel.com>
Wed, 8 Aug 2018 14:42:49 +0000 (15:42 +0100)
committerEric Engestrom <eric.engestrom@intel.com>
Thu, 9 Aug 2018 10:20:27 +0000 (11:20 +0100)
Cc: Jason Ekstrand <jason.ekstrand@intel.com>
Fixes: 5b196f39bddc689742d3 "anv/pipeline: Compile to NIR in compile_graphics"
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_pipeline.c

index 23af0f1c9248858d6762c852071560c0d381214d..4074c8fd364f9b815f8319304501a3a9df0806ef 100644 (file)
@@ -979,8 +979,10 @@ anv_pipeline_compile_graphics(struct anv_pipeline *pipeline,
                                            &stages[s],
                                            &stages[s].prog_data.base,
                                            &stages[s].bind_map);
-      if (stages[s].nir == NULL)
+      if (stages[s].nir == NULL) {
+         result = vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
          goto fail;
+      }
    }
 
    /* Walk backwards to link */