[Bf-blender-cvs] [cc667854a94] master: Fix T66372 Convert to mesh with subdivision breaks topology
Clément Foucault
noreply at git.blender.org
Wed Jul 3 21:06:36 CEST 2019
Commit: cc667854a94d782e252722e2581a692fa7ec2cac
Author: Clément Foucault
Date: Wed Jul 3 21:06:27 2019 +0200
Branches: master
https://developer.blender.org/rBcc667854a94d782e252722e2581a692fa7ec2cac
Fix T66372 Convert to mesh with subdivision breaks topology
This was caused by a check that was not taking the restart index into
account.
===================================================================
M source/blender/gpu/intern/gpu_element.c
===================================================================
diff --git a/source/blender/gpu/intern/gpu_element.c b/source/blender/gpu/intern/gpu_element.c
index 380de4c4e65..50e7df96503 100644
--- a/source/blender/gpu/intern/gpu_element.c
+++ b/source/blender/gpu/intern/gpu_element.c
@@ -204,7 +204,7 @@ static void squeeze_indices_short(GPUIndexBufBuilder *builder,
* converting in place to avoid extra allocation */
GLushort *data = (GLushort *)builder->data;
- if (max_index > 0xFFFF) {
+ if (max_index >= 0xFFFF) {
elem->base_index = min_index;
for (uint i = 0; i < index_len; ++i) {
data[i] = (values[i] == RESTART_INDEX) ? 0xFFFF : (GLushort)(values[i] - min_index);
More information about the Bf-blender-cvs
mailing list