Mesa (master): i965: fix mask used to write to clip distance registers when gen>6
Paul Berry
stereotype441 at kemper.freedesktop.org
Fri Jun 24 22:37:53 UTC 2011
Module: Mesa
Branch: master
Commit: 95c2e0b601fd333cc73d7f214a3cd949f7e45aac
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=95c2e0b601fd333cc73d7f214a3cd949f7e45aac
Author: Paul Berry <stereotype441 at gmail.com>
Date: Sun Jun 12 10:47:46 2011 -0700
i965: fix mask used to write to clip distance registers when gen>6
In gen6 and above, clip distances 0-3 are written to message register
3's xyzw components, and 4-7 to message register 4's xyzw components.
Therefore when when writing the clip distances we need to examine the
lower 2 bits of the clip distance index to see which component to
write to.
emit_vertex_write() was examining the lower 3 bits, causing clip
distances 4-7 not to be written correctly.
Fixes piglit test vs-clip-vertex-01.shader_test
---
src/mesa/drivers/dri/i965/brw_vs_emit.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c
index b6c9e5a..9d73334 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c
@@ -1635,7 +1635,7 @@ static void emit_vertex_write( struct brw_vs_compile *c)
else
m = brw_message_reg(4);
- brw_DP4(p, brw_writemask(m, (1 << (i & 7))),pos, c->userplane[i]);
+ brw_DP4(p, brw_writemask(m, (1 << (i & 3))),pos, c->userplane[i]);
}
}
} else if ((c->prog_data.outputs_written &
More information about the mesa-commit
mailing list