radv: fix segfault when getting device vm fault info
pFaultInfo can be NULL.
Fixes: 8097becc7f
("radv: add initial VK_EXT_device_fault support")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27292>
This commit is contained in:

committed by
Marge Bot

parent
e39fed5737
commit
c68f96878c
@@ -1085,7 +1085,8 @@ radv_GetDeviceFaultInfoEXT(VkDevice _device, VkDeviceFaultCountsEXT *pFaultCount
|
||||
.addressPrecision = 4096, /* 4K page granularity */
|
||||
};
|
||||
|
||||
strncpy(pFaultInfo->description, "A GPUVM fault has been detected", sizeof(pFaultInfo->description));
|
||||
if (pFaultInfo)
|
||||
strncpy(pFaultInfo->description, "A GPUVM fault has been detected", sizeof(pFaultInfo->description));
|
||||
|
||||
if (device->physical_device->rad_info.gfx_level >= GFX10) {
|
||||
addr_fault_info.addressType = G_00A130_RW(fault_info.status) ? VK_DEVICE_FAULT_ADDRESS_TYPE_WRITE_INVALID_EXT
|
||||
|
Reference in New Issue
Block a user