From bcf8c5ee8f92c1b51b5c6808df935095f7d0e4c1 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Fri, 9 Sep 2016 11:23:39 +1200 Subject: layers: Don't bother continuing after missing entrypoint There's very little we can do here. Signed-off-by: Chris Forbes --- layers/core_validation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'layers/core_validation.cpp') diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 3e3d3cac..288ec36c 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -2719,7 +2719,6 @@ static bool validate_pipeline_shader_stage(debug_report_data *report_data, bool pass = true; auto module_it = shaderModuleMap.find(pStage->module); auto module = *out_module = module_it->second.get(); - pass &= validate_specialization_offsets(report_data, pStage); /* find the entrypoint */ auto entrypoint = *out_entrypoint = find_entrypoint(module, pStage->pName, pStage->stage); @@ -2728,7 +2727,7 @@ static bool validate_pipeline_shader_stage(debug_report_data *report_data, __LINE__, SHADER_CHECKER_MISSING_ENTRYPOINT, "SC", "No entrypoint found named `%s` for stage %s", pStage->pName, string_VkShaderStageFlagBits(pStage->stage))) { - pass = false; + return false; // no point continuing beyond here, any analysis is just going to be garbage. } } @@ -2744,6 +2743,7 @@ static bool validate_pipeline_shader_stage(debug_report_data *report_data, auto pipelineLayout = pipeline->pipeline_layout; /* validate push constant usage */ + pass &= validate_specialization_offsets(report_data, pStage); pass &= validate_push_constant_usage(report_data, &pipelineLayout.push_constant_ranges, module, accessible_ids, pStage->stage); /* validate descriptor use */ -- cgit v1.2.3