From 6bb8b9979d12122c3ac2e627bcad965129556d12 Mon Sep 17 00:00:00 2001 From: archimedus Date: Sat, 27 Jul 2024 17:41:12 +0200 Subject: [PATCH] Remove unneeded memory requirement (#1045) Remove VK_MEMORY_PROPERTY_HOST_CACHED_BIT bit, that actually it is optional and may lead to situation memory will not be allocated. --- src/vulkan/blas.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vulkan/blas.cc b/src/vulkan/blas.cc index 33c1e34a..bdd41012 100644 --- a/src/vulkan/blas.cc +++ b/src/vulkan/blas.cc @@ -182,11 +182,11 @@ Result BLAS::CreateBLAS(amber::BLAS* blas) { vertex_buffer_->AddAllocateFlags(VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT); vertex_buffer_->SetMemoryPropertiesFlags( VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | - VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | - VK_MEMORY_PROPERTY_HOST_CACHED_BIT); + VK_MEMORY_PROPERTY_HOST_COHERENT_BIT); vertex_buffer_->Initialize(); void* memory_ptr = vertex_buffer_->HostAccessibleMemoryPtr(); + assert(memory_ptr != nullptr); for (size_t geometryNdx = 0; geometryNdx < geometries.size(); ++geometryNdx) {