diff options
Diffstat (limited to 'src/amd/vulkan/winsys')
-rw-r--r-- | src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c index 9e19b7b1f89..c07641d6ab8 100644 --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c @@ -382,8 +382,11 @@ radv_amdgpu_winsys_bo_create(struct radeon_winsys *_ws, } /* 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; + if (initial_domain & RADEON_DOMAIN_VRAM) { + if (ws->zero_all_vram_allocs || (flags & RADEON_FLAG_ZERO_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"); |