Mesa (master): draw: allow overflows in the llvm paths

Zack Rusin zack at kemper.freedesktop.org
Tue Jun 25 16:02:34 UTC 2013


Module: Mesa
Branch: master
Commit: 29dacd98038efa5b5056464167cb30290c41a090
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=29dacd98038efa5b5056464167cb30290c41a090

Author: Zack Rusin <zackr at vmware.com>
Date:   Mon Jun 24 18:52:24 2013 -0400

draw: allow overflows in the llvm paths

Because our code couldn't handle it we were skipping rendering
if we detected overflows. According to the spec we should
still render but with all 0 vertices, which is what the llvm
code already does. So for the llvm paths lets enable processing
even if an overflow condition has been detected.

Signed-off-by: Zack Rusin <zackr at vmware.com>
Reviewed-by: Jose Fonseca <jfonseca at vmware.com>
Reviewed-by: Roland Scheidegger <sroland at vmware.com>

---

 src/gallium/auxiliary/draw/draw_pt.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/gallium/auxiliary/draw/draw_pt.c b/src/gallium/auxiliary/draw/draw_pt.c
index 720d7b1..e0b8007 100644
--- a/src/gallium/auxiliary/draw/draw_pt.c
+++ b/src/gallium/auxiliary/draw/draw_pt.c
@@ -508,11 +508,15 @@ draw_vbo(struct draw_context *draw,
                                      draw->pt.vertex_element,
                                      draw->pt.nr_vertex_elements,
                                      info);
-
-   if (index_limit == 0) {
+#if HAVE_LLVM
+   if (!draw->llvm)
+#endif
+   {
+      if (index_limit == 0) {
       /* one of the buffers is too small to do any valid drawing */
-      debug_warning("draw: VBO too small to draw anything\n");
-      return;
+         debug_warning("draw: VBO too small to draw anything\n");
+         return;
+      }
    }
 
    /* If we're collecting stats then make sure we start from scratch */




More information about the mesa-commit mailing list