Mesa (master): draw: fix missing immediates bug in polygon stipple code

Brian Paul brianp at kemper.freedesktop.org
Wed Mar 28 17:43:51 UTC 2012


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

Author: Brian Paul <brianp at vmware.com>
Date:   Fri Mar 23 14:53:48 2012 -0600

draw: fix missing immediates bug in polygon stipple code

The function that counts the number of TGSI immediates also needs to
emit the immediates.  This fixes assorted failures when using polygon
stipple with fragment shaders that have their own immediates.

NOTE: This is a candidate for the 8.0 branch.

---

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

diff --git a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
index 62c54b3..cfb6ef4 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
@@ -165,11 +165,16 @@ pstip_transform_decl(struct tgsi_transform_context *ctx,
 }
 
 
+/**
+ * TGSI immediate declaration transform callback.
+ * We're just counting the number of immediates here.
+ */
 static void
 pstip_transform_immed(struct tgsi_transform_context *ctx,
                       struct tgsi_full_immediate *immed)
 {
    struct pstip_transform_context *pctx = (struct pstip_transform_context *) ctx;
+   ctx->emit_immediate(ctx, immed); /* emit to output shader */
    pctx->numImmed++;
 }
 




More information about the mesa-commit mailing list