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:
authorJeroen Bakker <jbakker>2020-07-17 14:47:10 +0300
committerJeroen Bakker <jeroen@blender.org>2020-07-17 14:47:53 +0300
commit9582797d4b50a18040e96ae07aa8c7643cbcc25a (patch)
treed7dc8cf7bd4b6e82cdd059699d86057d7101b330 /source/blender/draw/intern/draw_cache_extract.h
parentbf2bb6db26113d4c097d3f9201d40d295da223f5 (diff)
Fix T77867: Link Duplicate Object crashes during batch creation
When using link duplicated objects it could happen that one object is calculating the GPUBuffers and the second object is marking these buffers invalid. This introduces threading issues. This patch fixes this by combining the surface and surface per material batches. Most likely the surface per material batches are used and when requested you will most likely need the surface batch for the depth tests and overlays. During tests it slightly improves performance as batches aren't thrown away without using it. After this patch we can add a quick path for meshes with one material and two materials. Alternative approaches that have been checked: - sync extraction per object: reduced performance to much (-15%) ({D8292}) - post checks: reduced the threading issues, but didn't solve it. - separating preparation and execution of the extraction ({D8312}) Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D8329
Diffstat (limited to 'source/blender/draw/intern/draw_cache_extract.h')
-rw-r--r--source/blender/draw/intern/draw_cache_extract.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_cache_extract.h b/source/blender/draw/intern/draw_cache_extract.h
index f05e8e2f9d6..4156e2e79d8 100644
--- a/source/blender/draw/intern/draw_cache_extract.h
+++ b/source/blender/draw/intern/draw_cache_extract.h
@@ -170,8 +170,7 @@ typedef enum DRWBatchFlag {
MBC_WIRE_EDGES = (1 << 23),
MBC_WIRE_LOOPS = (1 << 24),
MBC_WIRE_LOOPS_UVS = (1 << 25),
- MBC_SURF_PER_MAT = (1 << 26),
- MBC_SKIN_ROOTS = (1 << 27),
+ MBC_SKIN_ROOTS = (1 << 26),
} DRWBatchFlag;
#define MBC_EDITUV \