diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-09-11 16:32:02 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-09-11 16:34:09 +0300 |
commit | eaf993ad9472dcd22e005c4a1d4df8920a98aed4 (patch) | |
tree | 48402b847a90cf23f8a598b92cd1e6b17916b753 /source/blender/blenkernel | |
parent | cde66d791650dc69478eefba4d0e2f932732a8eb (diff) |
Followup for previous PBVH commit
Didn't realize the index buffer is stored once in a BVH
and same pointer is reused. Surprisingly, simple files
were fixed with the previous fix.
Now disabled the optimization all together, and it was
simpler to just completely remove all residue of the
code. It is likely to be a different implementation
anyway, so no need to try to keep code in a semi-broken
state.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/pbvh.c | 3 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/pbvh_intern.h | 5 |
2 files changed, 1 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c index 611e409b0aa..65fc02c71c2 100644 --- a/source/blender/blenkernel/intern/pbvh.c +++ b/source/blender/blenkernel/intern/pbvh.c @@ -637,7 +637,6 @@ void BKE_pbvh_free(PBVH *bvh) BLI_gset_free(node->bm_other_verts, NULL); } } - GPU_pbvh_multires_buffers_free(&bvh->grid_common_gpu_buffer); if (bvh->deformed) { if (bvh->verts) { @@ -1122,7 +1121,7 @@ static void pbvh_update_draw_buffers(PBVH *bvh, PBVHNode **nodes, int totnode) node->totprim, bvh->grid_hidden, bvh->gridkey.grid_size, - &bvh->gridkey, &bvh->grid_common_gpu_buffer); + &bvh->gridkey); break; case PBVH_FACES: node->draw_buffers = diff --git a/source/blender/blenkernel/intern/pbvh_intern.h b/source/blender/blenkernel/intern/pbvh_intern.h index 4aef97bda47..ea8bd1933cd 100644 --- a/source/blender/blenkernel/intern/pbvh_intern.h +++ b/source/blender/blenkernel/intern/pbvh_intern.h @@ -144,11 +144,6 @@ struct PBVH { const DMFlagMat *grid_flag_mats; int totgrid; BLI_bitmap **grid_hidden; - /* index_buf of GPU_PBVH_Buffers can be the same for all 'fully drawn' nodes (same size). - * Previously was stored in a static var in gpu_buffer.c, but this breaks in case we handle several different - * objects in sculpt mode with different sizes at the same time, so now storing that common gpu buffer - * in an opaque pointer per pbvh. See T47637. */ - struct GridCommonGPUBuffer *grid_common_gpu_buffer; /* Only used during BVH build and update, * don't need to remain valid after */ |