diff options
author | Brian <[email protected]> | 2007-04-23 21:21:52 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-04-23 21:21:52 -0600 |
commit | 0bdf216dd06d5136b8529297297aa962bab548c2 (patch) | |
tree | bb7c516d3d6f2e818f2cbb0f8865a45fecf053c6 /src/mesa/swrast/s_context.h | |
parent | d59e6f233b02ffe2c36c2fb89ec26c208a421540 (diff) |
Improve the code for interpolating fragment attributes a little. More to come...
Diffstat (limited to 'src/mesa/swrast/s_context.h')
-rw-r--r-- | src/mesa/swrast/s_context.h | 25 |
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 |