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 13:27:57 -0700
committerPaul Berry <stereotype441@gmail.com>2011-09-06 11:05:25 -0700
commit54a62f8806df29d79f1e630bae6d1f45fb15c69f (patch)
treefe3804fbe0243c915c8f4020c397fae0b633df1e /src/mesa/drivers/dri/i965/brw_clip_util.c
parent620f06b12600d509406543738ed8bff27715df2c (diff)
i965: clip: Add a function to determine whether a vert_result is in use.
Previously we would examine the offset[] array (since an offset of 0 meant "not in use"). This paves the way for removing the offset[] array. 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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_clip_util.c b/src/mesa/drivers/dri/i965/brw_clip_util.c
index e90f14687c..cfbb497f9d 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_util.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_util.c
@@ -290,22 +290,22 @@ void brw_clip_copy_colors( struct brw_clip_compile *c,
{
struct brw_compile *p = &c->func;
- if (c->offset[VERT_RESULT_COL0])
+ if (brw_clip_have_vert_result(c, VERT_RESULT_COL0))
brw_MOV(p,
byte_offset(c->reg.vertex[to], c->offset[VERT_RESULT_COL0]),
byte_offset(c->reg.vertex[from], c->offset[VERT_RESULT_COL0]));
- if (c->offset[VERT_RESULT_COL1])
+ if (brw_clip_have_vert_result(c, VERT_RESULT_COL1))
brw_MOV(p,
byte_offset(c->reg.vertex[to], c->offset[VERT_RESULT_COL1]),
byte_offset(c->reg.vertex[from], c->offset[VERT_RESULT_COL1]));
- if (c->offset[VERT_RESULT_BFC0])
+ if (brw_clip_have_vert_result(c, VERT_RESULT_BFC0))
brw_MOV(p,
byte_offset(c->reg.vertex[to], c->offset[VERT_RESULT_BFC0]),
byte_offset(c->reg.vertex[from], c->offset[VERT_RESULT_BFC0]));
- if (c->offset[VERT_RESULT_BFC1])
+ if (brw_clip_have_vert_result(c, VERT_RESULT_BFC1))
brw_MOV(p,
byte_offset(c->reg.vertex[to], c->offset[VERT_RESULT_BFC1]),
byte_offset(c->reg.vertex[from], c->offset[VERT_RESULT_BFC1]));