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:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2022-05-04 20:31:53 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2022-05-04 20:31:53 +0300
commitfc0f6d19adae47cfb2d0abd31f4b44395179cb89 (patch)
treec12922e73afec9ebd3901a649ae21901c37ec041 /source/blender
parent5d7ee444065021ab52d293c07638275611e826de (diff)
Fix T96845: artifacts with GPU subdivision and mirror modifier
The coarse polygon count was set to the one of the BMesh instead of the the one of the mesh used for subdivision, which caused the compute shaders to output wrong data.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/draw/intern/draw_cache_impl_subdivision.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_subdivision.cc b/source/blender/draw/intern/draw_cache_impl_subdivision.cc
index 19745304b2d..7d245f4158b 100644
--- a/source/blender/draw/intern/draw_cache_impl_subdivision.cc
+++ b/source/blender/draw/intern/draw_cache_impl_subdivision.cc
@@ -1143,7 +1143,7 @@ static void draw_subdiv_init_ubo_storage(const DRWSubdivCache *cache,
ubo->max_patch_face = cache->gpu_patch_map.max_patch_face;
ubo->max_depth = cache->gpu_patch_map.max_depth;
ubo->patches_are_triangular = cache->gpu_patch_map.patches_are_triangular;
- ubo->coarse_poly_count = cache->bm ? cache->bm->totface : cache->num_coarse_poly;
+ ubo->coarse_poly_count = cache->num_coarse_poly;
ubo->optimal_display = cache->optimal_display;
ubo->num_subdiv_loops = cache->num_subdiv_loops;
ubo->edge_loose_offset = cache->num_subdiv_loops * 2;