diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2008-03-10 19:41:12 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2008-03-10 23:31:50 +0000 |
commit | 3f5b9f4ba49df57e7bbab04eab55a17a99bb5046 (patch) | |
tree | 5dde8f208700680c2eabbdab0ccf9b6cdd3ae817 /src/gallium/auxiliary/draw/draw_vs_llvm.c | |
parent | 6d5ee6d9a4a705cce80117f90ee334986f5e5e26 (diff) | |
download | external_mesa3d-3f5b9f4ba49df57e7bbab04eab55a17a99bb5046.zip external_mesa3d-3f5b9f4ba49df57e7bbab04eab55a17a99bb5046.tar.gz external_mesa3d-3f5b9f4ba49df57e7bbab04eab55a17a99bb5046.tar.bz2 |
gallium: use the same bypass_clipping logic on all vs paths
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_vs_llvm.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_vs_llvm.c | 48 |
1 files changed, 29 insertions, 19 deletions
diff --git a/src/gallium/auxiliary/draw/draw_vs_llvm.c b/src/gallium/auxiliary/draw/draw_vs_llvm.c index 0fd557d..53c260b 100644 --- a/src/gallium/auxiliary/draw/draw_vs_llvm.c +++ b/src/gallium/auxiliary/draw/draw_vs_llvm.c @@ -135,25 +135,35 @@ vs_llvm_run( struct draw_vertex_shader *base, unsigned slot; float x, y, z, w; - x = vOut[j]->clip[0] = machine->Outputs[0].xyzw[0].f[j]; - y = vOut[j]->clip[1] = machine->Outputs[0].xyzw[1].f[j]; - z = vOut[j]->clip[2] = machine->Outputs[0].xyzw[2].f[j]; - w = vOut[j]->clip[3] = machine->Outputs[0].xyzw[3].f[j]; - - vOut[j]->clipmask = compute_clipmask(vOut[j]->clip, draw->plane, draw->nr_planes); - vOut[j]->edgeflag = 1; - - /* divide by w */ - w = 1.0f / w; - x *= w; - y *= w; - z *= w; - - /* Viewport mapping */ - vOut[j]->data[0][0] = x * scale[0] + trans[0]; - vOut[j]->data[0][1] = y * scale[1] + trans[1]; - vOut[j]->data[0][2] = z * scale[2] + trans[2]; - vOut[j]->data[0][3] = w; + if (!draw->rasterizer->bypass_clipping) { + x = vOut[j]->clip[0] = machine->Outputs[0].xyzw[0].f[j]; + y = vOut[j]->clip[1] = machine->Outputs[0].xyzw[1].f[j]; + z = vOut[j]->clip[2] = machine->Outputs[0].xyzw[2].f[j]; + w = vOut[j]->clip[3] = machine->Outputs[0].xyzw[3].f[j]; + + vOut[j]->clipmask = compute_clipmask(vOut[j]->clip, draw->plane, draw->nr_planes); + vOut[j]->edgeflag = 1; + + /* divide by w */ + w = 1.0f / w; + x *= w; + y *= w; + z *= w; + + /* Viewport mapping */ + vOut[j]->data[0][0] = x * scale[0] + trans[0]; + vOut[j]->data[0][1] = y * scale[1] + trans[1]; + vOut[j]->data[0][2] = z * scale[2] + trans[2]; + vOut[j]->data[0][3] = w; + } + else { + vOut[j]->clipmask = 0; + vOut[j]->edgeflag = 1; + vOut[j]->data[0][0] = x; + vOut[j]->data[0][1] = y; + vOut[j]->data[0][2] = z; + vOut[j]->data[0][3] = w; + } /* Remaining attributes are packed into sequential post-transform * vertex attrib slots. |