radeonsi: add a debug flag to zero vram allocations
[mesa.git] / src / gallium / winsys / amdgpu / drm / amdgpu_winsys.h
index b4a3422744f6408c6f43e6359cfb84f0242c0eb8..8079255e4cf1cfdd6aa44d9eaaf6cba1a8a17e28 100644 (file)
  * next paragraph) shall be included in all copies or substantial portions
  * of the Software.
  */
-/*
- * Authors:
- *      Marek Olšák <maraeo@gmail.com>
- */
 
 #ifndef AMDGPU_WINSYS_H
 #define AMDGPU_WINSYS_H
@@ -36,6 +32,7 @@
 #include "pipebuffer/pb_slab.h"
 #include "gallium/drivers/radeon/radeon_winsys.h"
 #include "addrlib/addrinterface.h"
+#include "util/simple_mtx.h"
 #include "util/u_queue.h"
 #include <amdgpu.h>
 
@@ -53,7 +50,7 @@ struct amdgpu_winsys {
 
    amdgpu_device_handle dev;
 
-   mtx_t bo_fence_lock;
+   simple_mtx_t bo_fence_lock;
 
    int num_cs; /* The number of command streams created. */
    unsigned num_total_rejected_cs;
@@ -82,9 +79,10 @@ struct amdgpu_winsys {
    bool check_vm;
    bool debug_all_bos;
    bool reserve_vmid;
+   bool zero_all_vram_allocs;
 
    /* List of all allocated buffers */
-   mtx_t global_bo_list_lock;
+   simple_mtx_t global_bo_list_lock;
    struct list_head global_bo_list;
    unsigned num_buffers;
 };