radv: do not abort if SPM isn't supported for the current GPU

In a mixed GFX9/GFX10 setup, this would crash for the GFX9 logical
device. Just print a message intead of aborting.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17292>
This commit is contained in:
Samuel Pitoiset 2022-06-29 11:04:00 +02:00
parent 06a48e599e
commit 25d5ef0450
1 changed files with 6 additions and 6 deletions

View File

@ -3424,13 +3424,13 @@ radv_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCr
radv_spm_trace_enabled() ? "enabled" : "disabled");
if (radv_spm_trace_enabled()) {
if (device->physical_device->rad_info.gfx_level < GFX10) {
fprintf(stderr, "SPM isn't supported for this GPU!\n");
abort();
if (device->physical_device->rad_info.gfx_level >= GFX10) {
if (!radv_spm_init(device))
goto fail;
} else {
fprintf(stderr, "radv: SPM isn't supported for this GPU (%s)!\n",
device->physical_device->name);
}
if (!radv_spm_init(device))
goto fail;
}
}