Skip to content

Commit

Permalink
Remove unneeded memory requirement (#1045)
Browse files Browse the repository at this point in the history
Remove VK_MEMORY_PROPERTY_HOST_CACHED_BIT bit, that actually it is optional and may lead to situation memory will not be allocated.
  • Loading branch information
archimedus authored Jul 27, 2024
1 parent 4fa3746 commit 6bb8b99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vulkan/blas.cc
Original file line number Diff line number Diff line change
@@ -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) {

0 comments on commit 6bb8b99

Please sign in to comment.