Merge pull request #335 from VasylBaran/apple_detiler_artifacts_fixup

Fixup for detiler artifacts on macOS
This commit is contained in:
psucien 2024-07-28 21:42:05 +02:00 committed by GitHub
commit aa795f5c59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -326,7 +326,12 @@ TileManager::ScratchBuffer TileManager::AllocBuffer(u32 size, bool is_storage /*
.usage = usage,
};
#ifdef __APPLE__
// Fix for detiler artifacts on macOS
const bool is_large_buffer = true;
#else
const bool is_large_buffer = size > 128_MB;
#endif
VmaAllocationCreateInfo alloc_info{
.flags = !is_storage ? VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT |
VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT