patch-intern_cycles_bvh_bvh_build_cpp 1.4 KB

12345678910111213141516171819202122232425262728293031
  1. $OpenBSD: patch-intern_cycles_bvh_bvh_build_cpp,v 1.1 2017/05/27 06:54:40 espie Exp $
  2. You can't fudge allocator value_type.
  3. Index: intern/cycles/bvh/bvh_build.cpp
  4. --- intern/cycles/bvh/bvh_build.cpp.orig
  5. +++ intern/cycles/bvh/bvh_build.cpp
  6. @@ -905,12 +905,13 @@ BVHNode* BVHBuild::create_leaf_node(const BVHRange& ra
  7. * can not control.
  8. */
  9. typedef StackAllocator<256, int> LeafStackAllocator;
  10. + typedef StackAllocator<256, float2> LeafStackAllocatorf;
  11. typedef StackAllocator<256, BVHReference> LeafReferenceStackAllocator;
  12. vector<int, LeafStackAllocator> p_type[PRIMITIVE_NUM_TOTAL];
  13. vector<int, LeafStackAllocator> p_index[PRIMITIVE_NUM_TOTAL];
  14. vector<int, LeafStackAllocator> p_object[PRIMITIVE_NUM_TOTAL];
  15. - vector<float2, LeafStackAllocator> p_time[PRIMITIVE_NUM_TOTAL];
  16. + vector<float2, LeafStackAllocatorf> p_time[PRIMITIVE_NUM_TOTAL];
  17. vector<BVHReference, LeafReferenceStackAllocator> p_ref[PRIMITIVE_NUM_TOTAL];
  18. /* TODO(sergey): In theory we should be able to store references. */
  19. @@ -964,7 +965,7 @@ BVHNode* BVHBuild::create_leaf_node(const BVHRange& ra
  20. vector<int, LeafStackAllocator> local_prim_type,
  21. local_prim_index,
  22. local_prim_object;
  23. - vector<float2, LeafStackAllocator> local_prim_time;
  24. + vector<float2, LeafStackAllocatorf> local_prim_time;
  25. local_prim_type.resize(num_new_prims);
  26. local_prim_index.resize(num_new_prims);
  27. local_prim_object.resize(num_new_prims);