Commit: 884a3852873f392c1678a1142005da69d0e4cb32
Author: Clément Foucault
Date: Tue Sep 17 16:18:08 2019 +0200
Branches: master
https://developer.blender.org/rB884a3852873f392c1678a1142005da69d0e4cb32
GPU: Fix broken assert
===================================================================
M source/blender/gpu/intern/gpu_batch.c
===================================================================
diff --git a/source/blender/gpu/intern/gpu_batch.c
b/source/blender/gpu/intern/gpu_batch.c
index e0d77f37512..bc750fb74c9 100644
--- a/source/blender/gpu/intern/gpu_batch.c
+++ b/source/blender/gpu/intern/gpu_batch.c
@@ -676,9 +676,9 @@ void GPU_batch_draw_advanced(GPUBatch *batch, int v_first,
int v_count, int i_fi
}
/* Verify there is enough data do draw. */
- BLI_assert(i_first + i_count <= batch->inst ? batch->inst->vertex_len : 1);
- BLI_assert(v_first + v_count <= batch->elem ? batch->elem->index_len :
- batch->verts[0]->vertex_len);
+ BLI_assert(i_first + i_count <= (batch->inst ? batch->inst->vertex_len :
INT_MAX));
+ BLI_assert(v_first + v_count <=
+ (batch->elem ? batch->elem->index_len :
batch->verts[0]->vertex_len));
if (!GPU_arb_base_instance_is_supported()) {
if (i_first > 0) {
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs