+/**
+ * Describes how to compute the interpolation coefficients (a0, dadx, dady)
+ * from the vertices passed into our triangle/line/point functions by the
+ * draw module.
+ *
+ * Vertices are treated as an array of float[4] values, indexed by
+ * src_index.
+ *
+ * LP_INTERP_COLOR is translated to either LP_INTERP_CONSTANT or
+ * PERSPECTIVE depending on flatshade state.
+ */
+enum lp_interp {
+ LP_INTERP_CONSTANT,
+ LP_INTERP_COLOR,
+ LP_INTERP_LINEAR,
+ LP_INTERP_PERSPECTIVE,
+ LP_INTERP_POSITION,
+ LP_INTERP_FACING
+};
+
+struct lp_shader_input {
+ uint interp:4; /* enum lp_interp */
+ uint usage_mask:4; /* bitmask of TGSI_WRITEMASK_x flags */
+ uint src_index:8; /* where to find values in incoming vertices */
+ uint cyl_wrap:4; /* TGSI_CYLINDRICAL_WRAP_x flags */
+ uint padding:12;
+};