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:
authorClément Foucault <foucault.clem@gmail.com>2019-09-17 17:18:08 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-09-17 17:22:11 +0300
commit884a3852873f392c1678a1142005da69d0e4cb32 (patch)
tree3d6e4b4c1b1fc86dd4e23944004749fb134b2a11
parent41d6d1463f8e86dd6cc65ec4d1290957580c48f7 (diff)
GPU: Fix broken assert
-rw-r--r--source/blender/gpu/intern/gpu_batch.c6
1 files changed, 3 insertions, 3 deletions
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) {