summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_clip_util.c
diff options
context:
space:
mode:
authorPaul Berry <stereotype441@gmail.com>2011-08-25 11:14:47 -0700
committerPaul Berry <stereotype441@gmail.com>2011-09-06 11:05:23 -0700
commit620f06b12600d509406543738ed8bff27715df2c (patch)
tree763762f0b51ef5eb0b3ba6c4dd85e744f48d21ac /src/mesa/drivers/dri/i965/brw_clip_util.c
parentc46be4273cf392a8ea53dc95881ea1e4452170b1 (diff)
i965: clip: Rework brw_clip_interp_vertex() to use the VUE map.
Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_clip_util.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip_util.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_clip_util.c b/src/mesa/drivers/dri/i965/brw_clip_util.c
index 0342aa53db..e90f14687c 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_util.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_util.c
@@ -139,7 +139,7 @@ void brw_clip_interp_vertex( struct brw_clip_compile *c,
{
struct brw_compile *p = &c->func;
struct brw_reg tmp = get_tmp(c);
- GLuint i;
+ GLuint slot;
/* Just copy the vertex header:
*/
@@ -151,10 +151,10 @@ void brw_clip_interp_vertex( struct brw_clip_compile *c,
/* Iterate over each attribute (could be done in pairs?)
*/
- for (i = 0; i < c->nr_attrs; i++) {
- GLuint delta = ATTR_SIZE * (2*c->header_regs + i);
+ for (slot = 2*c->header_regs; slot < c->vue_map.num_slots; slot++) {
+ GLuint delta = ATTR_SIZE * slot;
- if (c->idx_to_attr[i] == VERT_RESULT_EDGE) {
+ if (c->vue_map.slot_to_vert_result[slot] == VERT_RESULT_EDGE) {
if (force_edgeflag)
brw_MOV(p, deref_4f(dest_ptr, delta), brw_imm_f(1));
else
@@ -182,7 +182,7 @@ void brw_clip_interp_vertex( struct brw_clip_compile *c,
}
}
- if (i & 1) {
+ if (c->vue_map.num_slots % 2) {
GLuint delta = c->vue_map.num_slots * ATTR_SIZE;
brw_MOV(p, deref_4f(dest_ptr, delta), brw_imm_f(0));