Closed Jaisiero closed 7 months ago
It might be a blas size thing. I guess until 15 tris the size is the same and past that we have some calculation errors or miss to pass the tri count or somthing.
It might be a blas size thing. I guess until 15 tris the size is the same and past that we have some calculation errors or miss to pass the tri count or somthing.
Yep. Just tricking it just like this:
daxa::AccelerationStructureBuildSizesInfo build_size_info = device.get_blas_build_sizes(blas_build_info);
auto blas_scratch_buffer = device.create_buffer({
.size = build_size_info.build_scratch_size * 2,
.name = "blas build scratch buffer",
});
It builds the accel. struct without crashing so I am gonna investigate further.
I found it and I did find another issue too. I think the whole acceleration structure (AS) building process is very error prone cause you first ask how much room you need for the building process, you create those AS and later you issue the info in a command recorder in order to build them. I would be nice if the whole process is driven by the API or at least some extra checks are made, i don't know how to approach it to be honest without to much headaches. I'll do a PR and you guys can check what it's going on. Thanks!
So this is the code from .\Daxa\tests\2_daxa_api\10_raytracing where if triangle_count upto 14 its fine. But when I reach 15 Vulkan explodes whit device lost error:
In case it could be some synchronization relationship I tried to add a sleep before the build command buffer:
but it doesn't matter. What it seems to matter is the amount of triangles.
I am not sure if I am doing something wrong here or there's some bug inside.