Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-08-11 02:58:23 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-13 15:20:24 +0300
commitac60a67b3f6eacbcff5b5c4716fd5e3902511a29 (patch)
tree486054624ca8c881751b2569cc872b37fb0b8695 /source/blender/draw/intern/draw_cache_inline.h
parentefc97b3919ea4fd46b9d2e931ca3fea27e7ea31c (diff)
Cleanup: GPU: Remove Batch vao cache reset
This is done at drawtime automatically.
Diffstat (limited to 'source/blender/draw/intern/draw_cache_inline.h')
-rw-r--r--source/blender/draw/intern/draw_cache_inline.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/draw/intern/draw_cache_inline.h b/source/blender/draw/intern/draw_cache_inline.h
index 0d24f2e450b..0f0e1785a2a 100644
--- a/source/blender/draw/intern/draw_cache_inline.h
+++ b/source/blender/draw/intern/draw_cache_inline.h
@@ -72,8 +72,7 @@ BLI_INLINE void DRW_ibo_request(GPUBatch *batch, GPUIndexBuf **ibo)
*ibo = GPU_indexbuf_calloc();
}
if (batch != NULL) {
- GPU_batch_vao_cache_clear(batch);
- batch->elem = *ibo;
+ GPU_batch_elembuf_set(batch, *ibo, false);
}
}
@@ -92,8 +91,7 @@ BLI_INLINE void DRW_vbo_request(GPUBatch *batch, GPUVertBuf **vbo)
if (batch != NULL) {
/* HACK set first vbo if not init. */
if (batch->verts[0] == NULL) {
- GPU_batch_vao_cache_clear(batch);
- batch->verts[0] = *vbo;
+ GPU_batch_vertbuf_add(batch, *vbo);
}
else {
/* HACK: bypass assert */