Skip to content

Commit

Permalink
Merge branch 'workaround/initcheck_bvh' into 'main'
Browse files Browse the repository at this point in the history
Add initialization to workaround threadfence issues in compute-sanitizer initcheck

See merge request omniverse/warp!737
  • Loading branch information
shi-eric committed Sep 19, 2024
2 parents aef5f0c + 20c5687 commit 2fce3a7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions warp/native/bvh.cu
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,9 @@ void bvh_create_device(void* context, vec3* lowers, vec3* uppers, int num_items,
bvh_host.num_items = num_items;
bvh_host.max_nodes = 2*num_items;
bvh_host.node_lowers = (BVHPackedNodeHalf*)alloc_device(WP_CURRENT_CONTEXT, sizeof(BVHPackedNodeHalf)*bvh_host.max_nodes);
memset_device(WP_CURRENT_CONTEXT, bvh_host.node_lowers, 0, sizeof(BVHPackedNodeHalf)*bvh_host.max_nodes);
bvh_host.node_uppers = (BVHPackedNodeHalf*)alloc_device(WP_CURRENT_CONTEXT, sizeof(BVHPackedNodeHalf)*bvh_host.max_nodes);
memset_device(WP_CURRENT_CONTEXT, bvh_host.node_uppers, 0, sizeof(BVHPackedNodeHalf)*bvh_host.max_nodes);
bvh_host.node_parents = (int*)alloc_device(WP_CURRENT_CONTEXT, sizeof(int)*bvh_host.max_nodes);
bvh_host.node_counts = (int*)alloc_device(WP_CURRENT_CONTEXT, sizeof(int)*bvh_host.max_nodes);
bvh_host.root = (int*)alloc_device(WP_CURRENT_CONTEXT, sizeof(int));
Expand Down

0 comments on commit 2fce3a7

Please sign in to comment.