diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2017-05-09 13:49:59 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2017-05-10 07:56:39 -0600 |
| commit | 234f9f78abe112595a0741291adbe46c9cb325b0 (patch) | |
| tree | 1f50ef20c31414a2d60f63d86aa418c25bf66b15 /layers/parameter_validation_utils.h | |
| parent | 754d46aeab41a0d991ec908355bb0e9299aa0758 (diff) | |
| download | usermoji-234f9f78abe112595a0741291adbe46c9cb325b0.tar.xz | |
layers: Add exclusion list to validate_result in PV
Allows specifying return codes to ignore in parameter validation.
Change-Id: Iebf11920c3921c39190903b2750f4b3d61fe6242
Diffstat (limited to 'layers/parameter_validation_utils.h')
| -rw-r--r-- | layers/parameter_validation_utils.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/layers/parameter_validation_utils.h b/layers/parameter_validation_utils.h index 62f11f2f..744f40df 100644 --- a/layers/parameter_validation_utils.h +++ b/layers/parameter_validation_utils.h @@ -813,12 +813,16 @@ static std::string get_result_description(VkResult result) { * * @param report_data debug_report_data object for routing validation messages. * @param apiName Name of API call being validated. +* @param ignore vector of VkResult return codes to be ignored * @param value VkResult value to validate. */ -static void validate_result(debug_report_data *report_data, const char *apiName, VkResult result) { +static void validate_result(debug_report_data *report_data, const char *apiName, std::vector<VkResult> const &ignore, + VkResult result) { if (result < 0 && result != VK_ERROR_VALIDATION_FAILED_EXT) { + if (std::find(ignore.begin(), ignore.end(), result) != ignore.end()) { + return; + } std::string resultName = string_VkResult(result); - if (resultName == UnsupportedResultString) { // Unrecognized result code log_msg(report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, 0, __LINE__, |
