layers: Don't bother continuing after missing entrypoint
authorChris Forbes <chrisforbes@google.com>
Thu, 8 Sep 2016 23:23:39 +0000 (11:23 +1200)
committerChris Forbes <chrisforbes@google.com>
Mon, 12 Sep 2016 23:20:17 +0000 (11:20 +1200)
There's very little we can do here.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
layers/core_validation.cpp

index 3e3d3ca..288ec36 100644 (file)
@@ -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 */