Mesa (master): softpipe: small cleanup

Zack Rusin zack at kemper.freedesktop.org
Sat Jun 12 07:45:50 PDT 2010


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

Author: Zack Rusin <zackr at vmware.com>
Date:   Sat Jun 12 10:40:39 2010 -0400

softpipe: small cleanup

---

 src/gallium/drivers/softpipe/sp_state_so.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/softpipe/sp_state_so.c b/src/gallium/drivers/softpipe/sp_state_so.c
index 27acd3d..cfe23f9 100644
--- a/src/gallium/drivers/softpipe/sp_state_so.c
+++ b/src/gallium/drivers/softpipe/sp_state_so.c
@@ -89,6 +89,8 @@ softpipe_set_stream_output_buffers(struct pipe_context *pipe,
    void *map_buffers[PIPE_MAX_SO_BUFFERS];
 
    assert(num_buffers <= PIPE_MAX_SO_BUFFERS);
+   if (num_buffers > PIPE_MAX_SO_BUFFERS)
+      num_buffers = PIPE_MAX_SO_BUFFERS;
 
    softpipe->dirty |= SP_NEW_SO_BUFFERS;
 
@@ -99,7 +101,7 @@ softpipe_set_stream_output_buffers(struct pipe_context *pipe,
       if (!res) {
          /* the whole call is invalid, bail out */
          softpipe->so_target.num_buffers = 0;
-         draw_set_mapped_so_buffers(softpipe->draw, map_buffers, 0);
+         draw_set_mapped_so_buffers(softpipe->draw, 0, 0);
          return;
       }
 



More information about the mesa-commit mailing list