diff options
author | Jacques Lucke <jacques@blender.org> | 2022-02-22 15:52:15 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-02-22 15:52:15 +0300 |
commit | 4e78a7360e451b4e2c99e8fb88d6701bc8f13618 (patch) | |
tree | 5064d39db37eab5b50411225363bf589dead50de /source/blender/gpu/intern | |
parent | 0ad4d2694bae7f4db551138ec79a46f8f7e57bba (diff) |
Fix T93784: text and curve objects have no motion blur
Previously, objects and geometries were mapped between frames
using different hash tables in a way that is incompatible with
geometry instances. That is because the geometry mapping happened
without looking at the `persistent_id` of instances, which is not possible
anymore. Now, there is just one mapping that identifies the same
object at multiple points in time.
There are also two new caches for duplicated vbos and textures used for
motion blur. This data has to be duplicated, otherwise it would be freed
when another time step is evaluated. This caching existed before, but is
now a bit more explicit and works for geometry instances as well.
Differential Revision: https://developer.blender.org/D13497
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r-- | source/blender/gpu/intern/gpu_batch.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_batch.cc b/source/blender/gpu/intern/gpu_batch.cc index 2874dea775f..7ad2786ab22 100644 --- a/source/blender/gpu/intern/gpu_batch.cc +++ b/source/blender/gpu/intern/gpu_batch.cc @@ -207,6 +207,16 @@ int GPU_batch_vertbuf_add_ex(GPUBatch *batch, GPUVertBuf *verts, bool own_vbo) return -1; } +bool GPU_batch_vertbuf_has(GPUBatch *batch, GPUVertBuf *verts) +{ + for (uint v = 0; v < GPU_BATCH_VBO_MAX_LEN; v++) { + if (batch->verts[v] == verts) { + return true; + } + } + return false; +} + /** \} */ /* -------------------------------------------------------------------- */ |