summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast/s_context.h')
-rw-r--r--src/mesa/swrast/s_context.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h
index dfe311a40bc..c8333b8e0a1 100644
--- a/src/mesa/swrast/s_context.h
+++ b/src/mesa/swrast/s_context.h
@@ -138,12 +138,10 @@ typedef struct
GLbitfield _ColorOutputsMask;
GLuint _NumColorOutputs;
- /** Fragment attributes to compute during rasterization.
- * Mask of FRAG_BIT_* flags.
- */
- GLbitfield _FragmentAttribs;
- GLuint _MinFragmentAttrib; /**< Lowest bit set in _FragmentAttribs */
- GLuint _MaxFragmentAttrib; /**< Highest bit set in _FragmentAttribs + 1 */
+ /** List/array of the fragment attributes to interpolate */
+ GLuint _ActiveAttribs[FRAG_ATTRIB_MAX];
+ /** Number of fragment attributes to interpolate */
+ GLuint _NumActiveAttribs;
/* Accum buffer temporaries.
*/
@@ -277,4 +275,19 @@ _swrast_update_texture_samplers(GLcontext *ctx);
#define FixedToChan(X) FixedToInt(X)
#endif
+
+/**
+ * For looping over fragment attributes in the pointe, line
+ * triangle rasterizers.
+ */
+#define ATTRIB_LOOP_BEGIN \
+ { \
+ GLuint a; \
+ for (a = 0; a < swrast->_NumActiveAttribs; a++) { \
+ const GLuint attr = swrast->_ActiveAttribs[a];
+
+#define ATTRIB_LOOP_END } }
+
+
+
#endif