[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21387] branches/soc-2009-jaguarandi/ source/blender/render/intern/source: *"Fixed" rayobject_bvh memory organization of BB's
André Pinto
andresusanopinto at gmail.com
Mon Jul 6 16:36:27 CEST 2009
Revision: 21387
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21387
Author: jaguarandi
Date: 2009-07-06 16:36:26 +0200 (Mon, 06 Jul 2009)
Log Message:
-----------
*"Fixed" rayobject_bvh memory organization of BB's
until now rayobject_bvh should be at least as fast as BLIBVH, this seemed to be the missing piece
Modified Paths:
--------------
branches/soc-2009-jaguarandi/source/blender/render/intern/source/rayobject_bvh.c
branches/soc-2009-jaguarandi/source/blender/render/intern/source/rayshade.c
Modified: branches/soc-2009-jaguarandi/source/blender/render/intern/source/rayobject_bvh.c
===================================================================
--- branches/soc-2009-jaguarandi/source/blender/render/intern/source/rayobject_bvh.c 2009-07-06 13:36:22 UTC (rev 21386)
+++ branches/soc-2009-jaguarandi/source/blender/render/intern/source/rayobject_bvh.c 2009-07-06 14:36:26 UTC (rev 21387)
@@ -195,7 +195,7 @@
if(node+1 > tree->node_next)
tree->node_next = node+1;
- node->bb = tree->bb_next;
+ node->bb = tree->bb_alloc + nid - 1;
tree->bb_next += 6;
return node;
Modified: branches/soc-2009-jaguarandi/source/blender/render/intern/source/rayshade.c
===================================================================
--- branches/soc-2009-jaguarandi/source/blender/render/intern/source/rayshade.c 2009-07-06 13:36:22 UTC (rev 21386)
+++ branches/soc-2009-jaguarandi/source/blender/render/intern/source/rayshade.c 2009-07-06 14:36:26 UTC (rev 21387)
@@ -348,15 +348,24 @@
void makeraytree(Render *re)
{
+ const char *tree_type = "Tree(unknown)";
+
#ifdef RE_RAYCOUNTER
+ if(re->r.raytrace_tree_type == R_RAYTRACE_TREE_BVH)
+ tree_type = "BVH";
+ if(re->r.raytrace_tree_type == R_RAYTRACE_TREE_BIH)
+ tree_type = "BIH";
+ if(re->r.raytrace_tree_type == R_RAYTRACE_TREE_BLIBVH)
+ tree_type = "BLIBVH";
+
if(re->r.raystructure == R_RAYSTRUCTURE_SINGLE_OCTREE)
printf("Building single octree\n");
else if(re->r.raystructure == R_RAYSTRUCTURE_SINGLE_BVH)
- printf("Building single tree\n");
+ printf("Building single tree(%s)\n", tree_type);
else if(re->r.raystructure == R_RAYSTRUCTURE_HIER_BVH_OCTREE)
- printf("Building tree of octrees\n");
+ printf("Building tree(%s) of octrees\n", tree_type);
else
- printf("Building tree of trees\n");
+ printf("Building tree(%s) of trees(%s)\n", tree_type, tree_type);
#endif
if(ELEM(re->r.raystructure, R_RAYSTRUCTURE_SINGLE_BVH, R_RAYSTRUCTURE_SINGLE_OCTREE))
More information about the Bf-blender-cvs
mailing list