vk: fixup BLAS preallocation on Linux/amdgpu
Fixing pool allocator to properly signal allocation failure uncovered an existing issue where we were lacking enough memory for dynamic model BLASes on Linux/amdgpu. Erroneously the same memory region was used for >1 BLAS. Surprisingly this hasn't led to any noticeable issues so far. Increasing accels buffer size fixes the issue.
This commit is contained in:
parent
06a7de02a8
commit
755b2d59a9
|
@ -80,7 +80,7 @@ static VkAccelerationStructureKHR createAccel(const char *name, VkAccelerationSt
|
|||
const alo_block_t block = aloPoolAllocate(g_accel.accels_buffer_alloc, size, /*TODO why? align=*/256);
|
||||
|
||||
if (block.offset == ALO_ALLOC_FAILED) {
|
||||
ERR("Failed to allocated %u bytes for blas \"%s\"", size, name);
|
||||
ERR("Failed to allocate %u bytes for blas \"%s\"", size, name);
|
||||
return VK_NULL_HANDLE;
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ struct vk_combuf_s;
|
|||
qboolean createOrUpdateAccelerationStructure(struct vk_combuf_s *combuf, const as_build_args_t *args);
|
||||
|
||||
#define MAX_SCRATCH_BUFFER (32*1024*1024)
|
||||
#define MAX_ACCELS_BUFFER (64*1024*1024)
|
||||
#define MAX_ACCELS_BUFFER (128*1024*1024)
|
||||
|
||||
typedef struct {
|
||||
// Geometry metadata. Lifetime is similar to geometry lifetime itself.
|
||||
|
|
Loading…
Reference in New Issue