summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_vs_exec.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2013-11-20 15:22:31 +0000
committerJosé Fonseca <jfonseca@vmware.com>2013-11-21 14:00:05 +0000
commit2d5f21ba650cb85ffea0ed6f41ee0d1e6fe5a29a (patch)
treea5e1eb3adde7b37f14b6bd93f3b363e8d1101eac /src/gallium/auxiliary/draw/draw_vs_exec.c
parentedd9efc2fb99ed67df38fa53ecd0283b8156c4ec (diff)
downloadexternal_mesa3d-2d5f21ba650cb85ffea0ed6f41ee0d1e6fe5a29a.tar.gz
external_mesa3d-2d5f21ba650cb85ffea0ed6f41ee0d1e6fe5a29a.tar.bz2
external_mesa3d-2d5f21ba650cb85ffea0ed6f41ee0d1e6fe5a29a.zip
gallium: Make TGSI_SEMANTIC_FOG register four-component wide.
D3D9 Shader Model 2 restricted the fog register to one component, http://msdn.microsoft.com/en-us/library/windows/desktop/bb172945.aspx , but that restriction no longer exists in Shader Model 3, and several WHCK tests enforce that. So this change: - lifts the single-component restriction TGSI_SEMANTIC_FOG from Gallium interface - updates the Mesa state tracker to enforce output fog has (f, 0, 0, 1) - draw module was updated to leave TGSI_SEMANTIC_FOG output registers alone Several gallium drivers that are going out of their way to clear TGSI_SEMANTIC_FOG components could be simplified in the future. Thanks to Si Chen and Michal Krol for identifying the problem. Testing done: piglit fogcoord-*.vpfp tests Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_vs_exec.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_vs_exec.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/draw/draw_vs_exec.c b/src/gallium/auxiliary/draw/draw_vs_exec.c
index 610039498a..83cc5fda5a 100644
--- a/src/gallium/auxiliary/draw/draw_vs_exec.c
+++ b/src/gallium/auxiliary/draw/draw_vs_exec.c
@@ -167,12 +167,7 @@ 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 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
+ else
{
output[slot][0] = machine->Outputs[slot].xyzw[0].f[j];
output[slot][1] = machine->Outputs[slot].xyzw[1].f[j];