diff options
author | Samuel Pitoiset <[email protected]> | 2017-12-05 13:57:07 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2018-01-08 21:24:43 +0100 |
commit | a3aaa036249401342a77f018a81f3e130735e305 (patch) | |
tree | d43745f46138db3ab00928c78043ca50dc8997f7 /src/amd/vulkan/winsys | |
parent | 2dab5e96ec54af87f651c917bffa08e6b0770eb5 (diff) |
radv/winsys: add RADEON_FLAG_READ_ONLY
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/winsys')
-rw-r--r-- | src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c index 7cefdc8173e..603111d2ebc 100644 --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c @@ -49,12 +49,14 @@ radv_amdgpu_bo_va_op(struct radv_amdgpu_winsys *ws, uint32_t ops) { uint64_t flags = AMDGPU_VM_PAGE_READABLE | - AMDGPU_VM_PAGE_WRITEABLE | AMDGPU_VM_PAGE_EXECUTABLE; if ((bo_flags & RADEON_FLAG_VA_UNCACHED) && ws->info.chip_class >= GFX9) flags |= AMDGPU_VM_MTYPE_UC; + if (!(bo_flags & RADEON_FLAG_READ_ONLY)) + flags |= AMDGPU_VM_PAGE_WRITEABLE; + size = ALIGN(size, getpagesize()); return amdgpu_bo_va_op_raw(ws->dev, bo, offset, size, addr, |