Mesa (arb_geometry_shader4): gs: allocate primitives

Zack Rusin zack at kemper.freedesktop.org
Tue Jul 14 04:23:04 UTC 2009


Module: Mesa
Branch: arb_geometry_shader4
Commit: be2e807f8113c8b491d84755847c86fc9c8a51c3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=be2e807f8113c8b491d84755847c86fc9c8a51c3

Author: Zack Rusin <zackr at vmware.com>
Date:   Tue Jul 14 00:26:59 2009 -0400

gs: allocate primitives

---

 src/gallium/auxiliary/draw/draw_gs.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/gallium/auxiliary/draw/draw_gs.c b/src/gallium/auxiliary/draw/draw_gs.c
index a51cae9..7ee5978 100644
--- a/src/gallium/auxiliary/draw/draw_gs.c
+++ b/src/gallium/auxiliary/draw/draw_gs.c
@@ -37,6 +37,8 @@
 #include "util/u_memory.h"
 
 #define MAX_PRIM_VERTICES 6
+/* fixme: move it from here */
+#define MAX_PRIMITIVES 128
 
 boolean
 draw_gs_init( struct draw_context *draw )
@@ -53,6 +55,10 @@ draw_gs_init( struct draw_context *draw )
    if (!draw->gs.machine.Outputs)
       return FALSE;
 
+   draw->gs.machine.Primitives = align_malloc(MAX_PRIMITIVES * sizeof(struct tgsi_exec_vector), 16);
+   if (!draw->gs.machine.Primitives)
+      return FALSE;
+
    return TRUE;
 }
 




More information about the mesa-commit mailing list