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:
authorJoseph Eagar <joeedh@gmail.com>2022-07-04 11:34:54 +0300
committerJoseph Eagar <joeedh@gmail.com>2022-07-04 11:34:54 +0300
commit3f5073a8e298c474fac36f7193d291e6f9579277 (patch)
tree46d614fdbb99b94e556be552e4379cd1d2d37e2f /source/blender/draw/intern/draw_cache_impl_subdivision.cc
parent7be07a9d6e26fde833e24957e8263e5e07af8d2f (diff)
Fix T98884: Fix edge case crashes in gpu subdiv cache code
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl_subdivision.cc')
-rw-r--r--source/blender/draw/intern/draw_cache_impl_subdivision.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_subdivision.cc b/source/blender/draw/intern/draw_cache_impl_subdivision.cc
index afec92a894d..29ab814cfa4 100644
--- a/source/blender/draw/intern/draw_cache_impl_subdivision.cc
+++ b/source/blender/draw/intern/draw_cache_impl_subdivision.cc
@@ -1470,6 +1470,11 @@ void draw_subdiv_interp_custom_data(const DRWSubdivCache *cache,
{
GPUShader *shader = nullptr;
+ if (!draw_subdiv_cache_need_polygon_data(cache)) {
+ /* Happens on meshes with only loose geometry. */
+ return;
+ }
+
if (dimensions == 1) {
shader = get_subdiv_shader(SHADER_COMP_CUSTOM_DATA_INTERP_1D,
"#define SUBDIV_POLYGON_OFFSET\n"