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 20:56:36 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-09-17 20:56:43 +0300
commite13a2cde28d715f6ff501d46b0f8b4ab37b95603 (patch)
tree1ccbb567e90f738580147771603bef07b03b43fe
parent3009429c9045f70a199d6568a79b2dcbad78d095 (diff)
GPU: Comment incorrect asserts
These asserts are too simple and triggers false positive.
-rw-r--r--source/blender/gpu/intern/gpu_batch.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_batch.c b/source/blender/gpu/intern/gpu_batch.c
index bc750fb74c9..9c0c001b979 100644
--- a/source/blender/gpu/intern/gpu_batch.c
+++ b/source/blender/gpu/intern/gpu_batch.c
@@ -676,9 +676,12 @@ 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 : INT_MAX));
- BLI_assert(v_first + v_count <=
- (batch->elem ? batch->elem->index_len : batch->verts[0]->vertex_len));
+ /* TODO(fclem) Nice to have but this is invalid when using procedural drawcalls.
+ * The right assert would be to check if there is an enabled attrib from each VBO
+ * and check their length. */
+ // 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) {