diff options
author | Brian Paul <[email protected]> | 2003-03-16 22:02:36 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2003-03-16 22:02:36 +0000 |
commit | 54e92e8420a028f07b0971ee8aa93be9b4214579 (patch) | |
tree | 4b376b2245fbd41c6b7c7fcc1a64207f43080e0c /src/mesa/swrast/s_context.h | |
parent | a79b55ae65a4a85a2aeaa2a5b1cb757c6e88849d (diff) |
Store partial derivative values in sw_span structure.
Implemented DDX and DDY fragment program instructions (whew!)
Not fully tested yet.
Diffstat (limited to 'src/mesa/swrast/s_context.h')
-rw-r--r-- | src/mesa/swrast/s_context.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h index 91063f0ef8a..219e002990a 100644 --- a/src/mesa/swrast/s_context.h +++ b/src/mesa/swrast/s_context.h @@ -1,4 +1,4 @@ -/* $Id: s_context.h,v 1.25 2003/02/28 15:09:02 brianp Exp $ */ +/* $Id: s_context.h,v 1.26 2003/03/16 22:02:36 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -133,6 +133,9 @@ struct sw_span { */ GLuint interpMask; + /* For horizontal spans, step is the partial derivative wrt X. + * For lines, step is the delta from one fragment to the next. + */ #if CHAN_TYPE == GL_FLOAT GLfloat red, redStep; GLfloat green, greenStep; @@ -158,6 +161,18 @@ struct sw_span { GLfloat texStepY[MAX_TEXTURE_COORD_UNITS][4]; GLfixed intTex[2], intTexStep[2]; /* s, t only */ + /* partial derivatives wrt X and Y. */ + GLfloat dzdx, dzdy; + GLfloat w, dwdx, dwdy; + GLfloat drdx, drdy; + GLfloat dgdx, dgdy; + GLfloat dbdx, dbdy; + GLfloat dadx, dady; + GLfloat dsrdx, dsrdy; + GLfloat dsgdx, dsgdy; + GLfloat dsbdx, dsbdy; + GLfloat dfogdx, dfogdy; + /** * This bitmask (of \link SpanFlags SPAN_* flags\endlink) indicates * which of the fragment arrays in the span_arrays struct are relevant. |