draw: fix missing immediates bug in polygon stipple code
authorBrian Paul <brianp@vmware.com>
Fri, 23 Mar 2012 20:53:48 +0000 (14:53 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 28 Mar 2012 17:43:18 +0000 (11:43 -0600)
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

index 62c54b35bc75756e97a5262e8149eb54af47256e..cfb6ef4453a816b54da8ba5fd6909af521cc45e2 100644 (file)
@@ -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++;
 }