vulkan : Pass in number of tlas/blas being built
Pass the counts for top-level and bottom-level acceleration structures to the debug_marker. Signed-off-by: Michael Cheng <michael.cheng@intel.com> Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33720>
This commit is contained in:
@@ -1025,10 +1025,24 @@ vk_cmd_build_acceleration_structures(VkCommandBuffer commandBuffer,
|
||||
struct bvh_state *bvh_states = calloc(infoCount, sizeof(struct bvh_state));
|
||||
|
||||
if (args->emit_markers) {
|
||||
device->as_build_ops->begin_debug_marker(commandBuffer,
|
||||
VK_ACCELERATION_STRUCTURE_BUILD_STEP_TOP,
|
||||
"vkCmdBuildAccelerationStructuresKHR(%u)",
|
||||
infoCount);
|
||||
uint32_t num_of_blas = 0;
|
||||
uint32_t num_of_tlas = 0;
|
||||
for (uint32_t i = 0; i < infoCount; ++i) {
|
||||
switch (pInfos[i].type) {
|
||||
case VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR:
|
||||
num_of_tlas++;
|
||||
break;
|
||||
case VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHR:
|
||||
num_of_blas++;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
ops->begin_debug_marker(commandBuffer,
|
||||
VK_ACCELERATION_STRUCTURE_BUILD_STEP_TOP,
|
||||
"vkCmdBuildAccelerationStructuresKHR() TLAS(%u) BLAS(%u)",
|
||||
num_of_tlas, num_of_blas);
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < infoCount; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user