diff options
author | Bas Nieuwenhuizen <[email protected]> | 2017-03-05 20:58:31 +0100 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2017-03-06 00:10:23 +0100 |
commit | fb7e4e16e726accd88fa60cd752ca29eddc958f5 (patch) | |
tree | 1cf72a32aa16f788e7bf4568a44b69a310537e71 /src/amd/vulkan/winsys | |
parent | 682248db451fa164d964863339ca873a1f85aec9 (diff) |
radv/amdgpu: Add some debug flags.
Signed-off-by: Bas Nieuwenhuizen <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/winsys')
-rw-r--r-- | src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c | 8 | ||||
-rw-r--r-- | src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys_public.h | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c index 35b6bc57a42..c9f52359912 100644 --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c @@ -27,6 +27,7 @@ #include "radv_amdgpu_winsys.h" #include "radv_amdgpu_winsys_public.h" #include "radv_amdgpu_surface.h" +#include "radv_debug.h" #include "amdgpu_id.h" #include "xf86drm.h" #include <stdio.h> @@ -347,7 +348,7 @@ static void radv_amdgpu_winsys_destroy(struct radeon_winsys *rws) } struct radeon_winsys * -radv_amdgpu_winsys_create(int fd) +radv_amdgpu_winsys_create(int fd, uint32_t debug_flags) { uint32_t drm_major, drm_minor, r; amdgpu_device_handle dev; @@ -367,7 +368,10 @@ radv_amdgpu_winsys_create(int fd) if (!do_winsys_init(ws, fd)) goto winsys_fail; - ws->debug_all_bos = getenv("RADV_DEBUG_ALL_BOS") ? true : false; + ws->debug_all_bos = !!(debug_flags & RADV_DEBUG_ALL_BOS); + if (debug_flags & RADV_DEBUG_NO_IBS) + ws->use_ib_bos = false; + LIST_INITHEAD(&ws->global_bo_list); pthread_mutex_init(&ws->global_bo_list_lock, NULL); ws->base.query_info = radv_amdgpu_winsys_query_info; diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys_public.h b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys_public.h index 208561db903..d5d0ff52c21 100644 --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys_public.h +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys_public.h @@ -29,6 +29,6 @@ #ifndef RADV_AMDGPU_WINSYS_PUBLIC_H #define RADV_AMDGPU_WINSYS_PUBLIC_H -struct radeon_winsys *radv_amdgpu_winsys_create(int fd); +struct radeon_winsys *radv_amdgpu_winsys_create(int fd, uint32_t debug_flags); #endif /* RADV_AMDGPU_WINSYS_PUBLIC_H */ |