From 2c1bffa286b9551c0533081cb16f497058974b03 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 16 Jun 2022 19:39:13 +0200 Subject: Cleanup: add verbose logging category names instead of numbers And use them more consistently than before. --- intern/cycles/bvh/build.cpp | 42 +++++++++++++++++++++--------------------- intern/cycles/bvh/embree.cpp | 6 +++--- 2 files changed, 24 insertions(+), 24 deletions(-) (limited to 'intern/cycles/bvh') diff --git a/intern/cycles/bvh/build.cpp b/intern/cycles/bvh/build.cpp index 1df3517673e..cf03f05de60 100644 --- a/intern/cycles/bvh/build.cpp +++ b/intern/cycles/bvh/build.cpp @@ -529,7 +529,7 @@ BVHNode *BVHBuild::run() if (progress.get_cancel()) { rootnode->deleteSubtree(); rootnode = NULL; - VLOG(1) << "BVH build cancelled."; + VLOG_WORK << "BVH build cancelled."; } else { /*rotate(rootnode, 4, 5);*/ @@ -537,26 +537,26 @@ BVHNode *BVHBuild::run() rootnode->update_time(); } if (rootnode != NULL) { - VLOG(1) << "BVH build statistics:\n" - << " Build time: " << time_dt() - build_start_time << "\n" - << " Total number of nodes: " - << string_human_readable_number(rootnode->getSubtreeSize(BVH_STAT_NODE_COUNT)) - << "\n" - << " Number of inner nodes: " - << string_human_readable_number(rootnode->getSubtreeSize(BVH_STAT_INNER_COUNT)) - << "\n" - << " Number of leaf nodes: " - << string_human_readable_number(rootnode->getSubtreeSize(BVH_STAT_LEAF_COUNT)) - << "\n" - << " Number of unaligned nodes: " - << string_human_readable_number(rootnode->getSubtreeSize(BVH_STAT_UNALIGNED_COUNT)) - << "\n" - << " Allocation slop factor: " - << ((prim_type.capacity() != 0) ? (float)prim_type.size() / prim_type.capacity() : - 1.0f) - << "\n" - << " Maximum depth: " - << string_human_readable_number(rootnode->getSubtreeSize(BVH_STAT_DEPTH)) << "\n"; + VLOG_WORK << "BVH build statistics:\n" + << " Build time: " << time_dt() - build_start_time << "\n" + << " Total number of nodes: " + << string_human_readable_number(rootnode->getSubtreeSize(BVH_STAT_NODE_COUNT)) + << "\n" + << " Number of inner nodes: " + << string_human_readable_number(rootnode->getSubtreeSize(BVH_STAT_INNER_COUNT)) + << "\n" + << " Number of leaf nodes: " + << string_human_readable_number(rootnode->getSubtreeSize(BVH_STAT_LEAF_COUNT)) + << "\n" + << " Number of unaligned nodes: " + << string_human_readable_number(rootnode->getSubtreeSize(BVH_STAT_UNALIGNED_COUNT)) + << "\n" + << " Allocation slop factor: " + << ((prim_type.capacity() != 0) ? (float)prim_type.size() / prim_type.capacity() : + 1.0f) + << "\n" + << " Maximum depth: " + << string_human_readable_number(rootnode->getSubtreeSize(BVH_STAT_DEPTH)) << "\n"; } } diff --git a/intern/cycles/bvh/embree.cpp b/intern/cycles/bvh/embree.cpp index 0fc71f49ce3..ea7480bd193 100644 --- a/intern/cycles/bvh/embree.cpp +++ b/intern/cycles/bvh/embree.cpp @@ -332,7 +332,7 @@ static bool rtc_memory_monitor_func(void *userPtr, const ssize_t bytes, const bo static void rtc_error_func(void *, enum RTCError, const char *str) { - VLOG(1) << str; + VLOG_WARNING << str; } static double progress_start_time = 0.0; @@ -521,8 +521,8 @@ void BVHEmbree::add_triangles(const Object *ob, const Mesh *mesh, int i) geom_id, RTC_BUFFER_TYPE_INDEX, 0, RTC_FORMAT_UINT3, sizeof(int) * 3, num_triangles); assert(rtc_indices); if (!rtc_indices) { - VLOG(1) << "Embree could not create new geometry buffer for mesh " << mesh->name.c_str() - << ".\n"; + VLOG_WARNING << "Embree could not create new geometry buffer for mesh " << mesh->name.c_str() + << ".\n"; return; } for (size_t j = 0; j < num_triangles; ++j) { -- cgit v1.2.3 From ff1883307f12a8b734bfcf87b01743dc73afae75 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 17 Jun 2022 17:16:37 +0200 Subject: Cleanup: renaming and consistency for kernel data * Rename "texture" to "data array". This has not used textures for a long time, there are just global memory arrays now. (On old CUDA GPUs there was a cache for textures but not global memory, so we used to put all data in textures.) * For CUDA and HIP, put globals in KernelParams struct like other devices. * Drop __ prefix for data array names, no possibility for naming conflict now that these are in a struct. --- intern/cycles/bvh/embree.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'intern/cycles/bvh') diff --git a/intern/cycles/bvh/embree.cpp b/intern/cycles/bvh/embree.cpp index ea7480bd193..eed7ae19965 100644 --- a/intern/cycles/bvh/embree.cpp +++ b/intern/cycles/bvh/embree.cpp @@ -250,7 +250,7 @@ static void rtc_filter_occluded_func(const RTCFilterFunctionNArguments *args) *isect = current_isect; /* Only primitives from volume object. */ uint tri_object = isect->object; - int object_flag = kernel_tex_fetch(__object_flag, tri_object); + int object_flag = kernel_data_fetch(object_flag, tri_object); if ((object_flag & SD_OBJECT_HAS_VOLUME) == 0) { --ctx->num_hits; } -- cgit v1.2.3