Mesa (master): i965: Add helper functions for interpolation map

Chris Forbes chrisf at kemper.freedesktop.org
Thu Aug 1 09:00:02 UTC 2013


Module: Mesa
Branch: master
Commit: 3b5fe704e182abce581518f43ea45d1cfb76f423
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3b5fe704e182abce581518f43ea45d1cfb76f423

Author: Chris Forbes <chrisf at ijw.co.nz>
Date:   Wed Jul 31 22:28:13 2013 +1200

i965: Add helper functions for interpolation map

V6: real bools

Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/brw_context.h |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 7b5fd13..00dd2b4 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -420,6 +420,24 @@ struct interpolation_mode_map {
    unsigned char mode[BRW_VARYING_SLOT_COUNT];
 };
 
+static inline bool brw_any_flat_varyings(struct interpolation_mode_map *map)
+{
+   for (int i = 0; i < BRW_VARYING_SLOT_COUNT; i++)
+      if (map->mode[i] == INTERP_QUALIFIER_FLAT)
+         return true;
+
+   return false;
+}
+
+static inline bool brw_any_noperspective_varyings(struct interpolation_mode_map *map)
+{
+   for (int i = 0; i < BRW_VARYING_SLOT_COUNT; i++)
+      if (map->mode[i] == INTERP_QUALIFIER_NOPERSPECTIVE)
+         return true;
+
+   return false;
+}
+
 
 struct brw_sf_prog_data {
    GLuint urb_read_length;




More information about the mesa-commit mailing list