[Bf-blender-cvs] [dc7a82e] GPU_data_request: tweak GPUx draw to use actual max index
Mike Erwin
noreply at git.blender.org
Mon Apr 6 22:05:22 CEST 2015
Commit: dc7a82e5e59a1682ebd83c41f46e3b1bb5ceab75
Author: Mike Erwin
Date: Mon Apr 6 15:43:59 2015 -0400
Branches: GPU_data_request
https://developer.blender.org/rBdc7a82e5e59a1682ebd83c41f46e3b1bb5ceab75
tweak GPUx draw to use actual max index
instead of max allowed index.
This is a looser restriction than before.
===================================================================
M source/blender/gpu/intern/gpux_draw.c
===================================================================
diff --git a/source/blender/gpu/intern/gpux_draw.c b/source/blender/gpu/intern/gpux_draw.c
index e058354..c5d26b1 100644
--- a/source/blender/gpu/intern/gpux_draw.c
+++ b/source/blender/gpu/intern/gpux_draw.c
@@ -22,7 +22,7 @@ void GPUx_draw_points(const CommonDrawState *common_state, const PointDrawState
#ifdef TRUST_NO_ONE
if (el) {
assert(el->prim_type == GL_POINTS);
- assert(el->max_allowed_index < GPUx_vertex_ct(vbo));
+ assert(max_index(el) < GPUx_vertex_ct(vbo));
}
#endif /* TRUST_NO_ONE */
@@ -46,7 +46,7 @@ void GPUx_draw_lines(const CommonDrawState *common_state, const LineDrawState *l
#ifdef TRUST_NO_ONE
if (el) {
assert(el->prim_type == GL_LINES);
- assert(el->max_allowed_index < GPUx_vertex_ct(vbo));
+ assert(max_index(el) < GPUx_vertex_ct(vbo));
}
#endif /* TRUST_NO_ONE */
@@ -70,7 +70,7 @@ void GPUx_draw_triangles(const CommonDrawState *common_state, const PolygonDrawS
#ifdef TRUST_NO_ONE
if (el) {
assert(el->prim_type == GL_TRIANGLES);
- assert(el->max_allowed_index < GPUx_vertex_ct(vbo));
+ assert(max_index(el) < GPUx_vertex_ct(vbo));
}
#endif /* TRUST_NO_ONE */
@@ -91,7 +91,7 @@ void GPUx_draw_primitives(const CommonDrawState *common_state, const void *primi
int vert_per_prim = 0;
#ifdef TRUST_NO_ONE
- assert(el->max_allowed_index < GPUx_vertex_ct(vbo));
+ assert(max_index(el) < GPUx_vertex_ct(vbo));
#endif /* TRUST_NO_ONE */
switch (el->prim_type) {
More information about the Bf-blender-cvs
mailing list