mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 12:50:10 +01:00
radv: export GPU hang reports through VK_EXT_device_fault
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27293>
This commit is contained in:
parent
8c3d1c9140
commit
a778d5fd0d
1 changed files with 25 additions and 0 deletions
|
|
@ -1094,6 +1094,31 @@ radv_GetDeviceFaultInfoEXT(VkDevice _device, VkDeviceFaultCountsEXT *pFaultCount
|
|||
pFaultCounts->vendorInfoCount = 0;
|
||||
pFaultCounts->vendorBinarySize = 0;
|
||||
|
||||
if (device->gpu_hang_report) {
|
||||
const struct radv_physical_device *pdevice = device->physical_device;
|
||||
|
||||
VkDeviceFaultVendorBinaryHeaderVersionOneEXT hdr;
|
||||
|
||||
hdr.headerSize = sizeof(VkDeviceFaultVendorBinaryHeaderVersionOneEXT);
|
||||
hdr.headerVersion = VK_DEVICE_FAULT_VENDOR_BINARY_HEADER_VERSION_ONE_EXT;
|
||||
hdr.vendorID = pdevice->vk.properties.vendorID;
|
||||
hdr.deviceID = pdevice->vk.properties.deviceID;
|
||||
hdr.driverVersion = pdevice->vk.properties.driverVersion;
|
||||
memcpy(hdr.pipelineCacheUUID, pdevice->cache_uuid, VK_UUID_SIZE);
|
||||
hdr.applicationNameOffset = 0;
|
||||
hdr.applicationVersion = pdevice->instance->vk.app_info.app_version;
|
||||
hdr.engineNameOffset = 0;
|
||||
hdr.engineVersion = pdevice->instance->vk.app_info.engine_version;
|
||||
hdr.apiVersion = pdevice->instance->vk.app_info.api_version;
|
||||
|
||||
pFaultCounts->vendorBinarySize = sizeof(hdr) + strlen(device->gpu_hang_report);
|
||||
if (pFaultInfo) {
|
||||
memcpy(pFaultInfo->pVendorBinaryData, &hdr, sizeof(hdr));
|
||||
memcpy((char *)pFaultInfo->pVendorBinaryData + sizeof(hdr), device->gpu_hang_report,
|
||||
strlen(device->gpu_hang_report));
|
||||
}
|
||||
}
|
||||
|
||||
if (vm_fault_occurred) {
|
||||
VkDeviceFaultAddressInfoEXT addr_fault_info = {
|
||||
.reportedAddress = fault_info.addr,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue