Mesa (gallium-mesa-7.4): draw: reset extra_vp_outputs. slot to zero in widepoint_flush()

Brian Paul brianp at kemper.freedesktop.org
Mon Jun 1 21:08:19 UTC 2009


Module: Mesa
Branch: gallium-mesa-7.4
Commit: dcf6fe16e03f7baddbf7789cbf3ca31e0ed529b2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=dcf6fe16e03f7baddbf7789cbf3ca31e0ed529b2

Author: Brian Paul <brianp at vmware.com>
Date:   Mon Jun  1 15:07:07 2009 -0600

draw: reset extra_vp_outputs.slot to zero in widepoint_flush()

Fixes a crash when clearing the window with a quad after drawing large
points.  We were asking the draw module how many vertex shader outputs
there were and got 3 instead of 2.  This led to creating vertices with
too many attributes and trying to read invalid memory.

We reset extra_vp_outputs.slot to zero in the aaline/aapoint stage's
flush functions already.
This omission was just an oversight in the wide_point stage.

(cherry picked from commit 427554211b5b8ab2c6afcd5bd574ac97fb3457da)

---

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

diff --git a/src/gallium/auxiliary/draw/draw_pipe_wide_point.c b/src/gallium/auxiliary/draw/draw_pipe_wide_point.c
index e1af9e5..99ef2d3 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_wide_point.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_wide_point.c
@@ -253,6 +253,7 @@ static void widepoint_flush( struct draw_stage *stage, unsigned flags )
 {
    stage->point = widepoint_first_point;
    stage->next->flush( stage->next, flags );
+   stage->draw->extra_vp_outputs.slot = 0;
 }
 
 




More information about the mesa-commit mailing list