summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-01-07 14:16:27 -0700
committerBrian Paul <[email protected]>2012-01-07 14:16:27 -0700
commitf0f623a9075107461438468e1aea6bca3a3234f3 (patch)
tree4db272593d79d692e1a30147f110260c840c30be
parent94bf2d48e19b86a4cfa4ff3bf3da97967f8a2793 (diff)
draw: replace assert(0) with debug_warn_once()
If the assertion was hit, it probably meant that we were unable to allocate or map a vertex buffer. Instead of dying in a debug build, issue a warning and continue.
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_emit.c4
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_fetch_emit.c4
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_emit.c b/src/gallium/auxiliary/draw/draw_pt_emit.c
index fbbaa8138f4..942ddc4d7bc 100644
--- a/src/gallium/auxiliary/draw/draw_pt_emit.c
+++ b/src/gallium/auxiliary/draw/draw_pt_emit.c
@@ -150,7 +150,7 @@ draw_pt_emit(struct pt_emit *emit,
hw_verts = render->map_vertices( render );
if (!hw_verts) {
- assert(0);
+ debug_warn_once("map of vertex buffer failed (out of memory?)");
return;
}
@@ -262,7 +262,7 @@ draw_pt_emit_linear(struct pt_emit *emit,
return;
fail:
- assert(0);
+ debug_warn_once("allocate or map of vertex buffer failed (out of memory?)");
return;
}
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c b/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c
index 84850812f3a..f30db1386cc 100644
--- a/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c
+++ b/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c
@@ -201,7 +201,7 @@ static void fetch_emit_run( struct draw_pt_middle_end *middle,
hw_verts = draw->render->map_vertices( draw->render );
if (!hw_verts) {
- assert(0);
+ debug_warn_once("vertex buffer allocation failed (out of memory?)");
return;
}
@@ -292,7 +292,7 @@ static void fetch_emit_run_linear( struct draw_pt_middle_end *middle,
return;
fail:
- assert(0);
+ debug_warn_once("allocate or map of vertex buffer failed (out of memory?)");
return;
}
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c
index b875f64e3b2..870b23bbf58 100644
--- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c
+++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c
@@ -236,7 +236,7 @@ fse_run_linear(struct draw_pt_middle_end *middle,
return;
fail:
- assert(0);
+ debug_warn_once("allocate or map of vertex buffer failed (out of memory?)");
return;
}
@@ -293,7 +293,7 @@ fse_run(struct draw_pt_middle_end *middle,
return;
fail:
- assert(0);
+ debug_warn_once("allocate or map of vertex buffer failed (out of memory?)");
return;
}