copy UsesKill state in _mesa_combine_programs()
authorBrian <brian.paul@tungstengraphics.com>
Wed, 16 Jan 2008 20:54:32 +0000 (13:54 -0700)
committerBrian <brian.paul@tungstengraphics.com>
Wed, 16 Jan 2008 20:54:32 +0000 (13:54 -0700)
src/mesa/shader/program.c

index fc53b5737cb8a5df172d70e641f68f0d1cae6e63..3869e3171478d312848776eb423f29d4a42493cd 100644 (file)
@@ -497,6 +497,13 @@ _mesa_combine_programs(GLcontext *ctx,
    newProg->NumInstructions = newLength;
 
    if (newProg->Target == GL_FRAGMENT_PROGRAM_ARB) {
+      struct gl_fragment_program *fprogA, *fprogB, *newFprog;
+      fprogA = (struct gl_fragment_program *) progA;
+      fprogB = (struct gl_fragment_program *) progB;
+      newFprog = (struct gl_fragment_program *) newProg;
+
+      newFprog->UsesKill = fprogA->UsesKill || fprogB->UsesKill;
+
       /* connect color outputs/inputs */
       if ((progA->OutputsWritten & (1 << FRAG_RESULT_COLR)) &&
           (progB->InputsRead & (1 << FRAG_ATTRIB_COL0))) {