Mesa (master): draw: Allocate the output buffer for output primitives

Zack Rusin zack at kemper.freedesktop.org
Thu Mar 28 00:07:09 UTC 2013


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

Author: Zack Rusin <zackr at vmware.com>
Date:   Tue Mar 26 12:32:30 2013 -0700

draw: Allocate the output buffer for output primitives

We were allocating the output buffer but using the input
primitives. We need to allocate that buffer using the
maximum number of output, not input, primitives.

Signed-off-by: Zack Rusin <zackr at vmware.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
Reviewed-by: José Fonseca <jfonseca at vmware.com>

---

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

diff --git a/src/gallium/auxiliary/draw/draw_gs.c b/src/gallium/auxiliary/draw/draw_gs.c
index c8ed95a..0115d47 100644
--- a/src/gallium/auxiliary/draw/draw_gs.c
+++ b/src/gallium/auxiliary/draw/draw_gs.c
@@ -506,10 +506,9 @@ int draw_geometry_shader_run(struct draw_geometry_shader *shader,
    output_verts->stride = output_verts->vertex_size;
    output_verts->verts =
       (struct vertex_header *)MALLOC(output_verts->vertex_size *
-                                     num_in_primitives *
+                                     max_out_prims *
                                      shader->max_output_vertices);
 
-
 #if 0
    debug_printf("%s count = %d (in prims # = %d)\n",
                 __FUNCTION__, num_input_verts, num_in_primitives);




More information about the mesa-commit mailing list