FIx/workaround wrong number of primitives in PBVG grid buffers
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 11 Sep 2018 12:41:39 +0000 (14:41 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 11 Sep 2018 12:45:13 +0000 (14:45 +0200)
commit8dde1e13e26b78295e112fccac0b2c4dfbd42e3c
tree406876386f522888a495cc667ba64d142b91ffba
parent7951adfb9c814bfac30549e3d74ef62a2634684e
FIx/workaround wrong number of primitives in PBVG grid buffers

Nodes can have different number of grids, so can not so simply
re-use index buffer across nodes. For now allow re-using buffer
if number of grids matches.

The issue is, number of grids is probably almost never matches,
so in order to have this optimization working need more tricks.
Maybe we can "instance" index buffers?
source/blender/gpu/intern/gpu_buffers.c