summaryrefslogtreecommitdiff
path: root/src/mesa/main/ffvertex_prog.c
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-03-16 12:49:46 +1100
committerBen Skeggs <skeggsb@gmail.com>2008-03-16 12:49:46 +1100
commitc4354f84603cabb0e33ea3f586cc89bfdc27f79b (patch)
tree01585e52a3cca102c212630d8bac345058e150f6 /src/mesa/main/ffvertex_prog.c
parent5e17088ee3d0ddfa8871d92d262bb5242bdd92bd (diff)
parentcb98f71d42e4c714dfb0c3e29d28d8418a1ee86b (diff)
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
Diffstat (limited to 'src/mesa/main/ffvertex_prog.c')
-rw-r--r--src/mesa/main/ffvertex_prog.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c
index 04ece4cda8..f648d081c0 100644
--- a/src/mesa/main/ffvertex_prog.c
+++ b/src/mesa/main/ffvertex_prog.c
@@ -1398,12 +1398,13 @@ static void build_pointsize( struct tnl_program *p )
/* 1 / sqrt(factor) */
emit_op1(p, OPCODE_RSQ, ut, WRITEMASK_X, ut );
-#if 1
+#if 0
/* out = pointSize / sqrt(factor) */
emit_op2(p, OPCODE_MUL, out, WRITEMASK_X, ut, state_size);
#else
- /* not sure, might make sense to do clamping here,
- but it's not done in t_vb_points neither */
+ /* this is a good place to clamp the point size since there's likely
+ * no hardware registers to clamp point size at rasterization time.
+ */
emit_op2(p, OPCODE_MUL, ut, WRITEMASK_X, ut, state_size);
emit_op2(p, OPCODE_MAX, ut, WRITEMASK_X, ut, swizzle1(state_size, Y));
emit_op2(p, OPCODE_MIN, out, WRITEMASK_X, ut, swizzle1(state_size, Z));