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:
authorHans Goudey <h.goudey@me.com>2022-05-09 18:36:54 +0300
committerHans Goudey <h.goudey@me.com>2022-05-09 18:39:22 +0300
commitf9d7313bb7ddee9c8bbf5718a3302eb925d9144a (patch)
tree9f63f7e9b6a98e1a8f9dd34e0ea3b312ce4190b9 /source/blender/draw/intern/draw_cache_extract_mesh.cc
parente0e95f789576fec43550ef8aae8ae94151f7967f (diff)
Fix T97853: Crash with edit mode X-ray and subdivision
The mesh drawing code used a different mesh to check whether or not to draw face dots and to actually retrieve them. The fix is moving the responsibility of determining whether to use subsurf face dots to the creation of `MeshRenderData` where the mesh used for drawing is known, rather than doing it at a higher level. Differential Revision: https://developer.blender.org/D14855
Diffstat (limited to 'source/blender/draw/intern/draw_cache_extract_mesh.cc')
-rw-r--r--source/blender/draw/intern/draw_cache_extract_mesh.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/source/blender/draw/intern/draw_cache_extract_mesh.cc b/source/blender/draw/intern/draw_cache_extract_mesh.cc
index 8a7b4fc9703..ec544d8e786 100644
--- a/source/blender/draw/intern/draw_cache_extract_mesh.cc
+++ b/source/blender/draw/intern/draw_cache_extract_mesh.cc
@@ -563,7 +563,6 @@ static void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph,
const float obmat[4][4],
const bool do_final,
const bool do_uvedit,
- const bool use_subsurf_fdots,
const Scene *scene,
const ToolSettings *ts,
const bool use_hide)
@@ -687,7 +686,7 @@ static void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph,
MeshRenderData *mr = mesh_render_data_create(
object, me, is_editmode, is_paint_mode, is_mode_active, obmat, do_final, do_uvedit, ts);
mr->use_hide = use_hide;
- mr->use_subsurf_fdots = use_subsurf_fdots;
+ mr->use_subsurf_fdots = mr->me && mr->me->runtime.subsurf_face_dot_tags != nullptr;
mr->use_final_mesh = do_final;
#ifdef DEBUG_TIME
@@ -919,7 +918,6 @@ void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph,
const float obmat[4][4],
const bool do_final,
const bool do_uvedit,
- const bool use_subsurf_fdots,
const Scene *scene,
const ToolSettings *ts,
const bool use_hide)
@@ -935,7 +933,6 @@ void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph,
obmat,
do_final,
do_uvedit,
- use_subsurf_fdots,
scene,
ts,
use_hide);