From d9a453c7479f258e42578c5937c513668134b66e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 20 Aug 2019 22:44:16 -0400 Subject: [PATCH] winsys/amdgpu+radeon: process AMD_DEBUG in addition to R600_DEBUG Reviewed-by: Pierre-Eric Pelloux-Prayer --- src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 9 ++++++--- src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c index 11dcf942c12..a89432d8594 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c @@ -106,11 +106,14 @@ static bool do_winsys_init(struct amdgpu_winsys *ws, goto fail; } - ws->check_vm = strstr(debug_get_option("R600_DEBUG", ""), "check_vm") != NULL; + ws->check_vm = strstr(debug_get_option("R600_DEBUG", ""), "check_vm") != NULL || + strstr(debug_get_option("AMD_DEBUG", ""), "check_vm") != NULL; ws->debug_all_bos = debug_get_option_all_bos(); - ws->reserve_vmid = strstr(debug_get_option("R600_DEBUG", ""), "reserve_vmid") != NULL; + ws->reserve_vmid = strstr(debug_get_option("R600_DEBUG", ""), "reserve_vmid") != NULL || + strstr(debug_get_option("AMD_DEBUG", ""), "reserve_vmid") != NULL; ws->zero_all_vram_allocs = strstr(debug_get_option("R600_DEBUG", ""), "zerovram") != NULL || - driQueryOptionb(config->options, "radeonsi_zerovram"); + strstr(debug_get_option("AMD_DEBUG", ""), "zerovram") != NULL || + driQueryOptionb(config->options, "radeonsi_zerovram"); return true; diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c index 75d41ef4f56..1630e93d2d6 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c @@ -590,7 +590,8 @@ static bool do_winsys_init(struct radeon_drm_winsys *ws) ws->info.has_graphics = true; ws->info.cpdma_prefetch_writes_memory = true; - ws->check_vm = strstr(debug_get_option("R600_DEBUG", ""), "check_vm") != NULL; + ws->check_vm = strstr(debug_get_option("R600_DEBUG", ""), "check_vm") != NULL || + strstr(debug_get_option("AMD_DEBUG", ""), "check_vm") != NULL; return true; } -- 2.30.2