Mesa (mesa_7_7_branch): tnl: set FOGC result to (f,0,0,1)

Brian Paul brianp at kemper.freedesktop.org
Thu Jan 7 00:44:03 UTC 2010


Module: Mesa
Branch: mesa_7_7_branch
Commit: 8485811f10142f54756d876ebe91193bfc8f8a0e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8485811f10142f54756d876ebe91193bfc8f8a0e

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Jan  6 17:42:53 2010 -0700

tnl: set FOGC result to (f,0,0,1)

Fixed FDO bug 23397.

---

 src/mesa/tnl/t_vb_program.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c
index e69f7d5..a9dae7d 100644
--- a/src/mesa/tnl/t_vb_program.c
+++ b/src/mesa/tnl/t_vb_program.c
@@ -390,6 +390,13 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage )
 #endif
          COPY_4V(store->results[attr].data[i], machine.Outputs[attr]);
       }
+
+      /* FOGC is a special case.  Fragment shader expects (f,0,0,1) */
+      if (program->Base.OutputsWritten & BITFIELD64_BIT(VERT_RESULT_FOGC)) {
+         store->results[VERT_RESULT_FOGC].data[i][1] = 0.0;
+         store->results[VERT_RESULT_FOGC].data[i][2] = 0.0;
+         store->results[VERT_RESULT_FOGC].data[i][3] = 1.0;
+      }
 #ifdef NAN_CHECK
       ASSERT(machine.Outputs[0][3] != 0.0F);
 #endif




More information about the mesa-commit mailing list