summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_clip.h
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.h
parent620f06b12600d509406543738ed8bff27715df2c (diff)
downloadexternal_mesa3d-54a62f8806df29d79f1e630bae6d1f45fb15c69f.zip
external_mesa3d-54a62f8806df29d79f1e630bae6d1f45fb15c69f.tar.gz
external_mesa3d-54a62f8806df29d79f1e630bae6d1f45fb15c69f.tar.bz2
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.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_clip.h b/src/mesa/drivers/dri/i965/brw_clip.h
index 0324fea..109a0b6 100644
--- a/src/mesa/drivers/dri/i965/brw_clip.h
+++ b/src/mesa/drivers/dri/i965/brw_clip.h
@@ -126,6 +126,15 @@ struct brw_clip_compile {
#define ATTR_SIZE (4*4)
+/**
+ * True if the given vert_result is one of the outputs of the vertex shader.
+ */
+static inline bool brw_clip_have_vert_result(struct brw_clip_compile *c,
+ GLuint vert_result)
+{
+ return (c->key.attrs & BITFIELD64_BIT(vert_result)) ? 1 : 0;
+}
+
/* Points are only culled, so no need for a clip routine, however it
* works out easier to have a dummy one.
*/