| 492 | } |
| 493 | |
| 494 | void Validator::InternalVmaError(LogObjectList objlist, VkResult result, const char* const specific_message) const { |
| 495 | aborted_ = true; |
| 496 | std::string error_message = specific_message; |
| 497 | |
| 498 | char* stats_string; |
| 499 | vmaBuildStatsString(vma_allocator_, &stats_string, false); |
| 500 | error_message += " VMA statistics = "; |
| 501 | error_message += stats_string; |
| 502 | vmaFreeStatsString(vma_allocator_, stats_string); |
| 503 | |
| 504 | const char* layer_name = gpuav_settings.debug_printf_only ? "DebugPrintf" : "GPU-AV"; |
| 505 | const char* vuid = gpuav_settings.debug_printf_only ? "UNASSIGNED-DEBUG-PRINTF" : "UNASSIGNED-GPU-Assisted-Validation"; |
| 506 | |
| 507 | LogError(vuid, objlist, Location(vvl::Func::Empty), "Internal VMA Error (%s), %s is being disabled. Details:\n%s", |
| 508 | string_VkResult(result), layer_name, error_message.c_str()); |
| 509 | |
| 510 | // Once we encounter an internal issue disconnect everything. |
| 511 | // This prevents need to check "if (aborted)" (which is awful when we easily forget to check somewhere and the user gets spammed |
| 512 | // with errors making it hard to see the first error with the real source of the problem). |
| 513 | dispatch_device_->ReleaseValidationObject(LayerObjectTypeGpuAssisted); |
| 514 | } |
| 515 | |
| 516 | // On machines where all memory types have both DEVICE_LOCAL and HOST_VISIBLE we need to let VMA know there will be host access, |
| 517 | // otherwise it will assert https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/issues/515 |
no test coverage detected