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-04-27 11:22:07 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2022-04-27 11:22:07 +0300
commit68ca12a7fc0eea117103d894609eb46c169ec88b (patch)
tree5054737e592d72b31dcc6036d9eed8c57b4c8f58 /source/blender/makesdna/DNA_mesh_types.h
parent9a8669ac81b99b2648b12e936bfcbc8a69a0fbbb (diff)
Fix T96283: last disabled subsurf is used for GPU subdivision
When more than one, consecutive, subdivision modifier is used on a Mesh, the last subsurf modifier is used for GPU subdivision even though it might be disabled. This is because retrieving the last subsurf modifier in the draw code did not check whether the modifier was disabled or not. To fix this, the session UUID of the modifier which delegated evaluation to the GPU code is cached and used in the draw to select the right subsurf modifier. Differential Revision: https://developer.blender.org/D14488
Diffstat (limited to 'source/blender/makesdna/DNA_mesh_types.h')
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index cd4676ee08e..1f8ff182510 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -10,6 +10,7 @@
#include "DNA_ID.h"
#include "DNA_customdata_types.h"
#include "DNA_defs.h"
+#include "DNA_session_uuid_types.h"
#ifdef __cplusplus
extern "C" {
@@ -120,11 +121,12 @@ typedef struct Mesh_Runtime {
*/
char wrapper_type_finalize;
- int subsurf_resolution;
/**
* Settings for lazily evaluating the subdivision on the CPU if needed. These are
* set in the modifier when GPU subdivision can be performed.
*/
+ SessionUUID subsurf_session_uuid;
+ int subsurf_resolution;
char subsurf_apply_render;
char subsurf_use_optimal_display;