summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2008-04-01 14:14:46 +0100
committerKeith Whitwell <[email protected]>2008-04-01 14:51:24 +0100
commit52f40dcc468039fc9cca45a4de20a5aa11228b67 (patch)
treee1d5a555f83e05fa281cdbe85d641e79a91cc0f8
parent4b1377b2403bcb34081f91991f1ffde06df17af1 (diff)
draw: associate rhw divide with clipping not viewport flag
-rw-r--r--src/gallium/auxiliary/draw/draw_vs_exec.c12
-rw-r--r--src/gallium/auxiliary/draw/draw_vs_llvm.c12
-rw-r--r--src/gallium/auxiliary/draw/draw_vs_sse.c12
3 files changed, 18 insertions, 18 deletions
diff --git a/src/gallium/auxiliary/draw/draw_vs_exec.c b/src/gallium/auxiliary/draw/draw_vs_exec.c
index c8ed17c00a2..c6e503686a6 100644
--- a/src/gallium/auxiliary/draw/draw_vs_exec.c
+++ b/src/gallium/auxiliary/draw/draw_vs_exec.c
@@ -143,6 +143,12 @@ vs_exec_run( struct draw_vertex_shader *shader,
if (!draw->rasterizer->bypass_clipping) {
vOut[j]->clipmask = compute_clipmask(vOut[j]->clip, draw->plane, draw->nr_planes);
+
+ /* divide by w */
+ w = 1.0f / w;
+ x *= w;
+ y *= w;
+ z *= w;
}
else {
vOut[j]->clipmask = 0;
@@ -150,12 +156,6 @@ vs_exec_run( struct draw_vertex_shader *shader,
vOut[j]->edgeflag = 1;
if (!draw->identity_viewport) {
- /* 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];
diff --git a/src/gallium/auxiliary/draw/draw_vs_llvm.c b/src/gallium/auxiliary/draw/draw_vs_llvm.c
index 8aa8a617bbb..c8268317efa 100644
--- a/src/gallium/auxiliary/draw/draw_vs_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_vs_llvm.c
@@ -153,6 +153,12 @@ vs_llvm_run( struct draw_vertex_shader *base,
if (!draw->rasterizer->bypass_clipping) {
vOut[j]->clipmask = compute_clipmask(vOut[j]->clip, draw->plane, draw->nr_planes);
+
+ /* divide by w */
+ w = 1.0f / w;
+ x *= w;
+ y *= w;
+ z *= w;
}
else {
vOut[j]->clipmask = 0;
@@ -160,12 +166,6 @@ vs_llvm_run( struct draw_vertex_shader *base,
vOut[j]->edgeflag = 1;
if (!draw->identity_viewport) {
- /* 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];
diff --git a/src/gallium/auxiliary/draw/draw_vs_sse.c b/src/gallium/auxiliary/draw/draw_vs_sse.c
index 701137f9087..f40d65df08f 100644
--- a/src/gallium/auxiliary/draw/draw_vs_sse.c
+++ b/src/gallium/auxiliary/draw/draw_vs_sse.c
@@ -168,6 +168,12 @@ vs_sse_run( struct draw_vertex_shader *base,
if (!draw->rasterizer->bypass_clipping) {
vOut[j]->clipmask = compute_clipmask(vOut[j]->clip, draw->plane, draw->nr_planes);
+
+ /* divide by w */
+ w = 1.0f / w;
+ x *= w;
+ y *= w;
+ z *= w;
}
else {
vOut[j]->clipmask = 0;
@@ -175,12 +181,6 @@ vs_sse_run( struct draw_vertex_shader *base,
vOut[j]->edgeflag = 1;
if (!draw->identity_viewport) {
- /* 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];