RADV_DEBUG_NO_IBS = 0x200,
RADV_DEBUG_DUMP_SPIRV = 0x400,
RADV_DEBUG_VM_FAULTS = 0x800,
+ RADV_DEBUG_ZERO_VRAM = 0x1000,
};
enum {
{"noibs", RADV_DEBUG_NO_IBS},
{"spirv", RADV_DEBUG_DUMP_SPIRV},
{"vmfaults", RADV_DEBUG_VM_FAULTS},
+ {"zerovram", RADV_DEBUG_ZERO_VRAM},
{NULL, 0}
};
if (flags & RADEON_FLAG_GTT_WC)
request.flags |= AMDGPU_GEM_CREATE_CPU_GTT_USWC;
+ /* this won't do anything on pre 4.9 kernels */
+ if (ws->zero_all_vram_allocs && (initial_domain & RADEON_DOMAIN_VRAM))
+ request.flags |= AMDGPU_GEM_CREATE_VRAM_CLEARED;
r = amdgpu_bo_alloc(ws->dev, &request, &buf_handle);
if (r) {
fprintf(stderr, "amdgpu: Failed to allocate a buffer:\n");
if (debug_flags & RADV_DEBUG_NO_IBS)
ws->use_ib_bos = false;
+ ws->zero_all_vram_allocs = debug_flags & RADV_DEBUG_ZERO_VRAM;
ws->batchchain = !(perftest_flags & RADV_PERFTEST_NO_BATCHCHAIN);
LIST_INITHEAD(&ws->global_bo_list);
pthread_mutex_init(&ws->global_bo_list_lock, NULL);
bool debug_all_bos;
bool batchchain;
bool use_ib_bos;
+ bool zero_all_vram_allocs;
unsigned num_buffers;
pthread_mutex_t global_bo_list_lock;