radv: check for has_trap_handler_support instead of asserting

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31925>
This commit is contained in:
Samuel Pitoiset 2024-10-31 16:12:28 +01:00 committed by Marge Bot
parent e27ba67d33
commit 930395c5e4

View file

@ -643,11 +643,11 @@ radv_device_init_trap_handler(struct radv_device *device)
{
const struct radv_physical_device *pdev = radv_device_physical(device);
if (!radv_trap_handler_enabled())
if (!pdev->info.has_trap_handler_support)
return VK_SUCCESS;
/* TODO: Add support for more hardware. */
assert(pdev->info.gfx_level == GFX8);
if (!radv_trap_handler_enabled())
return VK_SUCCESS;
fprintf(stderr, "**********************************************************************\n");
fprintf(stderr, "* WARNING: RADV_TRAP_HANDLER is experimental and only for debugging! *\n");