Mesa (master): draw: fix fog coord export.
Dave Airlie
airlied at kemper.freedesktop.org
Sat Feb 4 17:53:05 UTC 2012
Module: Mesa
Branch: master
Commit: fa2a76a21c8c513de506f2c5ec938c829cc65fdf
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fa2a76a21c8c513de506f2c5ec938c829cc65fdf
Author: Dave Airlie <airlied at redhat.com>
Date: Sat Jan 28 18:29:18 2012 +0000
draw: fix fog coord export.
This does what we do in the hw drivers, and only export the X.
fixes the fogcoord.dp* tests.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/gallium/auxiliary/draw/draw_vs_exec.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/gallium/auxiliary/draw/draw_vs_exec.c b/src/gallium/auxiliary/draw/draw_vs_exec.c
index eaba475..84ce8c1 100644
--- a/src/gallium/auxiliary/draw/draw_vs_exec.c
+++ b/src/gallium/auxiliary/draw/draw_vs_exec.c
@@ -168,7 +168,12 @@ vs_exec_run_linear( struct draw_vertex_shader *shader,
output[slot][2] = CLAMP(machine->Outputs[slot].xyzw[2].f[j], 0.0f, 1.0f);
output[slot][3] = CLAMP(machine->Outputs[slot].xyzw[3].f[j], 0.0f, 1.0f);
}
- else
+ else if (name == TGSI_SEMANTIC_FOG) {
+ output[slot][0] = machine->Outputs[slot].xyzw[0].f[j];
+ output[slot][1] = 0;
+ output[slot][2] = 0;
+ output[slot][3] = 1;
+ } else
{
output[slot][0] = machine->Outputs[slot].xyzw[0].f[j];
output[slot][1] = machine->Outputs[slot].xyzw[1].f[j];
More information about the mesa-commit
mailing list