summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/swrast.h
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-05-20 12:27:39 -0600
committerBrian <[email protected]>2007-05-20 12:27:39 -0600
commit9e8a961dd7d7b717a9fb4ecdea1c1b60ea355efe (patch)
tree60c87644ec38f4693ceecbf440b120b02e2d07e6 /src/mesa/swrast/swrast.h
parentaa133a9dae53bc6aa50b88ee43deb8b34e8d0029 (diff)
Overhaul/simplify SWvertex and SWspan attribute handling.
Instead of separate fog/specular/texcoord/varying code, just treat all of them as generic attributes. Simplifies the point/line/triangle functions.
Diffstat (limited to 'src/mesa/swrast/swrast.h')
-rw-r--r--src/mesa/swrast/swrast.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/mesa/swrast/swrast.h b/src/mesa/swrast/swrast.h
index 12264a159ad..d101a9e2ae2 100644
--- a/src/mesa/swrast/swrast.h
+++ b/src/mesa/swrast/swrast.h
@@ -45,6 +45,14 @@
* improve its usefulness as a fallback mechanism for hardware
* drivers.
*
+ * wpos = attr[FRAG_ATTRIB_WPOS] and MUST BE THE FIRST values in the
+ * vertex because of the tnl clipping code.
+
+ * wpos[0] and [1] are the screen-coords of SWvertex.
+ * wpos[2] is the z-buffer coord (if 16-bit Z buffer, in range [0,65535]).
+ * wpos[3] is 1/w where w is the clip-space W coord. This is the value
+ * that clip{XYZ} were multiplied by to get ndc{XYZ}.
+ *
* Full software drivers:
* - Register the rastersetup and triangle functions from
* utils/software_helper.
@@ -61,20 +69,15 @@
* primitives unaccelerated), hook in swrast_setup instead.
*/
typedef struct {
- /** win[0], win[1] are the screen-coords of SWvertex.
- * win[2] is the z-buffer coord (if 16-bit Z buffer, in range [0,65535]).
- * win[3] is 1/w where w is the clip-space W coord. This is the value
- * that clip{XYZ} were multiplied by to get ndc{XYZ}.
- */
- GLfloat win[4];
- GLchan color[4];
- GLchan specular[4];
- GLfloat index;
+ GLfloat attrib[FRAG_ATTRIB_MAX][4];
+ GLchan color[4]; /** integer color */
GLfloat pointSize;
- GLfloat attrib[FRAG_ATTRIB_MAX][4]; /**< texcoords & varying, more to come */
} SWvertex;
+#define FRAG_ATTRIB_CI FRAG_ATTRIB_COL0
+
+
struct swrast_device_driver;