diff options
author | Samuel Pitoiset <[email protected]> | 2017-12-05 14:22:17 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2018-01-08 21:24:49 +0100 |
commit | 6e3459eaf4481193aedfa313b81ace8369a83234 (patch) | |
tree | 8f758edeba08fe3c7f308d00b92bdc530e2af891 /src/amd | |
parent | e4f2ad403f39090a3897ffe4695bab315fb2bf30 (diff) |
radv: make descriptor BOs read-only for the GPU
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/vulkan/radv_descriptor_set.c | 6 | ||||
-rw-r--r-- | src/amd/vulkan/radv_device.c | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/amd/vulkan/radv_descriptor_set.c b/src/amd/vulkan/radv_descriptor_set.c index e815939a67c..19a560a6b34 100644 --- a/src/amd/vulkan/radv_descriptor_set.c +++ b/src/amd/vulkan/radv_descriptor_set.c @@ -454,8 +454,10 @@ VkResult radv_CreateDescriptorPool( } if (bo_size) { - pool->bo = device->ws->buffer_create(device->ws, bo_size, - 32, RADEON_DOMAIN_VRAM, RADEON_FLAG_NO_INTERPROCESS_SHARING); + pool->bo = device->ws->buffer_create(device->ws, bo_size, 32, + RADEON_DOMAIN_VRAM, + RADEON_FLAG_NO_INTERPROCESS_SHARING | + RADEON_FLAG_READ_ONLY); pool->mapped_ptr = (uint8_t*)device->ws->buffer_map(pool->bo); } pool->size = bo_size; diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index cbf8f5cf49c..5f78af624b5 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -1603,7 +1603,9 @@ radv_get_preamble_cs(struct radv_queue *queue, size, 4096, RADEON_DOMAIN_VRAM, - RADEON_FLAG_CPU_ACCESS|RADEON_FLAG_NO_INTERPROCESS_SHARING); + RADEON_FLAG_CPU_ACCESS | + RADEON_FLAG_NO_INTERPROCESS_SHARING | + RADEON_FLAG_READ_ONLY); if (!descriptor_bo) goto fail; } else |