projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mesa: Use bitmask/ffs to iterate color material attributes.
[mesa.git]
/
src
/
mesa
/
tnl
/
t_vertex_generic.c
diff --git
a/src/mesa/tnl/t_vertex_generic.c
b/src/mesa/tnl/t_vertex_generic.c
index b1ea14246491b4c16a92710209ed2afcba021720..6c40c8683630410f4616ed7f13fad9e72c59071c 100644
(file)
--- a/
src/mesa/tnl/t_vertex_generic.c
+++ b/
src/mesa/tnl/t_vertex_generic.c
@@
-1,6
+1,6
@@
/*
/*
- * Copyright 2003
Tungsten Graphics, i
nc.
+ * Copyright 2003
VMware, I
nc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@
-17,25
+17,26
@@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- *
TUNGSTEN GRAPHICS
AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ *
VMWARE
AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
- * Keith Whitwell <keithw@
tungstengraphics
.com>
+ * Keith Whitwell <keithw@
vmware
.com>
*/
#include "main/glheader.h"
#include "main/context.h"
*/
#include "main/glheader.h"
#include "main/context.h"
-#include "main/colormac.h"
-#include "main/simple_list.h"
+#include "main/macros.h"
+#include "util/simple_list.h"
+#include "swrast/s_chan.h"
#include "t_context.h"
#include "t_vertex.h"
#if 0
#include "t_context.h"
#include "t_vertex.h"
#if 0
-#define DEBUG_INSERT printf("%s\n", __
FUNCTION
__)
+#define DEBUG_INSERT printf("%s\n", __
func
__)
#else
#define DEBUG_INSERT
#endif
#else
#define DEBUG_INSERT
#endif
@@
-46,7
+47,7
@@
* NDC->Viewport mapping and store the results at 'v'.
*/
* NDC->Viewport mapping and store the results at 'v'.
*/
-static
INLINE
void insert_4f_viewport_4( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_4f_viewport_4( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
@@
-58,7
+59,7
@@
static INLINE void insert_4f_viewport_4( const struct tnl_clipspace_attr *a, GLu
out[3] = in[3];
}
out[3] = in[3];
}
-static
INLINE
void insert_4f_viewport_3( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_4f_viewport_3( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
@@
-70,7
+71,7
@@
static INLINE void insert_4f_viewport_3( const struct tnl_clipspace_attr *a, GLu
out[3] = 1;
}
out[3] = 1;
}
-static
INLINE
void insert_4f_viewport_2( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_4f_viewport_2( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
@@
-82,7
+83,7
@@
static INLINE void insert_4f_viewport_2( const struct tnl_clipspace_attr *a, GLu
out[3] = 1;
}
out[3] = 1;
}
-static
INLINE
void insert_4f_viewport_1( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_4f_viewport_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
@@
-94,7
+95,7
@@
static INLINE void insert_4f_viewport_1( const struct tnl_clipspace_attr *a, GLu
out[3] = 1;
}
out[3] = 1;
}
-static
INLINE
void insert_3f_viewport_3( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_3f_viewport_3( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
@@
-105,7
+106,7
@@
static INLINE void insert_3f_viewport_3( const struct tnl_clipspace_attr *a, GLu
out[2] = vp[10] * in[2] + vp[14];
}
out[2] = vp[10] * in[2] + vp[14];
}
-static
INLINE
void insert_3f_viewport_2( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_3f_viewport_2( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
@@
-116,7
+117,7
@@
static INLINE void insert_3f_viewport_2( const struct tnl_clipspace_attr *a, GLu
out[2] = vp[14];
}
out[2] = vp[14];
}
-static
INLINE
void insert_3f_viewport_1( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_3f_viewport_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
@@
-127,7
+128,7
@@
static INLINE void insert_3f_viewport_1( const struct tnl_clipspace_attr *a, GLu
out[2] = vp[14];
}
out[2] = vp[14];
}
-static
INLINE
void insert_2f_viewport_2( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_2f_viewport_2( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
@@
-137,7
+138,7
@@
static INLINE void insert_2f_viewport_2( const struct tnl_clipspace_attr *a, GLu
out[1] = vp[5] * in[1] + vp[13];
}
out[1] = vp[5] * in[1] + vp[13];
}
-static
INLINE
void insert_2f_viewport_1( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_2f_viewport_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
const GLfloat *in )
{
GLfloat *out = (GLfloat *)v;
@@
-152,7
+153,7
@@
static INLINE void insert_2f_viewport_1( const struct tnl_clipspace_attr *a, GLu
* These functions do the same as above, except for the viewport mapping.
*/
* These functions do the same as above, except for the viewport mapping.
*/
-static
INLINE
void insert_4f_4( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static
inline
void insert_4f_4( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
(void) a;
{
GLfloat *out = (GLfloat *)(v);
(void) a;
@@
-163,7
+164,7
@@
static INLINE void insert_4f_4( const struct tnl_clipspace_attr *a, GLubyte *v,
out[3] = in[3];
}
out[3] = in[3];
}
-static
INLINE
void insert_4f_3( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static
inline
void insert_4f_3( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
(void) a;
{
GLfloat *out = (GLfloat *)(v);
(void) a;
@@
-174,7
+175,7
@@
static INLINE void insert_4f_3( const struct tnl_clipspace_attr *a, GLubyte *v,
out[3] = 1;
}
out[3] = 1;
}
-static
INLINE
void insert_4f_2( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static
inline
void insert_4f_2( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
(void) a;
{
GLfloat *out = (GLfloat *)(v);
(void) a;
@@
-185,7
+186,7
@@
static INLINE void insert_4f_2( const struct tnl_clipspace_attr *a, GLubyte *v,
out[3] = 1;
}
out[3] = 1;
}
-static
INLINE
void insert_4f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static
inline
void insert_4f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
(void) a;
{
GLfloat *out = (GLfloat *)(v);
(void) a;
@@
-196,7
+197,7
@@
static INLINE void insert_4f_1( const struct tnl_clipspace_attr *a, GLubyte *v,
out[3] = 1;
}
out[3] = 1;
}
-static
INLINE
void insert_3f_xyw_4( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static
inline
void insert_3f_xyw_4( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
(void) a;
{
GLfloat *out = (GLfloat *)(v);
(void) a;
@@
-206,14
+207,14
@@
static INLINE void insert_3f_xyw_4( const struct tnl_clipspace_attr *a, GLubyte
out[2] = in[3];
}
out[2] = in[3];
}
-static
INLINE
void insert_3f_xyw_err( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static
inline
void insert_3f_xyw_err( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
(void) a; (void) v; (void) in;
DEBUG_INSERT;
exit(1);
}
{
(void) a; (void) v; (void) in;
DEBUG_INSERT;
exit(1);
}
-static
INLINE
void insert_3f_3( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static
inline
void insert_3f_3( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
(void) a;
{
GLfloat *out = (GLfloat *)(v);
(void) a;
@@
-223,7
+224,7
@@
static INLINE void insert_3f_3( const struct tnl_clipspace_attr *a, GLubyte *v,
out[2] = in[2];
}
out[2] = in[2];
}
-static
INLINE
void insert_3f_2( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static
inline
void insert_3f_2( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
(void) a;
{
GLfloat *out = (GLfloat *)(v);
(void) a;
@@
-233,7
+234,7
@@
static INLINE void insert_3f_2( const struct tnl_clipspace_attr *a, GLubyte *v,
out[2] = 0;
}
out[2] = 0;
}
-static
INLINE
void insert_3f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static
inline
void insert_3f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
(void) a;
{
GLfloat *out = (GLfloat *)(v);
(void) a;
@@
-244,7
+245,7
@@
static INLINE void insert_3f_1( const struct tnl_clipspace_attr *a, GLubyte *v,
}
}
-static
INLINE
void insert_2f_2( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static
inline
void insert_2f_2( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
(void) a;
{
GLfloat *out = (GLfloat *)(v);
(void) a;
@@
-253,7
+254,7
@@
static INLINE void insert_2f_2( const struct tnl_clipspace_attr *a, GLubyte *v,
out[1] = in[1];
}
out[1] = in[1];
}
-static
INLINE
void insert_2f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static
inline
void insert_2f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
(void) a;
{
GLfloat *out = (GLfloat *)(v);
(void) a;
@@
-262,7
+263,7
@@
static INLINE void insert_2f_1( const struct tnl_clipspace_attr *a, GLubyte *v,
out[1] = 0;
}
out[1] = 0;
}
-static
INLINE
void insert_1f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static
inline
void insert_1f_1( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
GLfloat *out = (GLfloat *)(v);
(void) a;
{
GLfloat *out = (GLfloat *)(v);
(void) a;
@@
-270,13
+271,13
@@
static INLINE void insert_1f_1( const struct tnl_clipspace_attr *a, GLubyte *v,
out[0] = in[0];
}
out[0] = in[0];
}
-static
INLINE
void insert_null( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
+static
inline
void insert_null( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
{
DEBUG_INSERT;
(void) a; (void) v; (void) in;
}
{
DEBUG_INSERT;
(void) a; (void) v; (void) in;
}
-static
INLINE
void insert_4chan_4f_rgba_4( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_4chan_4f_rgba_4( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLchan *c = (GLchan *)v;
const GLfloat *in )
{
GLchan *c = (GLchan *)v;
@@
-288,7
+289,7
@@
static INLINE void insert_4chan_4f_rgba_4( const struct tnl_clipspace_attr *a, G
UNCLAMPED_FLOAT_TO_CHAN(c[3], in[3]);
}
UNCLAMPED_FLOAT_TO_CHAN(c[3], in[3]);
}
-static
INLINE
void insert_4chan_4f_rgba_3( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_4chan_4f_rgba_3( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLchan *c = (GLchan *)v;
const GLfloat *in )
{
GLchan *c = (GLchan *)v;
@@
-300,7
+301,7
@@
static INLINE void insert_4chan_4f_rgba_3( const struct tnl_clipspace_attr *a, G
c[3] = CHAN_MAX;
}
c[3] = CHAN_MAX;
}
-static
INLINE
void insert_4chan_4f_rgba_2( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_4chan_4f_rgba_2( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLchan *c = (GLchan *)v;
const GLfloat *in )
{
GLchan *c = (GLchan *)v;
@@
-312,7
+313,7
@@
static INLINE void insert_4chan_4f_rgba_2( const struct tnl_clipspace_attr *a, G
c[3] = CHAN_MAX;
}
c[3] = CHAN_MAX;
}
-static
INLINE
void insert_4chan_4f_rgba_1( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_4chan_4f_rgba_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
GLchan *c = (GLchan *)v;
const GLfloat *in )
{
GLchan *c = (GLchan *)v;
@@
-324,7
+325,7
@@
static INLINE void insert_4chan_4f_rgba_1( const struct tnl_clipspace_attr *a, G
c[3] = CHAN_MAX;
}
c[3] = CHAN_MAX;
}
-static
INLINE
void insert_4ub_4f_rgba_4( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_4ub_4f_rgba_4( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
const GLfloat *in )
{
DEBUG_INSERT;
@@
-335,7
+336,7
@@
static INLINE void insert_4ub_4f_rgba_4( const struct tnl_clipspace_attr *a, GLu
UNCLAMPED_FLOAT_TO_UBYTE(v[3], in[3]);
}
UNCLAMPED_FLOAT_TO_UBYTE(v[3], in[3]);
}
-static
INLINE
void insert_4ub_4f_rgba_3( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_4ub_4f_rgba_3( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
const GLfloat *in )
{
DEBUG_INSERT;
@@
-346,7
+347,7
@@
static INLINE void insert_4ub_4f_rgba_3( const struct tnl_clipspace_attr *a, GLu
v[3] = 0xff;
}
v[3] = 0xff;
}
-static
INLINE
void insert_4ub_4f_rgba_2( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_4ub_4f_rgba_2( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
const GLfloat *in )
{
DEBUG_INSERT;
@@
-357,7
+358,7
@@
static INLINE void insert_4ub_4f_rgba_2( const struct tnl_clipspace_attr *a, GLu
v[3] = 0xff;
}
v[3] = 0xff;
}
-static
INLINE
void insert_4ub_4f_rgba_1( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_4ub_4f_rgba_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
const GLfloat *in )
{
DEBUG_INSERT;
@@
-368,7
+369,7
@@
static INLINE void insert_4ub_4f_rgba_1( const struct tnl_clipspace_attr *a, GLu
v[3] = 0xff;
}
v[3] = 0xff;
}
-static
INLINE
void insert_4ub_4f_bgra_4( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_4ub_4f_bgra_4( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
const GLfloat *in )
{
DEBUG_INSERT;
@@
-379,7
+380,7
@@
static INLINE void insert_4ub_4f_bgra_4( const struct tnl_clipspace_attr *a, GLu
UNCLAMPED_FLOAT_TO_UBYTE(v[3], in[3]);
}
UNCLAMPED_FLOAT_TO_UBYTE(v[3], in[3]);
}
-static
INLINE
void insert_4ub_4f_bgra_3( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_4ub_4f_bgra_3( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
const GLfloat *in )
{
DEBUG_INSERT;
@@
-390,7
+391,7
@@
static INLINE void insert_4ub_4f_bgra_3( const struct tnl_clipspace_attr *a, GLu
v[3] = 0xff;
}
v[3] = 0xff;
}
-static
INLINE
void insert_4ub_4f_bgra_2( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_4ub_4f_bgra_2( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
const GLfloat *in )
{
DEBUG_INSERT;
@@
-401,7
+402,7
@@
static INLINE void insert_4ub_4f_bgra_2( const struct tnl_clipspace_attr *a, GLu
v[3] = 0xff;
}
v[3] = 0xff;
}
-static
INLINE
void insert_4ub_4f_bgra_1( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_4ub_4f_bgra_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
const GLfloat *in )
{
DEBUG_INSERT;
@@
-412,7
+413,7
@@
static INLINE void insert_4ub_4f_bgra_1( const struct tnl_clipspace_attr *a, GLu
v[3] = 0xff;
}
v[3] = 0xff;
}
-static
INLINE
void insert_4ub_4f_argb_4( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_4ub_4f_argb_4( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
const GLfloat *in )
{
DEBUG_INSERT;
@@
-423,7
+424,7
@@
static INLINE void insert_4ub_4f_argb_4( const struct tnl_clipspace_attr *a, GLu
UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[3]);
}
UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[3]);
}
-static
INLINE
void insert_4ub_4f_argb_3( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_4ub_4f_argb_3( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
const GLfloat *in )
{
DEBUG_INSERT;
@@
-434,7
+435,7
@@
static INLINE void insert_4ub_4f_argb_3( const struct tnl_clipspace_attr *a, GLu
v[0] = 0xff;
}
v[0] = 0xff;
}
-static
INLINE
void insert_4ub_4f_argb_2( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_4ub_4f_argb_2( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
const GLfloat *in )
{
DEBUG_INSERT;
@@
-445,7
+446,7
@@
static INLINE void insert_4ub_4f_argb_2( const struct tnl_clipspace_attr *a, GLu
v[0] = 0xff;
}
v[0] = 0xff;
}
-static
INLINE
void insert_4ub_4f_argb_1( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_4ub_4f_argb_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
const GLfloat *in )
{
DEBUG_INSERT;
@@
-456,7
+457,7
@@
static INLINE void insert_4ub_4f_argb_1( const struct tnl_clipspace_attr *a, GLu
v[0] = 0xff;
}
v[0] = 0xff;
}
-static
INLINE
void insert_4ub_4f_abgr_4( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_4ub_4f_abgr_4( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
const GLfloat *in )
{
DEBUG_INSERT;
@@
-467,7
+468,7
@@
static INLINE void insert_4ub_4f_abgr_4( const struct tnl_clipspace_attr *a, GLu
UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[3]);
}
UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[3]);
}
-static
INLINE
void insert_4ub_4f_abgr_3( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_4ub_4f_abgr_3( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
const GLfloat *in )
{
DEBUG_INSERT;
@@
-478,7
+479,7
@@
static INLINE void insert_4ub_4f_abgr_3( const struct tnl_clipspace_attr *a, GLu
v[0] = 0xff;
}
v[0] = 0xff;
}
-static
INLINE
void insert_4ub_4f_abgr_2( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_4ub_4f_abgr_2( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
const GLfloat *in )
{
DEBUG_INSERT;
@@
-489,7
+490,7
@@
static INLINE void insert_4ub_4f_abgr_2( const struct tnl_clipspace_attr *a, GLu
v[0] = 0xff;
}
v[0] = 0xff;
}
-static
INLINE
void insert_4ub_4f_abgr_1( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_4ub_4f_abgr_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
const GLfloat *in )
{
DEBUG_INSERT;
@@
-500,7
+501,7
@@
static INLINE void insert_4ub_4f_abgr_1( const struct tnl_clipspace_attr *a, GLu
v[0] = 0xff;
}
v[0] = 0xff;
}
-static
INLINE
void insert_3ub_3f_rgb_3( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_3ub_3f_rgb_3( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
const GLfloat *in )
{
DEBUG_INSERT;
@@
-510,7
+511,7
@@
static INLINE void insert_3ub_3f_rgb_3( const struct tnl_clipspace_attr *a, GLub
UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[2]);
}
UNCLAMPED_FLOAT_TO_UBYTE(v[2], in[2]);
}
-static
INLINE
void insert_3ub_3f_rgb_2( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_3ub_3f_rgb_2( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
const GLfloat *in )
{
DEBUG_INSERT;
@@
-520,7
+521,7
@@
static INLINE void insert_3ub_3f_rgb_2( const struct tnl_clipspace_attr *a, GLub
v[2] = 0;
}
v[2] = 0;
}
-static
INLINE
void insert_3ub_3f_rgb_1( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_3ub_3f_rgb_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
const GLfloat *in )
{
DEBUG_INSERT;
@@
-530,7
+531,7
@@
static INLINE void insert_3ub_3f_rgb_1( const struct tnl_clipspace_attr *a, GLub
v[2] = 0;
}
v[2] = 0;
}
-static
INLINE
void insert_3ub_3f_bgr_3( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_3ub_3f_bgr_3( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
const GLfloat *in )
{
DEBUG_INSERT;
@@
-540,7
+541,7
@@
static INLINE void insert_3ub_3f_bgr_3( const struct tnl_clipspace_attr *a, GLub
UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[2]);
}
UNCLAMPED_FLOAT_TO_UBYTE(v[0], in[2]);
}
-static
INLINE
void insert_3ub_3f_bgr_2( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_3ub_3f_bgr_2( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
const GLfloat *in )
{
DEBUG_INSERT;
@@
-550,7
+551,7
@@
static INLINE void insert_3ub_3f_bgr_2( const struct tnl_clipspace_attr *a, GLub
v[0] = 0;
}
v[0] = 0;
}
-static
INLINE
void insert_3ub_3f_bgr_1( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_3ub_3f_bgr_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
const GLfloat *in )
{
DEBUG_INSERT;
@@
-561,7
+562,7
@@
static INLINE void insert_3ub_3f_bgr_1( const struct tnl_clipspace_attr *a, GLub
}
}
-static
INLINE
void insert_1ub_1f_1( const struct tnl_clipspace_attr *a, GLubyte *v,
+static
inline
void insert_1ub_1f_1( const struct tnl_clipspace_attr *a, GLubyte *v,
const GLfloat *in )
{
DEBUG_INSERT;
const GLfloat *in )
{
DEBUG_INSERT;
@@
-866,7
+867,7
@@
const struct tnl_format_info _tnl_format_info[EMIT_MAX] =
* vertices
*/
#define EMIT5(NR, F0, F1, F2, F3, F4, NAME) \
* vertices
*/
#define EMIT5(NR, F0, F1, F2, F3, F4, NAME) \
-static void NAME(
GL
context *ctx, \
+static void NAME(
struct gl_
context *ctx, \
GLuint count, \
GLubyte *v ) \
{ \
GLuint count, \
GLubyte *v ) \
{ \
@@
-929,7
+930,7
@@
EMIT4(insert_4f_4, insert_4ub_4f_rgba_4, insert_2f_2, insert_2f_2, emit_xyzw4_rg
/* Use the codegen paths to select one of a number of hardwired
* fastpaths.
*/
/* Use the codegen paths to select one of a number of hardwired
* fastpaths.
*/
-void _tnl_generate_hardwired_emit(
GL
context *ctx )
+void _tnl_generate_hardwired_emit(
struct gl_
context *ctx )
{
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
tnl_emit_func func = NULL;
{
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
tnl_emit_func func = NULL;
@@
-987,7
+988,7
@@
void _tnl_generate_hardwired_emit( GLcontext *ctx )
* vertices
*/
* vertices
*/
-void _tnl_generic_emit(
GL
context *ctx,
+void _tnl_generic_emit(
struct gl_
context *ctx,
GLuint count,
GLubyte *v )
{
GLuint count,
GLubyte *v )
{
@@
-1007,7
+1008,7
@@
void _tnl_generic_emit( GLcontext *ctx,
}
}
-void _tnl_generic_interp(
GL
context *ctx,
+void _tnl_generic_interp(
struct gl_
context *ctx,
GLfloat t,
GLuint edst, GLuint eout, GLuint ein,
GLboolean force_boundary )
GLfloat t,
GLuint edst, GLuint eout, GLuint ein,
GLboolean force_boundary )
@@
-1025,7
+1026,7
@@
void _tnl_generic_interp( GLcontext *ctx,
if (tnl->NeedNdcCoords) {
const GLfloat *dstclip = VB->ClipPtr->data[edst];
if (tnl->NeedNdcCoords) {
const GLfloat *dstclip = VB->ClipPtr->data[edst];
- if (dstclip[3] != 0.0) {
+ if (dstclip[3] != 0.0
f
) {
const GLfloat w = 1.0f / dstclip[3];
GLfloat pos[4];
const GLfloat w = 1.0f / dstclip[3];
GLfloat pos[4];
@@
-1048,10
+1049,7
@@
void _tnl_generic_interp( GLcontext *ctx,
a[j].extract( &a[j], fin, vin + a[j].vertoffset );
a[j].extract( &a[j], fout, vout + a[j].vertoffset );
a[j].extract( &a[j], fin, vin + a[j].vertoffset );
a[j].extract( &a[j], fout, vout + a[j].vertoffset );
- INTERP_F( t, fdst[3], fout[3], fin[3] );
- INTERP_F( t, fdst[2], fout[2], fin[2] );
- INTERP_F( t, fdst[1], fout[1], fin[1] );
- INTERP_F( t, fdst[0], fout[0], fin[0] );
+ INTERP_4F(t, fdst, fout, fin);
a[j].insert[4-1]( &a[j], vdst + a[j].vertoffset, fdst );
}
a[j].insert[4-1]( &a[j], vdst + a[j].vertoffset, fdst );
}
@@
-1061,7
+1059,7
@@
void _tnl_generic_interp( GLcontext *ctx,
/* Extract color attributes from one vertex and insert them into
* another. (Shortcircuit extract/insert with memcpy).
*/
/* Extract color attributes from one vertex and insert them into
* another. (Shortcircuit extract/insert with memcpy).
*/
-void _tnl_generic_copy_pv(
GL
context *ctx, GLuint edst, GLuint esrc )
+void _tnl_generic_copy_pv(
struct gl_
context *ctx, GLuint edst, GLuint esrc )
{
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
GLubyte *vsrc = vtx->vertex_buf + esrc * vtx->vertex_size;
{
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
GLubyte *vsrc = vtx->vertex_buf + esrc * vtx->vertex_size;
@@
-1085,7
+1083,7
@@
void _tnl_generic_copy_pv( GLcontext *ctx, GLuint edst, GLuint esrc )
/* Helper functions for hardware which doesn't put back colors and/or
* edgeflags into vertices.
*/
/* Helper functions for hardware which doesn't put back colors and/or
* edgeflags into vertices.
*/
-void _tnl_generic_interp_extras(
GL
context *ctx,
+void _tnl_generic_interp_extras(
struct gl_
context *ctx,
GLfloat t,
GLuint dst, GLuint out, GLuint in,
GLboolean force_boundary )
GLfloat t,
GLuint dst, GLuint out, GLuint in,
GLboolean force_boundary )
@@
-1128,7
+1126,7
@@
void _tnl_generic_interp_extras( GLcontext *ctx,
_tnl_generic_interp(ctx, t, dst, out, in, force_boundary);
}
_tnl_generic_interp(ctx, t, dst, out, in, force_boundary);
}
-void _tnl_generic_copy_pv_extras(
GL
context *ctx,
+void _tnl_generic_copy_pv_extras(
struct gl_
context *ctx,
GLuint dst, GLuint src )
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
GLuint dst, GLuint src )
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;