diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-09-17 17:18:08 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-09-17 17:22:11 +0300 |
commit | 884a3852873f392c1678a1142005da69d0e4cb32 (patch) | |
tree | 3d6e4b4c1b1fc86dd4e23944004749fb134b2a11 /source/blender | |
parent | 41d6d1463f8e86dd6cc65ec4d1290957580c48f7 (diff) |
GPU: Fix broken assert
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/gpu/intern/gpu_batch.c | 6 |
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) { |