Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 40212 Details for
Bug 65058
xorg-x11-6.7.0-r2 compilation fails with internal compiler
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Preprocessed C of the file that files to compile
xm_tri.c.preprocessed (text/plain), 1.05 MB, created by
Ooblick
on 2004-09-23 03:11:27 UTC
(
hide
)
Description:
Preprocessed C of the file that files to compile
Filename:
MIME Type:
Creator:
Ooblick
Created:
2004-09-23 03:11:27 UTC
Size:
1.05 MB
patch
obsolete
># 1 "xm_tri.c" ># 1 "<built-in>" ># 1 "<command line>" ># 1 "xm_tri.c" ># 34 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/X/glxheader.h" 1 ># 39 "../../../../../extras/Mesa/src/X/glxheader.h" ># 1 "../../../../../extras/Mesa/src/glheader.h" 1 ># 51 "../../../../../extras/Mesa/src/glheader.h" ># 1 "/usr/include/assert.h" 1 3 4 ># 36 "/usr/include/assert.h" 3 4 ># 1 "/usr/include/features.h" 1 3 4 ># 295 "/usr/include/features.h" 3 4 ># 1 "/usr/include/sys/cdefs.h" 1 3 4 ># 296 "/usr/include/features.h" 2 3 4 ># 318 "/usr/include/features.h" 3 4 ># 1 "/usr/include/gnu/stubs.h" 1 3 4 ># 319 "/usr/include/features.h" 2 3 4 ># 37 "/usr/include/assert.h" 2 3 4 ># 65 "/usr/include/assert.h" 3 4 > > > >extern void __assert_fail (__const char *__assertion, __const char *__file, > unsigned int __line, __const char *__function) > __attribute__ ((__noreturn__)); > > >extern void __assert_perror_fail (int __errnum, __const char *__file, > unsigned int __line, > __const char *__function) > __attribute__ ((__noreturn__)); > > > > >extern void __assert (const char *__assertion, const char *__file, int __line) > __attribute__ ((__noreturn__)); > > > ># 52 "../../../../../extras/Mesa/src/glheader.h" 2 ># 1 "/usr/include/ctype.h" 1 3 4 ># 28 "/usr/include/ctype.h" 3 4 ># 1 "/usr/include/bits/types.h" 1 3 4 ># 28 "/usr/include/bits/types.h" 3 4 ># 1 "/usr/include/bits/wordsize.h" 1 3 4 ># 29 "/usr/include/bits/types.h" 2 3 4 > > ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/stddef.h" 1 3 4 ># 213 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/stddef.h" 3 4 >typedef unsigned int size_t; ># 32 "/usr/include/bits/types.h" 2 3 4 > > >typedef unsigned char __u_char; >typedef unsigned short int __u_short; >typedef unsigned int __u_int; >typedef unsigned long int __u_long; > > >typedef signed char __int8_t; >typedef unsigned char __uint8_t; >typedef signed short int __int16_t; >typedef unsigned short int __uint16_t; >typedef signed int __int32_t; >typedef unsigned int __uint32_t; > > > > >__extension__ typedef signed long long int __int64_t; >__extension__ typedef unsigned long long int __uint64_t; > > > > > > > >__extension__ typedef long long int __quad_t; >__extension__ typedef unsigned long long int __u_quad_t; ># 129 "/usr/include/bits/types.h" 3 4 ># 1 "/usr/include/bits/typesizes.h" 1 3 4 ># 130 "/usr/include/bits/types.h" 2 3 4 > > > > > > >__extension__ typedef unsigned long long int __dev_t; >__extension__ typedef unsigned int __uid_t; >__extension__ typedef unsigned int __gid_t; >__extension__ typedef unsigned long int __ino_t; >__extension__ typedef unsigned long long int __ino64_t; >__extension__ typedef unsigned int __mode_t; >__extension__ typedef unsigned int __nlink_t; >__extension__ typedef long int __off_t; >__extension__ typedef long long int __off64_t; >__extension__ typedef int __pid_t; >__extension__ typedef struct { int __val[2]; } __fsid_t; >__extension__ typedef long int __clock_t; >__extension__ typedef unsigned long int __rlim_t; >__extension__ typedef unsigned long long int __rlim64_t; >__extension__ typedef unsigned int __id_t; >__extension__ typedef long int __time_t; >__extension__ typedef unsigned int __useconds_t; >__extension__ typedef long int __suseconds_t; > >__extension__ typedef int __daddr_t; >__extension__ typedef long int __swblk_t; >__extension__ typedef int __key_t; > > >__extension__ typedef int __clockid_t; > > >__extension__ typedef void * __timer_t; > > >__extension__ typedef long int __blksize_t; > > > > >__extension__ typedef long int __blkcnt_t; >__extension__ typedef long long int __blkcnt64_t; > > >__extension__ typedef unsigned long int __fsblkcnt_t; >__extension__ typedef unsigned long long int __fsblkcnt64_t; > > >__extension__ typedef unsigned long int __fsfilcnt_t; >__extension__ typedef unsigned long long int __fsfilcnt64_t; > >__extension__ typedef int __ssize_t; > > > >typedef __off64_t __loff_t; >typedef __quad_t *__qaddr_t; >typedef char *__caddr_t; > > >__extension__ typedef int __intptr_t; > > >__extension__ typedef unsigned int __socklen_t; ># 29 "/usr/include/ctype.h" 2 3 4 > > ># 41 "/usr/include/ctype.h" 3 4 ># 1 "/usr/include/endian.h" 1 3 4 ># 37 "/usr/include/endian.h" 3 4 ># 1 "/usr/include/bits/endian.h" 1 3 4 ># 38 "/usr/include/endian.h" 2 3 4 ># 42 "/usr/include/ctype.h" 2 3 4 > > > > > > >enum >{ > _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), > _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), > _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), > _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), > _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), > _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), > _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), > _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), > _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), > _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), > _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), > _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) >}; ># 81 "/usr/include/ctype.h" 3 4 >extern __const unsigned short int **__ctype_b_loc (void) > __attribute__ ((__const)); >extern __const __int32_t **__ctype_tolower_loc (void) > __attribute__ ((__const)); >extern __const __int32_t **__ctype_toupper_loc (void) > __attribute__ ((__const)); ># 96 "/usr/include/ctype.h" 3 4 > > > > > > >extern int isalnum (int) ; >extern int isalpha (int) ; >extern int iscntrl (int) ; >extern int isdigit (int) ; >extern int islower (int) ; >extern int isgraph (int) ; >extern int isprint (int) ; >extern int ispunct (int) ; >extern int isspace (int) ; >extern int isupper (int) ; >extern int isxdigit (int) ; > > > >extern int tolower (int __c) ; > > >extern int toupper (int __c) ; > > > > > > > > >extern int isblank (int) ; > > > > > > >extern int isctype (int __c, int __mask) ; > > > > > > >extern int isascii (int __c) ; > > > >extern int toascii (int __c) ; > > > >extern int _toupper (int) ; >extern int _tolower (int) ; ># 190 "/usr/include/ctype.h" 3 4 >extern __inline int >tolower (int __c) >{ > return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c; >} > >extern __inline int >toupper (int __c) >{ > return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c; >} ># 233 "/usr/include/ctype.h" 3 4 ># 1 "/usr/include/xlocale.h" 1 3 4 ># 28 "/usr/include/xlocale.h" 3 4 >typedef struct __locale_struct >{ > > struct locale_data *__locales[13]; > > > const unsigned short int *__ctype_b; > const int *__ctype_tolower; > const int *__ctype_toupper; > > > const char *__names[13]; >} *__locale_t; ># 234 "/usr/include/ctype.h" 2 3 4 ># 247 "/usr/include/ctype.h" 3 4 >extern int isalnum_l (int, __locale_t) ; >extern int isalpha_l (int, __locale_t) ; >extern int iscntrl_l (int, __locale_t) ; >extern int isdigit_l (int, __locale_t) ; >extern int islower_l (int, __locale_t) ; >extern int isgraph_l (int, __locale_t) ; >extern int isprint_l (int, __locale_t) ; >extern int ispunct_l (int, __locale_t) ; >extern int isspace_l (int, __locale_t) ; >extern int isupper_l (int, __locale_t) ; >extern int isxdigit_l (int, __locale_t) ; > >extern int isblank_l (int, __locale_t) ; > > > >extern int __tolower_l (int __c, __locale_t __l) ; >extern int tolower_l (int __c, __locale_t __l) ; > > >extern int __toupper_l (int __c, __locale_t __l) ; >extern int toupper_l (int __c, __locale_t __l) ; ># 323 "/usr/include/ctype.h" 3 4 > ># 53 "../../../../../extras/Mesa/src/glheader.h" 2 > > > > ># 1 "/usr/include/math.h" 1 3 4 ># 29 "/usr/include/math.h" 3 4 > > > > ># 1 "/usr/include/bits/huge_val.h" 1 3 4 ># 34 "/usr/include/math.h" 2 3 4 > ># 1 "/usr/include/bits/huge_valf.h" 1 3 4 ># 36 "/usr/include/math.h" 2 3 4 ># 1 "/usr/include/bits/huge_vall.h" 1 3 4 ># 37 "/usr/include/math.h" 2 3 4 > > ># 1 "/usr/include/bits/inf.h" 1 3 4 ># 40 "/usr/include/math.h" 2 3 4 > > ># 1 "/usr/include/bits/nan.h" 1 3 4 ># 43 "/usr/include/math.h" 2 3 4 > > > ># 1 "/usr/include/bits/mathdef.h" 1 3 4 ># 29 "/usr/include/bits/mathdef.h" 3 4 >typedef long double float_t; > >typedef long double double_t; ># 47 "/usr/include/math.h" 2 3 4 ># 70 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls.h" 1 3 4 ># 53 "/usr/include/bits/mathcalls.h" 3 4 > > >extern double acos (double __x) ; extern double __acos (double __x) ; > >extern double asin (double __x) ; extern double __asin (double __x) ; > >extern double atan (double __x) ; extern double __atan (double __x) ; > >extern double atan2 (double __y, double __x) ; extern double __atan2 (double __y, double __x) ; > > >extern double cos (double __x) ; extern double __cos (double __x) ; > >extern double sin (double __x) ; extern double __sin (double __x) ; > >extern double tan (double __x) ; extern double __tan (double __x) ; > > > > >extern double cosh (double __x) ; extern double __cosh (double __x) ; > >extern double sinh (double __x) ; extern double __sinh (double __x) ; > >extern double tanh (double __x) ; extern double __tanh (double __x) ; > > > > >extern void sincos (double __x, double *__sinx, double *__cosx) ; extern void __sincos (double __x, double *__sinx, double *__cosx) ; > > > > > > >extern double acosh (double __x) ; extern double __acosh (double __x) ; > >extern double asinh (double __x) ; extern double __asinh (double __x) ; > >extern double atanh (double __x) ; extern double __atanh (double __x) ; > > > > > > > >extern double exp (double __x) ; extern double __exp (double __x) ; > > >extern double frexp (double __x, int *__exponent) ; extern double __frexp (double __x, int *__exponent) ; > > >extern double ldexp (double __x, int __exponent) ; extern double __ldexp (double __x, int __exponent) ; > > >extern double log (double __x) ; extern double __log (double __x) ; > > >extern double log10 (double __x) ; extern double __log10 (double __x) ; > > >extern double modf (double __x, double *__iptr) ; extern double __modf (double __x, double *__iptr) ; > > > > >extern double exp10 (double __x) ; extern double __exp10 (double __x) ; > >extern double pow10 (double __x) ; extern double __pow10 (double __x) ; > > > > > >extern double expm1 (double __x) ; extern double __expm1 (double __x) ; > > >extern double log1p (double __x) ; extern double __log1p (double __x) ; > > >extern double logb (double __x) ; extern double __logb (double __x) ; > > > > > > >extern double exp2 (double __x) ; extern double __exp2 (double __x) ; > > >extern double log2 (double __x) ; extern double __log2 (double __x) ; > > > > > > > > >extern double pow (double __x, double __y) ; extern double __pow (double __x, double __y) ; > > >extern double sqrt (double __x) ; extern double __sqrt (double __x) ; > > > > > >extern double hypot (double __x, double __y) ; extern double __hypot (double __x, double __y) ; > > > > > > >extern double cbrt (double __x) ; extern double __cbrt (double __x) ; > > > > > > > > >extern double ceil (double __x) __attribute__ ((__const__)); extern double __ceil (double __x) __attribute__ ((__const__)); > > >extern double fabs (double __x) __attribute__ ((__const__)); extern double __fabs (double __x) __attribute__ ((__const__)); > > >extern double floor (double __x) __attribute__ ((__const__)); extern double __floor (double __x) __attribute__ ((__const__)); > > >extern double fmod (double __x, double __y) ; extern double __fmod (double __x, double __y) ; > > > > >extern int __isinf (double __value) __attribute__ ((__const__)); > > >extern int __finite (double __value) __attribute__ ((__const__)); > > > > > >extern int isinf (double __value) __attribute__ ((__const__)); > > >extern int finite (double __value) __attribute__ ((__const__)); > > >extern double drem (double __x, double __y) ; extern double __drem (double __x, double __y) ; > > > >extern double significand (double __x) ; extern double __significand (double __x) ; > > > > > >extern double copysign (double __x, double __y) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) __attribute__ ((__const__)); > > > > > > >extern double nan (__const char *__tagb) __attribute__ ((__const__)); extern double __nan (__const char *__tagb) __attribute__ ((__const__)); > > > > > >extern int __isnan (double __value) __attribute__ ((__const__)); > > > >extern int isnan (double __value) __attribute__ ((__const__)); > > >extern double j0 (double) ; extern double __j0 (double) ; >extern double j1 (double) ; extern double __j1 (double) ; >extern double jn (int, double) ; extern double __jn (int, double) ; >extern double y0 (double) ; extern double __y0 (double) ; >extern double y1 (double) ; extern double __y1 (double) ; >extern double yn (int, double) ; extern double __yn (int, double) ; > > > > > > >extern double erf (double) ; extern double __erf (double) ; >extern double erfc (double) ; extern double __erfc (double) ; >extern double lgamma (double) ; extern double __lgamma (double) ; > > > > > > >extern double tgamma (double) ; extern double __tgamma (double) ; > > > > > >extern double gamma (double) ; extern double __gamma (double) ; > > > > > > >extern double lgamma_r (double, int *__signgamp) ; extern double __lgamma_r (double, int *__signgamp) ; > > > > > > > >extern double rint (double __x) ; extern double __rint (double __x) ; > > >extern double nextafter (double __x, double __y) __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) __attribute__ ((__const__)); > >extern double nexttoward (double __x, long double __y) __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) __attribute__ ((__const__)); > > > >extern double remainder (double __x, double __y) ; extern double __remainder (double __x, double __y) ; > > > >extern double scalbn (double __x, int __n) ; extern double __scalbn (double __x, int __n) ; > > > >extern int ilogb (double __x) ; extern int __ilogb (double __x) ; > > > > >extern double scalbln (double __x, long int __n) ; extern double __scalbln (double __x, long int __n) ; > > > >extern double nearbyint (double __x) ; extern double __nearbyint (double __x) ; > > > >extern double round (double __x) __attribute__ ((__const__)); extern double __round (double __x) __attribute__ ((__const__)); > > > >extern double trunc (double __x) __attribute__ ((__const__)); extern double __trunc (double __x) __attribute__ ((__const__)); > > > > >extern double remquo (double __x, double __y, int *__quo) ; extern double __remquo (double __x, double __y, int *__quo) ; > > > > > > >extern long int lrint (double __x) ; extern long int __lrint (double __x) ; >extern long long int llrint (double __x) ; extern long long int __llrint (double __x) ; > > > >extern long int lround (double __x) ; extern long int __lround (double __x) ; >extern long long int llround (double __x) ; extern long long int __llround (double __x) ; > > > >extern double fdim (double __x, double __y) ; extern double __fdim (double __x, double __y) ; > > >extern double fmax (double __x, double __y) ; extern double __fmax (double __x, double __y) ; > > >extern double fmin (double __x, double __y) ; extern double __fmin (double __x, double __y) ; > > > >extern int __fpclassify (double __value) > __attribute__ ((__const__)); > > >extern int __signbit (double __value) > __attribute__ ((__const__)); > > > >extern double fma (double __x, double __y, double __z) ; extern double __fma (double __x, double __y, double __z) ; > > > > >extern double scalb (double __x, double __n) ; extern double __scalb (double __x, double __n) ; ># 71 "/usr/include/math.h" 2 3 4 ># 93 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls.h" 1 3 4 ># 53 "/usr/include/bits/mathcalls.h" 3 4 > > >extern float acosf (float __x) ; extern float __acosf (float __x) ; > >extern float asinf (float __x) ; extern float __asinf (float __x) ; > >extern float atanf (float __x) ; extern float __atanf (float __x) ; > >extern float atan2f (float __y, float __x) ; extern float __atan2f (float __y, float __x) ; > > >extern float cosf (float __x) ; extern float __cosf (float __x) ; > >extern float sinf (float __x) ; extern float __sinf (float __x) ; > >extern float tanf (float __x) ; extern float __tanf (float __x) ; > > > > >extern float coshf (float __x) ; extern float __coshf (float __x) ; > >extern float sinhf (float __x) ; extern float __sinhf (float __x) ; > >extern float tanhf (float __x) ; extern float __tanhf (float __x) ; > > > > >extern void sincosf (float __x, float *__sinx, float *__cosx) ; extern void __sincosf (float __x, float *__sinx, float *__cosx) ; > > > > > > >extern float acoshf (float __x) ; extern float __acoshf (float __x) ; > >extern float asinhf (float __x) ; extern float __asinhf (float __x) ; > >extern float atanhf (float __x) ; extern float __atanhf (float __x) ; > > > > > > > >extern float expf (float __x) ; extern float __expf (float __x) ; > > >extern float frexpf (float __x, int *__exponent) ; extern float __frexpf (float __x, int *__exponent) ; > > >extern float ldexpf (float __x, int __exponent) ; extern float __ldexpf (float __x, int __exponent) ; > > >extern float logf (float __x) ; extern float __logf (float __x) ; > > >extern float log10f (float __x) ; extern float __log10f (float __x) ; > > >extern float modff (float __x, float *__iptr) ; extern float __modff (float __x, float *__iptr) ; > > > > >extern float exp10f (float __x) ; extern float __exp10f (float __x) ; > >extern float pow10f (float __x) ; extern float __pow10f (float __x) ; > > > > > >extern float expm1f (float __x) ; extern float __expm1f (float __x) ; > > >extern float log1pf (float __x) ; extern float __log1pf (float __x) ; > > >extern float logbf (float __x) ; extern float __logbf (float __x) ; > > > > > > >extern float exp2f (float __x) ; extern float __exp2f (float __x) ; > > >extern float log2f (float __x) ; extern float __log2f (float __x) ; > > > > > > > > >extern float powf (float __x, float __y) ; extern float __powf (float __x, float __y) ; > > >extern float sqrtf (float __x) ; extern float __sqrtf (float __x) ; > > > > > >extern float hypotf (float __x, float __y) ; extern float __hypotf (float __x, float __y) ; > > > > > > >extern float cbrtf (float __x) ; extern float __cbrtf (float __x) ; > > > > > > > > >extern float ceilf (float __x) __attribute__ ((__const__)); extern float __ceilf (float __x) __attribute__ ((__const__)); > > >extern float fabsf (float __x) __attribute__ ((__const__)); extern float __fabsf (float __x) __attribute__ ((__const__)); > > >extern float floorf (float __x) __attribute__ ((__const__)); extern float __floorf (float __x) __attribute__ ((__const__)); > > >extern float fmodf (float __x, float __y) ; extern float __fmodf (float __x, float __y) ; > > > > >extern int __isinff (float __value) __attribute__ ((__const__)); > > >extern int __finitef (float __value) __attribute__ ((__const__)); > > > > > >extern int isinff (float __value) __attribute__ ((__const__)); > > >extern int finitef (float __value) __attribute__ ((__const__)); > > >extern float dremf (float __x, float __y) ; extern float __dremf (float __x, float __y) ; > > > >extern float significandf (float __x) ; extern float __significandf (float __x) ; > > > > > >extern float copysignf (float __x, float __y) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) __attribute__ ((__const__)); > > > > > > >extern float nanf (__const char *__tagb) __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) __attribute__ ((__const__)); > > > > > >extern int __isnanf (float __value) __attribute__ ((__const__)); > > > >extern int isnanf (float __value) __attribute__ ((__const__)); > > >extern float j0f (float) ; extern float __j0f (float) ; >extern float j1f (float) ; extern float __j1f (float) ; >extern float jnf (int, float) ; extern float __jnf (int, float) ; >extern float y0f (float) ; extern float __y0f (float) ; >extern float y1f (float) ; extern float __y1f (float) ; >extern float ynf (int, float) ; extern float __ynf (int, float) ; > > > > > > >extern float erff (float) ; extern float __erff (float) ; >extern float erfcf (float) ; extern float __erfcf (float) ; >extern float lgammaf (float) ; extern float __lgammaf (float) ; > > > > > > >extern float tgammaf (float) ; extern float __tgammaf (float) ; > > > > > >extern float gammaf (float) ; extern float __gammaf (float) ; > > > > > > >extern float lgammaf_r (float, int *__signgamp) ; extern float __lgammaf_r (float, int *__signgamp) ; > > > > > > > >extern float rintf (float __x) ; extern float __rintf (float __x) ; > > >extern float nextafterf (float __x, float __y) __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) __attribute__ ((__const__)); > >extern float nexttowardf (float __x, long double __y) __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) __attribute__ ((__const__)); > > > >extern float remainderf (float __x, float __y) ; extern float __remainderf (float __x, float __y) ; > > > >extern float scalbnf (float __x, int __n) ; extern float __scalbnf (float __x, int __n) ; > > > >extern int ilogbf (float __x) ; extern int __ilogbf (float __x) ; > > > > >extern float scalblnf (float __x, long int __n) ; extern float __scalblnf (float __x, long int __n) ; > > > >extern float nearbyintf (float __x) ; extern float __nearbyintf (float __x) ; > > > >extern float roundf (float __x) __attribute__ ((__const__)); extern float __roundf (float __x) __attribute__ ((__const__)); > > > >extern float truncf (float __x) __attribute__ ((__const__)); extern float __truncf (float __x) __attribute__ ((__const__)); > > > > >extern float remquof (float __x, float __y, int *__quo) ; extern float __remquof (float __x, float __y, int *__quo) ; > > > > > > >extern long int lrintf (float __x) ; extern long int __lrintf (float __x) ; >extern long long int llrintf (float __x) ; extern long long int __llrintf (float __x) ; > > > >extern long int lroundf (float __x) ; extern long int __lroundf (float __x) ; >extern long long int llroundf (float __x) ; extern long long int __llroundf (float __x) ; > > > >extern float fdimf (float __x, float __y) ; extern float __fdimf (float __x, float __y) ; > > >extern float fmaxf (float __x, float __y) ; extern float __fmaxf (float __x, float __y) ; > > >extern float fminf (float __x, float __y) ; extern float __fminf (float __x, float __y) ; > > > >extern int __fpclassifyf (float __value) > __attribute__ ((__const__)); > > >extern int __signbitf (float __value) > __attribute__ ((__const__)); > > > >extern float fmaf (float __x, float __y, float __z) ; extern float __fmaf (float __x, float __y, float __z) ; > > > > >extern float scalbf (float __x, float __n) ; extern float __scalbf (float __x, float __n) ; ># 94 "/usr/include/math.h" 2 3 4 ># 114 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathcalls.h" 1 3 4 ># 53 "/usr/include/bits/mathcalls.h" 3 4 > > >extern long double acosl (long double __x) ; extern long double __acosl (long double __x) ; > >extern long double asinl (long double __x) ; extern long double __asinl (long double __x) ; > >extern long double atanl (long double __x) ; extern long double __atanl (long double __x) ; > >extern long double atan2l (long double __y, long double __x) ; extern long double __atan2l (long double __y, long double __x) ; > > >extern long double cosl (long double __x) ; extern long double __cosl (long double __x) ; > >extern long double sinl (long double __x) ; extern long double __sinl (long double __x) ; > >extern long double tanl (long double __x) ; extern long double __tanl (long double __x) ; > > > > >extern long double coshl (long double __x) ; extern long double __coshl (long double __x) ; > >extern long double sinhl (long double __x) ; extern long double __sinhl (long double __x) ; > >extern long double tanhl (long double __x) ; extern long double __tanhl (long double __x) ; > > > > >extern void sincosl (long double __x, long double *__sinx, long double *__cosx) ; extern void __sincosl (long double __x, long double *__sinx, long double *__cosx) ; > > > > > > >extern long double acoshl (long double __x) ; extern long double __acoshl (long double __x) ; > >extern long double asinhl (long double __x) ; extern long double __asinhl (long double __x) ; > >extern long double atanhl (long double __x) ; extern long double __atanhl (long double __x) ; > > > > > > > >extern long double expl (long double __x) ; extern long double __expl (long double __x) ; > > >extern long double frexpl (long double __x, int *__exponent) ; extern long double __frexpl (long double __x, int *__exponent) ; > > >extern long double ldexpl (long double __x, int __exponent) ; extern long double __ldexpl (long double __x, int __exponent) ; > > >extern long double logl (long double __x) ; extern long double __logl (long double __x) ; > > >extern long double log10l (long double __x) ; extern long double __log10l (long double __x) ; > > >extern long double modfl (long double __x, long double *__iptr) ; extern long double __modfl (long double __x, long double *__iptr) ; > > > > >extern long double exp10l (long double __x) ; extern long double __exp10l (long double __x) ; > >extern long double pow10l (long double __x) ; extern long double __pow10l (long double __x) ; > > > > > >extern long double expm1l (long double __x) ; extern long double __expm1l (long double __x) ; > > >extern long double log1pl (long double __x) ; extern long double __log1pl (long double __x) ; > > >extern long double logbl (long double __x) ; extern long double __logbl (long double __x) ; > > > > > > >extern long double exp2l (long double __x) ; extern long double __exp2l (long double __x) ; > > >extern long double log2l (long double __x) ; extern long double __log2l (long double __x) ; > > > > > > > > >extern long double powl (long double __x, long double __y) ; extern long double __powl (long double __x, long double __y) ; > > >extern long double sqrtl (long double __x) ; extern long double __sqrtl (long double __x) ; > > > > > >extern long double hypotl (long double __x, long double __y) ; extern long double __hypotl (long double __x, long double __y) ; > > > > > > >extern long double cbrtl (long double __x) ; extern long double __cbrtl (long double __x) ; > > > > > > > > >extern long double ceill (long double __x) __attribute__ ((__const__)); extern long double __ceill (long double __x) __attribute__ ((__const__)); > > >extern long double fabsl (long double __x) __attribute__ ((__const__)); extern long double __fabsl (long double __x) __attribute__ ((__const__)); > > >extern long double floorl (long double __x) __attribute__ ((__const__)); extern long double __floorl (long double __x) __attribute__ ((__const__)); > > >extern long double fmodl (long double __x, long double __y) ; extern long double __fmodl (long double __x, long double __y) ; > > > > >extern int __isinfl (long double __value) __attribute__ ((__const__)); > > >extern int __finitel (long double __value) __attribute__ ((__const__)); > > > > > >extern int isinfl (long double __value) __attribute__ ((__const__)); > > >extern int finitel (long double __value) __attribute__ ((__const__)); > > >extern long double dreml (long double __x, long double __y) ; extern long double __dreml (long double __x, long double __y) ; > > > >extern long double significandl (long double __x) ; extern long double __significandl (long double __x) ; > > > > > >extern long double copysignl (long double __x, long double __y) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) __attribute__ ((__const__)); > > > > > > >extern long double nanl (__const char *__tagb) __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) __attribute__ ((__const__)); > > > > > >extern int __isnanl (long double __value) __attribute__ ((__const__)); > > > >extern int isnanl (long double __value) __attribute__ ((__const__)); > > >extern long double j0l (long double) ; extern long double __j0l (long double) ; >extern long double j1l (long double) ; extern long double __j1l (long double) ; >extern long double jnl (int, long double) ; extern long double __jnl (int, long double) ; >extern long double y0l (long double) ; extern long double __y0l (long double) ; >extern long double y1l (long double) ; extern long double __y1l (long double) ; >extern long double ynl (int, long double) ; extern long double __ynl (int, long double) ; > > > > > > >extern long double erfl (long double) ; extern long double __erfl (long double) ; >extern long double erfcl (long double) ; extern long double __erfcl (long double) ; >extern long double lgammal (long double) ; extern long double __lgammal (long double) ; > > > > > > >extern long double tgammal (long double) ; extern long double __tgammal (long double) ; > > > > > >extern long double gammal (long double) ; extern long double __gammal (long double) ; > > > > > > >extern long double lgammal_r (long double, int *__signgamp) ; extern long double __lgammal_r (long double, int *__signgamp) ; > > > > > > > >extern long double rintl (long double __x) ; extern long double __rintl (long double __x) ; > > >extern long double nextafterl (long double __x, long double __y) __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) __attribute__ ((__const__)); > >extern long double nexttowardl (long double __x, long double __y) __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) __attribute__ ((__const__)); > > > >extern long double remainderl (long double __x, long double __y) ; extern long double __remainderl (long double __x, long double __y) ; > > > >extern long double scalbnl (long double __x, int __n) ; extern long double __scalbnl (long double __x, int __n) ; > > > >extern int ilogbl (long double __x) ; extern int __ilogbl (long double __x) ; > > > > >extern long double scalblnl (long double __x, long int __n) ; extern long double __scalblnl (long double __x, long int __n) ; > > > >extern long double nearbyintl (long double __x) ; extern long double __nearbyintl (long double __x) ; > > > >extern long double roundl (long double __x) __attribute__ ((__const__)); extern long double __roundl (long double __x) __attribute__ ((__const__)); > > > >extern long double truncl (long double __x) __attribute__ ((__const__)); extern long double __truncl (long double __x) __attribute__ ((__const__)); > > > > >extern long double remquol (long double __x, long double __y, int *__quo) ; extern long double __remquol (long double __x, long double __y, int *__quo) ; > > > > > > >extern long int lrintl (long double __x) ; extern long int __lrintl (long double __x) ; >extern long long int llrintl (long double __x) ; extern long long int __llrintl (long double __x) ; > > > >extern long int lroundl (long double __x) ; extern long int __lroundl (long double __x) ; >extern long long int llroundl (long double __x) ; extern long long int __llroundl (long double __x) ; > > > >extern long double fdiml (long double __x, long double __y) ; extern long double __fdiml (long double __x, long double __y) ; > > >extern long double fmaxl (long double __x, long double __y) ; extern long double __fmaxl (long double __x, long double __y) ; > > >extern long double fminl (long double __x, long double __y) ; extern long double __fminl (long double __x, long double __y) ; > > > >extern int __fpclassifyl (long double __value) > __attribute__ ((__const__)); > > >extern int __signbitl (long double __value) > __attribute__ ((__const__)); > > > >extern long double fmal (long double __x, long double __y, long double __z) ; extern long double __fmal (long double __x, long double __y, long double __z) ; > > > > >extern long double scalbl (long double __x, long double __n) ; extern long double __scalbl (long double __x, long double __n) ; ># 115 "/usr/include/math.h" 2 3 4 ># 130 "/usr/include/math.h" 3 4 >extern int signgam; ># 171 "/usr/include/math.h" 3 4 >enum > { > FP_NAN, > > FP_INFINITE, > > FP_ZERO, > > FP_SUBNORMAL, > > FP_NORMAL > > }; ># 257 "/usr/include/math.h" 3 4 >typedef enum >{ > _IEEE_ = -1, > _SVID_, > _XOPEN_, > _POSIX_, > _ISOC_ >} _LIB_VERSION_TYPE; > > > > >extern _LIB_VERSION_TYPE _LIB_VERSION; ># 282 "/usr/include/math.h" 3 4 >struct exception > > { > int type; > char *name; > double arg1; > double arg2; > double retval; > }; > > > > >extern int matherr (struct exception *__exc); ># 382 "/usr/include/math.h" 3 4 ># 1 "/usr/include/bits/mathinline.h" 1 3 4 ># 126 "/usr/include/bits/mathinline.h" 3 4 >extern __inline int >__signbitf (float __x) >{ > __extension__ union { float __f; int __i; } __u = { __f: __x }; > return __u.__i < 0; >} >extern __inline int >__signbit (double __x) >{ > __extension__ union { double __d; int __i[2]; } __u = { __d: __x }; > return __u.__i[1] < 0; >} >extern __inline int >__signbitl (long double __x) >{ > __extension__ union { long double __l; int __i[3]; } __u = { __l: __x }; > return (__u.__i[2] & 0x8000) != 0; >} ># 383 "/usr/include/math.h" 2 3 4 ># 438 "/usr/include/math.h" 3 4 > ># 58 "../../../../../extras/Mesa/src/glheader.h" 2 > ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/limits.h" 1 3 4 ># 11 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/limits.h" 3 4 ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/syslimits.h" 1 3 4 > > > > > > ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/limits.h" 1 3 4 ># 122 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/limits.h" 3 4 ># 1 "/usr/include/limits.h" 1 3 4 ># 144 "/usr/include/limits.h" 3 4 ># 1 "/usr/include/bits/posix1_lim.h" 1 3 4 ># 130 "/usr/include/bits/posix1_lim.h" 3 4 ># 1 "/usr/include/bits/local_lim.h" 1 3 4 ># 36 "/usr/include/bits/local_lim.h" 3 4 ># 1 "/usr/include/linux/limits.h" 1 3 4 ># 37 "/usr/include/bits/local_lim.h" 2 3 4 ># 131 "/usr/include/bits/posix1_lim.h" 2 3 4 ># 145 "/usr/include/limits.h" 2 3 4 > > > ># 1 "/usr/include/bits/posix2_lim.h" 1 3 4 ># 149 "/usr/include/limits.h" 2 3 4 > > > ># 1 "/usr/include/bits/xopen_lim.h" 1 3 4 ># 34 "/usr/include/bits/xopen_lim.h" 3 4 ># 1 "/usr/include/bits/stdio_lim.h" 1 3 4 ># 35 "/usr/include/bits/xopen_lim.h" 2 3 4 ># 153 "/usr/include/limits.h" 2 3 4 ># 123 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/limits.h" 2 3 4 ># 8 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/syslimits.h" 2 3 4 ># 12 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/limits.h" 2 3 4 ># 60 "../../../../../extras/Mesa/src/glheader.h" 2 ># 1 "/usr/include/stdlib.h" 1 3 4 ># 33 "/usr/include/stdlib.h" 3 4 ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/stddef.h" 1 3 4 ># 325 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/stddef.h" 3 4 >typedef long int wchar_t; ># 34 "/usr/include/stdlib.h" 2 3 4 > > > > > > > > ># 1 "/usr/include/bits/waitflags.h" 1 3 4 ># 43 "/usr/include/stdlib.h" 2 3 4 ># 1 "/usr/include/bits/waitstatus.h" 1 3 4 ># 65 "/usr/include/bits/waitstatus.h" 3 4 >union wait > { > int w_status; > struct > { > > unsigned int __w_termsig:7; > unsigned int __w_coredump:1; > unsigned int __w_retcode:8; > unsigned int:16; > > > > > > > > } __wait_terminated; > struct > { > > unsigned int __w_stopval:8; > unsigned int __w_stopsig:8; > unsigned int:16; > > > > > > > } __wait_stopped; > }; ># 44 "/usr/include/stdlib.h" 2 3 4 ># 68 "/usr/include/stdlib.h" 3 4 >typedef union > { > union wait *__uptr; > int *__iptr; > } __WAIT_STATUS __attribute__ ((__transparent_union__)); ># 93 "/usr/include/stdlib.h" 3 4 > > >typedef struct > { > int quot; > int rem; > } div_t; > > > >typedef struct > { > long int quot; > long int rem; > } ldiv_t; > > > > > > > >__extension__ typedef struct > { > long long int quot; > long long int rem; > } lldiv_t; > > ># 137 "/usr/include/stdlib.h" 3 4 >extern size_t __ctype_get_mb_cur_max (void) ; > > > > >extern double atof (__const char *__nptr) __attribute__ ((__pure__)); > >extern int atoi (__const char *__nptr) __attribute__ ((__pure__)); > >extern long int atol (__const char *__nptr) __attribute__ ((__pure__)); > > > > > >__extension__ extern long long int atoll (__const char *__nptr) > __attribute__ ((__pure__)); > > > > > >extern double strtod (__const char *__restrict __nptr, > char **__restrict __endptr) ; > > > > > >extern float strtof (__const char *__restrict __nptr, > char **__restrict __endptr) ; > >extern long double strtold (__const char *__restrict __nptr, > char **__restrict __endptr) ; > > > > > >extern long int strtol (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) ; > >extern unsigned long int strtoul (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) > ; > > > > >__extension__ >extern long long int strtoq (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) ; > >__extension__ >extern unsigned long long int strtouq (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) > ; > > > > > >__extension__ >extern long long int strtoll (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) ; > >__extension__ >extern unsigned long long int strtoull (__const char *__restrict __nptr, > char **__restrict __endptr, int __base) > ; > ># 229 "/usr/include/stdlib.h" 3 4 >extern long int strtol_l (__const char *__restrict __nptr, > char **__restrict __endptr, int __base, > __locale_t __loc) ; > >extern unsigned long int strtoul_l (__const char *__restrict __nptr, > char **__restrict __endptr, > int __base, __locale_t __loc) ; > >__extension__ >extern long long int strtoll_l (__const char *__restrict __nptr, > char **__restrict __endptr, int __base, > __locale_t __loc) ; > >__extension__ >extern unsigned long long int strtoull_l (__const char *__restrict __nptr, > char **__restrict __endptr, > int __base, __locale_t __loc) > ; > >extern double strtod_l (__const char *__restrict __nptr, > char **__restrict __endptr, __locale_t __loc) > ; > >extern float strtof_l (__const char *__restrict __nptr, > char **__restrict __endptr, __locale_t __loc) ; > >extern long double strtold_l (__const char *__restrict __nptr, > char **__restrict __endptr, > __locale_t __loc) ; > > > > > > >extern double __strtod_internal (__const char *__restrict __nptr, > char **__restrict __endptr, int __group) > ; >extern float __strtof_internal (__const char *__restrict __nptr, > char **__restrict __endptr, int __group) > ; >extern long double __strtold_internal (__const char *__restrict __nptr, > char **__restrict __endptr, > int __group) ; > >extern long int __strtol_internal (__const char *__restrict __nptr, > char **__restrict __endptr, > int __base, int __group) ; > > > >extern unsigned long int __strtoul_internal (__const char *__restrict __nptr, > char **__restrict __endptr, > int __base, int __group) ; > > > > >__extension__ >extern long long int __strtoll_internal (__const char *__restrict __nptr, > char **__restrict __endptr, > int __base, int __group) ; > > > >__extension__ >extern unsigned long long int __strtoull_internal (__const char * > __restrict __nptr, > char **__restrict __endptr, > int __base, int __group) > ; > > > > > > > > >extern __inline double >strtod (__const char *__restrict __nptr, char **__restrict __endptr) >{ > return __strtod_internal (__nptr, __endptr, 0); >} >extern __inline long int >strtol (__const char *__restrict __nptr, char **__restrict __endptr, > int __base) >{ > return __strtol_internal (__nptr, __endptr, __base, 0); >} >extern __inline unsigned long int >strtoul (__const char *__restrict __nptr, char **__restrict __endptr, > int __base) >{ > return __strtoul_internal (__nptr, __endptr, __base, 0); >} > > > > >extern __inline float >strtof (__const char *__restrict __nptr, char **__restrict __endptr) >{ > return __strtof_internal (__nptr, __endptr, 0); >} >extern __inline long double >strtold (__const char *__restrict __nptr, char **__restrict __endptr) >{ > return __strtold_internal (__nptr, __endptr, 0); >} > > > > >__extension__ extern __inline long long int >strtoq (__const char *__restrict __nptr, char **__restrict __endptr, > int __base) >{ > return __strtoll_internal (__nptr, __endptr, __base, 0); >} >__extension__ extern __inline unsigned long long int >strtouq (__const char *__restrict __nptr, char **__restrict __endptr, > int __base) >{ > return __strtoull_internal (__nptr, __endptr, __base, 0); >} > > > > >__extension__ extern __inline long long int >strtoll (__const char *__restrict __nptr, char **__restrict __endptr, > int __base) >{ > return __strtoll_internal (__nptr, __endptr, __base, 0); >} >__extension__ extern __inline unsigned long long int >strtoull (__const char * __restrict __nptr, char **__restrict __endptr, > int __base) >{ > return __strtoull_internal (__nptr, __endptr, __base, 0); >} > > > > >extern __inline double >atof (__const char *__nptr) >{ > return strtod (__nptr, (char **) ((void *)0)); >} >extern __inline int >atoi (__const char *__nptr) >{ > return (int) strtol (__nptr, (char **) ((void *)0), 10); >} >extern __inline long int >atol (__const char *__nptr) >{ > return strtol (__nptr, (char **) ((void *)0), 10); >} > > > > >__extension__ extern __inline long long int >atoll (__const char *__nptr) >{ > return strtoll (__nptr, (char **) ((void *)0), 10); >} > ># 408 "/usr/include/stdlib.h" 3 4 >extern char *l64a (long int __n) ; > > >extern long int a64l (__const char *__s) __attribute__ ((__pure__)); > > > > ># 1 "/usr/include/sys/types.h" 1 3 4 ># 29 "/usr/include/sys/types.h" 3 4 > > > > > > >typedef __u_char u_char; >typedef __u_short u_short; >typedef __u_int u_int; >typedef __u_long u_long; >typedef __quad_t quad_t; >typedef __u_quad_t u_quad_t; >typedef __fsid_t fsid_t; > > > > >typedef __loff_t loff_t; > > > >typedef __ino_t ino_t; > > > > > > >typedef __ino64_t ino64_t; > > > > >typedef __dev_t dev_t; > > > > >typedef __gid_t gid_t; > > > > >typedef __mode_t mode_t; > > > > >typedef __nlink_t nlink_t; > > > > >typedef __uid_t uid_t; > > > > > >typedef __off_t off_t; > > > > > > >typedef __off64_t off64_t; > > > > >typedef __pid_t pid_t; > > > > >typedef __id_t id_t; > > > > >typedef __ssize_t ssize_t; > > > > > >typedef __daddr_t daddr_t; >typedef __caddr_t caddr_t; > > > > > >typedef __key_t key_t; ># 133 "/usr/include/sys/types.h" 3 4 ># 1 "/usr/include/time.h" 1 3 4 ># 58 "/usr/include/time.h" 3 4 > > >typedef __clock_t clock_t; > > > ># 74 "/usr/include/time.h" 3 4 > > >typedef __time_t time_t; > > > ># 92 "/usr/include/time.h" 3 4 >typedef __clockid_t clockid_t; ># 104 "/usr/include/time.h" 3 4 >typedef __timer_t timer_t; ># 134 "/usr/include/sys/types.h" 2 3 4 > > > >typedef __useconds_t useconds_t; > > > >typedef __suseconds_t suseconds_t; > > > > > ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/stddef.h" 1 3 4 ># 148 "/usr/include/sys/types.h" 2 3 4 > > > >typedef unsigned long int ulong; >typedef unsigned short int ushort; >typedef unsigned int uint; ># 191 "/usr/include/sys/types.h" 3 4 >typedef int int8_t __attribute__ ((__mode__ (__QI__))); >typedef int int16_t __attribute__ ((__mode__ (__HI__))); >typedef int int32_t __attribute__ ((__mode__ (__SI__))); >typedef int int64_t __attribute__ ((__mode__ (__DI__))); > > >typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); >typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); >typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); >typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); > >typedef int register_t __attribute__ ((__mode__ (__word__))); ># 216 "/usr/include/sys/types.h" 3 4 ># 1 "/usr/include/sys/select.h" 1 3 4 ># 31 "/usr/include/sys/select.h" 3 4 ># 1 "/usr/include/bits/select.h" 1 3 4 ># 32 "/usr/include/sys/select.h" 2 3 4 > > ># 1 "/usr/include/bits/sigset.h" 1 3 4 ># 23 "/usr/include/bits/sigset.h" 3 4 >typedef int __sig_atomic_t; > > > > >typedef struct > { > unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; > } __sigset_t; ># 35 "/usr/include/sys/select.h" 2 3 4 > > > >typedef __sigset_t sigset_t; > > > > > ># 1 "/usr/include/time.h" 1 3 4 ># 118 "/usr/include/time.h" 3 4 >struct timespec > { > __time_t tv_sec; > long int tv_nsec; > }; ># 45 "/usr/include/sys/select.h" 2 3 4 > ># 1 "/usr/include/bits/time.h" 1 3 4 ># 69 "/usr/include/bits/time.h" 3 4 >struct timeval > { > __time_t tv_sec; > __suseconds_t tv_usec; > }; ># 47 "/usr/include/sys/select.h" 2 3 4 ># 55 "/usr/include/sys/select.h" 3 4 >typedef long int __fd_mask; ># 67 "/usr/include/sys/select.h" 3 4 >typedef struct > { > > > > __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))]; > > > > > > } fd_set; > > > > > > >typedef __fd_mask fd_mask; ># 99 "/usr/include/sys/select.h" 3 4 > ># 109 "/usr/include/sys/select.h" 3 4 >extern int select (int __nfds, fd_set *__restrict __readfds, > fd_set *__restrict __writefds, > fd_set *__restrict __exceptfds, > struct timeval *__restrict __timeout); ># 121 "/usr/include/sys/select.h" 3 4 >extern int pselect (int __nfds, fd_set *__restrict __readfds, > fd_set *__restrict __writefds, > fd_set *__restrict __exceptfds, > const struct timespec *__restrict __timeout, > const __sigset_t *__restrict __sigmask); > > > ># 217 "/usr/include/sys/types.h" 2 3 4 > > ># 1 "/usr/include/sys/sysmacros.h" 1 3 4 ># 29 "/usr/include/sys/sysmacros.h" 3 4 >__extension__ >extern __inline unsigned int gnu_dev_major (unsigned long long int __dev) > ; >__extension__ >extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev) > ; >__extension__ >extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major, > unsigned int __minor) > ; > > >__extension__ extern __inline unsigned int >gnu_dev_major (unsigned long long int __dev) >{ > return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); >} > >__extension__ extern __inline unsigned int >gnu_dev_minor (unsigned long long int __dev) >{ > return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); >} > >__extension__ extern __inline unsigned long long int >gnu_dev_makedev (unsigned int __major, unsigned int __minor) >{ > return ((__minor & 0xff) | ((__major & 0xfff) << 8) > | (((unsigned long long int) (__minor & ~0xff)) << 12) > | (((unsigned long long int) (__major & ~0xfff)) << 32)); >} ># 220 "/usr/include/sys/types.h" 2 3 4 > > > > >typedef __blksize_t blksize_t; > > > > > > >typedef __blkcnt_t blkcnt_t; > > > >typedef __fsblkcnt_t fsblkcnt_t; > > > >typedef __fsfilcnt_t fsfilcnt_t; ># 258 "/usr/include/sys/types.h" 3 4 >typedef __blkcnt64_t blkcnt64_t; >typedef __fsblkcnt64_t fsblkcnt64_t; >typedef __fsfilcnt64_t fsfilcnt64_t; > > > > > ># 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 ># 36 "/usr/include/bits/pthreadtypes.h" 3 4 >typedef unsigned long int pthread_t; > > >typedef union >{ > char __size[36]; > long int __align; >} pthread_attr_t; > > > > >typedef union >{ > struct > { > int __lock; > unsigned int __count; > int __owner; > > > int __kind; > unsigned int __nusers; > int __spins; > } __data; > char __size[24]; > long int __align; >} pthread_mutex_t; > >typedef union >{ > char __size[4]; > long int __align; >} pthread_mutexattr_t; > > > > >typedef union >{ > struct > { > int __lock; > int __clock; > unsigned long long int __total_seq; > unsigned long long int __wakeup_seq; > unsigned long long int __woken_seq; > void *__mutex; > } __data; > char __size[48]; > long long int __align; >} pthread_cond_t; > >typedef union >{ > char __size[4]; > long int __align; >} pthread_condattr_t; > > > >typedef unsigned int pthread_key_t; > > > >typedef int pthread_once_t; > > > > > >typedef union >{ > struct > { > int __lock; > unsigned int __nr_readers; > unsigned int __readers_wakeup; > unsigned int __writer_wakeup; > unsigned int __nr_readers_queued; > unsigned int __nr_writers_queued; > > > unsigned int __flags; > int __writer; > } __data; > char __size[32]; > long int __align; >} pthread_rwlock_t; > >typedef union >{ > char __size[8]; > long int __align; >} pthread_rwlockattr_t; > > > > > >typedef volatile int pthread_spinlock_t; > > > > >typedef union >{ > char __size[20]; > long int __align; >} pthread_barrier_t; > >typedef union >{ > char __size[4]; > int __align; >} pthread_barrierattr_t; ># 267 "/usr/include/sys/types.h" 2 3 4 > > > ># 417 "/usr/include/stdlib.h" 2 3 4 > > > > > > >extern long int random (void) ; > > >extern void srandom (unsigned int __seed) ; > > > > > >extern char *initstate (unsigned int __seed, char *__statebuf, > size_t __statelen) ; > > > >extern char *setstate (char *__statebuf) ; > > > > > > > >struct random_data > { > int32_t *fptr; > int32_t *rptr; > int32_t *state; > int rand_type; > int rand_deg; > int rand_sep; > int32_t *end_ptr; > }; > >extern int random_r (struct random_data *__restrict __buf, > int32_t *__restrict __result) ; > >extern int srandom_r (unsigned int __seed, struct random_data *__buf) ; > >extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, > size_t __statelen, > struct random_data *__restrict __buf) ; > >extern int setstate_r (char *__restrict __statebuf, > struct random_data *__restrict __buf) ; > > > > > > >extern int rand (void) ; > >extern void srand (unsigned int __seed) ; > > > > >extern int rand_r (unsigned int *__seed) ; > > > > > > > >extern double drand48 (void) ; >extern double erand48 (unsigned short int __xsubi[3]) ; > > >extern long int lrand48 (void) ; >extern long int nrand48 (unsigned short int __xsubi[3]) ; > > >extern long int mrand48 (void) ; >extern long int jrand48 (unsigned short int __xsubi[3]) ; > > >extern void srand48 (long int __seedval) ; >extern unsigned short int *seed48 (unsigned short int __seed16v[3]) ; >extern void lcong48 (unsigned short int __param[7]) ; > > > > > >struct drand48_data > { > unsigned short int __x[3]; > unsigned short int __old_x[3]; > unsigned short int __c; > unsigned short int __init; > unsigned long long int __a; > }; > > >extern int drand48_r (struct drand48_data *__restrict __buffer, > double *__restrict __result) ; >extern int erand48_r (unsigned short int __xsubi[3], > struct drand48_data *__restrict __buffer, > double *__restrict __result) ; > > >extern int lrand48_r (struct drand48_data *__restrict __buffer, > long int *__restrict __result) ; >extern int nrand48_r (unsigned short int __xsubi[3], > struct drand48_data *__restrict __buffer, > long int *__restrict __result) ; > > >extern int mrand48_r (struct drand48_data *__restrict __buffer, > long int *__restrict __result) ; >extern int jrand48_r (unsigned short int __xsubi[3], > struct drand48_data *__restrict __buffer, > long int *__restrict __result) ; > > >extern int srand48_r (long int __seedval, struct drand48_data *__buffer) > ; > >extern int seed48_r (unsigned short int __seed16v[3], > struct drand48_data *__buffer) ; > >extern int lcong48_r (unsigned short int __param[7], > struct drand48_data *__buffer) ; > > > > > > > > > >extern void *malloc (size_t __size) __attribute__ ((__malloc__)); > >extern void *calloc (size_t __nmemb, size_t __size) > __attribute__ ((__malloc__)); > > > > > > > >extern void *realloc (void *__ptr, size_t __size) __attribute__ ((__malloc__)); > >extern void free (void *__ptr) ; > > > > >extern void cfree (void *__ptr) ; > > > ># 1 "/usr/include/alloca.h" 1 3 4 ># 25 "/usr/include/alloca.h" 3 4 ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/stddef.h" 1 3 4 ># 26 "/usr/include/alloca.h" 2 3 4 > > > > > > > >extern void *alloca (size_t __size) ; > > > > > > ># 579 "/usr/include/stdlib.h" 2 3 4 > > > > >extern void *valloc (size_t __size) __attribute__ ((__malloc__)); > > > > >extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) > __attribute__ ((__malloc__)); > > > > >extern void abort (void) __attribute__ ((__noreturn__)); > > > >extern int atexit (void (*__func) (void)) ; > > > > > >extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) > ; > > > > > > >extern void exit (int __status) __attribute__ ((__noreturn__)); > > > > > > >extern void _Exit (int __status) __attribute__ ((__noreturn__)); > > > > > > >extern char *getenv (__const char *__name) ; > > > > >extern char *__secure_getenv (__const char *__name) ; > > > > > >extern int putenv (char *__string) ; > > > > > >extern int setenv (__const char *__name, __const char *__value, int __replace) > ; > > >extern int unsetenv (__const char *__name) ; > > > > > > >extern int clearenv (void) ; ># 663 "/usr/include/stdlib.h" 3 4 >extern char *mktemp (char *__template) ; ># 674 "/usr/include/stdlib.h" 3 4 >extern int mkstemp (char *__template); ># 683 "/usr/include/stdlib.h" 3 4 >extern int mkstemp64 (char *__template); ># 693 "/usr/include/stdlib.h" 3 4 >extern char *mkdtemp (char *__template) ; > > > > > > > > >extern int system (__const char *__command); > > > > > > > >extern char *canonicalize_file_name (__const char *__name) ; ># 720 "/usr/include/stdlib.h" 3 4 >extern char *realpath (__const char *__restrict __name, > char *__restrict __resolved) ; > > > > > > >typedef int (*__compar_fn_t) (__const void *, __const void *); > > >typedef __compar_fn_t comparison_fn_t; > > > > > > >extern void *bsearch (__const void *__key, __const void *__base, > size_t __nmemb, size_t __size, __compar_fn_t __compar); > > > >extern void qsort (void *__base, size_t __nmemb, size_t __size, > __compar_fn_t __compar); > > > >extern int abs (int __x) __attribute__ ((__const__)); >extern long int labs (long int __x) __attribute__ ((__const__)); > > > >__extension__ extern long long int llabs (long long int __x) > __attribute__ ((__const__)); > > > > > > > >extern div_t div (int __numer, int __denom) > __attribute__ ((__const__)); >extern ldiv_t ldiv (long int __numer, long int __denom) > __attribute__ ((__const__)); > > > > >__extension__ extern lldiv_t lldiv (long long int __numer, > long long int __denom) > __attribute__ ((__const__)); > ># 784 "/usr/include/stdlib.h" 3 4 >extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign) ; > > > > >extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign) ; > > > > >extern char *gcvt (double __value, int __ndigit, char *__buf) ; > > > > >extern char *qecvt (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign) ; >extern char *qfcvt (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign) ; >extern char *qgcvt (long double __value, int __ndigit, char *__buf) ; > > > > >extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign, char *__restrict __buf, > size_t __len) ; >extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, > int *__restrict __sign, char *__restrict __buf, > size_t __len) ; > >extern int qecvt_r (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign, > char *__restrict __buf, size_t __len) ; >extern int qfcvt_r (long double __value, int __ndigit, > int *__restrict __decpt, int *__restrict __sign, > char *__restrict __buf, size_t __len) ; > > > > > > > >extern int mblen (__const char *__s, size_t __n) ; > > >extern int mbtowc (wchar_t *__restrict __pwc, > __const char *__restrict __s, size_t __n) ; > > >extern int wctomb (char *__s, wchar_t __wchar) ; > > > >extern size_t mbstowcs (wchar_t *__restrict __pwcs, > __const char *__restrict __s, size_t __n) ; > >extern size_t wcstombs (char *__restrict __s, > __const wchar_t *__restrict __pwcs, size_t __n) > ; > > > > > > > > >extern int rpmatch (__const char *__response) ; ># 866 "/usr/include/stdlib.h" 3 4 >extern int getsubopt (char **__restrict __optionp, > char *__const *__restrict __tokens, > char **__restrict __valuep) ; > > > > > >extern void setkey (__const char *__key) ; > > > > > > > >extern int posix_openpt (int __oflag); > > > > > > > >extern int grantpt (int __fd) ; > > > >extern int unlockpt (int __fd) ; > > > > >extern char *ptsname (int __fd) ; > > > > > > >extern int ptsname_r (int __fd, char *__buf, size_t __buflen) ; > > >extern int getpt (void); > > > > > > >extern int getloadavg (double __loadavg[], int __nelem) ; > > > > > > ># 61 "../../../../../extras/Mesa/src/glheader.h" 2 ># 1 "/usr/include/stdio.h" 1 3 4 ># 30 "/usr/include/stdio.h" 3 4 > > > > ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/stddef.h" 1 3 4 ># 35 "/usr/include/stdio.h" 2 3 4 ># 44 "/usr/include/stdio.h" 3 4 > > >typedef struct _IO_FILE FILE; > > > > > ># 62 "/usr/include/stdio.h" 3 4 >typedef struct _IO_FILE __FILE; ># 72 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/libio.h" 1 3 4 ># 32 "/usr/include/libio.h" 3 4 ># 1 "/usr/include/_G_config.h" 1 3 4 ># 14 "/usr/include/_G_config.h" 3 4 ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/stddef.h" 1 3 4 ># 354 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/stddef.h" 3 4 >typedef unsigned int wint_t; ># 15 "/usr/include/_G_config.h" 2 3 4 ># 24 "/usr/include/_G_config.h" 3 4 ># 1 "/usr/include/wchar.h" 1 3 4 ># 48 "/usr/include/wchar.h" 3 4 ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/stddef.h" 1 3 4 ># 49 "/usr/include/wchar.h" 2 3 4 > ># 1 "/usr/include/bits/wchar.h" 1 3 4 ># 51 "/usr/include/wchar.h" 2 3 4 ># 76 "/usr/include/wchar.h" 3 4 >typedef struct >{ > int __count; > union > { > wint_t __wch; > char __wchb[4]; > } __value; >} __mbstate_t; ># 25 "/usr/include/_G_config.h" 2 3 4 > >typedef struct >{ > __off_t __pos; > __mbstate_t __state; >} _G_fpos_t; >typedef struct >{ > __off64_t __pos; > __mbstate_t __state; >} _G_fpos64_t; ># 44 "/usr/include/_G_config.h" 3 4 ># 1 "/usr/include/gconv.h" 1 3 4 ># 28 "/usr/include/gconv.h" 3 4 ># 1 "/usr/include/wchar.h" 1 3 4 ># 48 "/usr/include/wchar.h" 3 4 ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/stddef.h" 1 3 4 ># 49 "/usr/include/wchar.h" 2 3 4 ># 29 "/usr/include/gconv.h" 2 3 4 > > ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/stddef.h" 1 3 4 ># 32 "/usr/include/gconv.h" 2 3 4 > > > > > >enum >{ > __GCONV_OK = 0, > __GCONV_NOCONV, > __GCONV_NODB, > __GCONV_NOMEM, > > __GCONV_EMPTY_INPUT, > __GCONV_FULL_OUTPUT, > __GCONV_ILLEGAL_INPUT, > __GCONV_INCOMPLETE_INPUT, > > __GCONV_ILLEGAL_DESCRIPTOR, > __GCONV_INTERNAL_ERROR >}; > > > >enum >{ > __GCONV_IS_LAST = 0x0001, > __GCONV_IGNORE_ERRORS = 0x0002 >}; > > > >struct __gconv_step; >struct __gconv_step_data; >struct __gconv_loaded_object; >struct __gconv_trans_data; > > > >typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *, > __const unsigned char **, __const unsigned char *, > unsigned char **, size_t *, int, int); > > >typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char); > > >typedef int (*__gconv_init_fct) (struct __gconv_step *); >typedef void (*__gconv_end_fct) (struct __gconv_step *); > > > >typedef int (*__gconv_trans_fct) (struct __gconv_step *, > struct __gconv_step_data *, void *, > __const unsigned char *, > __const unsigned char **, > __const unsigned char *, unsigned char **, > size_t *); > > >typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *, > __const unsigned char *, > unsigned char *, unsigned char *); > > >typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***, > size_t *); > > >typedef int (*__gconv_trans_init_fct) (void **, const char *); >typedef void (*__gconv_trans_end_fct) (void *); > >struct __gconv_trans_data >{ > > __gconv_trans_fct __trans_fct; > __gconv_trans_context_fct __trans_context_fct; > __gconv_trans_end_fct __trans_end_fct; > void *__data; > struct __gconv_trans_data *__next; >}; > > > >struct __gconv_step >{ > struct __gconv_loaded_object *__shlib_handle; > __const char *__modname; > > int __counter; > > char *__from_name; > char *__to_name; > > __gconv_fct __fct; > __gconv_btowc_fct __btowc_fct; > __gconv_init_fct __init_fct; > __gconv_end_fct __end_fct; > > > > int __min_needed_from; > int __max_needed_from; > int __min_needed_to; > int __max_needed_to; > > > int __stateful; > > void *__data; >}; > > > >struct __gconv_step_data >{ > unsigned char *__outbuf; > unsigned char *__outbufend; > > > > int __flags; > > > > int __invocation_counter; > > > > int __internal_use; > > __mbstate_t *__statep; > __mbstate_t __state; > > > > struct __gconv_trans_data *__trans; >}; > > > >typedef struct __gconv_info >{ > size_t __nsteps; > struct __gconv_step *__steps; > __extension__ struct __gconv_step_data __data []; >} *__gconv_t; ># 45 "/usr/include/_G_config.h" 2 3 4 >typedef union >{ > struct __gconv_info __cd; > struct > { > struct __gconv_info __cd; > struct __gconv_step_data __data; > } __combined; >} _G_iconv_t; > >typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); >typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); >typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); >typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); ># 33 "/usr/include/libio.h" 2 3 4 ># 53 "/usr/include/libio.h" 3 4 ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/stdarg.h" 1 3 4 ># 43 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/stdarg.h" 3 4 >typedef __builtin_va_list __gnuc_va_list; ># 54 "/usr/include/libio.h" 2 3 4 ># 163 "/usr/include/libio.h" 3 4 >struct _IO_jump_t; struct _IO_FILE; ># 173 "/usr/include/libio.h" 3 4 >typedef void _IO_lock_t; > > > > > >struct _IO_marker { > struct _IO_marker *_next; > struct _IO_FILE *_sbuf; > > > > int _pos; ># 196 "/usr/include/libio.h" 3 4 >}; > > >enum __codecvt_result >{ > __codecvt_ok, > __codecvt_partial, > __codecvt_error, > __codecvt_noconv >}; ># 264 "/usr/include/libio.h" 3 4 >struct _IO_FILE { > int _flags; > > > > > char* _IO_read_ptr; > char* _IO_read_end; > char* _IO_read_base; > char* _IO_write_base; > char* _IO_write_ptr; > char* _IO_write_end; > char* _IO_buf_base; > char* _IO_buf_end; > > char *_IO_save_base; > char *_IO_backup_base; > char *_IO_save_end; > > struct _IO_marker *_markers; > > struct _IO_FILE *_chain; > > int _fileno; > > > > int _flags2; > > __off_t _old_offset; > > > > unsigned short _cur_column; > signed char _vtable_offset; > char _shortbuf[1]; > > > > _IO_lock_t *_lock; ># 312 "/usr/include/libio.h" 3 4 > __off64_t _offset; > > > > > > void *__pad1; > void *__pad2; > > int _mode; > > char _unused2[15 * sizeof (int) - 2 * sizeof (void *)]; > >}; > > >typedef struct _IO_FILE _IO_FILE; > > >struct _IO_FILE_plus; > >extern struct _IO_FILE_plus _IO_2_1_stdin_; >extern struct _IO_FILE_plus _IO_2_1_stdout_; >extern struct _IO_FILE_plus _IO_2_1_stderr_; ># 351 "/usr/include/libio.h" 3 4 >typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); > > > > > > > >typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, > size_t __n); > > > > > > > >typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); > > >typedef int __io_close_fn (void *__cookie); > > > > >typedef __io_read_fn cookie_read_function_t; >typedef __io_write_fn cookie_write_function_t; >typedef __io_seek_fn cookie_seek_function_t; >typedef __io_close_fn cookie_close_function_t; > > >typedef struct >{ > __io_read_fn *read; > __io_write_fn *write; > __io_seek_fn *seek; > __io_close_fn *close; >} _IO_cookie_io_functions_t; >typedef _IO_cookie_io_functions_t cookie_io_functions_t; > >struct _IO_cookie_file; > > >extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, > void *__cookie, _IO_cookie_io_functions_t __fns); > > > > > > > >extern int __underflow (_IO_FILE *) ; >extern int __uflow (_IO_FILE *) ; >extern int __overflow (_IO_FILE *, int) ; >extern wint_t __wunderflow (_IO_FILE *) ; >extern wint_t __wuflow (_IO_FILE *) ; >extern wint_t __woverflow (_IO_FILE *, wint_t) ; ># 441 "/usr/include/libio.h" 3 4 >extern int _IO_getc (_IO_FILE *__fp) ; >extern int _IO_putc (int __c, _IO_FILE *__fp) ; >extern int _IO_feof (_IO_FILE *__fp) ; >extern int _IO_ferror (_IO_FILE *__fp) ; > >extern int _IO_peekc_locked (_IO_FILE *__fp) ; > > > > > >extern void _IO_flockfile (_IO_FILE *) ; >extern void _IO_funlockfile (_IO_FILE *) ; >extern int _IO_ftrylockfile (_IO_FILE *) ; ># 471 "/usr/include/libio.h" 3 4 >extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, > __gnuc_va_list, int *__restrict) ; >extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, > __gnuc_va_list) ; >extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) ; >extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) ; > >extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) ; >extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) ; > >extern void _IO_free_backup_area (_IO_FILE *) ; ># 73 "/usr/include/stdio.h" 2 3 4 > > > > >typedef __gnuc_va_list va_list; ># 86 "/usr/include/stdio.h" 3 4 > > >typedef _G_fpos_t fpos_t; > > > > > >typedef _G_fpos64_t fpos64_t; ># 138 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/bits/stdio_lim.h" 1 3 4 ># 139 "/usr/include/stdio.h" 2 3 4 > > > >extern struct _IO_FILE *stdin; >extern struct _IO_FILE *stdout; >extern struct _IO_FILE *stderr; > > > > > > > >extern int remove (__const char *__filename) ; > >extern int rename (__const char *__old, __const char *__new) ; > > > > > > > > > >extern FILE *tmpfile (void); ># 174 "/usr/include/stdio.h" 3 4 >extern FILE *tmpfile64 (void); > > > >extern char *tmpnam (char *__s) ; > > > > > >extern char *tmpnam_r (char *__s) ; ># 196 "/usr/include/stdio.h" 3 4 >extern char *tempnam (__const char *__dir, __const char *__pfx) > __attribute__ ((__malloc__)); > > > > > > > > >extern int fclose (FILE *__stream); > > > > >extern int fflush (FILE *__stream); > ># 221 "/usr/include/stdio.h" 3 4 >extern int fflush_unlocked (FILE *__stream); ># 231 "/usr/include/stdio.h" 3 4 >extern int fcloseall (void); > > > > > > > > > >extern FILE *fopen (__const char *__restrict __filename, > __const char *__restrict __modes); > > > > >extern FILE *freopen (__const char *__restrict __filename, > __const char *__restrict __modes, > FILE *__restrict __stream); ># 262 "/usr/include/stdio.h" 3 4 > > >extern FILE *fopen64 (__const char *__restrict __filename, > __const char *__restrict __modes); >extern FILE *freopen64 (__const char *__restrict __filename, > __const char *__restrict __modes, > FILE *__restrict __stream); > > > > >extern FILE *fdopen (int __fd, __const char *__modes) ; > > > > > >extern FILE *fopencookie (void *__restrict __magic_cookie, > __const char *__restrict __modes, > _IO_cookie_io_functions_t __io_funcs) ; > > >extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) ; > > > > >extern FILE *open_memstream (char **__restrict __bufloc, > size_t *__restrict __sizeloc) ; > > > > > > >extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) ; > > > >extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, > int __modes, size_t __n) ; > > > > > >extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, > size_t __size) ; > > >extern void setlinebuf (FILE *__stream) ; > > > > > > > > >extern int fprintf (FILE *__restrict __stream, > __const char *__restrict __format, ...); > > > > >extern int printf (__const char *__restrict __format, ...); > >extern int sprintf (char *__restrict __s, > __const char *__restrict __format, ...) ; > > > > > >extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, > __gnuc_va_list __arg); > > > > >extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); > >extern int vsprintf (char *__restrict __s, __const char *__restrict __format, > __gnuc_va_list __arg) ; > > > > > >extern int snprintf (char *__restrict __s, size_t __maxlen, > __const char *__restrict __format, ...) > __attribute__ ((__format__ (__printf__, 3, 4))); > >extern int vsnprintf (char *__restrict __s, size_t __maxlen, > __const char *__restrict __format, __gnuc_va_list __arg) > __attribute__ ((__format__ (__printf__, 3, 0))); > > > > > > >extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, > __gnuc_va_list __arg) > __attribute__ ((__format__ (__printf__, 2, 0))); >extern int __asprintf (char **__restrict __ptr, > __const char *__restrict __fmt, ...) > __attribute__ ((__format__ (__printf__, 2, 3))); >extern int asprintf (char **__restrict __ptr, > __const char *__restrict __fmt, ...) > __attribute__ ((__format__ (__printf__, 2, 3))); > > > > > > > >extern int vdprintf (int __fd, __const char *__restrict __fmt, > __gnuc_va_list __arg) > __attribute__ ((__format__ (__printf__, 2, 0))); >extern int dprintf (int __fd, __const char *__restrict __fmt, ...) > __attribute__ ((__format__ (__printf__, 2, 3))); > > > > > > > > >extern int fscanf (FILE *__restrict __stream, > __const char *__restrict __format, ...); > > > > >extern int scanf (__const char *__restrict __format, ...); > >extern int sscanf (__const char *__restrict __s, > __const char *__restrict __format, ...) ; > > > > > > > > >extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, > __gnuc_va_list __arg) > __attribute__ ((__format__ (__scanf__, 2, 0))); > > > > > >extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) > __attribute__ ((__format__ (__scanf__, 1, 0))); > > >extern int vsscanf (__const char *__restrict __s, > __const char *__restrict __format, __gnuc_va_list __arg) > __attribute__ ((__format__ (__scanf__, 2, 0))); > > > > > > > > > >extern int fgetc (FILE *__stream); >extern int getc (FILE *__stream); > > > > > >extern int getchar (void); > ># 454 "/usr/include/stdio.h" 3 4 >extern int getc_unlocked (FILE *__stream); >extern int getchar_unlocked (void); ># 465 "/usr/include/stdio.h" 3 4 >extern int fgetc_unlocked (FILE *__stream); > > > > > > > > > > > >extern int fputc (int __c, FILE *__stream); >extern int putc (int __c, FILE *__stream); > > > > > >extern int putchar (int __c); > ># 498 "/usr/include/stdio.h" 3 4 >extern int fputc_unlocked (int __c, FILE *__stream); > > > > > > > >extern int putc_unlocked (int __c, FILE *__stream); >extern int putchar_unlocked (int __c); > > > > > > >extern int getw (FILE *__stream); > > >extern int putw (int __w, FILE *__stream); > > > > > > > > >extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream); > > > > > > >extern char *gets (char *__s); > ># 543 "/usr/include/stdio.h" 3 4 >extern char *fgets_unlocked (char *__restrict __s, int __n, > FILE *__restrict __stream); ># 559 "/usr/include/stdio.h" 3 4 >extern __ssize_t __getdelim (char **__restrict __lineptr, > size_t *__restrict __n, int __delimiter, > FILE *__restrict __stream); >extern __ssize_t getdelim (char **__restrict __lineptr, > size_t *__restrict __n, int __delimiter, > FILE *__restrict __stream); > > > > > > > >extern __ssize_t getline (char **__restrict __lineptr, > size_t *__restrict __n, > FILE *__restrict __stream); > > > > > > > > >extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); > > > > > >extern int puts (__const char *__s); > > > > > > >extern int ungetc (int __c, FILE *__stream); > > > > > > >extern size_t fread (void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __stream); > > > > >extern size_t fwrite (__const void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __s); > ># 620 "/usr/include/stdio.h" 3 4 >extern int fputs_unlocked (__const char *__restrict __s, > FILE *__restrict __stream); ># 631 "/usr/include/stdio.h" 3 4 >extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __stream); >extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __stream); > > > > > > > > >extern int fseek (FILE *__stream, long int __off, int __whence); > > > > >extern long int ftell (FILE *__stream); > > > > >extern void rewind (FILE *__stream); > ># 667 "/usr/include/stdio.h" 3 4 >extern int fseeko (FILE *__stream, __off_t __off, int __whence); > > > > >extern __off_t ftello (FILE *__stream); ># 686 "/usr/include/stdio.h" 3 4 > > > > > > >extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); > > > > >extern int fsetpos (FILE *__stream, __const fpos_t *__pos); ># 709 "/usr/include/stdio.h" 3 4 > > > >extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); >extern __off64_t ftello64 (FILE *__stream); >extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); >extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); > > > > >extern void clearerr (FILE *__stream) ; > >extern int feof (FILE *__stream) ; > >extern int ferror (FILE *__stream) ; > > > > >extern void clearerr_unlocked (FILE *__stream) ; >extern int feof_unlocked (FILE *__stream) ; >extern int ferror_unlocked (FILE *__stream) ; > > > > > > > > >extern void perror (__const char *__s); > > > > > > ># 1 "/usr/include/bits/sys_errlist.h" 1 3 4 ># 27 "/usr/include/bits/sys_errlist.h" 3 4 >extern int sys_nerr; >extern __const char *__const sys_errlist[]; > > >extern int _sys_nerr; >extern __const char *__const _sys_errlist[]; ># 748 "/usr/include/stdio.h" 2 3 4 > > > > >extern int fileno (FILE *__stream) ; > > > > >extern int fileno_unlocked (FILE *__stream) ; ># 767 "/usr/include/stdio.h" 3 4 >extern FILE *popen (__const char *__command, __const char *__modes); > > > > > >extern int pclose (FILE *__stream); > > > > > >extern char *ctermid (char *__s) ; > > > > > >extern char *cuserid (char *__s); > > > > >struct obstack; > > >extern int obstack_printf (struct obstack *__restrict __obstack, > __const char *__restrict __format, ...) > __attribute__ ((__format__ (__printf__, 2, 3))); >extern int obstack_vprintf (struct obstack *__restrict __obstack, > __const char *__restrict __format, > __gnuc_va_list __args) > __attribute__ ((__format__ (__printf__, 2, 0))); > > > > > > > >extern void flockfile (FILE *__stream) ; > > > >extern int ftrylockfile (FILE *__stream) ; > > >extern void funlockfile (FILE *__stream) ; ># 828 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/bits/stdio.h" 1 3 4 ># 33 "/usr/include/bits/stdio.h" 3 4 >extern __inline int >vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg) >{ > return vfprintf (stdout, __fmt, __arg); >} > > >extern __inline int >getchar (void) >{ > return _IO_getc (stdin); >} > > > > >extern __inline int >getc_unlocked (FILE *__fp) >{ > return (__builtin_expect ((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end, 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); >} > > >extern __inline int >getchar_unlocked (void) >{ > return (__builtin_expect ((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end, 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); >} > > > > >extern __inline int >putchar (int __c) >{ > return _IO_putc (__c, stdout); >} > > > > >extern __inline int >fputc_unlocked (int __c, FILE *__stream) >{ > return (__builtin_expect ((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end, 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); >} > > > > > >extern __inline int >putc_unlocked (int __c, FILE *__stream) >{ > return (__builtin_expect ((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end, 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); >} > > >extern __inline int >putchar_unlocked (int __c) >{ > return (__builtin_expect ((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end, 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); >} > > > > > >extern __inline __ssize_t >getline (char **__lineptr, size_t *__n, FILE *__stream) >{ > return __getdelim (__lineptr, __n, '\n', __stream); >} > > > > > >extern __inline int >feof_unlocked (FILE *__stream) >{ > return (((__stream)->_flags & 0x10) != 0); >} > > >extern __inline int >ferror_unlocked (FILE *__stream) >{ > return (((__stream)->_flags & 0x20) != 0); >} ># 829 "/usr/include/stdio.h" 2 3 4 > > > ># 62 "../../../../../extras/Mesa/src/glheader.h" 2 ># 1 "/usr/include/string.h" 1 3 4 ># 28 "/usr/include/string.h" 3 4 > > > > > ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/stddef.h" 1 3 4 ># 34 "/usr/include/string.h" 2 3 4 > > > > >extern void *memcpy (void *__restrict __dest, > __const void *__restrict __src, size_t __n) ; > > >extern void *memmove (void *__dest, __const void *__src, size_t __n) > ; > > > > > > >extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, > int __c, size_t __n) > ; > > > > > >extern void *memset (void *__s, int __c, size_t __n) ; > > >extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) > __attribute__ ((__pure__)); > > >extern void *memchr (__const void *__s, int __c, size_t __n) > __attribute__ ((__pure__)); > > > > > >extern void *rawmemchr (__const void *__s, int __c) __attribute__ ((__pure__)); > > >extern void *memrchr (__const void *__s, int __c, size_t __n) > __attribute__ ((__pure__)); > > > > > >extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) > ; > >extern char *strncpy (char *__restrict __dest, > __const char *__restrict __src, size_t __n) ; > > >extern char *strcat (char *__restrict __dest, __const char *__restrict __src) > ; > >extern char *strncat (char *__restrict __dest, __const char *__restrict __src, > size_t __n) ; > > >extern int strcmp (__const char *__s1, __const char *__s2) > __attribute__ ((__pure__)); > >extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) > __attribute__ ((__pure__)); > > >extern int strcoll (__const char *__s1, __const char *__s2) > __attribute__ ((__pure__)); > >extern size_t strxfrm (char *__restrict __dest, > __const char *__restrict __src, size_t __n) ; > ># 117 "/usr/include/string.h" 3 4 >extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) > __attribute__ ((__pure__)); > >extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, > __locale_t __l) ; > > > > >extern char *strdup (__const char *__s) __attribute__ ((__malloc__)); > > > > > > >extern char *strndup (__const char *__string, size_t __n) > __attribute__ ((__malloc__)); ># 160 "/usr/include/string.h" 3 4 > > >extern char *strchr (__const char *__s, int __c) __attribute__ ((__pure__)); > >extern char *strrchr (__const char *__s, int __c) __attribute__ ((__pure__)); > > > > > >extern char *strchrnul (__const char *__s, int __c) __attribute__ ((__pure__)); > > > > > >extern size_t strcspn (__const char *__s, __const char *__reject) > __attribute__ ((__pure__)); > > >extern size_t strspn (__const char *__s, __const char *__accept) > __attribute__ ((__pure__)); > >extern char *strpbrk (__const char *__s, __const char *__accept) > __attribute__ ((__pure__)); > >extern char *strstr (__const char *__haystack, __const char *__needle) > __attribute__ ((__pure__)); > > > >extern char *strtok (char *__restrict __s, __const char *__restrict __delim) > ; > > > > >extern char *__strtok_r (char *__restrict __s, > __const char *__restrict __delim, > char **__restrict __save_ptr) ; > >extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, > char **__restrict __save_ptr) ; > > > > >extern char *strcasestr (__const char *__haystack, __const char *__needle) > __attribute__ ((__pure__)); > > > > > > >extern void *memmem (__const void *__haystack, size_t __haystacklen, > __const void *__needle, size_t __needlelen) > __attribute__ ((__pure__)); > > > >extern void *__mempcpy (void *__restrict __dest, > __const void *__restrict __src, size_t __n) ; >extern void *mempcpy (void *__restrict __dest, > __const void *__restrict __src, size_t __n) ; > > > > > >extern size_t strlen (__const char *__s) __attribute__ ((__pure__)); > > > > > >extern size_t strnlen (__const char *__string, size_t __maxlen) > __attribute__ ((__pure__)); > > > > > >extern char *strerror (int __errnum) ; > ># 268 "/usr/include/string.h" 3 4 >extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) ; > > > > > >extern void __bzero (void *__s, size_t __n) ; > > > >extern void bcopy (__const void *__src, void *__dest, size_t __n) ; > > >extern void bzero (void *__s, size_t __n) ; > > >extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) > __attribute__ ((__pure__)); > > >extern char *index (__const char *__s, int __c) __attribute__ ((__pure__)); > > >extern char *rindex (__const char *__s, int __c) __attribute__ ((__pure__)); > > > >extern int ffs (int __i) __attribute__ ((__const__)); > > > > >extern int ffsl (long int __l) __attribute__ ((__const__)); > >__extension__ extern int ffsll (long long int __ll) > __attribute__ ((__const__)); > > > > >extern int strcasecmp (__const char *__s1, __const char *__s2) > __attribute__ ((__pure__)); > > >extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) > __attribute__ ((__pure__)); > > > > > >extern int strcasecmp_l (__const char *__s1, __const char *__s2, > __locale_t __loc) __attribute__ ((__pure__)); > >extern int strncasecmp_l (__const char *__s1, __const char *__s2, > size_t __n, __locale_t __loc) > __attribute__ ((__pure__)); > > > > > >extern char *strsep (char **__restrict __stringp, > __const char *__restrict __delim) ; > > > > >extern int strverscmp (__const char *__s1, __const char *__s2) > __attribute__ ((__pure__)); > > >extern char *strsignal (int __sig) ; > > >extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) > ; >extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) > ; > > > >extern char *__stpncpy (char *__restrict __dest, > __const char *__restrict __src, size_t __n) ; >extern char *stpncpy (char *__restrict __dest, > __const char *__restrict __src, size_t __n) ; > > >extern char *strfry (char *__string) ; > > >extern void *memfrob (void *__s, size_t __n) ; > > > > > > >extern char *basename (__const char *__filename) ; ># 393 "/usr/include/string.h" 3 4 ># 1 "/usr/include/bits/string.h" 1 3 4 ># 394 "/usr/include/string.h" 2 3 4 > > ># 1 "/usr/include/bits/string2.h" 1 3 4 ># 389 "/usr/include/bits/string2.h" 3 4 >extern void *__rawmemchr (const void *__s, int __c); ># 919 "/usr/include/bits/string2.h" 3 4 >extern __inline size_t __strcspn_c1 (__const char *__s, int __reject); >extern __inline size_t >__strcspn_c1 (__const char *__s, int __reject) >{ > register size_t __result = 0; > while (__s[__result] != '\0' && __s[__result] != __reject) > ++__result; > return __result; >} > >extern __inline size_t __strcspn_c2 (__const char *__s, int __reject1, > int __reject2); >extern __inline size_t >__strcspn_c2 (__const char *__s, int __reject1, int __reject2) >{ > register size_t __result = 0; > while (__s[__result] != '\0' && __s[__result] != __reject1 > && __s[__result] != __reject2) > ++__result; > return __result; >} > >extern __inline size_t __strcspn_c3 (__const char *__s, int __reject1, > int __reject2, int __reject3); >extern __inline size_t >__strcspn_c3 (__const char *__s, int __reject1, int __reject2, > int __reject3) >{ > register size_t __result = 0; > while (__s[__result] != '\0' && __s[__result] != __reject1 > && __s[__result] != __reject2 && __s[__result] != __reject3) > ++__result; > return __result; >} ># 976 "/usr/include/bits/string2.h" 3 4 >extern __inline size_t __strspn_c1 (__const char *__s, int __accept); >extern __inline size_t >__strspn_c1 (__const char *__s, int __accept) >{ > register size_t __result = 0; > > while (__s[__result] == __accept) > ++__result; > return __result; >} > >extern __inline size_t __strspn_c2 (__const char *__s, int __accept1, > int __accept2); >extern __inline size_t >__strspn_c2 (__const char *__s, int __accept1, int __accept2) >{ > register size_t __result = 0; > > while (__s[__result] == __accept1 || __s[__result] == __accept2) > ++__result; > return __result; >} > >extern __inline size_t __strspn_c3 (__const char *__s, int __accept1, > int __accept2, int __accept3); >extern __inline size_t >__strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) >{ > register size_t __result = 0; > > while (__s[__result] == __accept1 || __s[__result] == __accept2 > || __s[__result] == __accept3) > ++__result; > return __result; >} ># 1033 "/usr/include/bits/string2.h" 3 4 >extern __inline char *__strpbrk_c2 (__const char *__s, int __accept1, > int __accept2); >extern __inline char * >__strpbrk_c2 (__const char *__s, int __accept1, int __accept2) >{ > > while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) > ++__s; > return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; >} > >extern __inline char *__strpbrk_c3 (__const char *__s, int __accept1, > int __accept2, int __accept3); >extern __inline char * >__strpbrk_c3 (__const char *__s, int __accept1, int __accept2, > int __accept3) >{ > > while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 > && *__s != __accept3) > ++__s; > return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; >} ># 1085 "/usr/include/bits/string2.h" 3 4 >extern __inline char *__strtok_r_1c (char *__s, char __sep, char **__nextp); >extern __inline char * >__strtok_r_1c (char *__s, char __sep, char **__nextp) >{ > char *__result; > if (__s == ((void *)0)) > __s = *__nextp; > while (*__s == __sep) > ++__s; > __result = ((void *)0); > if (*__s != '\0') > { > __result = __s++; > while (*__s != '\0') > if (*__s++ == __sep) > { > __s[-1] = '\0'; > break; > } > *__nextp = __s; > } > return __result; >} ># 1117 "/usr/include/bits/string2.h" 3 4 >extern char *__strsep_g (char **__stringp, __const char *__delim); ># 1135 "/usr/include/bits/string2.h" 3 4 >extern __inline char *__strsep_1c (char **__s, char __reject); >extern __inline char * >__strsep_1c (char **__s, char __reject) >{ > register char *__retval = *__s; > if (__retval != ((void *)0) && (*__s = (__extension__ (__builtin_constant_p (__reject) && (__reject) == '\0' ? (char *) __rawmemchr (__retval, __reject) : strchr (__retval, __reject)))) != ((void *)0)) > *(*__s)++ = '\0'; > return __retval; >} > >extern __inline char *__strsep_2c (char **__s, char __reject1, char __reject2); >extern __inline char * >__strsep_2c (char **__s, char __reject1, char __reject2) >{ > register char *__retval = *__s; > if (__retval != ((void *)0)) > { > register char *__cp = __retval; > while (1) > { > if (*__cp == '\0') > { > __cp = ((void *)0); > break; > } > if (*__cp == __reject1 || *__cp == __reject2) > { > *__cp++ = '\0'; > break; > } > ++__cp; > } > *__s = __cp; > } > return __retval; >} > >extern __inline char *__strsep_3c (char **__s, char __reject1, char __reject2, > char __reject3); >extern __inline char * >__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) >{ > register char *__retval = *__s; > if (__retval != ((void *)0)) > { > register char *__cp = __retval; > while (1) > { > if (*__cp == '\0') > { > __cp = ((void *)0); > break; > } > if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) > { > *__cp++ = '\0'; > break; > } > ++__cp; > } > *__s = __cp; > } > return __retval; >} ># 1216 "/usr/include/bits/string2.h" 3 4 >extern char *__strdup (__const char *__string) __attribute__ ((__malloc__)); ># 1235 "/usr/include/bits/string2.h" 3 4 >extern char *__strndup (__const char *__string, size_t __n) > __attribute__ ((__malloc__)); ># 397 "/usr/include/string.h" 2 3 4 > > > > ># 63 "../../../../../extras/Mesa/src/glheader.h" 2 > ># 1 "/usr/include/fpu_control.h" 1 3 4 ># 89 "/usr/include/fpu_control.h" 3 4 >typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__))); ># 100 "/usr/include/fpu_control.h" 3 4 >extern fpu_control_t __fpu_control; ># 65 "../../../../../extras/Mesa/src/glheader.h" 2 > > ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/float.h" 1 3 4 ># 68 "../../../../../extras/Mesa/src/glheader.h" 2 ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/stdarg.h" 1 3 4 ># 69 "../../../../../extras/Mesa/src/glheader.h" 2 ># 192 "../../../../../extras/Mesa/src/glheader.h" ># 1 "../../../../../extras/Mesa/include/GL/gl.h" 1 ># 122 "../../../../../extras/Mesa/include/GL/gl.h" >typedef unsigned int GLenum; >typedef unsigned char GLboolean; >typedef unsigned int GLbitfield; >typedef void GLvoid; >typedef signed char GLbyte; >typedef short GLshort; >typedef int GLint; >typedef unsigned char GLubyte; >typedef unsigned short GLushort; >typedef unsigned int GLuint; >typedef int GLsizei; >typedef float GLfloat; >typedef float GLclampf; >typedef double GLdouble; >typedef double GLclampd; ># 749 "../../../../../extras/Mesa/include/GL/gl.h" >extern void glClearIndex( GLfloat c ); > >extern void glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ); > >extern void glClear( GLbitfield mask ); > >extern void glIndexMask( GLuint mask ); > >extern void glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ); > >extern void glAlphaFunc( GLenum func, GLclampf ref ); > >extern void glBlendFunc( GLenum sfactor, GLenum dfactor ); > >extern void glLogicOp( GLenum opcode ); > >extern void glCullFace( GLenum mode ); > >extern void glFrontFace( GLenum mode ); > >extern void glPointSize( GLfloat size ); > >extern void glLineWidth( GLfloat width ); > >extern void glLineStipple( GLint factor, GLushort pattern ); > >extern void glPolygonMode( GLenum face, GLenum mode ); > >extern void glPolygonOffset( GLfloat factor, GLfloat units ); > >extern void glPolygonStipple( const GLubyte *mask ); > >extern void glGetPolygonStipple( GLubyte *mask ); > >extern void glEdgeFlag( GLboolean flag ); > >extern void glEdgeFlagv( const GLboolean *flag ); > >extern void glScissor( GLint x, GLint y, GLsizei width, GLsizei height); > >extern void glClipPlane( GLenum plane, const GLdouble *equation ); > >extern void glGetClipPlane( GLenum plane, GLdouble *equation ); > >extern void glDrawBuffer( GLenum mode ); > >extern void glReadBuffer( GLenum mode ); > >extern void glEnable( GLenum cap ); > >extern void glDisable( GLenum cap ); > >extern GLboolean glIsEnabled( GLenum cap ); > > >extern void glEnableClientState( GLenum cap ); > >extern void glDisableClientState( GLenum cap ); > > >extern void glGetBooleanv( GLenum pname, GLboolean *params ); > >extern void glGetDoublev( GLenum pname, GLdouble *params ); > >extern void glGetFloatv( GLenum pname, GLfloat *params ); > >extern void glGetIntegerv( GLenum pname, GLint *params ); > > >extern void glPushAttrib( GLbitfield mask ); > >extern void glPopAttrib( void ); > > >extern void glPushClientAttrib( GLbitfield mask ); > >extern void glPopClientAttrib( void ); > > >extern GLint glRenderMode( GLenum mode ); > >extern GLenum glGetError( void ); > >extern const GLubyte* glGetString( GLenum name ); > >extern void glFinish( void ); > >extern void glFlush( void ); > >extern void glHint( GLenum target, GLenum mode ); > > > > > > >extern void glClearDepth( GLclampd depth ); > >extern void glDepthFunc( GLenum func ); > >extern void glDepthMask( GLboolean flag ); > >extern void glDepthRange( GLclampd near_val, GLclampd far_val ); > > > > > > >extern void glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ); > >extern void glAccum( GLenum op, GLfloat value ); > > > > > > >extern void glMatrixMode( GLenum mode ); > >extern void glOrtho( GLdouble left, GLdouble right, > GLdouble bottom, GLdouble top, > GLdouble near_val, GLdouble far_val ); > >extern void glFrustum( GLdouble left, GLdouble right, > GLdouble bottom, GLdouble top, > GLdouble near_val, GLdouble far_val ); > >extern void glViewport( GLint x, GLint y, > GLsizei width, GLsizei height ); > >extern void glPushMatrix( void ); > >extern void glPopMatrix( void ); > >extern void glLoadIdentity( void ); > >extern void glLoadMatrixd( const GLdouble *m ); >extern void glLoadMatrixf( const GLfloat *m ); > >extern void glMultMatrixd( const GLdouble *m ); >extern void glMultMatrixf( const GLfloat *m ); > >extern void glRotated( GLdouble angle, > GLdouble x, GLdouble y, GLdouble z ); >extern void glRotatef( GLfloat angle, > GLfloat x, GLfloat y, GLfloat z ); > >extern void glScaled( GLdouble x, GLdouble y, GLdouble z ); >extern void glScalef( GLfloat x, GLfloat y, GLfloat z ); > >extern void glTranslated( GLdouble x, GLdouble y, GLdouble z ); >extern void glTranslatef( GLfloat x, GLfloat y, GLfloat z ); > > > > > > >extern GLboolean glIsList( GLuint list ); > >extern void glDeleteLists( GLuint list, GLsizei range ); > >extern GLuint glGenLists( GLsizei range ); > >extern void glNewList( GLuint list, GLenum mode ); > >extern void glEndList( void ); > >extern void glCallList( GLuint list ); > >extern void glCallLists( GLsizei n, GLenum type, > const GLvoid *lists ); > >extern void glListBase( GLuint base ); > > > > > > >extern void glBegin( GLenum mode ); > >extern void glEnd( void ); > > >extern void glVertex2d( GLdouble x, GLdouble y ); >extern void glVertex2f( GLfloat x, GLfloat y ); >extern void glVertex2i( GLint x, GLint y ); >extern void glVertex2s( GLshort x, GLshort y ); > >extern void glVertex3d( GLdouble x, GLdouble y, GLdouble z ); >extern void glVertex3f( GLfloat x, GLfloat y, GLfloat z ); >extern void glVertex3i( GLint x, GLint y, GLint z ); >extern void glVertex3s( GLshort x, GLshort y, GLshort z ); > >extern void glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w ); >extern void glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ); >extern void glVertex4i( GLint x, GLint y, GLint z, GLint w ); >extern void glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w ); > >extern void glVertex2dv( const GLdouble *v ); >extern void glVertex2fv( const GLfloat *v ); >extern void glVertex2iv( const GLint *v ); >extern void glVertex2sv( const GLshort *v ); > >extern void glVertex3dv( const GLdouble *v ); >extern void glVertex3fv( const GLfloat *v ); >extern void glVertex3iv( const GLint *v ); >extern void glVertex3sv( const GLshort *v ); > >extern void glVertex4dv( const GLdouble *v ); >extern void glVertex4fv( const GLfloat *v ); >extern void glVertex4iv( const GLint *v ); >extern void glVertex4sv( const GLshort *v ); > > >extern void glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz ); >extern void glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz ); >extern void glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz ); >extern void glNormal3i( GLint nx, GLint ny, GLint nz ); >extern void glNormal3s( GLshort nx, GLshort ny, GLshort nz ); > >extern void glNormal3bv( const GLbyte *v ); >extern void glNormal3dv( const GLdouble *v ); >extern void glNormal3fv( const GLfloat *v ); >extern void glNormal3iv( const GLint *v ); >extern void glNormal3sv( const GLshort *v ); > > >extern void glIndexd( GLdouble c ); >extern void glIndexf( GLfloat c ); >extern void glIndexi( GLint c ); >extern void glIndexs( GLshort c ); >extern void glIndexub( GLubyte c ); > >extern void glIndexdv( const GLdouble *c ); >extern void glIndexfv( const GLfloat *c ); >extern void glIndexiv( const GLint *c ); >extern void glIndexsv( const GLshort *c ); >extern void glIndexubv( const GLubyte *c ); > >extern void glColor3b( GLbyte red, GLbyte green, GLbyte blue ); >extern void glColor3d( GLdouble red, GLdouble green, GLdouble blue ); >extern void glColor3f( GLfloat red, GLfloat green, GLfloat blue ); >extern void glColor3i( GLint red, GLint green, GLint blue ); >extern void glColor3s( GLshort red, GLshort green, GLshort blue ); >extern void glColor3ub( GLubyte red, GLubyte green, GLubyte blue ); >extern void glColor3ui( GLuint red, GLuint green, GLuint blue ); >extern void glColor3us( GLushort red, GLushort green, GLushort blue ); > >extern void glColor4b( GLbyte red, GLbyte green, > GLbyte blue, GLbyte alpha ); >extern void glColor4d( GLdouble red, GLdouble green, > GLdouble blue, GLdouble alpha ); >extern void glColor4f( GLfloat red, GLfloat green, > GLfloat blue, GLfloat alpha ); >extern void glColor4i( GLint red, GLint green, > GLint blue, GLint alpha ); >extern void glColor4s( GLshort red, GLshort green, > GLshort blue, GLshort alpha ); >extern void glColor4ub( GLubyte red, GLubyte green, > GLubyte blue, GLubyte alpha ); >extern void glColor4ui( GLuint red, GLuint green, > GLuint blue, GLuint alpha ); >extern void glColor4us( GLushort red, GLushort green, > GLushort blue, GLushort alpha ); > > >extern void glColor3bv( const GLbyte *v ); >extern void glColor3dv( const GLdouble *v ); >extern void glColor3fv( const GLfloat *v ); >extern void glColor3iv( const GLint *v ); >extern void glColor3sv( const GLshort *v ); >extern void glColor3ubv( const GLubyte *v ); >extern void glColor3uiv( const GLuint *v ); >extern void glColor3usv( const GLushort *v ); > >extern void glColor4bv( const GLbyte *v ); >extern void glColor4dv( const GLdouble *v ); >extern void glColor4fv( const GLfloat *v ); >extern void glColor4iv( const GLint *v ); >extern void glColor4sv( const GLshort *v ); >extern void glColor4ubv( const GLubyte *v ); >extern void glColor4uiv( const GLuint *v ); >extern void glColor4usv( const GLushort *v ); > > >extern void glTexCoord1d( GLdouble s ); >extern void glTexCoord1f( GLfloat s ); >extern void glTexCoord1i( GLint s ); >extern void glTexCoord1s( GLshort s ); > >extern void glTexCoord2d( GLdouble s, GLdouble t ); >extern void glTexCoord2f( GLfloat s, GLfloat t ); >extern void glTexCoord2i( GLint s, GLint t ); >extern void glTexCoord2s( GLshort s, GLshort t ); > >extern void glTexCoord3d( GLdouble s, GLdouble t, GLdouble r ); >extern void glTexCoord3f( GLfloat s, GLfloat t, GLfloat r ); >extern void glTexCoord3i( GLint s, GLint t, GLint r ); >extern void glTexCoord3s( GLshort s, GLshort t, GLshort r ); > >extern void glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q ); >extern void glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q ); >extern void glTexCoord4i( GLint s, GLint t, GLint r, GLint q ); >extern void glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q ); > >extern void glTexCoord1dv( const GLdouble *v ); >extern void glTexCoord1fv( const GLfloat *v ); >extern void glTexCoord1iv( const GLint *v ); >extern void glTexCoord1sv( const GLshort *v ); > >extern void glTexCoord2dv( const GLdouble *v ); >extern void glTexCoord2fv( const GLfloat *v ); >extern void glTexCoord2iv( const GLint *v ); >extern void glTexCoord2sv( const GLshort *v ); > >extern void glTexCoord3dv( const GLdouble *v ); >extern void glTexCoord3fv( const GLfloat *v ); >extern void glTexCoord3iv( const GLint *v ); >extern void glTexCoord3sv( const GLshort *v ); > >extern void glTexCoord4dv( const GLdouble *v ); >extern void glTexCoord4fv( const GLfloat *v ); >extern void glTexCoord4iv( const GLint *v ); >extern void glTexCoord4sv( const GLshort *v ); > > >extern void glRasterPos2d( GLdouble x, GLdouble y ); >extern void glRasterPos2f( GLfloat x, GLfloat y ); >extern void glRasterPos2i( GLint x, GLint y ); >extern void glRasterPos2s( GLshort x, GLshort y ); > >extern void glRasterPos3d( GLdouble x, GLdouble y, GLdouble z ); >extern void glRasterPos3f( GLfloat x, GLfloat y, GLfloat z ); >extern void glRasterPos3i( GLint x, GLint y, GLint z ); >extern void glRasterPos3s( GLshort x, GLshort y, GLshort z ); > >extern void glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w ); >extern void glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ); >extern void glRasterPos4i( GLint x, GLint y, GLint z, GLint w ); >extern void glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w ); > >extern void glRasterPos2dv( const GLdouble *v ); >extern void glRasterPos2fv( const GLfloat *v ); >extern void glRasterPos2iv( const GLint *v ); >extern void glRasterPos2sv( const GLshort *v ); > >extern void glRasterPos3dv( const GLdouble *v ); >extern void glRasterPos3fv( const GLfloat *v ); >extern void glRasterPos3iv( const GLint *v ); >extern void glRasterPos3sv( const GLshort *v ); > >extern void glRasterPos4dv( const GLdouble *v ); >extern void glRasterPos4fv( const GLfloat *v ); >extern void glRasterPos4iv( const GLint *v ); >extern void glRasterPos4sv( const GLshort *v ); > > >extern void glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 ); >extern void glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 ); >extern void glRecti( GLint x1, GLint y1, GLint x2, GLint y2 ); >extern void glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 ); > > >extern void glRectdv( const GLdouble *v1, const GLdouble *v2 ); >extern void glRectfv( const GLfloat *v1, const GLfloat *v2 ); >extern void glRectiv( const GLint *v1, const GLint *v2 ); >extern void glRectsv( const GLshort *v1, const GLshort *v2 ); > > > > > > >extern void glVertexPointer( GLint size, GLenum type, > GLsizei stride, const GLvoid *ptr ); > >extern void glNormalPointer( GLenum type, GLsizei stride, > const GLvoid *ptr ); > >extern void glColorPointer( GLint size, GLenum type, > GLsizei stride, const GLvoid *ptr ); > >extern void glIndexPointer( GLenum type, GLsizei stride, > const GLvoid *ptr ); > >extern void glTexCoordPointer( GLint size, GLenum type, > GLsizei stride, const GLvoid *ptr ); > >extern void glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr ); > >extern void glGetPointerv( GLenum pname, GLvoid **params ); > >extern void glArrayElement( GLint i ); > >extern void glDrawArrays( GLenum mode, GLint first, GLsizei count ); > >extern void glDrawElements( GLenum mode, GLsizei count, > GLenum type, const GLvoid *indices ); > >extern void glInterleavedArrays( GLenum format, GLsizei stride, > const GLvoid *pointer ); > > > > > >extern void glShadeModel( GLenum mode ); > >extern void glLightf( GLenum light, GLenum pname, GLfloat param ); >extern void glLighti( GLenum light, GLenum pname, GLint param ); >extern void glLightfv( GLenum light, GLenum pname, > const GLfloat *params ); >extern void glLightiv( GLenum light, GLenum pname, > const GLint *params ); > >extern void glGetLightfv( GLenum light, GLenum pname, > GLfloat *params ); >extern void glGetLightiv( GLenum light, GLenum pname, > GLint *params ); > >extern void glLightModelf( GLenum pname, GLfloat param ); >extern void glLightModeli( GLenum pname, GLint param ); >extern void glLightModelfv( GLenum pname, const GLfloat *params ); >extern void glLightModeliv( GLenum pname, const GLint *params ); > >extern void glMaterialf( GLenum face, GLenum pname, GLfloat param ); >extern void glMateriali( GLenum face, GLenum pname, GLint param ); >extern void glMaterialfv( GLenum face, GLenum pname, const GLfloat *params ); >extern void glMaterialiv( GLenum face, GLenum pname, const GLint *params ); > >extern void glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params ); >extern void glGetMaterialiv( GLenum face, GLenum pname, GLint *params ); > >extern void glColorMaterial( GLenum face, GLenum mode ); > > > > > > >extern void glPixelZoom( GLfloat xfactor, GLfloat yfactor ); > >extern void glPixelStoref( GLenum pname, GLfloat param ); >extern void glPixelStorei( GLenum pname, GLint param ); > >extern void glPixelTransferf( GLenum pname, GLfloat param ); >extern void glPixelTransferi( GLenum pname, GLint param ); > >extern void glPixelMapfv( GLenum map, GLint mapsize, > const GLfloat *values ); >extern void glPixelMapuiv( GLenum map, GLint mapsize, > const GLuint *values ); >extern void glPixelMapusv( GLenum map, GLint mapsize, > const GLushort *values ); > >extern void glGetPixelMapfv( GLenum map, GLfloat *values ); >extern void glGetPixelMapuiv( GLenum map, GLuint *values ); >extern void glGetPixelMapusv( GLenum map, GLushort *values ); > >extern void glBitmap( GLsizei width, GLsizei height, > GLfloat xorig, GLfloat yorig, > GLfloat xmove, GLfloat ymove, > const GLubyte *bitmap ); > >extern void glReadPixels( GLint x, GLint y, > GLsizei width, GLsizei height, > GLenum format, GLenum type, > GLvoid *pixels ); > >extern void glDrawPixels( GLsizei width, GLsizei height, > GLenum format, GLenum type, > const GLvoid *pixels ); > >extern void glCopyPixels( GLint x, GLint y, > GLsizei width, GLsizei height, > GLenum type ); > > > > > >extern void glStencilFunc( GLenum func, GLint ref, GLuint mask ); > >extern void glStencilMask( GLuint mask ); > >extern void glStencilOp( GLenum fail, GLenum zfail, GLenum zpass ); > >extern void glClearStencil( GLint s ); > > > > > > > >extern void glTexGend( GLenum coord, GLenum pname, GLdouble param ); >extern void glTexGenf( GLenum coord, GLenum pname, GLfloat param ); >extern void glTexGeni( GLenum coord, GLenum pname, GLint param ); > >extern void glTexGendv( GLenum coord, GLenum pname, const GLdouble *params ); >extern void glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params ); >extern void glTexGeniv( GLenum coord, GLenum pname, const GLint *params ); > >extern void glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params ); >extern void glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ); >extern void glGetTexGeniv( GLenum coord, GLenum pname, GLint *params ); > > >extern void glTexEnvf( GLenum target, GLenum pname, GLfloat param ); >extern void glTexEnvi( GLenum target, GLenum pname, GLint param ); > >extern void glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params ); >extern void glTexEnviv( GLenum target, GLenum pname, const GLint *params ); > >extern void glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params ); >extern void glGetTexEnviv( GLenum target, GLenum pname, GLint *params ); > > >extern void glTexParameterf( GLenum target, GLenum pname, GLfloat param ); >extern void glTexParameteri( GLenum target, GLenum pname, GLint param ); > >extern void glTexParameterfv( GLenum target, GLenum pname, > const GLfloat *params ); >extern void glTexParameteriv( GLenum target, GLenum pname, > const GLint *params ); > >extern void glGetTexParameterfv( GLenum target, > GLenum pname, GLfloat *params); >extern void glGetTexParameteriv( GLenum target, > GLenum pname, GLint *params ); > >extern void glGetTexLevelParameterfv( GLenum target, GLint level, > GLenum pname, GLfloat *params ); >extern void glGetTexLevelParameteriv( GLenum target, GLint level, > GLenum pname, GLint *params ); > > >extern void glTexImage1D( GLenum target, GLint level, > GLint internalFormat, > GLsizei width, GLint border, > GLenum format, GLenum type, > const GLvoid *pixels ); > >extern void glTexImage2D( GLenum target, GLint level, > GLint internalFormat, > GLsizei width, GLsizei height, > GLint border, GLenum format, GLenum type, > const GLvoid *pixels ); > >extern void glGetTexImage( GLenum target, GLint level, > GLenum format, GLenum type, > GLvoid *pixels ); > > > > >extern void glGenTextures( GLsizei n, GLuint *textures ); > >extern void glDeleteTextures( GLsizei n, const GLuint *textures); > >extern void glBindTexture( GLenum target, GLuint texture ); > >extern void glPrioritizeTextures( GLsizei n, > const GLuint *textures, > const GLclampf *priorities ); > >extern GLboolean glAreTexturesResident( GLsizei n, > const GLuint *textures, > GLboolean *residences ); > >extern GLboolean glIsTexture( GLuint texture ); > > >extern void glTexSubImage1D( GLenum target, GLint level, > GLint xoffset, > GLsizei width, GLenum format, > GLenum type, const GLvoid *pixels ); > > >extern void glTexSubImage2D( GLenum target, GLint level, > GLint xoffset, GLint yoffset, > GLsizei width, GLsizei height, > GLenum format, GLenum type, > const GLvoid *pixels ); > > >extern void glCopyTexImage1D( GLenum target, GLint level, > GLenum internalformat, > GLint x, GLint y, > GLsizei width, GLint border ); > > >extern void glCopyTexImage2D( GLenum target, GLint level, > GLenum internalformat, > GLint x, GLint y, > GLsizei width, GLsizei height, > GLint border ); > > >extern void glCopyTexSubImage1D( GLenum target, GLint level, > GLint xoffset, GLint x, GLint y, > GLsizei width ); > > >extern void glCopyTexSubImage2D( GLenum target, GLint level, > GLint xoffset, GLint yoffset, > GLint x, GLint y, > GLsizei width, GLsizei height ); > > > > > > >extern void glMap1d( GLenum target, GLdouble u1, GLdouble u2, > GLint stride, > GLint order, const GLdouble *points ); >extern void glMap1f( GLenum target, GLfloat u1, GLfloat u2, > GLint stride, > GLint order, const GLfloat *points ); > >extern void glMap2d( GLenum target, > GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, > GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, > const GLdouble *points ); >extern void glMap2f( GLenum target, > GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, > GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, > const GLfloat *points ); > >extern void glGetMapdv( GLenum target, GLenum query, GLdouble *v ); >extern void glGetMapfv( GLenum target, GLenum query, GLfloat *v ); >extern void glGetMapiv( GLenum target, GLenum query, GLint *v ); > >extern void glEvalCoord1d( GLdouble u ); >extern void glEvalCoord1f( GLfloat u ); > >extern void glEvalCoord1dv( const GLdouble *u ); >extern void glEvalCoord1fv( const GLfloat *u ); > >extern void glEvalCoord2d( GLdouble u, GLdouble v ); >extern void glEvalCoord2f( GLfloat u, GLfloat v ); > >extern void glEvalCoord2dv( const GLdouble *u ); >extern void glEvalCoord2fv( const GLfloat *u ); > >extern void glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 ); >extern void glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 ); > >extern void glMapGrid2d( GLint un, GLdouble u1, GLdouble u2, > GLint vn, GLdouble v1, GLdouble v2 ); >extern void glMapGrid2f( GLint un, GLfloat u1, GLfloat u2, > GLint vn, GLfloat v1, GLfloat v2 ); > >extern void glEvalPoint1( GLint i ); > >extern void glEvalPoint2( GLint i, GLint j ); > >extern void glEvalMesh1( GLenum mode, GLint i1, GLint i2 ); > >extern void glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ); > > > > > > >extern void glFogf( GLenum pname, GLfloat param ); > >extern void glFogi( GLenum pname, GLint param ); > >extern void glFogfv( GLenum pname, const GLfloat *params ); > >extern void glFogiv( GLenum pname, const GLint *params ); > > > > > > >extern void glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer ); > >extern void glPassThrough( GLfloat token ); > >extern void glSelectBuffer( GLsizei size, GLuint *buffer ); > >extern void glInitNames( void ); > >extern void glLoadName( GLuint name ); > >extern void glPushName( GLuint name ); > >extern void glPopName( void ); ># 1494 "../../../../../extras/Mesa/include/GL/gl.h" >extern void glDrawRangeElements( GLenum mode, GLuint start, > GLuint end, GLsizei count, GLenum type, const GLvoid *indices ); > >extern void glTexImage3D( GLenum target, GLint level, > GLint internalFormat, > GLsizei width, GLsizei height, > GLsizei depth, GLint border, > GLenum format, GLenum type, > const GLvoid *pixels ); > >extern void glTexSubImage3D( GLenum target, GLint level, > GLint xoffset, GLint yoffset, > GLint zoffset, GLsizei width, > GLsizei height, GLsizei depth, > GLenum format, > GLenum type, const GLvoid *pixels); > >extern void glCopyTexSubImage3D( GLenum target, GLint level, > GLint xoffset, GLint yoffset, > GLint zoffset, GLint x, > GLint y, GLsizei width, > GLsizei height ); > >typedef void ( * PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); >typedef void ( * PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); >typedef void ( * PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); >typedef void ( * PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); ># 1604 "../../../../../extras/Mesa/include/GL/gl.h" >extern void glColorTable( GLenum target, GLenum internalformat, > GLsizei width, GLenum format, > GLenum type, const GLvoid *table ); > >extern void glColorSubTable( GLenum target, > GLsizei start, GLsizei count, > GLenum format, GLenum type, > const GLvoid *data ); > >extern void glColorTableParameteriv(GLenum target, GLenum pname, > const GLint *params); > >extern void glColorTableParameterfv(GLenum target, GLenum pname, > const GLfloat *params); > >extern void glCopyColorSubTable( GLenum target, GLsizei start, > GLint x, GLint y, GLsizei width ); > >extern void glCopyColorTable( GLenum target, GLenum internalformat, > GLint x, GLint y, GLsizei width ); > >extern void glGetColorTable( GLenum target, GLenum format, > GLenum type, GLvoid *table ); > >extern void glGetColorTableParameterfv( GLenum target, GLenum pname, > GLfloat *params ); > >extern void glGetColorTableParameteriv( GLenum target, GLenum pname, > GLint *params ); > >extern void glBlendEquation( GLenum mode ); > >extern void glBlendColor( GLclampf red, GLclampf green, > GLclampf blue, GLclampf alpha ); > >extern void glHistogram( GLenum target, GLsizei width, > GLenum internalformat, GLboolean sink ); > >extern void glResetHistogram( GLenum target ); > >extern void glGetHistogram( GLenum target, GLboolean reset, > GLenum format, GLenum type, > GLvoid *values ); > >extern void glGetHistogramParameterfv( GLenum target, GLenum pname, > GLfloat *params ); > >extern void glGetHistogramParameteriv( GLenum target, GLenum pname, > GLint *params ); > >extern void glMinmax( GLenum target, GLenum internalformat, > GLboolean sink ); > >extern void glResetMinmax( GLenum target ); > >extern void glGetMinmax( GLenum target, GLboolean reset, > GLenum format, GLenum types, > GLvoid *values ); > >extern void glGetMinmaxParameterfv( GLenum target, GLenum pname, > GLfloat *params ); > >extern void glGetMinmaxParameteriv( GLenum target, GLenum pname, > GLint *params ); > >extern void glConvolutionFilter1D( GLenum target, > GLenum internalformat, GLsizei width, GLenum format, GLenum type, > const GLvoid *image ); > >extern void glConvolutionFilter2D( GLenum target, > GLenum internalformat, GLsizei width, GLsizei height, GLenum format, > GLenum type, const GLvoid *image ); > >extern void glConvolutionParameterf( GLenum target, GLenum pname, > GLfloat params ); > >extern void glConvolutionParameterfv( GLenum target, GLenum pname, > const GLfloat *params ); > >extern void glConvolutionParameteri( GLenum target, GLenum pname, > GLint params ); > >extern void glConvolutionParameteriv( GLenum target, GLenum pname, > const GLint *params ); > >extern void glCopyConvolutionFilter1D( GLenum target, > GLenum internalformat, GLint x, GLint y, GLsizei width ); > >extern void glCopyConvolutionFilter2D( GLenum target, > GLenum internalformat, GLint x, GLint y, GLsizei width, > GLsizei height); > >extern void glGetConvolutionFilter( GLenum target, GLenum format, > GLenum type, GLvoid *image ); > >extern void glGetConvolutionParameterfv( GLenum target, GLenum pname, > GLfloat *params ); > >extern void glGetConvolutionParameteriv( GLenum target, GLenum pname, > GLint *params ); > >extern void glSeparableFilter2D( GLenum target, > GLenum internalformat, GLsizei width, GLsizei height, GLenum format, > GLenum type, const GLvoid *row, const GLvoid *column ); > >extern void glGetSeparableFilter( GLenum target, GLenum format, > GLenum type, GLvoid *row, GLvoid *column, GLvoid *span ); > >typedef void ( * PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); >typedef void ( * PFNGLBLENDEQUATIONPROC) (GLenum mode); >typedef void ( * PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); >typedef void ( * PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); >typedef void ( * PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); >typedef void ( * PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); >typedef void ( * PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); >typedef void ( * PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); >typedef void ( * PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); >typedef void ( * PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); >typedef void ( * PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); >typedef void ( * PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); >typedef void ( * PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); >typedef void ( * PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); >typedef void ( * PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); >typedef void ( * PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); >typedef void ( * PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); >typedef void ( * PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); >typedef void ( * PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); >typedef void ( * PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); >typedef void ( * PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); >typedef void ( * PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); >typedef void ( * PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); >typedef void ( * PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); >typedef void ( * PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); >typedef void ( * PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); >typedef void ( * PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); >typedef void ( * PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); >typedef void ( * PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); >typedef void ( * PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); >typedef void ( * PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); >typedef void ( * PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); >typedef void ( * PFNGLRESETHISTOGRAMPROC) (GLenum target); >typedef void ( * PFNGLRESETMINMAXPROC) (GLenum target); ># 1858 "../../../../../extras/Mesa/include/GL/gl.h" >extern void glActiveTexture( GLenum texture ); > >extern void glClientActiveTexture( GLenum texture ); > >extern void glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data ); > >extern void glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data ); > >extern void glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data ); > >extern void glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data ); > >extern void glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data ); > >extern void glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data ); > >extern void glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img ); > >extern void glMultiTexCoord1d( GLenum target, GLdouble s ); > >extern void glMultiTexCoord1dv( GLenum target, const GLdouble *v ); > >extern void glMultiTexCoord1f( GLenum target, GLfloat s ); > >extern void glMultiTexCoord1fv( GLenum target, const GLfloat *v ); > >extern void glMultiTexCoord1i( GLenum target, GLint s ); > >extern void glMultiTexCoord1iv( GLenum target, const GLint *v ); > >extern void glMultiTexCoord1s( GLenum target, GLshort s ); > >extern void glMultiTexCoord1sv( GLenum target, const GLshort *v ); > >extern void glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t ); > >extern void glMultiTexCoord2dv( GLenum target, const GLdouble *v ); > >extern void glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t ); > >extern void glMultiTexCoord2fv( GLenum target, const GLfloat *v ); > >extern void glMultiTexCoord2i( GLenum target, GLint s, GLint t ); > >extern void glMultiTexCoord2iv( GLenum target, const GLint *v ); > >extern void glMultiTexCoord2s( GLenum target, GLshort s, GLshort t ); > >extern void glMultiTexCoord2sv( GLenum target, const GLshort *v ); > >extern void glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r ); > >extern void glMultiTexCoord3dv( GLenum target, const GLdouble *v ); > >extern void glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r ); > >extern void glMultiTexCoord3fv( GLenum target, const GLfloat *v ); > >extern void glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r ); > >extern void glMultiTexCoord3iv( GLenum target, const GLint *v ); > >extern void glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r ); > >extern void glMultiTexCoord3sv( GLenum target, const GLshort *v ); > >extern void glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q ); > >extern void glMultiTexCoord4dv( GLenum target, const GLdouble *v ); > >extern void glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ); > >extern void glMultiTexCoord4fv( GLenum target, const GLfloat *v ); > >extern void glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q ); > >extern void glMultiTexCoord4iv( GLenum target, const GLint *v ); > >extern void glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q ); > >extern void glMultiTexCoord4sv( GLenum target, const GLshort *v ); > > >extern void glLoadTransposeMatrixd( const GLdouble m[16] ); > >extern void glLoadTransposeMatrixf( const GLfloat m[16] ); > >extern void glMultTransposeMatrixd( const GLdouble m[16] ); > >extern void glMultTransposeMatrixf( const GLfloat m[16] ); > >extern void glSampleCoverage( GLclampf value, GLboolean invert ); > >typedef void ( * PFNGLACTIVETEXTUREPROC) (GLenum texture); >typedef void ( * PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); >typedef void ( * PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); >typedef void ( * PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v); >typedef void ( * PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); >typedef void ( * PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v); >typedef void ( * PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); >typedef void ( * PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v); >typedef void ( * PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); >typedef void ( * PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v); >typedef void ( * PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); >typedef void ( * PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v); >typedef void ( * PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); >typedef void ( * PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v); >typedef void ( * PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); >typedef void ( * PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v); >typedef void ( * PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); >typedef void ( * PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v); >typedef void ( * PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); >typedef void ( * PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v); >typedef void ( * PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); >typedef void ( * PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v); >typedef void ( * PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); >typedef void ( * PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v); >typedef void ( * PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); >typedef void ( * PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v); >typedef void ( * PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); >typedef void ( * PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v); >typedef void ( * PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); >typedef void ( * PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v); >typedef void ( * PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); >typedef void ( * PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v); >typedef void ( * PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); >typedef void ( * PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v); >typedef void ( * PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m); >typedef void ( * PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m); >typedef void ( * PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m); >typedef void ( * PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m); >typedef void ( * PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert); >typedef void ( * PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); >typedef void ( * PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); >typedef void ( * PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); >typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); >typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); >typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); >typedef void ( * PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img); ># 2041 "../../../../../extras/Mesa/include/GL/gl.h" >extern void glActiveTextureARB(GLenum texture); >extern void glClientActiveTextureARB(GLenum texture); >extern void glMultiTexCoord1dARB(GLenum target, GLdouble s); >extern void glMultiTexCoord1dvARB(GLenum target, const GLdouble *v); >extern void glMultiTexCoord1fARB(GLenum target, GLfloat s); >extern void glMultiTexCoord1fvARB(GLenum target, const GLfloat *v); >extern void glMultiTexCoord1iARB(GLenum target, GLint s); >extern void glMultiTexCoord1ivARB(GLenum target, const GLint *v); >extern void glMultiTexCoord1sARB(GLenum target, GLshort s); >extern void glMultiTexCoord1svARB(GLenum target, const GLshort *v); >extern void glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t); >extern void glMultiTexCoord2dvARB(GLenum target, const GLdouble *v); >extern void glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t); >extern void glMultiTexCoord2fvARB(GLenum target, const GLfloat *v); >extern void glMultiTexCoord2iARB(GLenum target, GLint s, GLint t); >extern void glMultiTexCoord2ivARB(GLenum target, const GLint *v); >extern void glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t); >extern void glMultiTexCoord2svARB(GLenum target, const GLshort *v); >extern void glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r); >extern void glMultiTexCoord3dvARB(GLenum target, const GLdouble *v); >extern void glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r); >extern void glMultiTexCoord3fvARB(GLenum target, const GLfloat *v); >extern void glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r); >extern void glMultiTexCoord3ivARB(GLenum target, const GLint *v); >extern void glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r); >extern void glMultiTexCoord3svARB(GLenum target, const GLshort *v); >extern void glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); >extern void glMultiTexCoord4dvARB(GLenum target, const GLdouble *v); >extern void glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); >extern void glMultiTexCoord4fvARB(GLenum target, const GLfloat *v); >extern void glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q); >extern void glMultiTexCoord4ivARB(GLenum target, const GLint *v); >extern void glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); >extern void glMultiTexCoord4svARB(GLenum target, const GLshort *v); > >typedef void ( * PFNGLACTIVETEXTUREARBPROC) (GLenum texture); >typedef void ( * PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); >typedef void ( * PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); >typedef void ( * PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); >typedef void ( * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); >typedef void ( * PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); >typedef void ( * PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); >typedef void ( * PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); >typedef void ( * PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); >typedef void ( * PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); >typedef void ( * PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); >typedef void ( * PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); >typedef void ( * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); >typedef void ( * PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); >typedef void ( * PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); >typedef void ( * PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); >typedef void ( * PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); >typedef void ( * PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); >typedef void ( * PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); >typedef void ( * PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); >typedef void ( * PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); >typedef void ( * PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); >typedef void ( * PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); >typedef void ( * PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); >typedef void ( * PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); >typedef void ( * PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); >typedef void ( * PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); >typedef void ( * PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); >typedef void ( * PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); >typedef void ( * PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); >typedef void ( * PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); >typedef void ( * PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); >typedef void ( * PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); >typedef void ( * PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); ># 2555 "../../../../../extras/Mesa/include/GL/gl.h" ># 1 "../../../../../extras/Mesa/include/GL/glext.h" 1 ># 2612 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glBlendFuncSeparate (GLenum, GLenum, GLenum, GLenum); >extern void glFogCoordf (GLfloat); >extern void glFogCoordfv (const GLfloat *); >extern void glFogCoordd (GLdouble); >extern void glFogCoorddv (const GLdouble *); >extern void glFogCoordPointer (GLenum, GLsizei, const GLvoid *); >extern void glMultiDrawArrays (GLenum, GLint *, GLsizei *, GLsizei); >extern void glMultiDrawElements (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei); >extern void glPointParameterf (GLenum, GLfloat); >extern void glPointParameterfv (GLenum, const GLfloat *); >extern void glPointParameteri (GLenum, GLint); >extern void glPointParameteriv (GLenum, const GLint *); >extern void glSecondaryColor3b (GLbyte, GLbyte, GLbyte); >extern void glSecondaryColor3bv (const GLbyte *); >extern void glSecondaryColor3d (GLdouble, GLdouble, GLdouble); >extern void glSecondaryColor3dv (const GLdouble *); >extern void glSecondaryColor3f (GLfloat, GLfloat, GLfloat); >extern void glSecondaryColor3fv (const GLfloat *); >extern void glSecondaryColor3i (GLint, GLint, GLint); >extern void glSecondaryColor3iv (const GLint *); >extern void glSecondaryColor3s (GLshort, GLshort, GLshort); >extern void glSecondaryColor3sv (const GLshort *); >extern void glSecondaryColor3ub (GLubyte, GLubyte, GLubyte); >extern void glSecondaryColor3ubv (const GLubyte *); >extern void glSecondaryColor3ui (GLuint, GLuint, GLuint); >extern void glSecondaryColor3uiv (const GLuint *); >extern void glSecondaryColor3us (GLushort, GLushort, GLushort); >extern void glSecondaryColor3usv (const GLushort *); >extern void glSecondaryColorPointer (GLint, GLenum, GLsizei, const GLvoid *); >extern void glWindowPos2d (GLdouble, GLdouble); >extern void glWindowPos2dv (const GLdouble *); >extern void glWindowPos2f (GLfloat, GLfloat); >extern void glWindowPos2fv (const GLfloat *); >extern void glWindowPos2i (GLint, GLint); >extern void glWindowPos2iv (const GLint *); >extern void glWindowPos2s (GLshort, GLshort); >extern void glWindowPos2sv (const GLshort *); >extern void glWindowPos3d (GLdouble, GLdouble, GLdouble); >extern void glWindowPos3dv (const GLdouble *); >extern void glWindowPos3f (GLfloat, GLfloat, GLfloat); >extern void glWindowPos3fv (const GLfloat *); >extern void glWindowPos3i (GLint, GLint, GLint); >extern void glWindowPos3iv (const GLint *); >extern void glWindowPos3s (GLshort, GLshort, GLshort); >extern void glWindowPos3sv (const GLshort *); > >typedef void ( * PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); >typedef void ( * PFNGLFOGCOORDFPROC) (GLfloat coord); >typedef void ( * PFNGLFOGCOORDFVPROC) (const GLfloat *coord); >typedef void ( * PFNGLFOGCOORDDPROC) (GLdouble coord); >typedef void ( * PFNGLFOGCOORDDVPROC) (const GLdouble *coord); >typedef void ( * PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); >typedef void ( * PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); >typedef void ( * PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); >typedef void ( * PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); >typedef void ( * PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params); >typedef void ( * PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param); >typedef void ( * PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params); >typedef void ( * PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue); >typedef void ( * PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v); >typedef void ( * PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue); >typedef void ( * PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v); >typedef void ( * PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue); >typedef void ( * PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v); >typedef void ( * PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue); >typedef void ( * PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v); >typedef void ( * PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue); >typedef void ( * PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v); >typedef void ( * PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue); >typedef void ( * PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v); >typedef void ( * PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue); >typedef void ( * PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v); >typedef void ( * PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue); >typedef void ( * PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v); >typedef void ( * PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); >typedef void ( * PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y); >typedef void ( * PFNGLWINDOWPOS2DVPROC) (const GLdouble *v); >typedef void ( * PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y); >typedef void ( * PFNGLWINDOWPOS2FVPROC) (const GLfloat *v); >typedef void ( * PFNGLWINDOWPOS2IPROC) (GLint x, GLint y); >typedef void ( * PFNGLWINDOWPOS2IVPROC) (const GLint *v); >typedef void ( * PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y); >typedef void ( * PFNGLWINDOWPOS2SVPROC) (const GLshort *v); >typedef void ( * PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z); >typedef void ( * PFNGLWINDOWPOS3DVPROC) (const GLdouble *v); >typedef void ( * PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z); >typedef void ( * PFNGLWINDOWPOS3FVPROC) (const GLfloat *v); >typedef void ( * PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z); >typedef void ( * PFNGLWINDOWPOS3IVPROC) (const GLint *v); >typedef void ( * PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z); >typedef void ( * PFNGLWINDOWPOS3SVPROC) (const GLshort *v); ># 2782 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glLoadTransposeMatrixfARB (const GLfloat *); >extern void glLoadTransposeMatrixdARB (const GLdouble *); >extern void glMultTransposeMatrixfARB (const GLfloat *); >extern void glMultTransposeMatrixdARB (const GLdouble *); > >typedef void ( * PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); >typedef void ( * PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); >typedef void ( * PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); >typedef void ( * PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); > > > > > >extern void glSampleCoverageARB (GLclampf, GLboolean); > >typedef void ( * PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert); ># 2812 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glCompressedTexImage3DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); >extern void glCompressedTexImage2DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); >extern void glCompressedTexImage1DARB (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *); >extern void glCompressedTexSubImage3DARB (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); >extern void glCompressedTexSubImage2DARB (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); >extern void glCompressedTexSubImage1DARB (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *); >extern void glGetCompressedTexImageARB (GLenum, GLint, void *); > >typedef void ( * PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); >typedef void ( * PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); >typedef void ( * PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); >typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); >typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); >typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); >typedef void ( * PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, void *img); ># 2836 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glPointParameterfARB (GLenum, GLfloat); >extern void glPointParameterfvARB (GLenum, const GLfloat *); > >typedef void ( * PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param); >typedef void ( * PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params); > > > > > >extern void glWeightbvARB (GLint, const GLbyte *); >extern void glWeightsvARB (GLint, const GLshort *); >extern void glWeightivARB (GLint, const GLint *); >extern void glWeightfvARB (GLint, const GLfloat *); >extern void glWeightdvARB (GLint, const GLdouble *); >extern void glWeightubvARB (GLint, const GLubyte *); >extern void glWeightusvARB (GLint, const GLushort *); >extern void glWeightuivARB (GLint, const GLuint *); >extern void glWeightPointerARB (GLint, GLenum, GLsizei, const GLvoid *); >extern void glVertexBlendARB (GLint); > >typedef void ( * PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights); >typedef void ( * PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights); >typedef void ( * PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights); >typedef void ( * PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights); >typedef void ( * PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights); >typedef void ( * PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights); >typedef void ( * PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights); >typedef void ( * PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights); >typedef void ( * PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); >typedef void ( * PFNGLVERTEXBLENDARBPROC) (GLint count); > > > > > >extern void glCurrentPaletteMatrixARB (GLint); >extern void glMatrixIndexubvARB (GLint, const GLubyte *); >extern void glMatrixIndexusvARB (GLint, const GLushort *); >extern void glMatrixIndexuivARB (GLint, const GLuint *); >extern void glMatrixIndexPointerARB (GLint, GLenum, GLsizei, const GLvoid *); > >typedef void ( * PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index); >typedef void ( * PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices); >typedef void ( * PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices); >typedef void ( * PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices); >typedef void ( * PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); ># 2916 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glWindowPos2dARB (GLdouble, GLdouble); >extern void glWindowPos2dvARB (const GLdouble *); >extern void glWindowPos2fARB (GLfloat, GLfloat); >extern void glWindowPos2fvARB (const GLfloat *); >extern void glWindowPos2iARB (GLint, GLint); >extern void glWindowPos2ivARB (const GLint *); >extern void glWindowPos2sARB (GLshort, GLshort); >extern void glWindowPos2svARB (const GLshort *); >extern void glWindowPos3dARB (GLdouble, GLdouble, GLdouble); >extern void glWindowPos3dvARB (const GLdouble *); >extern void glWindowPos3fARB (GLfloat, GLfloat, GLfloat); >extern void glWindowPos3fvARB (const GLfloat *); >extern void glWindowPos3iARB (GLint, GLint, GLint); >extern void glWindowPos3ivARB (const GLint *); >extern void glWindowPos3sARB (GLshort, GLshort, GLshort); >extern void glWindowPos3svARB (const GLshort *); > >typedef void ( * PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y); >typedef void ( * PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v); >typedef void ( * PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y); >typedef void ( * PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v); >typedef void ( * PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y); >typedef void ( * PFNGLWINDOWPOS2IVARBPROC) (const GLint *v); >typedef void ( * PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y); >typedef void ( * PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v); >typedef void ( * PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z); >typedef void ( * PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v); >typedef void ( * PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z); >typedef void ( * PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v); >typedef void ( * PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z); >typedef void ( * PFNGLWINDOWPOS3IVARBPROC) (const GLint *v); >typedef void ( * PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z); >typedef void ( * PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v); > > > > > >extern void glVertexAttrib1dARB (GLuint, GLdouble); >extern void glVertexAttrib1dvARB (GLuint, const GLdouble *); >extern void glVertexAttrib1fARB (GLuint, GLfloat); >extern void glVertexAttrib1fvARB (GLuint, const GLfloat *); >extern void glVertexAttrib1sARB (GLuint, GLshort); >extern void glVertexAttrib1svARB (GLuint, const GLshort *); >extern void glVertexAttrib2dARB (GLuint, GLdouble, GLdouble); >extern void glVertexAttrib2dvARB (GLuint, const GLdouble *); >extern void glVertexAttrib2fARB (GLuint, GLfloat, GLfloat); >extern void glVertexAttrib2fvARB (GLuint, const GLfloat *); >extern void glVertexAttrib2sARB (GLuint, GLshort, GLshort); >extern void glVertexAttrib2svARB (GLuint, const GLshort *); >extern void glVertexAttrib3dARB (GLuint, GLdouble, GLdouble, GLdouble); >extern void glVertexAttrib3dvARB (GLuint, const GLdouble *); >extern void glVertexAttrib3fARB (GLuint, GLfloat, GLfloat, GLfloat); >extern void glVertexAttrib3fvARB (GLuint, const GLfloat *); >extern void glVertexAttrib3sARB (GLuint, GLshort, GLshort, GLshort); >extern void glVertexAttrib3svARB (GLuint, const GLshort *); >extern void glVertexAttrib4NbvARB (GLuint, const GLbyte *); >extern void glVertexAttrib4NivARB (GLuint, const GLint *); >extern void glVertexAttrib4NsvARB (GLuint, const GLshort *); >extern void glVertexAttrib4NubARB (GLuint, GLubyte, GLubyte, GLubyte, GLubyte); >extern void glVertexAttrib4NubvARB (GLuint, const GLubyte *); >extern void glVertexAttrib4NuivARB (GLuint, const GLuint *); >extern void glVertexAttrib4NusvARB (GLuint, const GLushort *); >extern void glVertexAttrib4bvARB (GLuint, const GLbyte *); >extern void glVertexAttrib4dARB (GLuint, GLdouble, GLdouble, GLdouble, GLdouble); >extern void glVertexAttrib4dvARB (GLuint, const GLdouble *); >extern void glVertexAttrib4fARB (GLuint, GLfloat, GLfloat, GLfloat, GLfloat); >extern void glVertexAttrib4fvARB (GLuint, const GLfloat *); >extern void glVertexAttrib4ivARB (GLuint, const GLint *); >extern void glVertexAttrib4sARB (GLuint, GLshort, GLshort, GLshort, GLshort); >extern void glVertexAttrib4svARB (GLuint, const GLshort *); >extern void glVertexAttrib4ubvARB (GLuint, const GLubyte *); >extern void glVertexAttrib4uivARB (GLuint, const GLuint *); >extern void glVertexAttrib4usvARB (GLuint, const GLushort *); >extern void glVertexAttribPointerARB (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *); >extern void glEnableVertexAttribArrayARB (GLuint); >extern void glDisableVertexAttribArrayARB (GLuint); >extern void glProgramStringARB (GLenum, GLenum, GLsizei, const GLvoid *); >extern void glBindProgramARB (GLenum, GLuint); >extern void glDeleteProgramsARB (GLsizei, const GLuint *); >extern void glGenProgramsARB (GLsizei, GLuint *); >extern void glProgramEnvParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); >extern void glProgramEnvParameter4dvARB (GLenum, GLuint, const GLdouble *); >extern void glProgramEnvParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); >extern void glProgramEnvParameter4fvARB (GLenum, GLuint, const GLfloat *); >extern void glProgramLocalParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); >extern void glProgramLocalParameter4dvARB (GLenum, GLuint, const GLdouble *); >extern void glProgramLocalParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); >extern void glProgramLocalParameter4fvARB (GLenum, GLuint, const GLfloat *); >extern void glGetProgramEnvParameterdvARB (GLenum, GLuint, GLdouble *); >extern void glGetProgramEnvParameterfvARB (GLenum, GLuint, GLfloat *); >extern void glGetProgramLocalParameterdvARB (GLenum, GLuint, GLdouble *); >extern void glGetProgramLocalParameterfvARB (GLenum, GLuint, GLfloat *); >extern void glGetProgramivARB (GLenum, GLenum, GLint *); >extern void glGetProgramStringARB (GLenum, GLenum, GLvoid *); >extern void glGetVertexAttribdvARB (GLuint, GLenum, GLdouble *); >extern void glGetVertexAttribfvARB (GLuint, GLenum, GLfloat *); >extern void glGetVertexAttribivARB (GLuint, GLenum, GLint *); >extern void glGetVertexAttribPointervARB (GLuint, GLenum, GLvoid* *); >extern GLboolean glIsProgramARB (GLuint); > >typedef void ( * PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x); >typedef void ( * PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v); >typedef void ( * PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x); >typedef void ( * PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v); >typedef void ( * PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x); >typedef void ( * PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v); >typedef void ( * PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y); >typedef void ( * PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v); >typedef void ( * PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y); >typedef void ( * PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v); >typedef void ( * PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y); >typedef void ( * PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v); >typedef void ( * PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); >typedef void ( * PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v); >typedef void ( * PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); >typedef void ( * PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v); >typedef void ( * PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z); >typedef void ( * PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v); >typedef void ( * PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v); >typedef void ( * PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v); >typedef void ( * PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v); >typedef void ( * PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); >typedef void ( * PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v); >typedef void ( * PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v); >typedef void ( * PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v); >typedef void ( * PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v); >typedef void ( * PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); >typedef void ( * PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v); >typedef void ( * PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); >typedef void ( * PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v); >typedef void ( * PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v); >typedef void ( * PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); >typedef void ( * PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v); >typedef void ( * PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v); >typedef void ( * PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v); >typedef void ( * PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v); >typedef void ( * PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); >typedef void ( * PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); >typedef void ( * PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); >typedef void ( * PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string); >typedef void ( * PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); >typedef void ( * PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs); >typedef void ( * PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs); >typedef void ( * PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); >typedef void ( * PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); >typedef void ( * PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); >typedef void ( * PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); >typedef void ( * PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); >typedef void ( * PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); >typedef void ( * PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); >typedef void ( * PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); >typedef void ( * PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); >typedef void ( * PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); >typedef void ( * PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); >typedef void ( * PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); >typedef void ( * PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params); >typedef void ( * PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string); >typedef void ( * PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params); >typedef void ( * PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params); >typedef void ( * PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params); >typedef void ( * PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer); >typedef GLboolean ( * PFNGLISPROGRAMARBPROC) (GLuint program); ># 3088 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glBlendColorEXT (GLclampf, GLclampf, GLclampf, GLclampf); > >typedef void ( * PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); > > > > > >extern void glPolygonOffsetEXT (GLfloat, GLfloat); > >typedef void ( * PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias); ># 3108 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glTexImage3DEXT (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); >extern void glTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); > >typedef void ( * PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); >typedef void ( * PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); > > > > > >extern void glGetTexFilterFuncSGIS (GLenum, GLenum, GLfloat *); >extern void glTexFilterFuncSGIS (GLenum, GLenum, GLsizei, const GLfloat *); > >typedef void ( * PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights); >typedef void ( * PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); > > > > > >extern void glTexSubImage1DEXT (GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *); >extern void glTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); > >typedef void ( * PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); >typedef void ( * PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); > > > > > >extern void glCopyTexImage1DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint); >extern void glCopyTexImage2DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint); >extern void glCopyTexSubImage1DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei); >extern void glCopyTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); >extern void glCopyTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); > >typedef void ( * PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); >typedef void ( * PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); >typedef void ( * PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); >typedef void ( * PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); >typedef void ( * PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); > > > > > >extern void glGetHistogramEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *); >extern void glGetHistogramParameterfvEXT (GLenum, GLenum, GLfloat *); >extern void glGetHistogramParameterivEXT (GLenum, GLenum, GLint *); >extern void glGetMinmaxEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *); >extern void glGetMinmaxParameterfvEXT (GLenum, GLenum, GLfloat *); >extern void glGetMinmaxParameterivEXT (GLenum, GLenum, GLint *); >extern void glHistogramEXT (GLenum, GLsizei, GLenum, GLboolean); >extern void glMinmaxEXT (GLenum, GLenum, GLboolean); >extern void glResetHistogramEXT (GLenum); >extern void glResetMinmaxEXT (GLenum); > >typedef void ( * PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); >typedef void ( * PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); >typedef void ( * PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); >typedef void ( * PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); >typedef void ( * PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); >typedef void ( * PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); >typedef void ( * PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); >typedef void ( * PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink); >typedef void ( * PFNGLRESETHISTOGRAMEXTPROC) (GLenum target); >typedef void ( * PFNGLRESETMINMAXEXTPROC) (GLenum target); > > > > > >extern void glConvolutionFilter1DEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); >extern void glConvolutionFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); >extern void glConvolutionParameterfEXT (GLenum, GLenum, GLfloat); >extern void glConvolutionParameterfvEXT (GLenum, GLenum, const GLfloat *); >extern void glConvolutionParameteriEXT (GLenum, GLenum, GLint); >extern void glConvolutionParameterivEXT (GLenum, GLenum, const GLint *); >extern void glCopyConvolutionFilter1DEXT (GLenum, GLenum, GLint, GLint, GLsizei); >extern void glCopyConvolutionFilter2DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei); >extern void glGetConvolutionFilterEXT (GLenum, GLenum, GLenum, GLvoid *); >extern void glGetConvolutionParameterfvEXT (GLenum, GLenum, GLfloat *); >extern void glGetConvolutionParameterivEXT (GLenum, GLenum, GLint *); >extern void glGetSeparableFilterEXT (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *); >extern void glSeparableFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *); > >typedef void ( * PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); >typedef void ( * PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); >typedef void ( * PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params); >typedef void ( * PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); >typedef void ( * PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params); >typedef void ( * PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); >typedef void ( * PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); >typedef void ( * PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); >typedef void ( * PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); >typedef void ( * PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); >typedef void ( * PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); >typedef void ( * PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); >typedef void ( * PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); ># 3216 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glColorTableSGI (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); >extern void glColorTableParameterfvSGI (GLenum, GLenum, const GLfloat *); >extern void glColorTableParameterivSGI (GLenum, GLenum, const GLint *); >extern void glCopyColorTableSGI (GLenum, GLenum, GLint, GLint, GLsizei); >extern void glGetColorTableSGI (GLenum, GLenum, GLenum, GLvoid *); >extern void glGetColorTableParameterfvSGI (GLenum, GLenum, GLfloat *); >extern void glGetColorTableParameterivSGI (GLenum, GLenum, GLint *); > >typedef void ( * PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); >typedef void ( * PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params); >typedef void ( * PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params); >typedef void ( * PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); >typedef void ( * PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); >typedef void ( * PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params); >typedef void ( * PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params); > > > > > >extern void glPixelTexGenSGIX (GLenum); > >typedef void ( * PFNGLPIXELTEXGENSGIXPROC) (GLenum mode); > > > > > >extern void glPixelTexGenParameteriSGIS (GLenum, GLint); >extern void glPixelTexGenParameterivSGIS (GLenum, const GLint *); >extern void glPixelTexGenParameterfSGIS (GLenum, GLfloat); >extern void glPixelTexGenParameterfvSGIS (GLenum, const GLfloat *); >extern void glGetPixelTexGenParameterivSGIS (GLenum, GLint *); >extern void glGetPixelTexGenParameterfvSGIS (GLenum, GLfloat *); > >typedef void ( * PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param); >typedef void ( * PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params); >typedef void ( * PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param); >typedef void ( * PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); >typedef void ( * PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params); >typedef void ( * PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params); > > > > > >extern void glTexImage4DSGIS (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); >extern void glTexSubImage4DSGIS (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); > >typedef void ( * PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels); >typedef void ( * PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels); ># 3280 "../../../../../extras/Mesa/include/GL/glext.h" >extern GLboolean glAreTexturesResidentEXT (GLsizei, const GLuint *, GLboolean *); >extern void glBindTextureEXT (GLenum, GLuint); >extern void glDeleteTexturesEXT (GLsizei, const GLuint *); >extern void glGenTexturesEXT (GLsizei, GLuint *); >extern GLboolean glIsTextureEXT (GLuint); >extern void glPrioritizeTexturesEXT (GLsizei, const GLuint *, const GLclampf *); > >typedef GLboolean ( * PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences); >typedef void ( * PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture); >typedef void ( * PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures); >typedef void ( * PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures); >typedef GLboolean ( * PFNGLISTEXTUREEXTPROC) (GLuint texture); >typedef void ( * PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities); > > > > > >extern void glDetailTexFuncSGIS (GLenum, GLsizei, const GLfloat *); >extern void glGetDetailTexFuncSGIS (GLenum, GLfloat *); > >typedef void ( * PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); >typedef void ( * PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points); > > > > > >extern void glSharpenTexFuncSGIS (GLenum, GLsizei, const GLfloat *); >extern void glGetSharpenTexFuncSGIS (GLenum, GLfloat *); > >typedef void ( * PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); >typedef void ( * PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points); ># 3326 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glSampleMaskSGIS (GLclampf, GLboolean); >extern void glSamplePatternSGIS (GLenum); > >typedef void ( * PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert); >typedef void ( * PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern); ># 3340 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glArrayElementEXT (GLint); >extern void glColorPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *); >extern void glDrawArraysEXT (GLenum, GLint, GLsizei); >extern void glEdgeFlagPointerEXT (GLsizei, GLsizei, const GLboolean *); >extern void glGetPointervEXT (GLenum, GLvoid* *); >extern void glIndexPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *); >extern void glNormalPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *); >extern void glTexCoordPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *); >extern void glVertexPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *); > >typedef void ( * PFNGLARRAYELEMENTEXTPROC) (GLint i); >typedef void ( * PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); >typedef void ( * PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count); >typedef void ( * PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer); >typedef void ( * PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params); >typedef void ( * PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); >typedef void ( * PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); >typedef void ( * PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); >typedef void ( * PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); ># 3388 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glBlendEquationEXT (GLenum); > >typedef void ( * PFNGLBLENDEQUATIONEXTPROC) (GLenum mode); ># 3416 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glSpriteParameterfSGIX (GLenum, GLfloat); >extern void glSpriteParameterfvSGIX (GLenum, const GLfloat *); >extern void glSpriteParameteriSGIX (GLenum, GLint); >extern void glSpriteParameterivSGIX (GLenum, const GLint *); > >typedef void ( * PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param); >typedef void ( * PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params); >typedef void ( * PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param); >typedef void ( * PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params); ># 3434 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glPointParameterfEXT (GLenum, GLfloat); >extern void glPointParameterfvEXT (GLenum, const GLfloat *); > >typedef void ( * PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param); >typedef void ( * PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params); > > > > > >extern void glPointParameterfSGIS (GLenum, GLfloat); >extern void glPointParameterfvSGIS (GLenum, const GLfloat *); > >typedef void ( * PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param); >typedef void ( * PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); > > > > > >extern GLint glGetInstrumentsSGIX (void); >extern void glInstrumentsBufferSGIX (GLsizei, GLint *); >extern GLint glPollInstrumentsSGIX (GLint *); >extern void glReadInstrumentsSGIX (GLint); >extern void glStartInstrumentsSGIX (void); >extern void glStopInstrumentsSGIX (GLint); > >typedef GLint ( * PFNGLGETINSTRUMENTSSGIXPROC) (void); >typedef void ( * PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer); >typedef GLint ( * PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p); >typedef void ( * PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker); >typedef void ( * PFNGLSTARTINSTRUMENTSSGIXPROC) (void); >typedef void ( * PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker); ># 3476 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glFrameZoomSGIX (GLint); > >typedef void ( * PFNGLFRAMEZOOMSGIXPROC) (GLint factor); > > > > > >extern void glTagSampleBufferSGIX (void); > >typedef void ( * PFNGLTAGSAMPLEBUFFERSGIXPROC) (void); > > > > > >extern void glDeformationMap3dSGIX (GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *); >extern void glDeformationMap3fSGIX (GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *); >extern void glDeformSGIX (GLbitfield); >extern void glLoadIdentityDeformationMapSGIX (GLbitfield); > >typedef void ( * PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); >typedef void ( * PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); >typedef void ( * PFNGLDEFORMSGIXPROC) (GLbitfield mask); >typedef void ( * PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask); > > > > > >extern void glReferencePlaneSGIX (const GLdouble *); > >typedef void ( * PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation); > > > > > >extern void glFlushRasterSGIX (void); > >typedef void ( * PFNGLFLUSHRASTERSGIXPROC) (void); ># 3526 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glFogFuncSGIS (GLsizei, const GLfloat *); >extern void glGetFogFuncSGIS (GLfloat *); > >typedef void ( * PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points); >typedef void ( * PFNGLGETFOGFUNCSGISPROC) (GLfloat *points); ># 3540 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glImageTransformParameteriHP (GLenum, GLenum, GLint); >extern void glImageTransformParameterfHP (GLenum, GLenum, GLfloat); >extern void glImageTransformParameterivHP (GLenum, GLenum, const GLint *); >extern void glImageTransformParameterfvHP (GLenum, GLenum, const GLfloat *); >extern void glGetImageTransformParameterivHP (GLenum, GLenum, GLint *); >extern void glGetImageTransformParameterfvHP (GLenum, GLenum, GLfloat *); > >typedef void ( * PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param); >typedef void ( * PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param); >typedef void ( * PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params); >typedef void ( * PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params); >typedef void ( * PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params); >typedef void ( * PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params); ># 3566 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glColorSubTableEXT (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); >extern void glCopyColorSubTableEXT (GLenum, GLsizei, GLint, GLint, GLsizei); > >typedef void ( * PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); >typedef void ( * PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); ># 3580 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glHintPGI (GLenum, GLint); > >typedef void ( * PFNGLHINTPGIPROC) (GLenum target, GLint mode); > > > > > >extern void glColorTableEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); >extern void glGetColorTableEXT (GLenum, GLenum, GLenum, GLvoid *); >extern void glGetColorTableParameterivEXT (GLenum, GLenum, GLint *); >extern void glGetColorTableParameterfvEXT (GLenum, GLenum, GLfloat *); > >typedef void ( * PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); >typedef void ( * PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data); >typedef void ( * PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); >typedef void ( * PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); ># 3606 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glGetListParameterfvSGIX (GLuint, GLenum, GLfloat *); >extern void glGetListParameterivSGIX (GLuint, GLenum, GLint *); >extern void glListParameterfSGIX (GLuint, GLenum, GLfloat); >extern void glListParameterfvSGIX (GLuint, GLenum, const GLfloat *); >extern void glListParameteriSGIX (GLuint, GLenum, GLint); >extern void glListParameterivSGIX (GLuint, GLenum, const GLint *); > >typedef void ( * PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params); >typedef void ( * PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params); >typedef void ( * PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param); >typedef void ( * PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params); >typedef void ( * PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param); >typedef void ( * PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params); ># 3644 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glIndexMaterialEXT (GLenum, GLenum); > >typedef void ( * PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode); > > > > > >extern void glIndexFuncEXT (GLenum, GLclampf); > >typedef void ( * PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref); ># 3664 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glLockArraysEXT (GLint, GLsizei); >extern void glUnlockArraysEXT (void); > >typedef void ( * PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count); >typedef void ( * PFNGLUNLOCKARRAYSEXTPROC) (void); > > > > > >extern void glCullParameterdvEXT (GLenum, GLdouble *); >extern void glCullParameterfvEXT (GLenum, GLfloat *); > >typedef void ( * PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params); >typedef void ( * PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params); ># 3688 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glFragmentColorMaterialSGIX (GLenum, GLenum); >extern void glFragmentLightfSGIX (GLenum, GLenum, GLfloat); >extern void glFragmentLightfvSGIX (GLenum, GLenum, const GLfloat *); >extern void glFragmentLightiSGIX (GLenum, GLenum, GLint); >extern void glFragmentLightivSGIX (GLenum, GLenum, const GLint *); >extern void glFragmentLightModelfSGIX (GLenum, GLfloat); >extern void glFragmentLightModelfvSGIX (GLenum, const GLfloat *); >extern void glFragmentLightModeliSGIX (GLenum, GLint); >extern void glFragmentLightModelivSGIX (GLenum, const GLint *); >extern void glFragmentMaterialfSGIX (GLenum, GLenum, GLfloat); >extern void glFragmentMaterialfvSGIX (GLenum, GLenum, const GLfloat *); >extern void glFragmentMaterialiSGIX (GLenum, GLenum, GLint); >extern void glFragmentMaterialivSGIX (GLenum, GLenum, const GLint *); >extern void glGetFragmentLightfvSGIX (GLenum, GLenum, GLfloat *); >extern void glGetFragmentLightivSGIX (GLenum, GLenum, GLint *); >extern void glGetFragmentMaterialfvSGIX (GLenum, GLenum, GLfloat *); >extern void glGetFragmentMaterialivSGIX (GLenum, GLenum, GLint *); >extern void glLightEnviSGIX (GLenum, GLint); > >typedef void ( * PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode); >typedef void ( * PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param); >typedef void ( * PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params); >typedef void ( * PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param); >typedef void ( * PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params); >typedef void ( * PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param); >typedef void ( * PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params); >typedef void ( * PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param); >typedef void ( * PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params); >typedef void ( * PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param); >typedef void ( * PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params); >typedef void ( * PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param); >typedef void ( * PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params); >typedef void ( * PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params); >typedef void ( * PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params); >typedef void ( * PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params); >typedef void ( * PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params); >typedef void ( * PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param); ># 3738 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glDrawRangeElementsEXT (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *); > >typedef void ( * PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); ># 3754 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glApplyTextureEXT (GLenum); >extern void glTextureLightEXT (GLenum); >extern void glTextureMaterialEXT (GLenum, GLenum); > >typedef void ( * PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode); >typedef void ( * PFNGLTEXTURELIGHTEXTPROC) (GLenum pname); >typedef void ( * PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode); ># 3774 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glAsyncMarkerSGIX (GLuint); >extern GLint glFinishAsyncSGIX (GLuint *); >extern GLint glPollAsyncSGIX (GLuint *); >extern GLuint glGenAsyncMarkersSGIX (GLsizei); >extern void glDeleteAsyncMarkersSGIX (GLuint, GLsizei); >extern GLboolean glIsAsyncMarkerSGIX (GLuint); > >typedef void ( * PFNGLASYNCMARKERSGIXPROC) (GLuint marker); >typedef GLint ( * PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp); >typedef GLint ( * PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp); >typedef GLuint ( * PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range); >typedef void ( * PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range); >typedef GLboolean ( * PFNGLISASYNCMARKERSGIXPROC) (GLuint marker); ># 3800 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glVertexPointervINTEL (GLint, GLenum, const GLvoid* *); >extern void glNormalPointervINTEL (GLenum, const GLvoid* *); >extern void glColorPointervINTEL (GLint, GLenum, const GLvoid* *); >extern void glTexCoordPointervINTEL (GLint, GLenum, const GLvoid* *); > >typedef void ( * PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); >typedef void ( * PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer); >typedef void ( * PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); >typedef void ( * PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); ># 3818 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glPixelTransformParameteriEXT (GLenum, GLenum, GLint); >extern void glPixelTransformParameterfEXT (GLenum, GLenum, GLfloat); >extern void glPixelTransformParameterivEXT (GLenum, GLenum, const GLint *); >extern void glPixelTransformParameterfvEXT (GLenum, GLenum, const GLfloat *); > >typedef void ( * PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param); >typedef void ( * PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param); >typedef void ( * PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); >typedef void ( * PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); ># 3844 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glSecondaryColor3bEXT (GLbyte, GLbyte, GLbyte); >extern void glSecondaryColor3bvEXT (const GLbyte *); >extern void glSecondaryColor3dEXT (GLdouble, GLdouble, GLdouble); >extern void glSecondaryColor3dvEXT (const GLdouble *); >extern void glSecondaryColor3fEXT (GLfloat, GLfloat, GLfloat); >extern void glSecondaryColor3fvEXT (const GLfloat *); >extern void glSecondaryColor3iEXT (GLint, GLint, GLint); >extern void glSecondaryColor3ivEXT (const GLint *); >extern void glSecondaryColor3sEXT (GLshort, GLshort, GLshort); >extern void glSecondaryColor3svEXT (const GLshort *); >extern void glSecondaryColor3ubEXT (GLubyte, GLubyte, GLubyte); >extern void glSecondaryColor3ubvEXT (const GLubyte *); >extern void glSecondaryColor3uiEXT (GLuint, GLuint, GLuint); >extern void glSecondaryColor3uivEXT (const GLuint *); >extern void glSecondaryColor3usEXT (GLushort, GLushort, GLushort); >extern void glSecondaryColor3usvEXT (const GLushort *); >extern void glSecondaryColorPointerEXT (GLint, GLenum, GLsizei, const GLvoid *); > >typedef void ( * PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); >typedef void ( * PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v); >typedef void ( * PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); >typedef void ( * PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v); >typedef void ( * PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); >typedef void ( * PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v); >typedef void ( * PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue); >typedef void ( * PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v); >typedef void ( * PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue); >typedef void ( * PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v); >typedef void ( * PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); >typedef void ( * PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v); >typedef void ( * PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue); >typedef void ( * PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v); >typedef void ( * PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue); >typedef void ( * PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v); >typedef void ( * PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); > > > > > >extern void glTextureNormalEXT (GLenum); > >typedef void ( * PFNGLTEXTURENORMALEXTPROC) (GLenum mode); > > > > > >extern void glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei); >extern void glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei); > >typedef void ( * PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); >typedef void ( * PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); > > > > > >extern void glFogCoordfEXT (GLfloat); >extern void glFogCoordfvEXT (const GLfloat *); >extern void glFogCoorddEXT (GLdouble); >extern void glFogCoorddvEXT (const GLdouble *); >extern void glFogCoordPointerEXT (GLenum, GLsizei, const GLvoid *); > >typedef void ( * PFNGLFOGCOORDFEXTPROC) (GLfloat coord); >typedef void ( * PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord); >typedef void ( * PFNGLFOGCOORDDEXTPROC) (GLdouble coord); >typedef void ( * PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord); >typedef void ( * PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); ># 3922 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glTangent3bEXT (GLbyte, GLbyte, GLbyte); >extern void glTangent3bvEXT (const GLbyte *); >extern void glTangent3dEXT (GLdouble, GLdouble, GLdouble); >extern void glTangent3dvEXT (const GLdouble *); >extern void glTangent3fEXT (GLfloat, GLfloat, GLfloat); >extern void glTangent3fvEXT (const GLfloat *); >extern void glTangent3iEXT (GLint, GLint, GLint); >extern void glTangent3ivEXT (const GLint *); >extern void glTangent3sEXT (GLshort, GLshort, GLshort); >extern void glTangent3svEXT (const GLshort *); >extern void glBinormal3bEXT (GLbyte, GLbyte, GLbyte); >extern void glBinormal3bvEXT (const GLbyte *); >extern void glBinormal3dEXT (GLdouble, GLdouble, GLdouble); >extern void glBinormal3dvEXT (const GLdouble *); >extern void glBinormal3fEXT (GLfloat, GLfloat, GLfloat); >extern void glBinormal3fvEXT (const GLfloat *); >extern void glBinormal3iEXT (GLint, GLint, GLint); >extern void glBinormal3ivEXT (const GLint *); >extern void glBinormal3sEXT (GLshort, GLshort, GLshort); >extern void glBinormal3svEXT (const GLshort *); >extern void glTangentPointerEXT (GLenum, GLsizei, const GLvoid *); >extern void glBinormalPointerEXT (GLenum, GLsizei, const GLvoid *); > >typedef void ( * PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz); >typedef void ( * PFNGLTANGENT3BVEXTPROC) (const GLbyte *v); >typedef void ( * PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz); >typedef void ( * PFNGLTANGENT3DVEXTPROC) (const GLdouble *v); >typedef void ( * PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz); >typedef void ( * PFNGLTANGENT3FVEXTPROC) (const GLfloat *v); >typedef void ( * PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz); >typedef void ( * PFNGLTANGENT3IVEXTPROC) (const GLint *v); >typedef void ( * PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz); >typedef void ( * PFNGLTANGENT3SVEXTPROC) (const GLshort *v); >typedef void ( * PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz); >typedef void ( * PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v); >typedef void ( * PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz); >typedef void ( * PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v); >typedef void ( * PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz); >typedef void ( * PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v); >typedef void ( * PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz); >typedef void ( * PFNGLBINORMAL3IVEXTPROC) (const GLint *v); >typedef void ( * PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz); >typedef void ( * PFNGLBINORMAL3SVEXTPROC) (const GLshort *v); >typedef void ( * PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); >typedef void ( * PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); ># 3988 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glFinishTextureSUNX (void); > >typedef void ( * PFNGLFINISHTEXTURESUNXPROC) (void); > > > > > >extern void glGlobalAlphaFactorbSUN (GLbyte); >extern void glGlobalAlphaFactorsSUN (GLshort); >extern void glGlobalAlphaFactoriSUN (GLint); >extern void glGlobalAlphaFactorfSUN (GLfloat); >extern void glGlobalAlphaFactordSUN (GLdouble); >extern void glGlobalAlphaFactorubSUN (GLubyte); >extern void glGlobalAlphaFactorusSUN (GLushort); >extern void glGlobalAlphaFactoruiSUN (GLuint); > >typedef void ( * PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor); >typedef void ( * PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor); >typedef void ( * PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor); >typedef void ( * PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor); >typedef void ( * PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor); >typedef void ( * PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor); >typedef void ( * PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor); >typedef void ( * PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor); > > > > > >extern void glReplacementCodeuiSUN (GLuint); >extern void glReplacementCodeusSUN (GLushort); >extern void glReplacementCodeubSUN (GLubyte); >extern void glReplacementCodeuivSUN (const GLuint *); >extern void glReplacementCodeusvSUN (const GLushort *); >extern void glReplacementCodeubvSUN (const GLubyte *); >extern void glReplacementCodePointerSUN (GLenum, GLsizei, const GLvoid* *); > >typedef void ( * PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code); >typedef void ( * PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code); >typedef void ( * PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code); >typedef void ( * PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code); >typedef void ( * PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code); >typedef void ( * PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code); >typedef void ( * PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer); > > > > > >extern void glColor4ubVertex2fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat); >extern void glColor4ubVertex2fvSUN (const GLubyte *, const GLfloat *); >extern void glColor4ubVertex3fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat); >extern void glColor4ubVertex3fvSUN (const GLubyte *, const GLfloat *); >extern void glColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); >extern void glColor3fVertex3fvSUN (const GLfloat *, const GLfloat *); >extern void glNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); >extern void glNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *); >extern void glColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); >extern void glColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *); >extern void glTexCoord2fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); >extern void glTexCoord2fVertex3fvSUN (const GLfloat *, const GLfloat *); >extern void glTexCoord4fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); >extern void glTexCoord4fVertex4fvSUN (const GLfloat *, const GLfloat *); >extern void glTexCoord2fColor4ubVertex3fSUN (GLfloat, GLfloat, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat); >extern void glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *, const GLubyte *, const GLfloat *); >extern void glTexCoord2fColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); >extern void glTexCoord2fColor3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *); >extern void glTexCoord2fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); >extern void glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *); >extern void glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); >extern void glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *); >extern void glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); >extern void glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *); >extern void glReplacementCodeuiVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat); >extern void glReplacementCodeuiVertex3fvSUN (const GLuint *, const GLfloat *); >extern void glReplacementCodeuiColor4ubVertex3fSUN (GLuint, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat); >extern void glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *, const GLubyte *, const GLfloat *); >extern void glReplacementCodeuiColor3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); >extern void glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *); >extern void glReplacementCodeuiNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); >extern void glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *); >extern void glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); >extern void glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *); >extern void glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); >extern void glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *); >extern void glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); >extern void glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *); >extern void glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); >extern void glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *); > >typedef void ( * PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); >typedef void ( * PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v); >typedef void ( * PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); >typedef void ( * PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v); >typedef void ( * PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); >typedef void ( * PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v); >typedef void ( * PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); >typedef void ( * PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v); >typedef void ( * PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); >typedef void ( * PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v); >typedef void ( * PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); >typedef void ( * PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v); >typedef void ( * PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); >typedef void ( * PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v); >typedef void ( * PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); >typedef void ( * PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v); >typedef void ( * PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); >typedef void ( * PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v); >typedef void ( * PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); >typedef void ( * PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v); >typedef void ( * PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); >typedef void ( * PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); >typedef void ( * PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); >typedef void ( * PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); >typedef void ( * PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z); >typedef void ( * PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v); >typedef void ( * PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); >typedef void ( * PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v); >typedef void ( * PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); >typedef void ( * PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v); >typedef void ( * PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); >typedef void ( * PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v); >typedef void ( * PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); >typedef void ( * PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); >typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); >typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v); >typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); >typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); >typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); >typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); > > > > > >extern void glBlendFuncSeparateEXT (GLenum, GLenum, GLenum, GLenum); > >typedef void ( * PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); > > > > > >extern void glBlendFuncSeparateINGR (GLenum, GLenum, GLenum, GLenum); > >typedef void ( * PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); ># 4176 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glVertexWeightfEXT (GLfloat); >extern void glVertexWeightfvEXT (const GLfloat *); >extern void glVertexWeightPointerEXT (GLsizei, GLenum, GLsizei, const GLvoid *); > >typedef void ( * PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight); >typedef void ( * PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight); >typedef void ( * PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer); ># 4192 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glFlushVertexArrayRangeNV (void); >extern void glVertexArrayRangeNV (GLsizei, const GLvoid *); > >typedef void ( * PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void); >typedef void ( * PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer); > > > > > >extern void glCombinerParameterfvNV (GLenum, const GLfloat *); >extern void glCombinerParameterfNV (GLenum, GLfloat); >extern void glCombinerParameterivNV (GLenum, const GLint *); >extern void glCombinerParameteriNV (GLenum, GLint); >extern void glCombinerInputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum); >extern void glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean); >extern void glFinalCombinerInputNV (GLenum, GLenum, GLenum, GLenum); >extern void glGetCombinerInputParameterfvNV (GLenum, GLenum, GLenum, GLenum, GLfloat *); >extern void glGetCombinerInputParameterivNV (GLenum, GLenum, GLenum, GLenum, GLint *); >extern void glGetCombinerOutputParameterfvNV (GLenum, GLenum, GLenum, GLfloat *); >extern void glGetCombinerOutputParameterivNV (GLenum, GLenum, GLenum, GLint *); >extern void glGetFinalCombinerInputParameterfvNV (GLenum, GLenum, GLfloat *); >extern void glGetFinalCombinerInputParameterivNV (GLenum, GLenum, GLint *); > >typedef void ( * PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params); >typedef void ( * PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param); >typedef void ( * PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params); >typedef void ( * PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); >typedef void ( * PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); >typedef void ( * PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); >typedef void ( * PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); >typedef void ( * PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); >typedef void ( * PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); >typedef void ( * PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); >typedef void ( * PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params); >typedef void ( * PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params); >typedef void ( * PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params); ># 4250 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glResizeBuffersMESA (void); > >typedef void ( * PFNGLRESIZEBUFFERSMESAPROC) (void); > > > > > >extern void glWindowPos2dMESA (GLdouble, GLdouble); >extern void glWindowPos2dvMESA (const GLdouble *); >extern void glWindowPos2fMESA (GLfloat, GLfloat); >extern void glWindowPos2fvMESA (const GLfloat *); >extern void glWindowPos2iMESA (GLint, GLint); >extern void glWindowPos2ivMESA (const GLint *); >extern void glWindowPos2sMESA (GLshort, GLshort); >extern void glWindowPos2svMESA (const GLshort *); >extern void glWindowPos3dMESA (GLdouble, GLdouble, GLdouble); >extern void glWindowPos3dvMESA (const GLdouble *); >extern void glWindowPos3fMESA (GLfloat, GLfloat, GLfloat); >extern void glWindowPos3fvMESA (const GLfloat *); >extern void glWindowPos3iMESA (GLint, GLint, GLint); >extern void glWindowPos3ivMESA (const GLint *); >extern void glWindowPos3sMESA (GLshort, GLshort, GLshort); >extern void glWindowPos3svMESA (const GLshort *); >extern void glWindowPos4dMESA (GLdouble, GLdouble, GLdouble, GLdouble); >extern void glWindowPos4dvMESA (const GLdouble *); >extern void glWindowPos4fMESA (GLfloat, GLfloat, GLfloat, GLfloat); >extern void glWindowPos4fvMESA (const GLfloat *); >extern void glWindowPos4iMESA (GLint, GLint, GLint, GLint); >extern void glWindowPos4ivMESA (const GLint *); >extern void glWindowPos4sMESA (GLshort, GLshort, GLshort, GLshort); >extern void glWindowPos4svMESA (const GLshort *); > >typedef void ( * PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y); >typedef void ( * PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v); >typedef void ( * PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y); >typedef void ( * PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v); >typedef void ( * PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y); >typedef void ( * PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v); >typedef void ( * PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y); >typedef void ( * PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v); >typedef void ( * PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z); >typedef void ( * PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v); >typedef void ( * PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z); >typedef void ( * PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v); >typedef void ( * PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z); >typedef void ( * PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v); >typedef void ( * PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z); >typedef void ( * PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v); >typedef void ( * PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w); >typedef void ( * PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v); >typedef void ( * PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); >typedef void ( * PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v); >typedef void ( * PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w); >typedef void ( * PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v); >typedef void ( * PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w); >typedef void ( * PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v); ># 4316 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glMultiModeDrawArraysIBM (GLenum, const GLint *, const GLsizei *, GLsizei, GLint); >extern void glMultiModeDrawElementsIBM (const GLenum *, const GLsizei *, GLenum, const GLvoid* *, GLsizei, GLint); > >typedef void ( * PFNGLMULTIMODEDRAWARRAYSIBMPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); >typedef void ( * PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount, GLint modestride); > > > > > >extern void glColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint); >extern void glSecondaryColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint); >extern void glEdgeFlagPointerListIBM (GLint, const GLboolean* *, GLint); >extern void glFogCoordPointerListIBM (GLenum, GLint, const GLvoid* *, GLint); >extern void glIndexPointerListIBM (GLenum, GLint, const GLvoid* *, GLint); >extern void glNormalPointerListIBM (GLenum, GLint, const GLvoid* *, GLint); >extern void glTexCoordPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint); >extern void glVertexPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint); > >typedef void ( * PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); >typedef void ( * PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); >typedef void ( * PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride); >typedef void ( * PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); >typedef void ( * PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); >typedef void ( * PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); >typedef void ( * PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); >typedef void ( * PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); ># 4372 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glTbufferMask3DFX (GLuint); > >typedef void ( * PFNGLTBUFFERMASK3DFXPROC) (GLuint mask); > > > > > >extern void glSampleMaskEXT (GLclampf, GLboolean); >extern void glSamplePatternEXT (GLenum); > >typedef void ( * PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert); >typedef void ( * PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern); ># 4406 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glTextureColorMaskSGIS (GLboolean, GLboolean, GLboolean, GLboolean); > >typedef void ( * PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); > > > > > >extern void glIglooInterfaceSGIX (GLenum, const GLvoid *); > >typedef void ( * PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params); ># 4430 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glDeleteFencesNV (GLsizei, const GLuint *); >extern void glGenFencesNV (GLsizei, GLuint *); >extern GLboolean glIsFenceNV (GLuint); >extern GLboolean glTestFenceNV (GLuint); >extern void glGetFenceivNV (GLuint, GLenum, GLint *); >extern void glFinishFenceNV (GLuint); >extern void glSetFenceNV (GLuint, GLenum); > >typedef void ( * PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); >typedef void ( * PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); >typedef GLboolean ( * PFNGLISFENCENVPROC) (GLuint fence); >typedef GLboolean ( * PFNGLTESTFENCENVPROC) (GLuint fence); >typedef void ( * PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); >typedef void ( * PFNGLFINISHFENCENVPROC) (GLuint fence); >typedef void ( * PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); > > > > > >extern void glMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLint, GLint, GLboolean, const GLvoid *); >extern void glMapParameterivNV (GLenum, GLenum, const GLint *); >extern void glMapParameterfvNV (GLenum, GLenum, const GLfloat *); >extern void glGetMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLboolean, GLvoid *); >extern void glGetMapParameterivNV (GLenum, GLenum, GLint *); >extern void glGetMapParameterfvNV (GLenum, GLenum, GLfloat *); >extern void glGetMapAttribParameterivNV (GLenum, GLuint, GLenum, GLint *); >extern void glGetMapAttribParameterfvNV (GLenum, GLuint, GLenum, GLfloat *); >extern void glEvalMapsNV (GLenum, GLenum); > >typedef void ( * PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); >typedef void ( * PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params); >typedef void ( * PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params); >typedef void ( * PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); >typedef void ( * PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params); >typedef void ( * PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params); >typedef void ( * PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); >typedef void ( * PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); >typedef void ( * PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode); ># 4478 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glCombinerStageParameterfvNV (GLenum, GLenum, const GLfloat *); >extern void glGetCombinerStageParameterfvNV (GLenum, GLenum, GLfloat *); > >typedef void ( * PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params); >typedef void ( * PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params); ># 4508 "../../../../../extras/Mesa/include/GL/glext.h" >extern GLboolean glAreProgramsResidentNV (GLsizei, const GLuint *, GLboolean *); >extern void glBindProgramNV (GLenum, GLuint); >extern void glDeleteProgramsNV (GLsizei, const GLuint *); >extern void glExecuteProgramNV (GLenum, GLuint, const GLfloat *); >extern void glGenProgramsNV (GLsizei, GLuint *); >extern void glGetProgramParameterdvNV (GLenum, GLuint, GLenum, GLdouble *); >extern void glGetProgramParameterfvNV (GLenum, GLuint, GLenum, GLfloat *); >extern void glGetProgramivNV (GLuint, GLenum, GLint *); >extern void glGetProgramStringNV (GLuint, GLenum, GLubyte *); >extern void glGetTrackMatrixivNV (GLenum, GLuint, GLenum, GLint *); >extern void glGetVertexAttribdvNV (GLuint, GLenum, GLdouble *); >extern void glGetVertexAttribfvNV (GLuint, GLenum, GLfloat *); >extern void glGetVertexAttribivNV (GLuint, GLenum, GLint *); >extern void glGetVertexAttribPointervNV (GLuint, GLenum, GLvoid* *); >extern GLboolean glIsProgramNV (GLuint); >extern void glLoadProgramNV (GLenum, GLuint, GLsizei, const GLubyte *); >extern void glProgramParameter4dNV (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); >extern void glProgramParameter4dvNV (GLenum, GLuint, const GLdouble *); >extern void glProgramParameter4fNV (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); >extern void glProgramParameter4fvNV (GLenum, GLuint, const GLfloat *); >extern void glProgramParameters4dvNV (GLenum, GLuint, GLuint, const GLdouble *); >extern void glProgramParameters4fvNV (GLenum, GLuint, GLuint, const GLfloat *); >extern void glRequestResidentProgramsNV (GLsizei, const GLuint *); >extern void glTrackMatrixNV (GLenum, GLuint, GLenum, GLenum); >extern void glVertexAttribPointerNV (GLuint, GLint, GLenum, GLsizei, const GLvoid *); >extern void glVertexAttrib1dNV (GLuint, GLdouble); >extern void glVertexAttrib1dvNV (GLuint, const GLdouble *); >extern void glVertexAttrib1fNV (GLuint, GLfloat); >extern void glVertexAttrib1fvNV (GLuint, const GLfloat *); >extern void glVertexAttrib1sNV (GLuint, GLshort); >extern void glVertexAttrib1svNV (GLuint, const GLshort *); >extern void glVertexAttrib2dNV (GLuint, GLdouble, GLdouble); >extern void glVertexAttrib2dvNV (GLuint, const GLdouble *); >extern void glVertexAttrib2fNV (GLuint, GLfloat, GLfloat); >extern void glVertexAttrib2fvNV (GLuint, const GLfloat *); >extern void glVertexAttrib2sNV (GLuint, GLshort, GLshort); >extern void glVertexAttrib2svNV (GLuint, const GLshort *); >extern void glVertexAttrib3dNV (GLuint, GLdouble, GLdouble, GLdouble); >extern void glVertexAttrib3dvNV (GLuint, const GLdouble *); >extern void glVertexAttrib3fNV (GLuint, GLfloat, GLfloat, GLfloat); >extern void glVertexAttrib3fvNV (GLuint, const GLfloat *); >extern void glVertexAttrib3sNV (GLuint, GLshort, GLshort, GLshort); >extern void glVertexAttrib3svNV (GLuint, const GLshort *); >extern void glVertexAttrib4dNV (GLuint, GLdouble, GLdouble, GLdouble, GLdouble); >extern void glVertexAttrib4dvNV (GLuint, const GLdouble *); >extern void glVertexAttrib4fNV (GLuint, GLfloat, GLfloat, GLfloat, GLfloat); >extern void glVertexAttrib4fvNV (GLuint, const GLfloat *); >extern void glVertexAttrib4sNV (GLuint, GLshort, GLshort, GLshort, GLshort); >extern void glVertexAttrib4svNV (GLuint, const GLshort *); >extern void glVertexAttrib4ubNV (GLuint, GLubyte, GLubyte, GLubyte, GLubyte); >extern void glVertexAttrib4ubvNV (GLuint, const GLubyte *); >extern void glVertexAttribs1dvNV (GLuint, GLsizei, const GLdouble *); >extern void glVertexAttribs1fvNV (GLuint, GLsizei, const GLfloat *); >extern void glVertexAttribs1svNV (GLuint, GLsizei, const GLshort *); >extern void glVertexAttribs2dvNV (GLuint, GLsizei, const GLdouble *); >extern void glVertexAttribs2fvNV (GLuint, GLsizei, const GLfloat *); >extern void glVertexAttribs2svNV (GLuint, GLsizei, const GLshort *); >extern void glVertexAttribs3dvNV (GLuint, GLsizei, const GLdouble *); >extern void glVertexAttribs3fvNV (GLuint, GLsizei, const GLfloat *); >extern void glVertexAttribs3svNV (GLuint, GLsizei, const GLshort *); >extern void glVertexAttribs4dvNV (GLuint, GLsizei, const GLdouble *); >extern void glVertexAttribs4fvNV (GLuint, GLsizei, const GLfloat *); >extern void glVertexAttribs4svNV (GLuint, GLsizei, const GLshort *); >extern void glVertexAttribs4ubvNV (GLuint, GLsizei, const GLubyte *); > >typedef GLboolean ( * PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences); >typedef void ( * PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); >typedef void ( * PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); >typedef void ( * PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params); >typedef void ( * PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); >typedef void ( * PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params); >typedef void ( * PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); >typedef void ( * PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params); >typedef void ( * PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program); >typedef void ( * PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params); >typedef void ( * PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params); >typedef void ( * PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params); >typedef void ( * PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params); >typedef void ( * PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); >typedef GLboolean ( * PFNGLISPROGRAMNVPROC) (GLuint id); >typedef void ( * PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); >typedef void ( * PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); >typedef void ( * PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v); >typedef void ( * PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); >typedef void ( * PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v); >typedef void ( * PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble *v); >typedef void ( * PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat *v); >typedef void ( * PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); >typedef void ( * PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); >typedef void ( * PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); >typedef void ( * PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x); >typedef void ( * PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v); >typedef void ( * PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); >typedef void ( * PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v); >typedef void ( * PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); >typedef void ( * PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v); >typedef void ( * PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); >typedef void ( * PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v); >typedef void ( * PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); >typedef void ( * PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v); >typedef void ( * PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); >typedef void ( * PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v); >typedef void ( * PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); >typedef void ( * PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v); >typedef void ( * PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); >typedef void ( * PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v); >typedef void ( * PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); >typedef void ( * PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v); >typedef void ( * PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); >typedef void ( * PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v); >typedef void ( * PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); >typedef void ( * PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v); >typedef void ( * PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); >typedef void ( * PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v); >typedef void ( * PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); >typedef void ( * PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v); >typedef void ( * PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); >typedef void ( * PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); >typedef void ( * PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); >typedef void ( * PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); >typedef void ( * PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); >typedef void ( * PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); >typedef void ( * PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); >typedef void ( * PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); >typedef void ( * PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); >typedef void ( * PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); >typedef void ( * PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); >typedef void ( * PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); >typedef void ( * PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v); ># 4666 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glTexBumpParameterivATI (GLenum, const GLint *); >extern void glTexBumpParameterfvATI (GLenum, const GLfloat *); >extern void glGetTexBumpParameterivATI (GLenum, GLint *); >extern void glGetTexBumpParameterfvATI (GLenum, GLfloat *); > >typedef void ( * PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param); >typedef void ( * PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param); >typedef void ( * PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param); >typedef void ( * PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param); > > > > > >extern GLuint glGenFragmentShadersATI (GLuint); >extern void glBindFragmentShaderATI (GLuint); >extern void glDeleteFragmentShaderATI (GLuint); >extern void glBeginFragmentShaderATI (void); >extern void glEndFragmentShaderATI (void); >extern void glPassTexCoordATI (GLuint, GLuint, GLenum); >extern void glSampleMapATI (GLuint, GLuint, GLenum); >extern void glColorFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); >extern void glColorFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); >extern void glColorFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); >extern void glAlphaFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint); >extern void glAlphaFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); >extern void glAlphaFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); >extern void glSetFragmentShaderConstantATI (GLuint, const GLfloat *); > >typedef GLuint ( * PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range); >typedef void ( * PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id); >typedef void ( * PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id); >typedef void ( * PFNGLBEGINFRAGMENTSHADERATIPROC) (void); >typedef void ( * PFNGLENDFRAGMENTSHADERATIPROC) (void); >typedef void ( * PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle); >typedef void ( * PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle); >typedef void ( * PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); >typedef void ( * PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); >typedef void ( * PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); >typedef void ( * PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); >typedef void ( * PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); >typedef void ( * PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); >typedef void ( * PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value); > > > > > >extern void glPNTrianglesiATI (GLenum, GLint); >extern void glPNTrianglesfATI (GLenum, GLfloat); > >typedef void ( * PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param); >typedef void ( * PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param); > > > > > >extern GLuint glNewObjectBufferATI (GLsizei, const GLvoid *, GLenum); >extern GLboolean glIsObjectBufferATI (GLuint); >extern void glUpdateObjectBufferATI (GLuint, GLuint, GLsizei, const GLvoid *, GLenum); >extern void glGetObjectBufferfvATI (GLuint, GLenum, GLfloat *); >extern void glGetObjectBufferivATI (GLuint, GLenum, GLint *); >extern void glDeleteObjectBufferATI (GLuint); >extern void glArrayObjectATI (GLenum, GLint, GLenum, GLsizei, GLuint, GLuint); >extern void glGetArrayObjectfvATI (GLenum, GLenum, GLfloat *); >extern void glGetArrayObjectivATI (GLenum, GLenum, GLint *); >extern void glVariantArrayObjectATI (GLuint, GLenum, GLsizei, GLuint, GLuint); >extern void glGetVariantArrayObjectfvATI (GLuint, GLenum, GLfloat *); >extern void glGetVariantArrayObjectivATI (GLuint, GLenum, GLint *); > >typedef GLuint ( * PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage); >typedef GLboolean ( * PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer); >typedef void ( * PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); >typedef void ( * PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params); >typedef void ( * PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params); >typedef void ( * PFNGLDELETEOBJECTBUFFERATIPROC) (GLuint buffer); >typedef void ( * PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); >typedef void ( * PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params); >typedef void ( * PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params); >typedef void ( * PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); >typedef void ( * PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params); >typedef void ( * PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params); > > > > > >extern void glBeginVertexShaderEXT (void); >extern void glEndVertexShaderEXT (void); >extern void glBindVertexShaderEXT (GLuint); >extern GLuint glGenVertexShadersEXT (GLuint); >extern void glDeleteVertexShaderEXT (GLuint); >extern void glShaderOp1EXT (GLenum, GLuint, GLuint); >extern void glShaderOp2EXT (GLenum, GLuint, GLuint, GLuint); >extern void glShaderOp3EXT (GLenum, GLuint, GLuint, GLuint, GLuint); >extern void glSwizzleEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum); >extern void glWriteMaskEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum); >extern void glInsertComponentEXT (GLuint, GLuint, GLuint); >extern void glExtractComponentEXT (GLuint, GLuint, GLuint); >extern GLuint glGenSymbolsEXT (GLenum, GLenum, GLenum, GLuint); >extern void glSetInvariantEXT (GLuint, GLenum, const void *); >extern void glSetLocalConstantEXT (GLuint, GLenum, const void *); >extern void glVariantbvEXT (GLuint, const GLbyte *); >extern void glVariantsvEXT (GLuint, const GLshort *); >extern void glVariantivEXT (GLuint, const GLint *); >extern void glVariantfvEXT (GLuint, const GLfloat *); >extern void glVariantdvEXT (GLuint, const GLdouble *); >extern void glVariantubvEXT (GLuint, const GLubyte *); >extern void glVariantusvEXT (GLuint, const GLushort *); >extern void glVariantuivEXT (GLuint, const GLuint *); >extern void glVariantPointerEXT (GLuint, GLenum, GLuint, const void *); >extern void glEnableVariantClientStateEXT (GLuint); >extern void glDisableVariantClientStateEXT (GLuint); >extern GLuint glBindLightParameterEXT (GLenum, GLenum); >extern GLuint glBindMaterialParameterEXT (GLenum, GLenum); >extern GLuint glBindTexGenParameterEXT (GLenum, GLenum, GLenum); >extern GLuint glBindTextureUnitParameterEXT (GLenum, GLenum); >extern GLuint glBindParameterEXT (GLenum); >extern GLboolean glIsVariantEnabledEXT (GLuint, GLenum); >extern void glGetVariantBooleanvEXT (GLuint, GLenum, GLboolean *); >extern void glGetVariantIntegervEXT (GLuint, GLenum, GLint *); >extern void glGetVariantFloatvEXT (GLuint, GLenum, GLfloat *); >extern void glGetVariantPointervEXT (GLuint, GLenum, GLvoid* *); >extern void glGetInvariantBooleanvEXT (GLuint, GLenum, GLboolean *); >extern void glGetInvariantIntegervEXT (GLuint, GLenum, GLint *); >extern void glGetInvariantFloatvEXT (GLuint, GLenum, GLfloat *); >extern void glGetLocalConstantBooleanvEXT (GLuint, GLenum, GLboolean *); >extern void glGetLocalConstantIntegervEXT (GLuint, GLenum, GLint *); >extern void glGetLocalConstantFloatvEXT (GLuint, GLenum, GLfloat *); > >typedef void ( * PFNGLBEGINVERTEXSHADEREXTPROC) (void); >typedef void ( * PFNGLENDVERTEXSHADEREXTPROC) (void); >typedef void ( * PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id); >typedef GLuint ( * PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range); >typedef void ( * PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id); >typedef void ( * PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1); >typedef void ( * PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); >typedef void ( * PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); >typedef void ( * PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); >typedef void ( * PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); >typedef void ( * PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); >typedef void ( * PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); >typedef GLuint ( * PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); >typedef void ( * PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const void *addr); >typedef void ( * PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const void *addr); >typedef void ( * PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr); >typedef void ( * PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr); >typedef void ( * PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr); >typedef void ( * PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr); >typedef void ( * PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr); >typedef void ( * PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr); >typedef void ( * PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr); >typedef void ( * PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr); >typedef void ( * PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const void *addr); >typedef void ( * PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); >typedef void ( * PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); >typedef GLuint ( * PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value); >typedef GLuint ( * PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value); >typedef GLuint ( * PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value); >typedef GLuint ( * PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value); >typedef GLuint ( * PFNGLBINDPARAMETEREXTPROC) (GLenum value); >typedef GLboolean ( * PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap); >typedef void ( * PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); >typedef void ( * PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); >typedef void ( * PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); >typedef void ( * PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data); >typedef void ( * PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); >typedef void ( * PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); >typedef void ( * PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); >typedef void ( * PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); >typedef void ( * PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); >typedef void ( * PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); > > > > > >extern void glVertexStream1sATI (GLenum, GLshort); >extern void glVertexStream1svATI (GLenum, const GLshort *); >extern void glVertexStream1iATI (GLenum, GLint); >extern void glVertexStream1ivATI (GLenum, const GLint *); >extern void glVertexStream1fATI (GLenum, GLfloat); >extern void glVertexStream1fvATI (GLenum, const GLfloat *); >extern void glVertexStream1dATI (GLenum, GLdouble); >extern void glVertexStream1dvATI (GLenum, const GLdouble *); >extern void glVertexStream2sATI (GLenum, GLshort, GLshort); >extern void glVertexStream2svATI (GLenum, const GLshort *); >extern void glVertexStream2iATI (GLenum, GLint, GLint); >extern void glVertexStream2ivATI (GLenum, const GLint *); >extern void glVertexStream2fATI (GLenum, GLfloat, GLfloat); >extern void glVertexStream2fvATI (GLenum, const GLfloat *); >extern void glVertexStream2dATI (GLenum, GLdouble, GLdouble); >extern void glVertexStream2dvATI (GLenum, const GLdouble *); >extern void glVertexStream3sATI (GLenum, GLshort, GLshort, GLshort); >extern void glVertexStream3svATI (GLenum, const GLshort *); >extern void glVertexStream3iATI (GLenum, GLint, GLint, GLint); >extern void glVertexStream3ivATI (GLenum, const GLint *); >extern void glVertexStream3fATI (GLenum, GLfloat, GLfloat, GLfloat); >extern void glVertexStream3fvATI (GLenum, const GLfloat *); >extern void glVertexStream3dATI (GLenum, GLdouble, GLdouble, GLdouble); >extern void glVertexStream3dvATI (GLenum, const GLdouble *); >extern void glVertexStream4sATI (GLenum, GLshort, GLshort, GLshort, GLshort); >extern void glVertexStream4svATI (GLenum, const GLshort *); >extern void glVertexStream4iATI (GLenum, GLint, GLint, GLint, GLint); >extern void glVertexStream4ivATI (GLenum, const GLint *); >extern void glVertexStream4fATI (GLenum, GLfloat, GLfloat, GLfloat, GLfloat); >extern void glVertexStream4fvATI (GLenum, const GLfloat *); >extern void glVertexStream4dATI (GLenum, GLdouble, GLdouble, GLdouble, GLdouble); >extern void glVertexStream4dvATI (GLenum, const GLdouble *); >extern void glNormalStream3bATI (GLenum, GLbyte, GLbyte, GLbyte); >extern void glNormalStream3bvATI (GLenum, const GLbyte *); >extern void glNormalStream3sATI (GLenum, GLshort, GLshort, GLshort); >extern void glNormalStream3svATI (GLenum, const GLshort *); >extern void glNormalStream3iATI (GLenum, GLint, GLint, GLint); >extern void glNormalStream3ivATI (GLenum, const GLint *); >extern void glNormalStream3fATI (GLenum, GLfloat, GLfloat, GLfloat); >extern void glNormalStream3fvATI (GLenum, const GLfloat *); >extern void glNormalStream3dATI (GLenum, GLdouble, GLdouble, GLdouble); >extern void glNormalStream3dvATI (GLenum, const GLdouble *); >extern void glClientActiveVertexStreamATI (GLenum); >extern void glVertexBlendEnviATI (GLenum, GLint); >extern void glVertexBlendEnvfATI (GLenum, GLfloat); > >typedef void ( * PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x); >typedef void ( * PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords); >typedef void ( * PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x); >typedef void ( * PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords); >typedef void ( * PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x); >typedef void ( * PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords); >typedef void ( * PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x); >typedef void ( * PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords); >typedef void ( * PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y); >typedef void ( * PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords); >typedef void ( * PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y); >typedef void ( * PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords); >typedef void ( * PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y); >typedef void ( * PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords); >typedef void ( * PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y); >typedef void ( * PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords); >typedef void ( * PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); >typedef void ( * PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); >typedef void ( * PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); >typedef void ( * PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); >typedef void ( * PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); >typedef void ( * PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); >typedef void ( * PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); >typedef void ( * PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); >typedef void ( * PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); >typedef void ( * PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords); >typedef void ( * PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); >typedef void ( * PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords); >typedef void ( * PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); >typedef void ( * PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords); >typedef void ( * PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); >typedef void ( * PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords); >typedef void ( * PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); >typedef void ( * PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords); >typedef void ( * PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz); >typedef void ( * PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); >typedef void ( * PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz); >typedef void ( * PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); >typedef void ( * PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); >typedef void ( * PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); >typedef void ( * PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); >typedef void ( * PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); >typedef void ( * PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream); >typedef void ( * PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param); >typedef void ( * PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param); > > > > > >extern void glElementPointerATI (GLenum, const GLvoid *); >extern void glDrawElementArrayATI (GLenum, GLsizei); >extern void glDrawRangeElementArrayATI (GLenum, GLuint, GLuint, GLsizei); > >typedef void ( * PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer); >typedef void ( * PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count); >typedef void ( * PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); > > > > > >extern void glDrawMeshArraysSUN (GLenum, GLint, GLsizei, GLsizei); > >typedef void ( * PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width); ># 4972 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glGenOcclusionQueriesNV (GLsizei, GLuint *); >extern void glDeleteOcclusionQueriesNV (GLsizei, const GLuint *); >extern GLboolean glIsOcclusionQueryNV (GLuint); >extern void glBeginOcclusionQueryNV (GLuint); >extern void glEndOcclusionQueryNV (void); >extern void glGetOcclusionQueryivNV (GLuint, GLenum, GLint *); >extern void glGetOcclusionQueryuivNV (GLuint, GLenum, GLuint *); > >typedef void ( * PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids); >typedef void ( * PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids); >typedef GLboolean ( * PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id); >typedef void ( * PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id); >typedef void ( * PFNGLENDOCCLUSIONQUERYNVPROC) (void); >typedef void ( * PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params); >typedef void ( * PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params); > > > > > >extern void glPointParameteriNV (GLenum, GLint); >extern void glPointParameterivNV (GLenum, const GLint *); > >typedef void ( * PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param); >typedef void ( * PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params); ># 5014 "../../../../../extras/Mesa/include/GL/glext.h" >extern void glActiveStencilFaceEXT (GLenum); > >typedef void ( * PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face); ># 2556 "../../../../../extras/Mesa/include/GL/gl.h" 2 ># 2578 "../../../../../extras/Mesa/include/GL/gl.h" >extern void glEnableTraceMESA( GLbitfield mask ); >extern void glDisableTraceMESA( GLbitfield mask ); >extern void glNewTraceMESA( GLbitfield mask, const GLubyte * traceName ); >extern void glEndTraceMESA( void ); >extern void glTraceAssertAttribMESA( GLbitfield attribMask ); >extern void glTraceCommentMESA( const GLubyte * comment ); >extern void glTraceTextureMESA( GLuint name, const GLubyte* comment ); >extern void glTraceListMESA( GLuint name, const GLubyte* comment ); >extern void glTracePointerMESA( GLvoid* pointer, const GLubyte* comment ); >extern void glTracePointerRangeMESA( const GLvoid* first, const GLvoid* last, const GLubyte* comment ); ># 193 "../../../../../extras/Mesa/src/glheader.h" 2 ># 203 "../../../../../extras/Mesa/src/glheader.h" ># 1 "../../../include/GL/internal/glcore.h" 1 ># 53 "../../../include/GL/internal/glcore.h" >typedef struct __GLcontextRec __GLcontext; >typedef struct __GLinterfaceRec __GLinterface; ># 73 "../../../include/GL/internal/glcore.h" >typedef struct __GLcontextModesRec { > GLboolean rgbMode; > GLboolean floatMode; > GLboolean colorIndexMode; > GLuint doubleBufferMode; > GLuint stereoMode; > > GLboolean haveAccumBuffer; > GLboolean haveDepthBuffer; > GLboolean haveStencilBuffer; > > GLint redBits, greenBits, blueBits, alphaBits; > GLuint redMask, greenMask, blueMask, alphaMask; > GLint rgbBits; > GLint indexBits; > > GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits; > GLint depthBits; > GLint stencilBits; > > GLint numAuxBuffers; > > GLint level; > > GLint pixmapMode; > > > GLint visualID; > GLint visualType; > > > > > GLint visualRating; > > > GLint transparentPixel; > > GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha; > GLint transparentIndex; > > > GLint sampleBuffers; > GLint samples; > > > GLint drawableType; > GLint renderType; > GLint xRenderable; > GLint fbconfigID; > > > GLint maxPbufferWidth; > GLint maxPbufferHeight; > GLint maxPbufferPixels; > GLint optimalPbufferWidth; > GLint optimalPbufferHeight; > > > GLint visualSelectGroup; > > > GLint swapMethod; > > GLint screen; >} __GLcontextModes; ># 160 "../../../include/GL/internal/glcore.h" >typedef struct __GLdrawableRegionRec __GLdrawableRegion; >typedef struct __GLdrawableBufferRec __GLdrawableBuffer; >typedef struct __GLdrawablePrivateRec __GLdrawablePrivate; > >typedef struct __GLregionRectRec { > > GLint x0, y0; > > GLint x1, y1; >} __GLregionRect; > >struct __GLdrawableRegionRec { > GLint numRects; > __GLregionRect *rects; > __GLregionRect boundingRect; >}; ># 196 "../../../include/GL/internal/glcore.h" >typedef void (*__GLbufFallbackInitFn)(__GLdrawableBuffer *buf, > __GLdrawablePrivate *glPriv, GLint bits); >typedef void (*__GLbufMainInitFn)(__GLdrawableBuffer *buf, > __GLdrawablePrivate *glPriv, GLint bits, > __GLbufFallbackInitFn back); ># 217 "../../../include/GL/internal/glcore.h" >struct __GLdrawableBufferRec { > > > > GLint width, height, depth; > > > > > void *base; > > > > > GLuint size; > > > > > GLuint elementSize; > GLuint elementSizeLog2; > > > > > > > GLint outerWidth; > > > > > GLint byteWidth; > > > > > > void *handle; > > > GLboolean (*resize)(__GLdrawableBuffer *buf, > GLint x, GLint y, GLuint width, GLuint height, > __GLdrawablePrivate *glPriv, GLuint bufferMask); > void (*lock)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv); > void (*unlock)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv); > void (*fill)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv, > GLuint val, GLint x, GLint y, GLint w, GLint h); > void (*free)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv); > > > void (*freePrivate)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv); > void *private; > > > void *other; > __GLbufMainInitFn mainInit; > __GLbufFallbackInitFn fallbackInit; >}; > > > > >struct __GLdrawablePrivateRec { > > > > __GLcontextModes *modes; > > > > > GLuint width, height; > > > > > GLint xOrigin, yOrigin; ># 309 "../../../include/GL/internal/glcore.h" > GLint yInverted; > > > > > GLuint accelBufferMask; > > > > > __GLdrawableBuffer frontBuffer; > __GLdrawableBuffer backBuffer; > __GLdrawableBuffer accumBuffer; > __GLdrawableBuffer depthBuffer; > __GLdrawableBuffer stencilBuffer; > > > > > __GLdrawableRegion ownershipRegion; > > > > > void *lock; ># 342 "../../../include/GL/internal/glcore.h" > void *(*malloc)(size_t size); > void *(*calloc)(size_t numElem, size_t elemSize); > void *(*realloc)(void *oldAddr, size_t newSize); > void (*free)(void *addr); > > GLboolean (*addSwapRect)(__GLdrawablePrivate *glPriv, > GLint x, GLint y, GLsizei width, GLsizei height); > void (*setClipRect)(__GLdrawablePrivate *glPriv, > GLint x, GLint y, GLsizei width, GLsizei height); > void (*updateClipRegion)(__GLdrawablePrivate *glPriv); > GLboolean (*resize)(__GLdrawablePrivate *glPriv); > void (*getDrawableSize)(__GLdrawablePrivate *glPriv, > GLint *x, GLint *y, GLuint *width, GLuint *height); > > void (*lockDP)(__GLdrawablePrivate *glPriv, __GLcontext *gc); > void (*unlockDP)(__GLdrawablePrivate *glPriv); > > > void *private; > void (*freePrivate)(__GLdrawablePrivate *); > > > void *other; >}; ># 392 "../../../include/GL/internal/glcore.h" >typedef struct __GLimportsRec { > > void * (*malloc)(__GLcontext *gc, size_t size); > void *(*calloc)(__GLcontext *gc, size_t numElem, size_t elemSize); > void *(*realloc)(__GLcontext *gc, void *oldAddr, size_t newSize); > void (*free)(__GLcontext *gc, void *addr); > > > void (*warning)(__GLcontext *gc, char *fmt); > void (*fatal)(__GLcontext *gc, char *fmt); > > > char *( *getenv)(__GLcontext *gc, const char *var); > int ( *atoi)(__GLcontext *gc, const char *str); > int ( *sprintf)(__GLcontext *gc, char *str, const char *fmt, ...); > void *( *fopen)(__GLcontext *gc, const char *path, const char *mode); > int ( *fclose)(__GLcontext *gc, void *stream); > int ( *fprintf)(__GLcontext *gc, void *stream, const char *fmt, ...); > > > __GLdrawablePrivate *(*getDrawablePrivate)(__GLcontext *gc); > __GLdrawablePrivate *(*getReadablePrivate)(__GLcontext *gc); > > > void *other; >} __GLimports; > > > > > > > >typedef struct __GLexportsRec { > > GLboolean (*destroyContext)(__GLcontext *gc); > GLboolean (*loseCurrent)(__GLcontext *gc); > > GLboolean (*makeCurrent)(__GLcontext *gc); > GLboolean (*shareContext)(__GLcontext *gc, __GLcontext *gcShare); > GLboolean (*copyContext)(__GLcontext *dst, const __GLcontext *src, GLuint mask); > GLboolean (*forceCurrent)(__GLcontext *gc); > > > GLboolean (*notifyResize)(__GLcontext *gc); > void (*notifyDestroy)(__GLcontext *gc); > void (*notifySwapBuffers)(__GLcontext *gc); > > > struct __GLdispatchStateRec* (*dispatchExec)(__GLcontext *gc); > void (*beginDispatchOverride)(__GLcontext *gc); > void (*endDispatchOverride)(__GLcontext *gc); >} __GLexports; ># 453 "../../../include/GL/internal/glcore.h" >struct __GLinterfaceRec { > __GLimports imports; > __GLexports exports; >}; > >extern __GLcontext *__glCoreCreateContext(__GLimports *, __GLcontextModes *); >extern void __glCoreNopDispatch(void); ># 204 "../../../../../extras/Mesa/src/glheader.h" 2 ># 292 "../../../../../extras/Mesa/src/glheader.h" >typedef union { GLfloat f; GLint i; } fi_type; ># 40 "../../../../../extras/Mesa/src/X/glxheader.h" 2 ># 52 "../../../../../extras/Mesa/src/X/glxheader.h" ># 1 "../../../../../exports/include/X11/Xlib.h" 1 ># 60 "../../../../../exports/include/X11/Xlib.h" ># 1 "../../../../../exports/include/X11/X.h" 1 ># 71 "../../../../../exports/include/X11/X.h" >typedef unsigned long XID; > > > >typedef unsigned long Mask; > > > >typedef unsigned long Atom; > >typedef unsigned long VisualID; >typedef unsigned long Time; ># 101 "../../../../../exports/include/X11/X.h" >typedef XID Window; >typedef XID Drawable; > > >typedef XID Font; > >typedef XID Pixmap; >typedef XID Cursor; >typedef XID Colormap; >typedef XID GContext; >typedef XID KeySym; > >typedef unsigned char KeyCode; ># 61 "../../../../../exports/include/X11/Xlib.h" 2 > > ># 1 "../../../../../exports/include/X11/Xfuncproto.h" 1 ># 64 "../../../../../exports/include/X11/Xlib.h" 2 ># 1 "../../../../../exports/include/X11/Xosdefs.h" 1 ># 65 "../../../../../exports/include/X11/Xlib.h" 2 ># 77 "../../../../../exports/include/X11/Xlib.h" ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/stddef.h" 1 3 4 ># 151 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/stddef.h" 3 4 >typedef int ptrdiff_t; ># 78 "../../../../../exports/include/X11/Xlib.h" 2 ># 95 "../../../../../exports/include/X11/Xlib.h" >extern int >_Xmblen( > > > > > char *str, > int len > > ); > > > > > >typedef char *XPointer; ># 182 "../../../../../exports/include/X11/Xlib.h" >typedef struct _XExtData { > int number; > struct _XExtData *next; > int (*free_private)( > struct _XExtData *extension > ); > XPointer private_data; >} XExtData; > > > > >typedef struct { > int extension; > int major_opcode; > int first_event; > int first_error; >} XExtCodes; > > > > > >typedef struct { > int depth; > int bits_per_pixel; > int scanline_pad; >} XPixmapFormatValues; > > > > > >typedef struct { > int function; > unsigned long plane_mask; > unsigned long foreground; > unsigned long background; > int line_width; > int line_style; > int cap_style; > > int join_style; > int fill_style; > > int fill_rule; > int arc_mode; > Pixmap tile; > Pixmap stipple; > int ts_x_origin; > int ts_y_origin; > Font font; > int subwindow_mode; > int graphics_exposures; > int clip_x_origin; > int clip_y_origin; > Pixmap clip_mask; > int dash_offset; > char dashes; >} XGCValues; > > > > > > >typedef struct _XGC > > > > > > > >*GC; > > > > >typedef struct { > XExtData *ext_data; > VisualID visualid; > > > > int class; > > unsigned long red_mask, green_mask, blue_mask; > int bits_per_rgb; > int map_entries; >} Visual; > > > > >typedef struct { > int depth; > int nvisuals; > Visual *visuals; >} Depth; > > > > > > > >struct _XDisplay; > >typedef struct { > XExtData *ext_data; > struct _XDisplay *display; > Window root; > int width, height; > int mwidth, mheight; > int ndepths; > Depth *depths; > int root_depth; > Visual *root_visual; > GC default_gc; > Colormap cmap; > unsigned long white_pixel; > unsigned long black_pixel; > int max_maps, min_maps; > int backing_store; > int save_unders; > long root_input_mask; >} Screen; > > > > >typedef struct { > XExtData *ext_data; > int depth; > int bits_per_pixel; > int scanline_pad; >} ScreenFormat; > > > > >typedef struct { > Pixmap background_pixmap; > unsigned long background_pixel; > Pixmap border_pixmap; > unsigned long border_pixel; > int bit_gravity; > int win_gravity; > int backing_store; > unsigned long backing_planes; > unsigned long backing_pixel; > int save_under; > long event_mask; > long do_not_propagate_mask; > int override_redirect; > Colormap colormap; > Cursor cursor; >} XSetWindowAttributes; > >typedef struct { > int x, y; > int width, height; > int border_width; > int depth; > Visual *visual; > Window root; > > > > int class; > > int bit_gravity; > int win_gravity; > int backing_store; > unsigned long backing_planes; > unsigned long backing_pixel; > int save_under; > Colormap colormap; > int map_installed; > int map_state; > long all_event_masks; > long your_event_mask; > long do_not_propagate_mask; > int override_redirect; > Screen *screen; >} XWindowAttributes; > > > > > > >typedef struct { > int family; > int length; > char *address; >} XHostAddress; > > > > >typedef struct { > int typelength; > int valuelength; > char *type; > char *value; >} XServerInterpretedAddress; > > > > >typedef struct _XImage { > int width, height; > int xoffset; > int format; > char *data; > int byte_order; > int bitmap_unit; > int bitmap_bit_order; > int bitmap_pad; > int depth; > int bytes_per_line; > int bits_per_pixel; > unsigned long red_mask; > unsigned long green_mask; > unsigned long blue_mask; > XPointer obdata; > struct funcs { > struct _XImage *(*create_image)( > struct _XDisplay* , > Visual* , > unsigned int , > int , > int , > char* , > unsigned int , > unsigned int , > int , > int ); > int (*destroy_image) (struct _XImage *); > unsigned long (*get_pixel) (struct _XImage *, int, int); > int (*put_pixel) (struct _XImage *, int, int, unsigned long); > struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int); > int (*add_pixel) (struct _XImage *, long); > } f; >} XImage; > > > > >typedef struct { > int x, y; > int width, height; > int border_width; > Window sibling; > int stack_mode; >} XWindowChanges; > > > > >typedef struct { > unsigned long pixel; > unsigned short red, green, blue; > char flags; > char pad; >} XColor; > > > > > > >typedef struct { > short x1, y1, x2, y2; >} XSegment; > >typedef struct { > short x, y; >} XPoint; > >typedef struct { > short x, y; > unsigned short width, height; >} XRectangle; > >typedef struct { > short x, y; > unsigned short width, height; > short angle1, angle2; >} XArc; > > > > >typedef struct { > int key_click_percent; > int bell_percent; > int bell_pitch; > int bell_duration; > int led; > int led_mode; > int key; > int auto_repeat_mode; >} XKeyboardControl; > > > >typedef struct { > int key_click_percent; > int bell_percent; > unsigned int bell_pitch, bell_duration; > unsigned long led_mask; > int global_auto_repeat; > char auto_repeats[32]; >} XKeyboardState; > > > >typedef struct { > Time time; > short x, y; >} XTimeCoord; > > > >typedef struct { > int max_keypermod; > KeyCode *modifiermap; >} XModifierKeymap; ># 521 "../../../../../exports/include/X11/Xlib.h" >typedef struct _XDisplay Display; > > >struct _XPrivate; >struct _XrmHashBucketRec; > >typedef struct > > > >{ > XExtData *ext_data; > struct _XPrivate *private1; > int fd; > int private2; > int proto_major_version; > int proto_minor_version; > char *vendor; > XID private3; > XID private4; > XID private5; > int private6; > XID (*resource_alloc)( > struct _XDisplay* > ); > int byte_order; > int bitmap_unit; > int bitmap_pad; > int bitmap_bit_order; > int nformats; > ScreenFormat *pixmap_format; > int private8; > int release; > struct _XPrivate *private9, *private10; > int qlen; > unsigned long last_request_read; > unsigned long request; > XPointer private11; > XPointer private12; > XPointer private13; > XPointer private14; > unsigned max_request_size; > struct _XrmHashBucketRec *db; > int (*private15)( > struct _XDisplay* > ); > char *display_name; > int default_screen; > int nscreens; > Screen *screens; > unsigned long motion_buffer; > unsigned long private16; > int min_keycode; > int max_keycode; > XPointer private17; > XPointer private18; > int private19; > char *xdefaults; > >} > > > >*_XPrivDisplay; > > > > > > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window window; > Window root; > Window subwindow; > Time time; > int x, y; > int x_root, y_root; > unsigned int state; > unsigned int keycode; > int same_screen; >} XKeyEvent; >typedef XKeyEvent XKeyPressedEvent; >typedef XKeyEvent XKeyReleasedEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window window; > Window root; > Window subwindow; > Time time; > int x, y; > int x_root, y_root; > unsigned int state; > unsigned int button; > int same_screen; >} XButtonEvent; >typedef XButtonEvent XButtonPressedEvent; >typedef XButtonEvent XButtonReleasedEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window window; > Window root; > Window subwindow; > Time time; > int x, y; > int x_root, y_root; > unsigned int state; > char is_hint; > int same_screen; >} XMotionEvent; >typedef XMotionEvent XPointerMovedEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window window; > Window root; > Window subwindow; > Time time; > int x, y; > int x_root, y_root; > int mode; > int detail; > > > > > int same_screen; > int focus; > unsigned int state; >} XCrossingEvent; >typedef XCrossingEvent XEnterWindowEvent; >typedef XCrossingEvent XLeaveWindowEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window window; > int mode; > int detail; > > > > > >} XFocusChangeEvent; >typedef XFocusChangeEvent XFocusInEvent; >typedef XFocusChangeEvent XFocusOutEvent; > > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window window; > char key_vector[32]; >} XKeymapEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window window; > int x, y; > int width, height; > int count; >} XExposeEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Drawable drawable; > int x, y; > int width, height; > int count; > int major_code; > int minor_code; >} XGraphicsExposeEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Drawable drawable; > int major_code; > int minor_code; >} XNoExposeEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window window; > int state; >} XVisibilityEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window parent; > Window window; > int x, y; > int width, height; > int border_width; > int override_redirect; >} XCreateWindowEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window event; > Window window; >} XDestroyWindowEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window event; > Window window; > int from_configure; >} XUnmapEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window event; > Window window; > int override_redirect; >} XMapEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window parent; > Window window; >} XMapRequestEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window event; > Window window; > Window parent; > int x, y; > int override_redirect; >} XReparentEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window event; > Window window; > int x, y; > int width, height; > int border_width; > Window above; > int override_redirect; >} XConfigureEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window event; > Window window; > int x, y; >} XGravityEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window window; > int width, height; >} XResizeRequestEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window parent; > Window window; > int x, y; > int width, height; > int border_width; > Window above; > int detail; > unsigned long value_mask; >} XConfigureRequestEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window event; > Window window; > int place; >} XCirculateEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window parent; > Window window; > int place; >} XCirculateRequestEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window window; > Atom atom; > Time time; > int state; >} XPropertyEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window window; > Atom selection; > Time time; >} XSelectionClearEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window owner; > Window requestor; > Atom selection; > Atom target; > Atom property; > Time time; >} XSelectionRequestEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window requestor; > Atom selection; > Atom target; > Atom property; > Time time; >} XSelectionEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window window; > Colormap colormap; > > > > int new; > > int state; >} XColormapEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window window; > Atom message_type; > int format; > union { > char b[20]; > short s[10]; > long l[5]; > } data; >} XClientMessageEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window window; > int request; > > int first_keycode; > int count; >} XMappingEvent; > >typedef struct { > int type; > Display *display; > XID resourceid; > unsigned long serial; > unsigned char error_code; > unsigned char request_code; > unsigned char minor_code; >} XErrorEvent; > >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > Window window; >} XAnyEvent; > > > > > >typedef union _XEvent { > int type; > XAnyEvent xany; > XKeyEvent xkey; > XButtonEvent xbutton; > XMotionEvent xmotion; > XCrossingEvent xcrossing; > XFocusChangeEvent xfocus; > XExposeEvent xexpose; > XGraphicsExposeEvent xgraphicsexpose; > XNoExposeEvent xnoexpose; > XVisibilityEvent xvisibility; > XCreateWindowEvent xcreatewindow; > XDestroyWindowEvent xdestroywindow; > XUnmapEvent xunmap; > XMapEvent xmap; > XMapRequestEvent xmaprequest; > XReparentEvent xreparent; > XConfigureEvent xconfigure; > XGravityEvent xgravity; > XResizeRequestEvent xresizerequest; > XConfigureRequestEvent xconfigurerequest; > XCirculateEvent xcirculate; > XCirculateRequestEvent xcirculaterequest; > XPropertyEvent xproperty; > XSelectionClearEvent xselectionclear; > XSelectionRequestEvent xselectionrequest; > XSelectionEvent xselection; > XColormapEvent xcolormap; > XClientMessageEvent xclient; > XMappingEvent xmapping; > XErrorEvent xerror; > XKeymapEvent xkeymap; > long pad[24]; >} XEvent; > > > > > > > >typedef struct { > short lbearing; > short rbearing; > short width; > short ascent; > short descent; > unsigned short attributes; >} XCharStruct; > > > > > >typedef struct { > Atom name; > unsigned long card32; >} XFontProp; > >typedef struct { > XExtData *ext_data; > Font fid; > unsigned direction; > unsigned min_char_or_byte2; > unsigned max_char_or_byte2; > unsigned min_byte1; > unsigned max_byte1; > int all_chars_exist; > unsigned default_char; > int n_properties; > XFontProp *properties; > XCharStruct min_bounds; > XCharStruct max_bounds; > XCharStruct *per_char; > int ascent; > int descent; >} XFontStruct; > > > > >typedef struct { > char *chars; > int nchars; > int delta; > Font font; >} XTextItem; > >typedef struct { > unsigned char byte1; > unsigned char byte2; >} XChar2b; > >typedef struct { > XChar2b *chars; > int nchars; > int delta; > Font font; >} XTextItem16; > > >typedef union { Display *display; > GC gc; > Visual *visual; > Screen *screen; > ScreenFormat *pixmap_format; > XFontStruct *font; } XEDataObject; > >typedef struct { > XRectangle max_ink_extent; > XRectangle max_logical_extent; >} XFontSetExtents; > > > > > >typedef struct _XOM *XOM; >typedef struct _XOC *XOC, *XFontSet; > >typedef struct { > char *chars; > int nchars; > int delta; > XFontSet font_set; >} XmbTextItem; > >typedef struct { > wchar_t *chars; > int nchars; > int delta; > XFontSet font_set; >} XwcTextItem; ># 1125 "../../../../../exports/include/X11/Xlib.h" >typedef struct { > int charset_count; > char **charset_list; >} XOMCharSetList; > >typedef enum { > XOMOrientation_LTR_TTB, > XOMOrientation_RTL_TTB, > XOMOrientation_TTB_LTR, > XOMOrientation_TTB_RTL, > XOMOrientation_Context >} XOrientation; > >typedef struct { > int num_orientation; > XOrientation *orientation; >} XOMOrientation; > >typedef struct { > int num_font; > XFontStruct **font_struct_list; > char **font_name_list; >} XOMFontInfo; > >typedef struct _XIM *XIM; >typedef struct _XIC *XIC; > >typedef void (*XIMProc)( > XIM, > XPointer, > XPointer >); > >typedef int (*XICProc)( > XIC, > XPointer, > XPointer >); > >typedef void (*XIDProc)( > Display*, > XPointer, > XPointer >); > >typedef unsigned long XIMStyle; > >typedef struct { > unsigned short count_styles; > XIMStyle *supported_styles; >} XIMStyles; ># 1237 "../../../../../exports/include/X11/Xlib.h" >typedef void *XVaNestedList; > >typedef struct { > XPointer client_data; > XIMProc callback; >} XIMCallback; > >typedef struct { > XPointer client_data; > XICProc callback; >} XICCallback; > >typedef unsigned long XIMFeedback; ># 1261 "../../../../../exports/include/X11/Xlib.h" >typedef struct _XIMText { > unsigned short length; > XIMFeedback *feedback; > int encoding_is_wchar; > union { > char *multi_byte; > wchar_t *wide_char; > } string; >} XIMText; > >typedef unsigned long XIMPreeditState; > > > > > >typedef struct _XIMPreeditStateNotifyCallbackStruct { > XIMPreeditState state; >} XIMPreeditStateNotifyCallbackStruct; > >typedef unsigned long XIMResetState; > > > > >typedef unsigned long XIMStringConversionFeedback; ># 1295 "../../../../../exports/include/X11/Xlib.h" >typedef struct _XIMStringConversionText { > unsigned short length; > XIMStringConversionFeedback *feedback; > int encoding_is_wchar; > union { > char *mbs; > wchar_t *wcs; > } string; >} XIMStringConversionText; > >typedef unsigned short XIMStringConversionPosition; > >typedef unsigned short XIMStringConversionType; > > > > > > >typedef unsigned short XIMStringConversionOperation; > > > > >typedef enum { > XIMForwardChar, XIMBackwardChar, > XIMForwardWord, XIMBackwardWord, > XIMCaretUp, XIMCaretDown, > XIMNextLine, XIMPreviousLine, > XIMLineStart, XIMLineEnd, > XIMAbsolutePosition, > XIMDontChange >} XIMCaretDirection; > >typedef struct _XIMStringConversionCallbackStruct { > XIMStringConversionPosition position; > XIMCaretDirection direction; > XIMStringConversionOperation operation; > unsigned short factor; > XIMStringConversionText *text; >} XIMStringConversionCallbackStruct; > >typedef struct _XIMPreeditDrawCallbackStruct { > int caret; > int chg_first; > int chg_length; > XIMText *text; >} XIMPreeditDrawCallbackStruct; > >typedef enum { > XIMIsInvisible, > XIMIsPrimary, > XIMIsSecondary >} XIMCaretStyle; > >typedef struct _XIMPreeditCaretCallbackStruct { > int position; > XIMCaretDirection direction; > XIMCaretStyle style; >} XIMPreeditCaretCallbackStruct; > >typedef enum { > XIMTextType, > XIMBitmapType >} XIMStatusDataType; > >typedef struct _XIMStatusDrawCallbackStruct { > XIMStatusDataType type; > union { > XIMText *text; > Pixmap bitmap; > } data; >} XIMStatusDrawCallbackStruct; > >typedef struct _XIMHotKeyTrigger { > KeySym keysym; > int modifier; > int modifier_mask; >} XIMHotKeyTrigger; > >typedef struct _XIMHotKeyTriggers { > int num_hot_key; > XIMHotKeyTrigger *key; >} XIMHotKeyTriggers; > >typedef unsigned long XIMHotKeyState; > > > > >typedef struct { > unsigned short count_values; > char **supported_values; >} XIMValuesList; > > > > > > > >extern int _Xdebug; > >extern XFontStruct *XLoadQueryFont( > Display* , > const char* >); > >extern XFontStruct *XQueryFont( > Display* , > XID >); > > >extern XTimeCoord *XGetMotionEvents( > Display* , > Window , > Time , > Time , > int* >); > >extern XModifierKeymap *XDeleteModifiermapEntry( > XModifierKeymap* , > > > > KeyCode , > > int >); > >extern XModifierKeymap *XGetModifierMapping( > Display* >); > >extern XModifierKeymap *XInsertModifiermapEntry( > XModifierKeymap* , > > > > KeyCode , > > int >); > >extern XModifierKeymap *XNewModifiermap( > int >); > >extern XImage *XCreateImage( > Display* , > Visual* , > unsigned int , > int , > int , > char* , > unsigned int , > unsigned int , > int , > int >); >extern int XInitImage( > XImage* >); >extern XImage *XGetImage( > Display* , > Drawable , > int , > int , > unsigned int , > unsigned int , > unsigned long , > int >); >extern XImage *XGetSubImage( > Display* , > Drawable , > int , > int , > unsigned int , > unsigned int , > unsigned long , > int , > XImage* , > int , > int >); > > > > >extern Display *XOpenDisplay( > const char* >); > >extern void XrmInitialize( > void >); > >extern char *XFetchBytes( > Display* , > int* >); >extern char *XFetchBuffer( > Display* , > int* , > int >); >extern char *XGetAtomName( > Display* , > Atom >); >extern int XGetAtomNames( > Display* , > Atom* , > int , > char** >); >extern char *XGetDefault( > Display* , > const char* , > const char* >); >extern char *XDisplayName( > const char* >); >extern char *XKeysymToString( > KeySym >); > >extern int (*XSynchronize( > Display* , > int >))( > Display* >); >extern int (*XSetAfterFunction( > Display* , > int (*) ( > Display* > ) >))( > Display* >); >extern Atom XInternAtom( > Display* , > const char* , > int >); >extern int XInternAtoms( > Display* , > char** , > int , > int , > Atom* >); >extern Colormap XCopyColormapAndFree( > Display* , > Colormap >); >extern Colormap XCreateColormap( > Display* , > Window , > Visual* , > int >); >extern Cursor XCreatePixmapCursor( > Display* , > Pixmap , > Pixmap , > XColor* , > XColor* , > unsigned int , > unsigned int >); >extern Cursor XCreateGlyphCursor( > Display* , > Font , > Font , > unsigned int , > unsigned int , > XColor const * , > XColor const * >); >extern Cursor XCreateFontCursor( > Display* , > unsigned int >); >extern Font XLoadFont( > Display* , > const char* >); >extern GC XCreateGC( > Display* , > Drawable , > unsigned long , > XGCValues* >); >extern GContext XGContextFromGC( > GC >); >extern void XFlushGC( > Display* , > GC >); >extern Pixmap XCreatePixmap( > Display* , > Drawable , > unsigned int , > unsigned int , > unsigned int >); >extern Pixmap XCreateBitmapFromData( > Display* , > Drawable , > const char* , > unsigned int , > unsigned int >); >extern Pixmap XCreatePixmapFromBitmapData( > Display* , > Drawable , > char* , > unsigned int , > unsigned int , > unsigned long , > unsigned long , > unsigned int >); >extern Window XCreateSimpleWindow( > Display* , > Window , > int , > int , > unsigned int , > unsigned int , > unsigned int , > unsigned long , > unsigned long >); >extern Window XGetSelectionOwner( > Display* , > Atom >); >extern Window XCreateWindow( > Display* , > Window , > int , > int , > unsigned int , > unsigned int , > unsigned int , > int , > unsigned int , > Visual* , > unsigned long , > XSetWindowAttributes* >); >extern Colormap *XListInstalledColormaps( > Display* , > Window , > int* >); >extern char **XListFonts( > Display* , > const char* , > int , > int* >); >extern char **XListFontsWithInfo( > Display* , > const char* , > int , > int* , > XFontStruct** >); >extern char **XGetFontPath( > Display* , > int* >); >extern char **XListExtensions( > Display* , > int* >); >extern Atom *XListProperties( > Display* , > Window , > int* >); >extern XHostAddress *XListHosts( > Display* , > int* , > int* >); >extern KeySym XKeycodeToKeysym( > Display* , > > > > KeyCode , > > int >); >extern KeySym XLookupKeysym( > XKeyEvent* , > int >); >extern KeySym *XGetKeyboardMapping( > Display* , > > > > KeyCode , > > int , > int* >); >extern KeySym XStringToKeysym( > const char* >); >extern long XMaxRequestSize( > Display* >); >extern long XExtendedMaxRequestSize( > Display* >); >extern char *XResourceManagerString( > Display* >); >extern char *XScreenResourceString( > Screen* >); >extern unsigned long XDisplayMotionBufferSize( > Display* >); >extern VisualID XVisualIDFromVisual( > Visual* >); > > > >extern int XInitThreads( > void >); > >extern void XLockDisplay( > Display* >); > >extern void XUnlockDisplay( > Display* >); > > > >extern XExtCodes *XInitExtension( > Display* , > const char* >); > >extern XExtCodes *XAddExtension( > Display* >); >extern XExtData *XFindOnExtensionList( > XExtData** , > int >); >extern XExtData **XEHeadOfExtensionList( > XEDataObject >); > > >extern Window XRootWindow( > Display* , > int >); >extern Window XDefaultRootWindow( > Display* >); >extern Window XRootWindowOfScreen( > Screen* >); >extern Visual *XDefaultVisual( > Display* , > int >); >extern Visual *XDefaultVisualOfScreen( > Screen* >); >extern GC XDefaultGC( > Display* , > int >); >extern GC XDefaultGCOfScreen( > Screen* >); >extern unsigned long XBlackPixel( > Display* , > int >); >extern unsigned long XWhitePixel( > Display* , > int >); >extern unsigned long XAllPlanes( > void >); >extern unsigned long XBlackPixelOfScreen( > Screen* >); >extern unsigned long XWhitePixelOfScreen( > Screen* >); >extern unsigned long XNextRequest( > Display* >); >extern unsigned long XLastKnownRequestProcessed( > Display* >); >extern char *XServerVendor( > Display* >); >extern char *XDisplayString( > Display* >); >extern Colormap XDefaultColormap( > Display* , > int >); >extern Colormap XDefaultColormapOfScreen( > Screen* >); >extern Display *XDisplayOfScreen( > Screen* >); >extern Screen *XScreenOfDisplay( > Display* , > int >); >extern Screen *XDefaultScreenOfDisplay( > Display* >); >extern long XEventMaskOfScreen( > Screen* >); > >extern int XScreenNumberOfScreen( > Screen* >); > >typedef int (*XErrorHandler) ( > Display* , > XErrorEvent* >); > >extern XErrorHandler XSetErrorHandler ( > XErrorHandler >); > > >typedef int (*XIOErrorHandler) ( > Display* >); > >extern XIOErrorHandler XSetIOErrorHandler ( > XIOErrorHandler >); > > >extern XPixmapFormatValues *XListPixmapFormats( > Display* , > int* >); >extern int *XListDepths( > Display* , > int , > int* >); > > > >extern int XReconfigureWMWindow( > Display* , > Window , > int , > unsigned int , > XWindowChanges* >); > >extern int XGetWMProtocols( > Display* , > Window , > Atom** , > int* >); >extern int XSetWMProtocols( > Display* , > Window , > Atom* , > int >); >extern int XIconifyWindow( > Display* , > Window , > int >); >extern int XWithdrawWindow( > Display* , > Window , > int >); >extern int XGetCommand( > Display* , > Window , > char*** , > int* >); >extern int XGetWMColormapWindows( > Display* , > Window , > Window** , > int* >); >extern int XSetWMColormapWindows( > Display* , > Window , > Window* , > int >); >extern void XFreeStringList( > char** >); >extern int XSetTransientForHint( > Display* , > Window , > Window >); > > > >extern int XActivateScreenSaver( > Display* >); > >extern int XAddHost( > Display* , > XHostAddress* >); > >extern int XAddHosts( > Display* , > XHostAddress* , > int >); > >extern int XAddToExtensionList( > struct _XExtData** , > XExtData* >); > >extern int XAddToSaveSet( > Display* , > Window >); > >extern int XAllocColor( > Display* , > Colormap , > XColor* >); > >extern int XAllocColorCells( > Display* , > Colormap , > int , > unsigned long* , > unsigned int , > unsigned long* , > unsigned int >); > >extern int XAllocColorPlanes( > Display* , > Colormap , > int , > unsigned long* , > int , > int , > int , > int , > unsigned long* , > unsigned long* , > unsigned long* >); > >extern int XAllocNamedColor( > Display* , > Colormap , > const char* , > XColor* , > XColor* >); > >extern int XAllowEvents( > Display* , > int , > Time >); > >extern int XAutoRepeatOff( > Display* >); > >extern int XAutoRepeatOn( > Display* >); > >extern int XBell( > Display* , > int >); > >extern int XBitmapBitOrder( > Display* >); > >extern int XBitmapPad( > Display* >); > >extern int XBitmapUnit( > Display* >); > >extern int XCellsOfScreen( > Screen* >); > >extern int XChangeActivePointerGrab( > Display* , > unsigned int , > Cursor , > Time >); > >extern int XChangeGC( > Display* , > GC , > unsigned long , > XGCValues* >); > >extern int XChangeKeyboardControl( > Display* , > unsigned long , > XKeyboardControl* >); > >extern int XChangeKeyboardMapping( > Display* , > int , > int , > KeySym* , > int >); > >extern int XChangePointerControl( > Display* , > int , > int , > int , > int , > int >); > >extern int XChangeProperty( > Display* , > Window , > Atom , > Atom , > int , > int , > const unsigned char* , > int >); > >extern int XChangeSaveSet( > Display* , > Window , > int >); > >extern int XChangeWindowAttributes( > Display* , > Window , > unsigned long , > XSetWindowAttributes* >); > >extern int XCheckIfEvent( > Display* , > XEvent* , > int (*) ( > Display* , > XEvent* , > XPointer > ) , > XPointer >); > >extern int XCheckMaskEvent( > Display* , > long , > XEvent* >); > >extern int XCheckTypedEvent( > Display* , > int , > XEvent* >); > >extern int XCheckTypedWindowEvent( > Display* , > Window , > int , > XEvent* >); > >extern int XCheckWindowEvent( > Display* , > Window , > long , > XEvent* >); > >extern int XCirculateSubwindows( > Display* , > Window , > int >); > >extern int XCirculateSubwindowsDown( > Display* , > Window >); > >extern int XCirculateSubwindowsUp( > Display* , > Window >); > >extern int XClearArea( > Display* , > Window , > int , > int , > unsigned int , > unsigned int , > int >); > >extern int XClearWindow( > Display* , > Window >); > >extern int XCloseDisplay( > Display* >); > >extern int XConfigureWindow( > Display* , > Window , > unsigned int , > XWindowChanges* >); > >extern int XConnectionNumber( > Display* >); > >extern int XConvertSelection( > Display* , > Atom , > Atom , > Atom , > Window , > Time >); > >extern int XCopyArea( > Display* , > Drawable , > Drawable , > GC , > int , > int , > unsigned int , > unsigned int , > int , > int >); > >extern int XCopyGC( > Display* , > GC , > unsigned long , > GC >); > >extern int XCopyPlane( > Display* , > Drawable , > Drawable , > GC , > int , > int , > unsigned int , > unsigned int , > int , > int , > unsigned long >); > >extern int XDefaultDepth( > Display* , > int >); > >extern int XDefaultDepthOfScreen( > Screen* >); > >extern int XDefaultScreen( > Display* >); > >extern int XDefineCursor( > Display* , > Window , > Cursor >); > >extern int XDeleteProperty( > Display* , > Window , > Atom >); > >extern int XDestroyWindow( > Display* , > Window >); > >extern int XDestroySubwindows( > Display* , > Window >); > >extern int XDoesBackingStore( > Screen* >); > >extern int XDoesSaveUnders( > Screen* >); > >extern int XDisableAccessControl( > Display* >); > > >extern int XDisplayCells( > Display* , > int >); > >extern int XDisplayHeight( > Display* , > int >); > >extern int XDisplayHeightMM( > Display* , > int >); > >extern int XDisplayKeycodes( > Display* , > int* , > int* >); > >extern int XDisplayPlanes( > Display* , > int >); > >extern int XDisplayWidth( > Display* , > int >); > >extern int XDisplayWidthMM( > Display* , > int >); > >extern int XDrawArc( > Display* , > Drawable , > GC , > int , > int , > unsigned int , > unsigned int , > int , > int >); > >extern int XDrawArcs( > Display* , > Drawable , > GC , > XArc* , > int >); > >extern int XDrawImageString( > Display* , > Drawable , > GC , > int , > int , > const char* , > int >); > >extern int XDrawImageString16( > Display* , > Drawable , > GC , > int , > int , > const XChar2b* , > int >); > >extern int XDrawLine( > Display* , > Drawable , > GC , > int , > int , > int , > int >); > >extern int XDrawLines( > Display* , > Drawable , > GC , > XPoint* , > int , > int >); > >extern int XDrawPoint( > Display* , > Drawable , > GC , > int , > int >); > >extern int XDrawPoints( > Display* , > Drawable , > GC , > XPoint* , > int , > int >); > >extern int XDrawRectangle( > Display* , > Drawable , > GC , > int , > int , > unsigned int , > unsigned int >); > >extern int XDrawRectangles( > Display* , > Drawable , > GC , > XRectangle* , > int >); > >extern int XDrawSegments( > Display* , > Drawable , > GC , > XSegment* , > int >); > >extern int XDrawString( > Display* , > Drawable , > GC , > int , > int , > const char* , > int >); > >extern int XDrawString16( > Display* , > Drawable , > GC , > int , > int , > const XChar2b* , > int >); > >extern int XDrawText( > Display* , > Drawable , > GC , > int , > int , > XTextItem* , > int >); > >extern int XDrawText16( > Display* , > Drawable , > GC , > int , > int , > XTextItem16* , > int >); > >extern int XEnableAccessControl( > Display* >); > >extern int XEventsQueued( > Display* , > int >); > >extern int XFetchName( > Display* , > Window , > char** >); > >extern int XFillArc( > Display* , > Drawable , > GC , > int , > int , > unsigned int , > unsigned int , > int , > int >); > >extern int XFillArcs( > Display* , > Drawable , > GC , > XArc* , > int >); > >extern int XFillPolygon( > Display* , > Drawable , > GC , > XPoint* , > int , > int , > int >); > >extern int XFillRectangle( > Display* , > Drawable , > GC , > int , > int , > unsigned int , > unsigned int >); > >extern int XFillRectangles( > Display* , > Drawable , > GC , > XRectangle* , > int >); > >extern int XFlush( > Display* >); > >extern int XForceScreenSaver( > Display* , > int >); > >extern int XFree( > void* >); > >extern int XFreeColormap( > Display* , > Colormap >); > >extern int XFreeColors( > Display* , > Colormap , > unsigned long* , > int , > unsigned long >); > >extern int XFreeCursor( > Display* , > Cursor >); > >extern int XFreeExtensionList( > char** >); > >extern int XFreeFont( > Display* , > XFontStruct* >); > >extern int XFreeFontInfo( > char** , > XFontStruct* , > int >); > >extern int XFreeFontNames( > char** >); > >extern int XFreeFontPath( > char** >); > >extern int XFreeGC( > Display* , > GC >); > >extern int XFreeModifiermap( > XModifierKeymap* >); > >extern int XFreePixmap( > Display* , > Pixmap >); > >extern int XGeometry( > Display* , > int , > const char* , > const char* , > unsigned int , > unsigned int , > unsigned int , > int , > int , > int* , > int* , > int* , > int* >); > >extern int XGetErrorDatabaseText( > Display* , > const char* , > const char* , > const char* , > char* , > int >); > >extern int XGetErrorText( > Display* , > int , > char* , > int >); > >extern int XGetFontProperty( > XFontStruct* , > Atom , > unsigned long* >); > >extern int XGetGCValues( > Display* , > GC , > unsigned long , > XGCValues* >); > >extern int XGetGeometry( > Display* , > Drawable , > Window* , > int* , > int* , > unsigned int* , > unsigned int* , > unsigned int* , > unsigned int* >); > >extern int XGetIconName( > Display* , > Window , > char** >); > >extern int XGetInputFocus( > Display* , > Window* , > int* >); > >extern int XGetKeyboardControl( > Display* , > XKeyboardState* >); > >extern int XGetPointerControl( > Display* , > int* , > int* , > int* >); > >extern int XGetPointerMapping( > Display* , > unsigned char* , > int >); > >extern int XGetScreenSaver( > Display* , > int* , > int* , > int* , > int* >); > >extern int XGetTransientForHint( > Display* , > Window , > Window* >); > >extern int XGetWindowProperty( > Display* , > Window , > Atom , > long , > long , > int , > Atom , > Atom* , > int* , > unsigned long* , > unsigned long* , > unsigned char** >); > >extern int XGetWindowAttributes( > Display* , > Window , > XWindowAttributes* >); > >extern int XGrabButton( > Display* , > unsigned int , > unsigned int , > Window , > int , > unsigned int , > int , > int , > Window , > Cursor >); > >extern int XGrabKey( > Display* , > int , > unsigned int , > Window , > int , > int , > int >); > >extern int XGrabKeyboard( > Display* , > Window , > int , > int , > int , > Time >); > >extern int XGrabPointer( > Display* , > Window , > int , > unsigned int , > int , > int , > Window , > Cursor , > Time >); > >extern int XGrabServer( > Display* >); > >extern int XHeightMMOfScreen( > Screen* >); > >extern int XHeightOfScreen( > Screen* >); > >extern int XIfEvent( > Display* , > XEvent* , > int (*) ( > Display* , > XEvent* , > XPointer > ) , > XPointer >); > >extern int XImageByteOrder( > Display* >); > >extern int XInstallColormap( > Display* , > Colormap >); > >extern KeyCode XKeysymToKeycode( > Display* , > KeySym >); > >extern int XKillClient( > Display* , > XID >); > >extern int XLookupColor( > Display* , > Colormap , > const char* , > XColor* , > XColor* >); > >extern int XLowerWindow( > Display* , > Window >); > >extern int XMapRaised( > Display* , > Window >); > >extern int XMapSubwindows( > Display* , > Window >); > >extern int XMapWindow( > Display* , > Window >); > >extern int XMaskEvent( > Display* , > long , > XEvent* >); > >extern int XMaxCmapsOfScreen( > Screen* >); > >extern int XMinCmapsOfScreen( > Screen* >); > >extern int XMoveResizeWindow( > Display* , > Window , > int , > int , > unsigned int , > unsigned int >); > >extern int XMoveWindow( > Display* , > Window , > int , > int >); > >extern int XNextEvent( > Display* , > XEvent* >); > >extern int XNoOp( > Display* >); > >extern int XParseColor( > Display* , > Colormap , > const char* , > XColor* >); > >extern int XParseGeometry( > const char* , > int* , > int* , > unsigned int* , > unsigned int* >); > >extern int XPeekEvent( > Display* , > XEvent* >); > >extern int XPeekIfEvent( > Display* , > XEvent* , > int (*) ( > Display* , > XEvent* , > XPointer > ) , > XPointer >); > >extern int XPending( > Display* >); > >extern int XPlanesOfScreen( > Screen* >); > >extern int XProtocolRevision( > Display* >); > >extern int XProtocolVersion( > Display* >); > > >extern int XPutBackEvent( > Display* , > XEvent* >); > >extern int XPutImage( > Display* , > Drawable , > GC , > XImage* , > int , > int , > int , > int , > unsigned int , > unsigned int >); > >extern int XQLength( > Display* >); > >extern int XQueryBestCursor( > Display* , > Drawable , > unsigned int , > unsigned int , > unsigned int* , > unsigned int* >); > >extern int XQueryBestSize( > Display* , > int , > Drawable , > unsigned int , > unsigned int , > unsigned int* , > unsigned int* >); > >extern int XQueryBestStipple( > Display* , > Drawable , > unsigned int , > unsigned int , > unsigned int* , > unsigned int* >); > >extern int XQueryBestTile( > Display* , > Drawable , > unsigned int , > unsigned int , > unsigned int* , > unsigned int* >); > >extern int XQueryColor( > Display* , > Colormap , > XColor* >); > >extern int XQueryColors( > Display* , > Colormap , > XColor* , > int >); > >extern int XQueryExtension( > Display* , > const char* , > int* , > int* , > int* >); > >extern int XQueryKeymap( > Display* , > char [32] >); > >extern int XQueryPointer( > Display* , > Window , > Window* , > Window* , > int* , > int* , > int* , > int* , > unsigned int* >); > >extern int XQueryTextExtents( > Display* , > XID , > const char* , > int , > int* , > int* , > int* , > XCharStruct* >); > >extern int XQueryTextExtents16( > Display* , > XID , > const XChar2b* , > int , > int* , > int* , > int* , > XCharStruct* >); > >extern int XQueryTree( > Display* , > Window , > Window* , > Window* , > Window** , > unsigned int* >); > >extern int XRaiseWindow( > Display* , > Window >); > >extern int XReadBitmapFile( > Display* , > Drawable , > const char* , > unsigned int* , > unsigned int* , > Pixmap* , > int* , > int* >); > >extern int XReadBitmapFileData( > const char* , > unsigned int* , > unsigned int* , > unsigned char** , > int* , > int* >); > >extern int XRebindKeysym( > Display* , > KeySym , > KeySym* , > int , > const unsigned char* , > int >); > >extern int XRecolorCursor( > Display* , > Cursor , > XColor* , > XColor* >); > >extern int XRefreshKeyboardMapping( > XMappingEvent* >); > >extern int XRemoveFromSaveSet( > Display* , > Window >); > >extern int XRemoveHost( > Display* , > XHostAddress* >); > >extern int XRemoveHosts( > Display* , > XHostAddress* , > int >); > >extern int XReparentWindow( > Display* , > Window , > Window , > int , > int >); > >extern int XResetScreenSaver( > Display* >); > >extern int XResizeWindow( > Display* , > Window , > unsigned int , > unsigned int >); > >extern int XRestackWindows( > Display* , > Window* , > int >); > >extern int XRotateBuffers( > Display* , > int >); > >extern int XRotateWindowProperties( > Display* , > Window , > Atom* , > int , > int >); > >extern int XScreenCount( > Display* >); > >extern int XSelectInput( > Display* , > Window , > long >); > >extern int XSendEvent( > Display* , > Window , > int , > long , > XEvent* >); > >extern int XSetAccessControl( > Display* , > int >); > >extern int XSetArcMode( > Display* , > GC , > int >); > >extern int XSetBackground( > Display* , > GC , > unsigned long >); > >extern int XSetClipMask( > Display* , > GC , > Pixmap >); > >extern int XSetClipOrigin( > Display* , > GC , > int , > int >); > >extern int XSetClipRectangles( > Display* , > GC , > int , > int , > XRectangle* , > int , > int >); > >extern int XSetCloseDownMode( > Display* , > int >); > >extern int XSetCommand( > Display* , > Window , > char** , > int >); > >extern int XSetDashes( > Display* , > GC , > int , > const char* , > int >); > >extern int XSetFillRule( > Display* , > GC , > int >); > >extern int XSetFillStyle( > Display* , > GC , > int >); > >extern int XSetFont( > Display* , > GC , > Font >); > >extern int XSetFontPath( > Display* , > char** , > int >); > >extern int XSetForeground( > Display* , > GC , > unsigned long >); > >extern int XSetFunction( > Display* , > GC , > int >); > >extern int XSetGraphicsExposures( > Display* , > GC , > int >); > >extern int XSetIconName( > Display* , > Window , > const char* >); > >extern int XSetInputFocus( > Display* , > Window , > int , > Time >); > >extern int XSetLineAttributes( > Display* , > GC , > unsigned int , > int , > int , > int >); > >extern int XSetModifierMapping( > Display* , > XModifierKeymap* >); > >extern int XSetPlaneMask( > Display* , > GC , > unsigned long >); > >extern int XSetPointerMapping( > Display* , > const unsigned char* , > int >); > >extern int XSetScreenSaver( > Display* , > int , > int , > int , > int >); > >extern int XSetSelectionOwner( > Display* , > Atom , > Window , > Time >); > >extern int XSetState( > Display* , > GC , > unsigned long , > unsigned long , > int , > unsigned long >); > >extern int XSetStipple( > Display* , > GC , > Pixmap >); > >extern int XSetSubwindowMode( > Display* , > GC , > int >); > >extern int XSetTSOrigin( > Display* , > GC , > int , > int >); > >extern int XSetTile( > Display* , > GC , > Pixmap >); > >extern int XSetWindowBackground( > Display* , > Window , > unsigned long >); > >extern int XSetWindowBackgroundPixmap( > Display* , > Window , > Pixmap >); > >extern int XSetWindowBorder( > Display* , > Window , > unsigned long >); > >extern int XSetWindowBorderPixmap( > Display* , > Window , > Pixmap >); > >extern int XSetWindowBorderWidth( > Display* , > Window , > unsigned int >); > >extern int XSetWindowColormap( > Display* , > Window , > Colormap >); > >extern int XStoreBuffer( > Display* , > const char* , > int , > int >); > >extern int XStoreBytes( > Display* , > const char* , > int >); > >extern int XStoreColor( > Display* , > Colormap , > XColor* >); > >extern int XStoreColors( > Display* , > Colormap , > XColor* , > int >); > >extern int XStoreName( > Display* , > Window , > const char* >); > >extern int XStoreNamedColor( > Display* , > Colormap , > const char* , > unsigned long , > int >); > >extern int XSync( > Display* , > int >); > >extern int XTextExtents( > XFontStruct* , > const char* , > int , > int* , > int* , > int* , > XCharStruct* >); > >extern int XTextExtents16( > XFontStruct* , > const XChar2b* , > int , > int* , > int* , > int* , > XCharStruct* >); > >extern int XTextWidth( > XFontStruct* , > const char* , > int >); > >extern int XTextWidth16( > XFontStruct* , > const XChar2b* , > int >); > >extern int XTranslateCoordinates( > Display* , > Window , > Window , > int , > int , > int* , > int* , > Window* >); > >extern int XUndefineCursor( > Display* , > Window >); > >extern int XUngrabButton( > Display* , > unsigned int , > unsigned int , > Window >); > >extern int XUngrabKey( > Display* , > int , > unsigned int , > Window >); > >extern int XUngrabKeyboard( > Display* , > Time >); > >extern int XUngrabPointer( > Display* , > Time >); > >extern int XUngrabServer( > Display* >); > >extern int XUninstallColormap( > Display* , > Colormap >); > >extern int XUnloadFont( > Display* , > Font >); > >extern int XUnmapSubwindows( > Display* , > Window >); > >extern int XUnmapWindow( > Display* , > Window >); > >extern int XVendorRelease( > Display* >); > >extern int XWarpPointer( > Display* , > Window , > Window , > int , > int , > unsigned int , > unsigned int , > int , > int >); > >extern int XWidthMMOfScreen( > Screen* >); > >extern int XWidthOfScreen( > Screen* >); > >extern int XWindowEvent( > Display* , > Window , > long , > XEvent* >); > >extern int XWriteBitmapFile( > Display* , > const char* , > Pixmap , > unsigned int , > unsigned int , > int , > int >); > >extern int XSupportsLocale (void); > >extern char *XSetLocaleModifiers( > const char* >); > >extern XOM XOpenOM( > Display* , > struct _XrmHashBucketRec* , > const char* , > const char* >); > >extern int XCloseOM( > XOM >); > >extern char *XSetOMValues( > XOM , > ... >); > >extern char *XGetOMValues( > XOM , > ... >); > >extern Display *XDisplayOfOM( > XOM >); > >extern char *XLocaleOfOM( > XOM >); > >extern XOC XCreateOC( > XOM , > ... >); > >extern void XDestroyOC( > XOC >); > >extern XOM XOMOfOC( > XOC >); > >extern char *XSetOCValues( > XOC , > ... >); > >extern char *XGetOCValues( > XOC , > ... >); > >extern XFontSet XCreateFontSet( > Display* , > const char* , > char*** , > int* , > char** >); > >extern void XFreeFontSet( > Display* , > XFontSet >); > >extern int XFontsOfFontSet( > XFontSet , > XFontStruct*** , > char*** >); > >extern char *XBaseFontNameListOfFontSet( > XFontSet >); > >extern char *XLocaleOfFontSet( > XFontSet >); > >extern int XContextDependentDrawing( > XFontSet >); > >extern int XDirectionalDependentDrawing( > XFontSet >); > >extern int XContextualDrawing( > XFontSet >); > >extern XFontSetExtents *XExtentsOfFontSet( > XFontSet >); > >extern int XmbTextEscapement( > XFontSet , > const char* , > int >); > >extern int XwcTextEscapement( > XFontSet , > const wchar_t* , > int >); > >extern int Xutf8TextEscapement( > XFontSet , > const char* , > int >); > >extern int XmbTextExtents( > XFontSet , > const char* , > int , > XRectangle* , > XRectangle* >); > >extern int XwcTextExtents( > XFontSet , > const wchar_t* , > int , > XRectangle* , > XRectangle* >); > >extern int Xutf8TextExtents( > XFontSet , > const char* , > int , > XRectangle* , > XRectangle* >); > >extern int XmbTextPerCharExtents( > XFontSet , > const char* , > int , > XRectangle* , > XRectangle* , > int , > int* , > XRectangle* , > XRectangle* >); > >extern int XwcTextPerCharExtents( > XFontSet , > const wchar_t* , > int , > XRectangle* , > XRectangle* , > int , > int* , > XRectangle* , > XRectangle* >); > >extern int Xutf8TextPerCharExtents( > XFontSet , > const char* , > int , > XRectangle* , > XRectangle* , > int , > int* , > XRectangle* , > XRectangle* >); > >extern void XmbDrawText( > Display* , > Drawable , > GC , > int , > int , > XmbTextItem* , > int >); > >extern void XwcDrawText( > Display* , > Drawable , > GC , > int , > int , > XwcTextItem* , > int >); > >extern void Xutf8DrawText( > Display* , > Drawable , > GC , > int , > int , > XmbTextItem* , > int >); > >extern void XmbDrawString( > Display* , > Drawable , > XFontSet , > GC , > int , > int , > const char* , > int >); > >extern void XwcDrawString( > Display* , > Drawable , > XFontSet , > GC , > int , > int , > const wchar_t* , > int >); > >extern void Xutf8DrawString( > Display* , > Drawable , > XFontSet , > GC , > int , > int , > const char* , > int >); > >extern void XmbDrawImageString( > Display* , > Drawable , > XFontSet , > GC , > int , > int , > const char* , > int >); > >extern void XwcDrawImageString( > Display* , > Drawable , > XFontSet , > GC , > int , > int , > const wchar_t* , > int >); > >extern void Xutf8DrawImageString( > Display* , > Drawable , > XFontSet , > GC , > int , > int , > const char* , > int >); > >extern XIM XOpenIM( > Display* , > struct _XrmHashBucketRec* , > char* , > char* >); > >extern int XCloseIM( > XIM >); > >extern char *XGetIMValues( > XIM , ... >); > >extern char *XSetIMValues( > XIM , ... >); > >extern Display *XDisplayOfIM( > XIM >); > >extern char *XLocaleOfIM( > XIM >); > >extern XIC XCreateIC( > XIM , ... >); > >extern void XDestroyIC( > XIC >); > >extern void XSetICFocus( > XIC >); > >extern void XUnsetICFocus( > XIC >); > >extern wchar_t *XwcResetIC( > XIC >); > >extern char *XmbResetIC( > XIC >); > >extern char *Xutf8ResetIC( > XIC >); > >extern char *XSetICValues( > XIC , ... >); > >extern char *XGetICValues( > XIC , ... >); > >extern XIM XIMOfIC( > XIC >); > >extern int XFilterEvent( > XEvent* , > Window >); > >extern int XmbLookupString( > XIC , > XKeyPressedEvent* , > char* , > int , > KeySym* , > int* >); > >extern int XwcLookupString( > XIC , > XKeyPressedEvent* , > wchar_t* , > int , > KeySym* , > int* >); > >extern int Xutf8LookupString( > XIC , > XKeyPressedEvent* , > char* , > int , > KeySym* , > int* >); > >extern XVaNestedList XVaCreateNestedList( > int , ... >); > > > >extern int XRegisterIMInstantiateCallback( > Display* , > struct _XrmHashBucketRec* , > char* , > char* , > XIDProc , > XPointer >); > >extern int XUnregisterIMInstantiateCallback( > Display* , > struct _XrmHashBucketRec* , > char* , > char* , > XIDProc , > XPointer >); > >typedef void (*XConnectionWatchProc)( > Display* , > XPointer , > int , > int , > XPointer* >); > > >extern int XInternalConnectionNumbers( > Display* , > int** , > int* >); > >extern void XProcessInternalConnection( > Display* , > int >); > >extern int XAddConnectionWatch( > Display* , > XConnectionWatchProc , > XPointer >); > >extern void XRemoveConnectionWatch( > Display* , > XConnectionWatchProc , > XPointer >); > >extern void XSetAuthorization( > char * , > int , > char * , > int >); > >extern int _Xmbtowc( > wchar_t * , > > > > > char * , > int > >); > >extern int _Xwctomb( > char * , > wchar_t >); > > ># 53 "../../../../../extras/Mesa/src/X/glxheader.h" 2 ># 1 "../../../../../exports/include/X11/Xutil.h" 1 ># 74 "../../../../../exports/include/X11/Xutil.h" >typedef struct { > long flags; > int x, y; > int width, height; > int min_width, min_height; > int max_width, max_height; > int width_inc, height_inc; > struct { > int x; > int y; > } min_aspect, max_aspect; > int base_width, base_height; > int win_gravity; >} XSizeHints; ># 112 "../../../../../exports/include/X11/Xutil.h" >typedef struct { > long flags; > int input; > > int initial_state; > Pixmap icon_pixmap; > Window icon_window; > int icon_x, icon_y; > Pixmap icon_mask; > XID window_group; > >} XWMHints; ># 156 "../../../../../exports/include/X11/Xutil.h" >typedef struct { > unsigned char *value; > Atom encoding; > int format; > unsigned long nitems; >} XTextProperty; > > > > > >typedef enum { > XStringStyle, > XCompoundTextStyle, > XTextStyle, > XStdICCTextStyle, > > XUTF8StringStyle >} XICCEncodingStyle; > >typedef struct { > int min_width, min_height; > int max_width, max_height; > int width_inc, height_inc; >} XIconSize; > >typedef struct { > char *res_name; > char *res_class; >} XClassHint; ># 224 "../../../../../exports/include/X11/Xutil.h" >typedef struct _XComposeStatus { > XPointer compose_ptr; > int chars_matched; >} XComposeStatus; ># 259 "../../../../../exports/include/X11/Xutil.h" >typedef struct _XRegion *Region; ># 273 "../../../../../exports/include/X11/Xutil.h" >typedef struct { > Visual *visual; > VisualID visualid; > int screen; > int depth; > > > > int class; > > unsigned long red_mask; > unsigned long green_mask; > unsigned long blue_mask; > int colormap_size; > int bits_per_rgb; >} XVisualInfo; ># 306 "../../../../../exports/include/X11/Xutil.h" >typedef struct { > Colormap colormap; > unsigned long red_max; > unsigned long red_mult; > unsigned long green_max; > unsigned long green_mult; > unsigned long blue_max; > unsigned long blue_mult; > unsigned long base_pixel; > VisualID visualid; > XID killid; >} XStandardColormap; ># 343 "../../../../../exports/include/X11/Xutil.h" >typedef int XContext; > > > > > > > > >extern XClassHint *XAllocClassHint ( > void >); > >extern XIconSize *XAllocIconSize ( > void >); > >extern XSizeHints *XAllocSizeHints ( > void >); > >extern XStandardColormap *XAllocStandardColormap ( > void >); > >extern XWMHints *XAllocWMHints ( > void >); > >extern int XClipBox( > Region , > XRectangle* >); > >extern Region XCreateRegion( > void >); > >extern const char *XDefaultString (void); > >extern int XDeleteContext( > Display* , > XID , > XContext >); > >extern int XDestroyRegion( > Region >); > >extern int XEmptyRegion( > Region >); > >extern int XEqualRegion( > Region , > Region >); > >extern int XFindContext( > Display* , > XID , > XContext , > XPointer* >); > >extern int XGetClassHint( > Display* , > Window , > XClassHint* >); > >extern int XGetIconSizes( > Display* , > Window , > XIconSize** , > int* >); > >extern int XGetNormalHints( > Display* , > Window , > XSizeHints* >); > >extern int XGetRGBColormaps( > Display* , > Window , > XStandardColormap** , > int* , > Atom >); > >extern int XGetSizeHints( > Display* , > Window , > XSizeHints* , > Atom >); > >extern int XGetStandardColormap( > Display* , > Window , > XStandardColormap* , > Atom >); > >extern int XGetTextProperty( > Display* , > Window , > XTextProperty* , > Atom >); > >extern XVisualInfo *XGetVisualInfo( > Display* , > long , > XVisualInfo* , > int* >); > >extern int XGetWMClientMachine( > Display* , > Window , > XTextProperty* >); > >extern XWMHints *XGetWMHints( > Display* , > Window >); > >extern int XGetWMIconName( > Display* , > Window , > XTextProperty* >); > >extern int XGetWMName( > Display* , > Window , > XTextProperty* >); > >extern int XGetWMNormalHints( > Display* , > Window , > XSizeHints* , > long* >); > >extern int XGetWMSizeHints( > Display* , > Window , > XSizeHints* , > long* , > Atom >); > >extern int XGetZoomHints( > Display* , > Window , > XSizeHints* >); > >extern int XIntersectRegion( > Region , > Region , > Region >); > >extern void XConvertCase( > KeySym , > KeySym* , > KeySym* >); > >extern int XLookupString( > XKeyEvent* , > char* , > int , > KeySym* , > XComposeStatus* >); > >extern int XMatchVisualInfo( > Display* , > int , > int , > int , > XVisualInfo* >); > >extern int XOffsetRegion( > Region , > int , > int >); > >extern int XPointInRegion( > Region , > int , > int >); > >extern Region XPolygonRegion( > XPoint* , > int , > int >); > >extern int XRectInRegion( > Region , > int , > int , > unsigned int , > unsigned int >); > >extern int XSaveContext( > Display* , > XID , > XContext , > const char* >); > >extern int XSetClassHint( > Display* , > Window , > XClassHint* >); > >extern int XSetIconSizes( > Display* , > Window , > XIconSize* , > int >); > >extern int XSetNormalHints( > Display* , > Window , > XSizeHints* >); > >extern void XSetRGBColormaps( > Display* , > Window , > XStandardColormap* , > int , > Atom >); > >extern int XSetSizeHints( > Display* , > Window , > XSizeHints* , > Atom >); > >extern int XSetStandardProperties( > Display* , > Window , > const char* , > const char* , > Pixmap , > char** , > int , > XSizeHints* >); > >extern void XSetTextProperty( > Display* , > Window , > XTextProperty* , > Atom >); > >extern void XSetWMClientMachine( > Display* , > Window , > XTextProperty* >); > >extern int XSetWMHints( > Display* , > Window , > XWMHints* >); > >extern void XSetWMIconName( > Display* , > Window , > XTextProperty* >); > >extern void XSetWMName( > Display* , > Window , > XTextProperty* >); > >extern void XSetWMNormalHints( > Display* , > Window , > XSizeHints* >); > >extern void XSetWMProperties( > Display* , > Window , > XTextProperty* , > XTextProperty* , > char** , > int , > XSizeHints* , > XWMHints* , > XClassHint* >); > >extern void XmbSetWMProperties( > Display* , > Window , > const char* , > const char* , > char** , > int , > XSizeHints* , > XWMHints* , > XClassHint* >); > >extern void Xutf8SetWMProperties( > Display* , > Window , > const char* , > const char* , > char** , > int , > XSizeHints* , > XWMHints* , > XClassHint* >); > >extern void XSetWMSizeHints( > Display* , > Window , > XSizeHints* , > Atom >); > >extern int XSetRegion( > Display* , > GC , > Region >); > >extern void XSetStandardColormap( > Display* , > Window , > XStandardColormap* , > Atom >); > >extern int XSetZoomHints( > Display* , > Window , > XSizeHints* >); > >extern int XShrinkRegion( > Region , > int , > int >); > >extern int XStringListToTextProperty( > char** , > int , > XTextProperty* >); > >extern int XSubtractRegion( > Region , > Region , > Region >); > >extern int XmbTextListToTextProperty( > Display* display, > char** list, > int count, > XICCEncodingStyle style, > XTextProperty* text_prop_return >); > >extern int XwcTextListToTextProperty( > Display* display, > wchar_t** list, > int count, > XICCEncodingStyle style, > XTextProperty* text_prop_return >); > >extern int Xutf8TextListToTextProperty( > Display* display, > char** list, > int count, > XICCEncodingStyle style, > XTextProperty* text_prop_return >); > >extern void XwcFreeStringList( > wchar_t** list >); > >extern int XTextPropertyToStringList( > XTextProperty* , > char*** , > int* >); > >extern int XmbTextPropertyToTextList( > Display* display, > const XTextProperty* text_prop, > char*** list_return, > int* count_return >); > >extern int XwcTextPropertyToTextList( > Display* display, > const XTextProperty* text_prop, > wchar_t*** list_return, > int* count_return >); > >extern int Xutf8TextPropertyToTextList( > Display* display, > const XTextProperty* text_prop, > char*** list_return, > int* count_return >); > >extern int XUnionRectWithRegion( > XRectangle* , > Region , > Region >); > >extern int XUnionRegion( > Region , > Region , > Region >); > >extern int XWMGeometry( > Display* , > int , > const char* , > const char* , > unsigned int , > XSizeHints* , > int* , > int* , > int* , > int* , > int* >); > >extern int XXorRegion( > Region , > Region , > Region >); > > ># 54 "../../../../../extras/Mesa/src/X/glxheader.h" 2 > > > > > ># 1 "../../../../../exports/include/GL/glx.h" 1 ># 42 "../../../../../exports/include/GL/glx.h" ># 1 "../../../../../exports/include/GL/glxtokens.h" 1 ># 43 "../../../../../exports/include/GL/glx.h" 2 ># 51 "../../../../../exports/include/GL/glx.h" >typedef XID GLXContextID; >typedef XID GLXPixmap; >typedef XID GLXDrawable; >typedef XID GLXPbuffer; >typedef XID GLXWindow; >typedef XID GLXFBConfigID; > > > > >typedef struct __GLXcontextRec *GLXContext; > > > > >typedef struct __GLXFBConfigRec *GLXFBConfig; > > > >extern XVisualInfo* glXChooseVisual (Display *dpy, int screen, int *attribList); >extern void glXCopyContext (Display *dpy, GLXContext src, GLXContext dst, unsigned long mask); >extern GLXContext glXCreateContext (Display *dpy, XVisualInfo *vis, GLXContext shareList, int direct); >extern GLXPixmap glXCreateGLXPixmap (Display *dpy, XVisualInfo *vis, Pixmap pixmap); >extern void glXDestroyContext (Display *dpy, GLXContext ctx); >extern void glXDestroyGLXPixmap (Display *dpy, GLXPixmap pix); >extern int glXGetConfig (Display *dpy, XVisualInfo *vis, int attrib, int *value); >extern GLXContext glXGetCurrentContext (void); >extern GLXDrawable glXGetCurrentDrawable (void); >extern int glXIsDirect (Display *dpy, GLXContext ctx); >extern int glXMakeCurrent (Display *dpy, GLXDrawable drawable, GLXContext ctx); >extern int glXQueryExtension (Display *dpy, int *errorBase, int *eventBase); >extern int glXQueryVersion (Display *dpy, int *major, int *minor); >extern void glXSwapBuffers (Display *dpy, GLXDrawable drawable); >extern void glXUseXFont (Font font, int first, int count, int listBase); >extern void glXWaitGL (void); >extern void glXWaitX (void); >extern const char * glXGetClientString (Display *dpy, int name ); >extern const char * glXQueryServerString (Display *dpy, int screen, int name ); >extern const char * glXQueryExtensionsString (Display *dpy, int screen ); > > >extern GLXFBConfig * glXGetFBConfigs (Display *dpy, int screen, int *nelements); >extern GLXFBConfig * glXChooseFBConfig (Display *dpy, int screen, const int *attrib_list, int *nelements); >extern int glXGetFBConfigAttrib (Display *dpy, GLXFBConfig config, int attribute, int *value); >extern XVisualInfo * glXGetVisualFromFBConfig (Display *dpy, GLXFBConfig config); >extern GLXWindow glXCreateWindow (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list); >extern void glXDestroyWindow (Display *dpy, GLXWindow win); >extern GLXPixmap glXCreatePixmap (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list); >extern void glXDestroyPixmap (Display *dpy, GLXPixmap pixmap); >extern GLXPbuffer glXCreatePbuffer (Display *dpy, GLXFBConfig config, const int *attrib_list); >extern void glXDestroyPbuffer (Display *dpy, GLXPbuffer pbuf); >extern void glXQueryDrawable (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); >extern GLXContext glXCreateNewContext (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, int direct); >extern int glXMakeContextCurrent (Display *display, GLXDrawable draw, GLXDrawable read, GLXContext ctx); >extern GLXDrawable glXGetCurrentReadDrawable (void); >extern Display * glXGetCurrentDisplay (void); >extern int glXQueryContext (Display *dpy, GLXContext ctx, int attribute, int *value); >extern void glXSelectEvent (Display *dpy, GLXDrawable draw, unsigned long event_mask); >extern void glXGetSelectedEvent (Display *dpy, GLXDrawable draw, unsigned long *event_mask); > > >extern void (*glXGetProcAddress(const GLubyte *procname))(void); > > > > ># 1 "../../../../../extras/Mesa/include/GL/glxext.h" 1 ># 291 "../../../../../extras/Mesa/include/GL/glxext.h" >typedef void (*__GLXextFuncPtr)(void); > > > >typedef XID GLXVideoSourceSGIX; > > > >typedef XID GLXFBConfigIDSGIX; >typedef struct __GLXFBConfigRec *GLXFBConfigSGIX; > > > >typedef XID GLXPbufferSGIX; >typedef struct { > int type; > unsigned long serial; > int send_event; > Display *display; > GLXDrawable drawable; > int event_type; > int draw_type; > unsigned int mask; > int x, y; > int width, height; > int count; >} GLXBufferClobberEventSGIX; ># 384 "../../../../../extras/Mesa/include/GL/glxext.h" >typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName); ># 404 "../../../../../extras/Mesa/include/GL/glxext.h" >typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval); ># 413 "../../../../../extras/Mesa/include/GL/glxext.h" >typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count); >typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count); ># 423 "../../../../../extras/Mesa/include/GL/glxext.h" >typedef int ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); >typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void); ># 452 "../../../../../extras/Mesa/include/GL/glxext.h" >typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void); >typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value); >typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context); >typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID); >typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context); ># 469 "../../../../../extras/Mesa/include/GL/glxext.h" >typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value); >typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements); >typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap); >typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, int direct); >typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config); >typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis); ># 486 "../../../../../extras/Mesa/include/GL/glxext.h" >typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list); >typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf); >typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value); >typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask); >typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask); > > > > > > > >typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion); ># 510 "../../../../../extras/Mesa/include/GL/glxext.h" >typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window); >typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h); >typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh); >typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h); >typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype); ># 532 "../../../../../extras/Mesa/include/GL/glxext.h" >typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member); ># 541 "../../../../../extras/Mesa/include/GL/glxext.h" >typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier); >typedef int ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max); > > > > > > > >typedef int ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex); > > > > > > > >typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height); > > > > > > > >typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap); > > > > > > > >typedef int ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable); > > > > > > > >typedef int ( * PFNGLXSET3DFXMODEMESAPROC) (int mode); > > > > > > > >typedef GLuint ( * PFNGLXGETAGPOFFSETMESAPROC) (const GLvoid *); ># 599 "../../../../../extras/Mesa/include/GL/glxext.h" >typedef GLint ( * PFNGLXSWAPINTERVALMESAPROC) (unsigned interval); >typedef GLint ( * PFNGLXGETSWAPINTERVALMESAPROC) ( void ); ># 620 "../../../../../extras/Mesa/include/GL/glxext.h" >typedef int ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc); >typedef int ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator); >typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder); >typedef int ( * PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc); >typedef int ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc); ># 635 "../../../../../extras/Mesa/include/GL/glxext.h" >typedef GLint ( * PFNGLXBEGINFRAMETRACKINGMESAPROC) (Display *dpy, GLXDrawable drawable); >typedef GLint ( * PFNGLXENDFRAMETRACKINGMESAPROC) (Display *dpy, GLXDrawable drawable); >typedef GLint ( * PFNGLXGETFRAMEUSAGEMESAPROC) (Display *dpy, GLXDrawable drawable, GLfloat *usage); >typedef GLint ( * PFNGLXQUERYFRAMETRACKINGMESAPROC) (Display *dpy, GLXDrawable drawable, int64_t *sbc, int64_t *missedFrames, GLfloat *lastMissedUsage); ># 118 "../../../../../exports/include/GL/glx.h" 2 ># 149 "../../../../../exports/include/GL/glx.h" >extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); >extern void glXFreeMemoryNV(GLvoid *pointer); >typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); >typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer); ># 176 "../../../../../exports/include/GL/glx.h" >extern void *glXAllocateMemoryMESA(Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority); >extern void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer); >extern GLuint glXGetMemoryOffsetMESA(Display *dpy, int scrn, const void *pointer); >typedef void * ( * PFNGLXALLOCATEMEMORYMESAPROC) (Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority); >typedef void ( * PFNGLXFREEMEMORYMESAPROC) (Display *dpy, int scrn, void *pointer); >typedef GLuint (* PFNGLXGETMEMORYOFFSETMESAPROC) (Display *dpy, int scrn, const void *pointer); ># 191 "../../../../../exports/include/GL/glx.h" >int glXBindTexImageARB( Display *dpy, GLXPbuffer pbuffer, int buffer ); >int glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer ); >int glXDrawableAttribARB( Display *dpy, GLXDrawable draw, const int *attribList ); ># 203 "../../../../../exports/include/GL/glx.h" >typedef struct { > int event_type; > int draw_type; > unsigned long serial; > int send_event; > Display *display; > GLXDrawable drawable; > unsigned int buffer_mask; > unsigned int aux_buffer; > int x, y; > int width, height; > int count; >} GLXPbufferClobberEvent; > >typedef union __GLXEvent { > GLXPbufferClobberEvent glxpbufferclobber; > long pad[24]; >} GLXEvent; ># 60 "../../../../../extras/Mesa/src/X/glxheader.h" 2 > > > > > > >struct timespec; >struct itimerspec; ># 35 "xm_tri.c" 2 ># 1 "../../../../../extras/Mesa/src/depth.h" 1 ># 31 "../../../../../extras/Mesa/src/depth.h" ># 1 "../../../../../extras/Mesa/src/mtypes.h" 1 ># 36 "../../../../../extras/Mesa/src/mtypes.h" ># 1 "../../../../../extras/Mesa/src/config.h" 1 ># 37 "../../../../../extras/Mesa/src/mtypes.h" 2 ># 1 "../../../../../extras/Mesa/src/glapitable.h" 1 > > > > > > >struct _glapi_table >{ > void (*NewList)(GLuint list, GLenum mode); > void (*EndList)(void); > void (*CallList)(GLuint list); > void (*CallLists)(GLsizei n, GLenum type, const GLvoid * lists); > void (*DeleteLists)(GLuint list, GLsizei range); > GLuint (*GenLists)(GLsizei range); > void (*ListBase)(GLuint base); > void (*Begin)(GLenum mode); > void (*Bitmap)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap); > void (*Color3b)(GLbyte red, GLbyte green, GLbyte blue); > void (*Color3bv)(const GLbyte * v); > void (*Color3d)(GLdouble red, GLdouble green, GLdouble blue); > void (*Color3dv)(const GLdouble * v); > void (*Color3f)(GLfloat red, GLfloat green, GLfloat blue); > void (*Color3fv)(const GLfloat * v); > void (*Color3i)(GLint red, GLint green, GLint blue); > void (*Color3iv)(const GLint * v); > void (*Color3s)(GLshort red, GLshort green, GLshort blue); > void (*Color3sv)(const GLshort * v); > void (*Color3ub)(GLubyte red, GLubyte green, GLubyte blue); > void (*Color3ubv)(const GLubyte * v); > void (*Color3ui)(GLuint red, GLuint green, GLuint blue); > void (*Color3uiv)(const GLuint * v); > void (*Color3us)(GLushort red, GLushort green, GLushort blue); > void (*Color3usv)(const GLushort * v); > void (*Color4b)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); > void (*Color4bv)(const GLbyte * v); > void (*Color4d)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); > void (*Color4dv)(const GLdouble * v); > void (*Color4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); > void (*Color4fv)(const GLfloat * v); > void (*Color4i)(GLint red, GLint green, GLint blue, GLint alpha); > void (*Color4iv)(const GLint * v); > void (*Color4s)(GLshort red, GLshort green, GLshort blue, GLshort alpha); > void (*Color4sv)(const GLshort * v); > void (*Color4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); > void (*Color4ubv)(const GLubyte * v); > void (*Color4ui)(GLuint red, GLuint green, GLuint blue, GLuint alpha); > void (*Color4uiv)(const GLuint * v); > void (*Color4us)(GLushort red, GLushort green, GLushort blue, GLushort alpha); > void (*Color4usv)(const GLushort * v); > void (*EdgeFlag)(GLboolean flag); > void (*EdgeFlagv)(const GLboolean * flag); > void (*End)(void); > void (*Indexd)(GLdouble c); > void (*Indexdv)(const GLdouble * c); > void (*Indexf)(GLfloat c); > void (*Indexfv)(const GLfloat * c); > void (*Indexi)(GLint c); > void (*Indexiv)(const GLint * c); > void (*Indexs)(GLshort c); > void (*Indexsv)(const GLshort * c); > void (*Normal3b)(GLbyte nx, GLbyte ny, GLbyte nz); > void (*Normal3bv)(const GLbyte * v); > void (*Normal3d)(GLdouble nx, GLdouble ny, GLdouble nz); > void (*Normal3dv)(const GLdouble * v); > void (*Normal3f)(GLfloat nx, GLfloat ny, GLfloat nz); > void (*Normal3fv)(const GLfloat * v); > void (*Normal3i)(GLint nx, GLint ny, GLint nz); > void (*Normal3iv)(const GLint * v); > void (*Normal3s)(GLshort nx, GLshort ny, GLshort nz); > void (*Normal3sv)(const GLshort * v); > void (*RasterPos2d)(GLdouble x, GLdouble y); > void (*RasterPos2dv)(const GLdouble * v); > void (*RasterPos2f)(GLfloat x, GLfloat y); > void (*RasterPos2fv)(const GLfloat * v); > void (*RasterPos2i)(GLint x, GLint y); > void (*RasterPos2iv)(const GLint * v); > void (*RasterPos2s)(GLshort x, GLshort y); > void (*RasterPos2sv)(const GLshort * v); > void (*RasterPos3d)(GLdouble x, GLdouble y, GLdouble z); > void (*RasterPos3dv)(const GLdouble * v); > void (*RasterPos3f)(GLfloat x, GLfloat y, GLfloat z); > void (*RasterPos3fv)(const GLfloat * v); > void (*RasterPos3i)(GLint x, GLint y, GLint z); > void (*RasterPos3iv)(const GLint * v); > void (*RasterPos3s)(GLshort x, GLshort y, GLshort z); > void (*RasterPos3sv)(const GLshort * v); > void (*RasterPos4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); > void (*RasterPos4dv)(const GLdouble * v); > void (*RasterPos4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); > void (*RasterPos4fv)(const GLfloat * v); > void (*RasterPos4i)(GLint x, GLint y, GLint z, GLint w); > void (*RasterPos4iv)(const GLint * v); > void (*RasterPos4s)(GLshort x, GLshort y, GLshort z, GLshort w); > void (*RasterPos4sv)(const GLshort * v); > void (*Rectd)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); > void (*Rectdv)(const GLdouble * v1, const GLdouble * v2); > void (*Rectf)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); > void (*Rectfv)(const GLfloat * v1, const GLfloat * v2); > void (*Recti)(GLint x1, GLint y1, GLint x2, GLint y2); > void (*Rectiv)(const GLint * v1, const GLint * v2); > void (*Rects)(GLshort x1, GLshort y1, GLshort x2, GLshort y2); > void (*Rectsv)(const GLshort * v1, const GLshort * v2); > void (*TexCoord1d)(GLdouble s); > void (*TexCoord1dv)(const GLdouble * v); > void (*TexCoord1f)(GLfloat s); > void (*TexCoord1fv)(const GLfloat * v); > void (*TexCoord1i)(GLint s); > void (*TexCoord1iv)(const GLint * v); > void (*TexCoord1s)(GLshort s); > void (*TexCoord1sv)(const GLshort * v); > void (*TexCoord2d)(GLdouble s, GLdouble t); > void (*TexCoord2dv)(const GLdouble * v); > void (*TexCoord2f)(GLfloat s, GLfloat t); > void (*TexCoord2fv)(const GLfloat * v); > void (*TexCoord2i)(GLint s, GLint t); > void (*TexCoord2iv)(const GLint * v); > void (*TexCoord2s)(GLshort s, GLshort t); > void (*TexCoord2sv)(const GLshort * v); > void (*TexCoord3d)(GLdouble s, GLdouble t, GLdouble r); > void (*TexCoord3dv)(const GLdouble * v); > void (*TexCoord3f)(GLfloat s, GLfloat t, GLfloat r); > void (*TexCoord3fv)(const GLfloat * v); > void (*TexCoord3i)(GLint s, GLint t, GLint r); > void (*TexCoord3iv)(const GLint * v); > void (*TexCoord3s)(GLshort s, GLshort t, GLshort r); > void (*TexCoord3sv)(const GLshort * v); > void (*TexCoord4d)(GLdouble s, GLdouble t, GLdouble r, GLdouble q); > void (*TexCoord4dv)(const GLdouble * v); > void (*TexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q); > void (*TexCoord4fv)(const GLfloat * v); > void (*TexCoord4i)(GLint s, GLint t, GLint r, GLint q); > void (*TexCoord4iv)(const GLint * v); > void (*TexCoord4s)(GLshort s, GLshort t, GLshort r, GLshort q); > void (*TexCoord4sv)(const GLshort * v); > void (*Vertex2d)(GLdouble x, GLdouble y); > void (*Vertex2dv)(const GLdouble * v); > void (*Vertex2f)(GLfloat x, GLfloat y); > void (*Vertex2fv)(const GLfloat * v); > void (*Vertex2i)(GLint x, GLint y); > void (*Vertex2iv)(const GLint * v); > void (*Vertex2s)(GLshort x, GLshort y); > void (*Vertex2sv)(const GLshort * v); > void (*Vertex3d)(GLdouble x, GLdouble y, GLdouble z); > void (*Vertex3dv)(const GLdouble * v); > void (*Vertex3f)(GLfloat x, GLfloat y, GLfloat z); > void (*Vertex3fv)(const GLfloat * v); > void (*Vertex3i)(GLint x, GLint y, GLint z); > void (*Vertex3iv)(const GLint * v); > void (*Vertex3s)(GLshort x, GLshort y, GLshort z); > void (*Vertex3sv)(const GLshort * v); > void (*Vertex4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); > void (*Vertex4dv)(const GLdouble * v); > void (*Vertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); > void (*Vertex4fv)(const GLfloat * v); > void (*Vertex4i)(GLint x, GLint y, GLint z, GLint w); > void (*Vertex4iv)(const GLint * v); > void (*Vertex4s)(GLshort x, GLshort y, GLshort z, GLshort w); > void (*Vertex4sv)(const GLshort * v); > void (*ClipPlane)(GLenum plane, const GLdouble * equation); > void (*ColorMaterial)(GLenum face, GLenum mode); > void (*CullFace)(GLenum mode); > void (*Fogf)(GLenum pname, GLfloat param); > void (*Fogfv)(GLenum pname, const GLfloat * params); > void (*Fogi)(GLenum pname, GLint param); > void (*Fogiv)(GLenum pname, const GLint * params); > void (*FrontFace)(GLenum mode); > void (*Hint)(GLenum target, GLenum mode); > void (*Lightf)(GLenum light, GLenum pname, GLfloat param); > void (*Lightfv)(GLenum light, GLenum pname, const GLfloat * params); > void (*Lighti)(GLenum light, GLenum pname, GLint param); > void (*Lightiv)(GLenum light, GLenum pname, const GLint * params); > void (*LightModelf)(GLenum pname, GLfloat param); > void (*LightModelfv)(GLenum pname, const GLfloat * params); > void (*LightModeli)(GLenum pname, GLint param); > void (*LightModeliv)(GLenum pname, const GLint * params); > void (*LineStipple)(GLint factor, GLushort pattern); > void (*LineWidth)(GLfloat width); > void (*Materialf)(GLenum face, GLenum pname, GLfloat param); > void (*Materialfv)(GLenum face, GLenum pname, const GLfloat * params); > void (*Materiali)(GLenum face, GLenum pname, GLint param); > void (*Materialiv)(GLenum face, GLenum pname, const GLint * params); > void (*PointSize)(GLfloat size); > void (*PolygonMode)(GLenum face, GLenum mode); > void (*PolygonStipple)(const GLubyte * mask); > void (*Scissor)(GLint x, GLint y, GLsizei width, GLsizei height); > void (*ShadeModel)(GLenum mode); > void (*TexParameterf)(GLenum target, GLenum pname, GLfloat param); > void (*TexParameterfv)(GLenum target, GLenum pname, const GLfloat * params); > void (*TexParameteri)(GLenum target, GLenum pname, GLint param); > void (*TexParameteriv)(GLenum target, GLenum pname, const GLint * params); > void (*TexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels); > void (*TexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels); > void (*TexEnvf)(GLenum target, GLenum pname, GLfloat param); > void (*TexEnvfv)(GLenum target, GLenum pname, const GLfloat * params); > void (*TexEnvi)(GLenum target, GLenum pname, GLint param); > void (*TexEnviv)(GLenum target, GLenum pname, const GLint * params); > void (*TexGend)(GLenum coord, GLenum pname, GLdouble param); > void (*TexGendv)(GLenum coord, GLenum pname, const GLdouble * params); > void (*TexGenf)(GLenum coord, GLenum pname, GLfloat param); > void (*TexGenfv)(GLenum coord, GLenum pname, const GLfloat * params); > void (*TexGeni)(GLenum coord, GLenum pname, GLint param); > void (*TexGeniv)(GLenum coord, GLenum pname, const GLint * params); > void (*FeedbackBuffer)(GLsizei size, GLenum type, GLfloat * buffer); > void (*SelectBuffer)(GLsizei size, GLuint * buffer); > GLint (*RenderMode)(GLenum mode); > void (*InitNames)(void); > void (*LoadName)(GLuint name); > void (*PassThrough)(GLfloat token); > void (*PopName)(void); > void (*PushName)(GLuint name); > void (*DrawBuffer)(GLenum mode); > void (*Clear)(GLbitfield mask); > void (*ClearAccum)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); > void (*ClearIndex)(GLfloat c); > void (*ClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); > void (*ClearStencil)(GLint s); > void (*ClearDepth)(GLclampd depth); > void (*StencilMask)(GLuint mask); > void (*ColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); > void (*DepthMask)(GLboolean flag); > void (*IndexMask)(GLuint mask); > void (*Accum)(GLenum op, GLfloat value); > void (*Disable)(GLenum cap); > void (*Enable)(GLenum cap); > void (*Finish)(void); > void (*Flush)(void); > void (*PopAttrib)(void); > void (*PushAttrib)(GLbitfield mask); > void (*Map1d)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points); > void (*Map1f)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * points); > void (*Map2d)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble * points); > void (*Map2f)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat * points); > void (*MapGrid1d)(GLint un, GLdouble u1, GLdouble u2); > void (*MapGrid1f)(GLint un, GLfloat u1, GLfloat u2); > void (*MapGrid2d)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); > void (*MapGrid2f)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); > void (*EvalCoord1d)(GLdouble u); > void (*EvalCoord1dv)(const GLdouble * u); > void (*EvalCoord1f)(GLfloat u); > void (*EvalCoord1fv)(const GLfloat * u); > void (*EvalCoord2d)(GLdouble u, GLdouble v); > void (*EvalCoord2dv)(const GLdouble * u); > void (*EvalCoord2f)(GLfloat u, GLfloat v); > void (*EvalCoord2fv)(const GLfloat * u); > void (*EvalMesh1)(GLenum mode, GLint i1, GLint i2); > void (*EvalPoint1)(GLint i); > void (*EvalMesh2)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); > void (*EvalPoint2)(GLint i, GLint j); > void (*AlphaFunc)(GLenum func, GLclampf ref); > void (*BlendFunc)(GLenum sfactor, GLenum dfactor); > void (*LogicOp)(GLenum opcode); > void (*StencilFunc)(GLenum func, GLint ref, GLuint mask); > void (*StencilOp)(GLenum fail, GLenum zfail, GLenum zpass); > void (*DepthFunc)(GLenum func); > void (*PixelZoom)(GLfloat xfactor, GLfloat yfactor); > void (*PixelTransferf)(GLenum pname, GLfloat param); > void (*PixelTransferi)(GLenum pname, GLint param); > void (*PixelStoref)(GLenum pname, GLfloat param); > void (*PixelStorei)(GLenum pname, GLint param); > void (*PixelMapfv)(GLenum map, GLint mapsize, const GLfloat * values); > void (*PixelMapuiv)(GLenum map, GLint mapsize, const GLuint * values); > void (*PixelMapusv)(GLenum map, GLint mapsize, const GLushort * values); > void (*ReadBuffer)(GLenum mode); > void (*CopyPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); > void (*ReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels); > void (*DrawPixels)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); > void (*GetBooleanv)(GLenum pname, GLboolean * params); > void (*GetClipPlane)(GLenum plane, GLdouble * equation); > void (*GetDoublev)(GLenum pname, GLdouble * params); > GLenum (*GetError)(void); > void (*GetFloatv)(GLenum pname, GLfloat * params); > void (*GetIntegerv)(GLenum pname, GLint * params); > void (*GetLightfv)(GLenum light, GLenum pname, GLfloat * params); > void (*GetLightiv)(GLenum light, GLenum pname, GLint * params); > void (*GetMapdv)(GLenum target, GLenum query, GLdouble * v); > void (*GetMapfv)(GLenum target, GLenum query, GLfloat * v); > void (*GetMapiv)(GLenum target, GLenum query, GLint * v); > void (*GetMaterialfv)(GLenum face, GLenum pname, GLfloat * params); > void (*GetMaterialiv)(GLenum face, GLenum pname, GLint * params); > void (*GetPixelMapfv)(GLenum map, GLfloat * values); > void (*GetPixelMapuiv)(GLenum map, GLuint * values); > void (*GetPixelMapusv)(GLenum map, GLushort * values); > void (*GetPolygonStipple)(GLubyte * mask); > const GLubyte * (*GetString)(GLenum name); > void (*GetTexEnvfv)(GLenum target, GLenum pname, GLfloat * params); > void (*GetTexEnviv)(GLenum target, GLenum pname, GLint * params); > void (*GetTexGendv)(GLenum coord, GLenum pname, GLdouble * params); > void (*GetTexGenfv)(GLenum coord, GLenum pname, GLfloat * params); > void (*GetTexGeniv)(GLenum coord, GLenum pname, GLint * params); > void (*GetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels); > void (*GetTexParameterfv)(GLenum target, GLenum pname, GLfloat * params); > void (*GetTexParameteriv)(GLenum target, GLenum pname, GLint * params); > void (*GetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat * params); > void (*GetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint * params); > GLboolean (*IsEnabled)(GLenum cap); > GLboolean (*IsList)(GLuint list); > void (*DepthRange)(GLclampd zNear, GLclampd zFar); > void (*Frustum)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); > void (*LoadIdentity)(void); > void (*LoadMatrixf)(const GLfloat * m); > void (*LoadMatrixd)(const GLdouble * m); > void (*MatrixMode)(GLenum mode); > void (*MultMatrixf)(const GLfloat * m); > void (*MultMatrixd)(const GLdouble * m); > void (*Ortho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); > void (*PopMatrix)(void); > void (*PushMatrix)(void); > void (*Rotated)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); > void (*Rotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); > void (*Scaled)(GLdouble x, GLdouble y, GLdouble z); > void (*Scalef)(GLfloat x, GLfloat y, GLfloat z); > void (*Translated)(GLdouble x, GLdouble y, GLdouble z); > void (*Translatef)(GLfloat x, GLfloat y, GLfloat z); > void (*Viewport)(GLint x, GLint y, GLsizei width, GLsizei height); > void (*ArrayElement)(GLint i); > void (*BindTexture)(GLenum target, GLuint texture); > void (*ColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); > void (*DisableClientState)(GLenum array); > void (*DrawArrays)(GLenum mode, GLint first, GLsizei count); > void (*DrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices); > void (*EdgeFlagPointer)(GLsizei stride, const GLvoid * pointer); > void (*EnableClientState)(GLenum array); > void (*IndexPointer)(GLenum type, GLsizei stride, const GLvoid * pointer); > void (*Indexub)(GLubyte c); > void (*Indexubv)(const GLubyte * c); > void (*InterleavedArrays)(GLenum format, GLsizei stride, const GLvoid * pointer); > void (*NormalPointer)(GLenum type, GLsizei stride, const GLvoid * pointer); > void (*PolygonOffset)(GLfloat factor, GLfloat units); > void (*TexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); > void (*VertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); > GLboolean (*AreTexturesResident)(GLsizei n, const GLuint * textures, GLboolean * residences); > void (*CopyTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); > void (*CopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); > void (*CopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); > void (*CopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); > void (*DeleteTextures)(GLsizei n, const GLuint * textures); > void (*GenTextures)(GLsizei n, GLuint * textures); > void (*GetPointerv)(GLenum pname, GLvoid ** params); > GLboolean (*IsTexture)(GLuint texture); > void (*PrioritizeTextures)(GLsizei n, const GLuint * textures, const GLclampf * priorities); > void (*TexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels); > void (*TexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); > void (*PopClientAttrib)(void); > void (*PushClientAttrib)(GLbitfield mask); > void (*BlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); > void (*BlendEquation)(GLenum mode); > void (*DrawRangeElements)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices); > void (*ColorTable)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table); > void (*ColorTableParameterfv)(GLenum target, GLenum pname, const GLfloat * params); > void (*ColorTableParameteriv)(GLenum target, GLenum pname, const GLint * params); > void (*CopyColorTable)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); > void (*GetColorTable)(GLenum target, GLenum format, GLenum type, GLvoid * table); > void (*GetColorTableParameterfv)(GLenum target, GLenum pname, GLfloat * params); > void (*GetColorTableParameteriv)(GLenum target, GLenum pname, GLint * params); > void (*ColorSubTable)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data); > void (*CopyColorSubTable)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); > void (*ConvolutionFilter1D)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image); > void (*ConvolutionFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image); > void (*ConvolutionParameterf)(GLenum target, GLenum pname, GLfloat params); > void (*ConvolutionParameterfv)(GLenum target, GLenum pname, const GLfloat * params); > void (*ConvolutionParameteri)(GLenum target, GLenum pname, GLint params); > void (*ConvolutionParameteriv)(GLenum target, GLenum pname, const GLint * params); > void (*CopyConvolutionFilter1D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); > void (*CopyConvolutionFilter2D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); > void (*GetConvolutionFilter)(GLenum target, GLenum format, GLenum type, GLvoid * image); > void (*GetConvolutionParameterfv)(GLenum target, GLenum pname, GLfloat * params); > void (*GetConvolutionParameteriv)(GLenum target, GLenum pname, GLint * params); > void (*GetSeparableFilter)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span); > void (*SeparableFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column); > void (*GetHistogram)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); > void (*GetHistogramParameterfv)(GLenum target, GLenum pname, GLfloat * params); > void (*GetHistogramParameteriv)(GLenum target, GLenum pname, GLint * params); > void (*GetMinmax)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); > void (*GetMinmaxParameterfv)(GLenum target, GLenum pname, GLfloat * params); > void (*GetMinmaxParameteriv)(GLenum target, GLenum pname, GLint * params); > void (*Histogram)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); > void (*Minmax)(GLenum target, GLenum internalformat, GLboolean sink); > void (*ResetHistogram)(GLenum target); > void (*ResetMinmax)(GLenum target); > void (*TexImage3D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels); > void (*TexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels); > void (*CopyTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); > void (*ActiveTextureARB)(GLenum texture); > void (*ClientActiveTextureARB)(GLenum texture); > void (*MultiTexCoord1dARB)(GLenum target, GLdouble s); > void (*MultiTexCoord1dvARB)(GLenum target, const GLdouble * v); > void (*MultiTexCoord1fARB)(GLenum target, GLfloat s); > void (*MultiTexCoord1fvARB)(GLenum target, const GLfloat * v); > void (*MultiTexCoord1iARB)(GLenum target, GLint s); > void (*MultiTexCoord1ivARB)(GLenum target, const GLint * v); > void (*MultiTexCoord1sARB)(GLenum target, GLshort s); > void (*MultiTexCoord1svARB)(GLenum target, const GLshort * v); > void (*MultiTexCoord2dARB)(GLenum target, GLdouble s, GLdouble t); > void (*MultiTexCoord2dvARB)(GLenum target, const GLdouble * v); > void (*MultiTexCoord2fARB)(GLenum target, GLfloat s, GLfloat t); > void (*MultiTexCoord2fvARB)(GLenum target, const GLfloat * v); > void (*MultiTexCoord2iARB)(GLenum target, GLint s, GLint t); > void (*MultiTexCoord2ivARB)(GLenum target, const GLint * v); > void (*MultiTexCoord2sARB)(GLenum target, GLshort s, GLshort t); > void (*MultiTexCoord2svARB)(GLenum target, const GLshort * v); > void (*MultiTexCoord3dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r); > void (*MultiTexCoord3dvARB)(GLenum target, const GLdouble * v); > void (*MultiTexCoord3fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r); > void (*MultiTexCoord3fvARB)(GLenum target, const GLfloat * v); > void (*MultiTexCoord3iARB)(GLenum target, GLint s, GLint t, GLint r); > void (*MultiTexCoord3ivARB)(GLenum target, const GLint * v); > void (*MultiTexCoord3sARB)(GLenum target, GLshort s, GLshort t, GLshort r); > void (*MultiTexCoord3svARB)(GLenum target, const GLshort * v); > void (*MultiTexCoord4dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); > void (*MultiTexCoord4dvARB)(GLenum target, const GLdouble * v); > void (*MultiTexCoord4fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); > void (*MultiTexCoord4fvARB)(GLenum target, const GLfloat * v); > void (*MultiTexCoord4iARB)(GLenum target, GLint s, GLint t, GLint r, GLint q); > void (*MultiTexCoord4ivARB)(GLenum target, const GLint * v); > void (*MultiTexCoord4sARB)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); > void (*MultiTexCoord4svARB)(GLenum target, const GLshort * v); > void (*LoadTransposeMatrixfARB)(const GLfloat * m); > void (*LoadTransposeMatrixdARB)(const GLdouble * m); > void (*MultTransposeMatrixfARB)(const GLfloat * m); > void (*MultTransposeMatrixdARB)(const GLdouble * m); > void (*SampleCoverageARB)(GLclampf value, GLboolean invert); > void (*__unused413)(void); > void (*PolygonOffsetEXT)(GLfloat factor, GLfloat bias); > void (*GetTexFilterFuncSGIS)(GLenum target, GLenum filter, GLfloat * weights); > void (*TexFilterFuncSGIS)(GLenum target, GLenum filter, GLsizei n, const GLfloat * weights); > void (*GetHistogramEXT)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); > void (*GetHistogramParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params); > void (*GetHistogramParameterivEXT)(GLenum target, GLenum pname, GLint * params); > void (*GetMinmaxEXT)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); > void (*GetMinmaxParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params); > void (*GetMinmaxParameterivEXT)(GLenum target, GLenum pname, GLint * params); > void (*GetConvolutionFilterEXT)(GLenum target, GLenum format, GLenum type, GLvoid * image); > void (*GetConvolutionParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params); > void (*GetConvolutionParameterivEXT)(GLenum target, GLenum pname, GLint * params); > void (*GetSeparableFilterEXT)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span); > void (*GetColorTableSGI)(GLenum target, GLenum format, GLenum type, GLvoid * table); > void (*GetColorTableParameterfvSGI)(GLenum target, GLenum pname, GLfloat * params); > void (*GetColorTableParameterivSGI)(GLenum target, GLenum pname, GLint * params); > void (*PixelTexGenSGIX)(GLenum mode); > void (*PixelTexGenParameteriSGIS)(GLenum pname, GLint param); > void (*PixelTexGenParameterivSGIS)(GLenum pname, const GLint * params); > void (*PixelTexGenParameterfSGIS)(GLenum pname, GLfloat param); > void (*PixelTexGenParameterfvSGIS)(GLenum pname, const GLfloat * params); > void (*GetPixelTexGenParameterivSGIS)(GLenum pname, GLint * params); > void (*GetPixelTexGenParameterfvSGIS)(GLenum pname, GLfloat * params); > void (*TexImage4DSGIS)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid * pixels); > void (*TexSubImage4DSGIS)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid * pixels); > GLboolean (*AreTexturesResidentEXT)(GLsizei n, const GLuint * textures, GLboolean * residences); > void (*GenTexturesEXT)(GLsizei n, GLuint * textures); > GLboolean (*IsTextureEXT)(GLuint texture); > void (*DetailTexFuncSGIS)(GLenum target, GLsizei n, const GLfloat * points); > void (*GetDetailTexFuncSGIS)(GLenum target, GLfloat * points); > void (*SharpenTexFuncSGIS)(GLenum target, GLsizei n, const GLfloat * points); > void (*GetSharpenTexFuncSGIS)(GLenum target, GLfloat * points); > void (*SampleMaskSGIS)(GLclampf value, GLboolean invert); > void (*SamplePatternSGIS)(GLenum pattern); > void (*ColorPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); > void (*EdgeFlagPointerEXT)(GLsizei stride, GLsizei count, const GLboolean * pointer); > void (*IndexPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); > void (*NormalPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); > void (*TexCoordPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); > void (*VertexPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); > void (*SpriteParameterfSGIX)(GLenum pname, GLfloat param); > void (*SpriteParameterfvSGIX)(GLenum pname, const GLfloat * params); > void (*SpriteParameteriSGIX)(GLenum pname, GLint param); > void (*SpriteParameterivSGIX)(GLenum pname, const GLint * params); > void (*PointParameterfEXT)(GLenum pname, GLfloat param); > void (*PointParameterfvEXT)(GLenum pname, const GLfloat * params); > GLint (*GetInstrumentsSGIX)(void); > void (*InstrumentsBufferSGIX)(GLsizei size, GLint * buffer); > GLint (*PollInstrumentsSGIX)(GLint * marker_p); > void (*ReadInstrumentsSGIX)(GLint marker); > void (*StartInstrumentsSGIX)(void); > void (*StopInstrumentsSGIX)(GLint marker); > void (*FrameZoomSGIX)(GLint factor); > void (*TagSampleBufferSGIX)(void); > void (*ReferencePlaneSGIX)(const GLdouble * equation); > void (*FlushRasterSGIX)(void); > void (*GetListParameterfvSGIX)(GLuint list, GLenum pname, GLfloat * params); > void (*GetListParameterivSGIX)(GLuint list, GLenum pname, GLint * params); > void (*ListParameterfSGIX)(GLuint list, GLenum pname, GLfloat param); > void (*ListParameterfvSGIX)(GLuint list, GLenum pname, const GLfloat * params); > void (*ListParameteriSGIX)(GLuint list, GLenum pname, GLint param); > void (*ListParameterivSGIX)(GLuint list, GLenum pname, const GLint * params); > void (*FragmentColorMaterialSGIX)(GLenum face, GLenum mode); > void (*FragmentLightfSGIX)(GLenum light, GLenum pname, GLfloat param); > void (*FragmentLightfvSGIX)(GLenum light, GLenum pname, const GLfloat * params); > void (*FragmentLightiSGIX)(GLenum light, GLenum pname, GLint param); > void (*FragmentLightivSGIX)(GLenum light, GLenum pname, const GLint * params); > void (*FragmentLightModelfSGIX)(GLenum pname, GLfloat param); > void (*FragmentLightModelfvSGIX)(GLenum pname, const GLfloat * params); > void (*FragmentLightModeliSGIX)(GLenum pname, GLint param); > void (*FragmentLightModelivSGIX)(GLenum pname, const GLint * params); > void (*FragmentMaterialfSGIX)(GLenum face, GLenum pname, GLfloat param); > void (*FragmentMaterialfvSGIX)(GLenum face, GLenum pname, const GLfloat * params); > void (*FragmentMaterialiSGIX)(GLenum face, GLenum pname, GLint param); > void (*FragmentMaterialivSGIX)(GLenum face, GLenum pname, const GLint * params); > void (*GetFragmentLightfvSGIX)(GLenum light, GLenum pname, GLfloat * params); > void (*GetFragmentLightivSGIX)(GLenum light, GLenum pname, GLint * params); > void (*GetFragmentMaterialfvSGIX)(GLenum face, GLenum pname, GLfloat * params); > void (*GetFragmentMaterialivSGIX)(GLenum face, GLenum pname, GLint * params); > void (*LightEnviSGIX)(GLenum pname, GLint param); > void (*VertexWeightfEXT)(GLfloat weight); > void (*VertexWeightfvEXT)(const GLfloat * weight); > void (*VertexWeightPointerEXT)(GLsizei size, GLenum type, GLsizei stride, const GLvoid * pointer); > void (*FlushVertexArrayRangeNV)(void); > void (*VertexArrayRangeNV)(GLsizei length, const GLvoid * pointer); > void (*CombinerParameterfvNV)(GLenum pname, const GLfloat * params); > void (*CombinerParameterfNV)(GLenum pname, GLfloat param); > void (*CombinerParameterivNV)(GLenum pname, const GLint * params); > void (*CombinerParameteriNV)(GLenum pname, GLint param); > void (*CombinerInputNV)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); > void (*CombinerOutputNV)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); > void (*FinalCombinerInputNV)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); > void (*GetCombinerInputParameterfvNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat * params); > void (*GetCombinerInputParameterivNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint * params); > void (*GetCombinerOutputParameterfvNV)(GLenum stage, GLenum portion, GLenum pname, GLfloat * params); > void (*GetCombinerOutputParameterivNV)(GLenum stage, GLenum portion, GLenum pname, GLint * params); > void (*GetFinalCombinerInputParameterfvNV)(GLenum variable, GLenum pname, GLfloat * params); > void (*GetFinalCombinerInputParameterivNV)(GLenum variable, GLenum pname, GLint * params); > void (*ResizeBuffersMESA)(void); > void (*WindowPos2dMESA)(GLdouble x, GLdouble y); > void (*WindowPos2dvMESA)(const GLdouble * v); > void (*WindowPos2fMESA)(GLfloat x, GLfloat y); > void (*WindowPos2fvMESA)(const GLfloat * v); > void (*WindowPos2iMESA)(GLint x, GLint y); > void (*WindowPos2ivMESA)(const GLint * v); > void (*WindowPos2sMESA)(GLshort x, GLshort y); > void (*WindowPos2svMESA)(const GLshort * v); > void (*WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z); > void (*WindowPos3dvMESA)(const GLdouble * v); > void (*WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z); > void (*WindowPos3fvMESA)(const GLfloat * v); > void (*WindowPos3iMESA)(GLint x, GLint y, GLint z); > void (*WindowPos3ivMESA)(const GLint * v); > void (*WindowPos3sMESA)(GLshort x, GLshort y, GLshort z); > void (*WindowPos3svMESA)(const GLshort * v); > void (*WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); > void (*WindowPos4dvMESA)(const GLdouble * v); > void (*WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); > void (*WindowPos4fvMESA)(const GLfloat * v); > void (*WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w); > void (*WindowPos4ivMESA)(const GLint * v); > void (*WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w); > void (*WindowPos4svMESA)(const GLshort * v); > void (*BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); > void (*IndexMaterialEXT)(GLenum face, GLenum mode); > void (*IndexFuncEXT)(GLenum func, GLclampf ref); > void (*LockArraysEXT)(GLint first, GLsizei count); > void (*UnlockArraysEXT)(void); > void (*CullParameterdvEXT)(GLenum pname, GLdouble * params); > void (*CullParameterfvEXT)(GLenum pname, GLfloat * params); > void (*HintPGI)(GLenum target, GLint mode); > void (*FogCoordfEXT)(GLfloat coord); > void (*FogCoordfvEXT)(const GLfloat * coord); > void (*FogCoorddEXT)(GLdouble coord); > void (*FogCoorddvEXT)(const GLdouble * coord); > void (*FogCoordPointerEXT)(GLenum type, GLsizei stride, const GLvoid * pointer); > void (*GetColorTableEXT)(GLenum target, GLenum format, GLenum type, GLvoid * data); > void (*GetColorTableParameterivEXT)(GLenum target, GLenum pname, GLint * params); > void (*GetColorTableParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params); > void (*TbufferMask3DFX)(GLuint mask); > void (*CompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data); > void (*CompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data); > void (*CompressedTexImage1DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data); > void (*CompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data); > void (*CompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data); > void (*CompressedTexSubImage1DARB)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data); > void (*GetCompressedTexImageARB)(GLenum target, GLint level, GLvoid * img); > void (*SecondaryColor3bEXT)(GLbyte red, GLbyte green, GLbyte blue); > void (*SecondaryColor3bvEXT)(const GLbyte * v); > void (*SecondaryColor3dEXT)(GLdouble red, GLdouble green, GLdouble blue); > void (*SecondaryColor3dvEXT)(const GLdouble * v); > void (*SecondaryColor3fEXT)(GLfloat red, GLfloat green, GLfloat blue); > void (*SecondaryColor3fvEXT)(const GLfloat * v); > void (*SecondaryColor3iEXT)(GLint red, GLint green, GLint blue); > void (*SecondaryColor3ivEXT)(const GLint * v); > void (*SecondaryColor3sEXT)(GLshort red, GLshort green, GLshort blue); > void (*SecondaryColor3svEXT)(const GLshort * v); > void (*SecondaryColor3ubEXT)(GLubyte red, GLubyte green, GLubyte blue); > void (*SecondaryColor3ubvEXT)(const GLubyte * v); > void (*SecondaryColor3uiEXT)(GLuint red, GLuint green, GLuint blue); > void (*SecondaryColor3uivEXT)(const GLuint * v); > void (*SecondaryColor3usEXT)(GLushort red, GLushort green, GLushort blue); > void (*SecondaryColor3usvEXT)(const GLushort * v); > void (*SecondaryColorPointerEXT)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); > GLboolean (*AreProgramsResidentNV)(GLsizei n, const GLuint * ids, GLboolean * residences); > void (*BindProgramNV)(GLenum target, GLuint id); > void (*DeleteProgramsNV)(GLsizei n, const GLuint * ids); > void (*ExecuteProgramNV)(GLenum target, GLuint id, const GLfloat * params); > void (*GenProgramsNV)(GLsizei n, GLuint * ids); > void (*GetProgramParameterdvNV)(GLenum target, GLuint index, GLenum pname, GLdouble * params); > void (*GetProgramParameterfvNV)(GLenum target, GLuint index, GLenum pname, GLfloat * params); > void (*GetProgramivNV)(GLuint id, GLenum pname, GLint * params); > void (*GetProgramStringNV)(GLuint id, GLenum pname, GLubyte * program); > void (*GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint * params); > void (*GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble * params); > void (*GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat * params); > void (*GetVertexAttribivNV)(GLuint index, GLenum pname, GLint * params); > void (*GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid ** pointer); > GLboolean (*IsProgramNV)(GLuint id); > void (*LoadProgramNV)(GLenum target, GLuint id, GLsizei len, const GLubyte * program); > void (*ProgramParameter4dNV)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); > void (*ProgramParameter4dvNV)(GLenum target, GLuint index, const GLdouble * params); > void (*ProgramParameter4fNV)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); > void (*ProgramParameter4fvNV)(GLenum target, GLuint index, const GLfloat * params); > void (*ProgramParameters4dvNV)(GLenum target, GLuint index, GLuint num, const GLdouble * params); > void (*ProgramParameters4fvNV)(GLenum target, GLuint index, GLuint num, const GLfloat * params); > void (*RequestResidentProgramsNV)(GLsizei n, const GLuint * ids); > void (*TrackMatrixNV)(GLenum target, GLuint address, GLenum matrix, GLenum transform); > void (*VertexAttribPointerNV)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); > void (*VertexAttrib1dNV)(GLuint index, GLdouble x); > void (*VertexAttrib1dvNV)(GLuint index, const GLdouble * v); > void (*VertexAttrib1fNV)(GLuint index, GLfloat x); > void (*VertexAttrib1fvNV)(GLuint index, const GLfloat * v); > void (*VertexAttrib1sNV)(GLuint index, GLshort x); > void (*VertexAttrib1svNV)(GLuint index, const GLshort * v); > void (*VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y); > void (*VertexAttrib2dvNV)(GLuint index, const GLdouble * v); > void (*VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y); > void (*VertexAttrib2fvNV)(GLuint index, const GLfloat * v); > void (*VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y); > void (*VertexAttrib2svNV)(GLuint index, const GLshort * v); > void (*VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z); > void (*VertexAttrib3dvNV)(GLuint index, const GLdouble * v); > void (*VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z); > void (*VertexAttrib3fvNV)(GLuint index, const GLfloat * v); > void (*VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z); > void (*VertexAttrib3svNV)(GLuint index, const GLshort * v); > void (*VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); > void (*VertexAttrib4dvNV)(GLuint index, const GLdouble * v); > void (*VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); > void (*VertexAttrib4fvNV)(GLuint index, const GLfloat * v); > void (*VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); > void (*VertexAttrib4svNV)(GLuint index, const GLshort * v); > void (*VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); > void (*VertexAttrib4ubvNV)(GLuint index, const GLubyte * v); > void (*VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble * v); > void (*VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat * v); > void (*VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort * v); > void (*VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble * v); > void (*VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat * v); > void (*VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort * v); > void (*VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble * v); > void (*VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat * v); > void (*VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort * v); > void (*VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble * v); > void (*VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat * v); > void (*VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort * v); > void (*VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte * v); > void (*PointParameteriNV)(GLenum pname, GLint params); > void (*PointParameterivNV)(GLenum pname, const GLint * params); > void (*MultiDrawArraysEXT)(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount); > void (*MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount); > void (*ActiveStencilFaceEXT)(GLenum face); > void (*DeleteFencesNV)(GLsizei n, const GLuint * fences); > void (*GenFencesNV)(GLsizei n, GLuint * fences); > GLboolean (*IsFenceNV)(GLuint fence); > GLboolean (*TestFenceNV)(GLuint fence); > void (*GetFenceivNV)(GLuint fence, GLenum pname, GLint * params); > void (*FinishFenceNV)(GLuint fence); > void (*SetFenceNV)(GLuint fence, GLenum condition); >}; ># 38 "../../../../../extras/Mesa/src/mtypes.h" 2 ># 1 "../../../../../extras/Mesa/src/glthread.h" 1 ># 182 "../../../../../extras/Mesa/src/glthread.h" ># 1 "../../../../../exports/include/X11/Xthreads.h" 1 ># 230 "../../../../../exports/include/X11/Xthreads.h" ># 1 "/usr/include/pthread.h" 1 3 4 ># 23 "/usr/include/pthread.h" 3 4 ># 1 "/usr/include/sched.h" 1 3 4 ># 29 "/usr/include/sched.h" 3 4 ># 1 "/usr/include/time.h" 1 3 4 ># 30 "/usr/include/sched.h" 2 3 4 > > ># 1 "/usr/include/bits/sched.h" 1 3 4 ># 62 "/usr/include/bits/sched.h" 3 4 >struct sched_param > { > int __sched_priority; > }; > > > > > >extern int clone (int (*__fn) (void *__arg), void *__child_stack, > int __flags, void *__arg) ; > > > > > > > > > > >struct __sched_param > { > int __sched_priority; > }; ># 98 "/usr/include/bits/sched.h" 3 4 >typedef unsigned long int __cpu_mask; > > > > > > >typedef struct >{ > __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; >} cpu_set_t; ># 33 "/usr/include/sched.h" 2 3 4 > > > > > > > >extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param) > ; > > >extern int sched_getparam (__pid_t __pid, struct sched_param *__param) ; > > >extern int sched_setscheduler (__pid_t __pid, int __policy, > __const struct sched_param *__param) ; > > >extern int sched_getscheduler (__pid_t __pid) ; > > >extern int sched_yield (void) ; > > >extern int sched_get_priority_max (int __algorithm) ; > > >extern int sched_get_priority_min (int __algorithm) ; > > >extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) ; ># 76 "/usr/include/sched.h" 3 4 >extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, > __const cpu_set_t *__cpuset) ; > > >extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, > cpu_set_t *__cpuset) ; > > > ># 24 "/usr/include/pthread.h" 2 3 4 ># 1 "/usr/include/time.h" 1 3 4 ># 30 "/usr/include/time.h" 3 4 > > > > > > > > ># 1 "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/include/stddef.h" 1 3 4 ># 39 "/usr/include/time.h" 2 3 4 > > > ># 1 "/usr/include/bits/time.h" 1 3 4 ># 43 "/usr/include/time.h" 2 3 4 ># 129 "/usr/include/time.h" 3 4 > > >struct tm >{ > int tm_sec; > int tm_min; > int tm_hour; > int tm_mday; > int tm_mon; > int tm_year; > int tm_wday; > int tm_yday; > int tm_isdst; > > > long int tm_gmtoff; > __const char *tm_zone; > > > > >}; > > > > > > > > >struct itimerspec > { > struct timespec it_interval; > struct timespec it_value; > }; > > >struct sigevent; ># 178 "/usr/include/time.h" 3 4 > > > >extern clock_t clock (void) ; > > >extern time_t time (time_t *__timer) ; > > >extern double difftime (time_t __time1, time_t __time0) > __attribute__ ((__const__)); > > >extern time_t mktime (struct tm *__tp) ; > > > > > >extern size_t strftime (char *__restrict __s, size_t __maxsize, > __const char *__restrict __format, > __const struct tm *__restrict __tp) ; > > > > > >extern char *strptime (__const char *__restrict __s, > __const char *__restrict __fmt, struct tm *__tp) > ; > > > > > > > >extern size_t strftime_l (char *__restrict __s, size_t __maxsize, > __const char *__restrict __format, > __const struct tm *__restrict __tp, > __locale_t __loc) ; > >extern char *strptime_l (__const char *__restrict __s, > __const char *__restrict __fmt, struct tm *__tp, > __locale_t __loc) ; > > > > > > >extern struct tm *gmtime (__const time_t *__timer) ; > > > >extern struct tm *localtime (__const time_t *__timer) ; > > > > > >extern struct tm *gmtime_r (__const time_t *__restrict __timer, > struct tm *__restrict __tp) ; > > > >extern struct tm *localtime_r (__const time_t *__restrict __timer, > struct tm *__restrict __tp) ; > > > > > >extern char *asctime (__const struct tm *__tp) ; > > >extern char *ctime (__const time_t *__timer) ; > > > > > > > >extern char *asctime_r (__const struct tm *__restrict __tp, > char *__restrict __buf) ; > > >extern char *ctime_r (__const time_t *__restrict __timer, > char *__restrict __buf) ; > > > > >extern char *__tzname[2]; >extern int __daylight; >extern long int __timezone; > > > > >extern char *tzname[2]; > > > >extern void tzset (void) ; > > > >extern int daylight; >extern long int timezone; > > > > > >extern int stime (__const time_t *__when) ; ># 309 "/usr/include/time.h" 3 4 >extern time_t timegm (struct tm *__tp) ; > > >extern time_t timelocal (struct tm *__tp) ; > > >extern int dysize (int __year) __attribute__ ((__const__)); ># 324 "/usr/include/time.h" 3 4 >extern int nanosleep (__const struct timespec *__requested_time, > struct timespec *__remaining); > > > >extern int clock_getres (clockid_t __clock_id, struct timespec *__res) ; > > >extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) ; > > >extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) > ; > > > > > > >extern int clock_nanosleep (clockid_t __clock_id, int __flags, > __const struct timespec *__req, > struct timespec *__rem); > > >extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) ; > > > > >extern int timer_create (clockid_t __clock_id, > struct sigevent *__restrict __evp, > timer_t *__restrict __timerid) ; > > >extern int timer_delete (timer_t __timerid) ; > > >extern int timer_settime (timer_t __timerid, int __flags, > __const struct itimerspec *__restrict __value, > struct itimerspec *__restrict __ovalue) ; > > >extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) > ; > > >extern int timer_getoverrun (timer_t __timerid) ; ># 386 "/usr/include/time.h" 3 4 >extern int getdate_err; ># 395 "/usr/include/time.h" 3 4 >extern struct tm *getdate (__const char *__string); ># 409 "/usr/include/time.h" 3 4 >extern int getdate_r (__const char *__restrict __string, > struct tm *__restrict __resbufp); > > > ># 25 "/usr/include/pthread.h" 2 3 4 > > ># 1 "/usr/include/signal.h" 1 3 4 ># 31 "/usr/include/signal.h" 3 4 > > ># 1 "/usr/include/bits/sigset.h" 1 3 4 ># 34 "/usr/include/signal.h" 2 3 4 ># 392 "/usr/include/signal.h" 3 4 > ># 28 "/usr/include/pthread.h" 2 3 4 > ># 1 "/usr/include/bits/setjmp.h" 1 3 4 ># 38 "/usr/include/bits/setjmp.h" 3 4 >typedef int __jmp_buf[6]; ># 30 "/usr/include/pthread.h" 2 3 4 > > > >enum >{ > PTHREAD_CREATE_JOINABLE, > > PTHREAD_CREATE_DETACHED > >}; > > > >enum >{ > PTHREAD_MUTEX_TIMED_NP, > PTHREAD_MUTEX_RECURSIVE_NP, > PTHREAD_MUTEX_ERRORCHECK_NP, > PTHREAD_MUTEX_ADAPTIVE_NP > > , > PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, > PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, > PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, > PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL > > > > , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP > >}; ># 77 "/usr/include/pthread.h" 3 4 >enum >{ > PTHREAD_RWLOCK_PREFER_READER_NP, > PTHREAD_RWLOCK_PREFER_WRITER_NP, > PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, > PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP >}; ># 96 "/usr/include/pthread.h" 3 4 >enum >{ > PTHREAD_INHERIT_SCHED, > > PTHREAD_EXPLICIT_SCHED > >}; > > > >enum >{ > PTHREAD_SCOPE_SYSTEM, > > PTHREAD_SCOPE_PROCESS > >}; > > > >enum >{ > PTHREAD_PROCESS_PRIVATE, > > PTHREAD_PROCESS_SHARED > >}; ># 131 "/usr/include/pthread.h" 3 4 >struct _pthread_cleanup_buffer >{ > void (*__routine) (void *); > void *__arg; > int __canceltype; > struct _pthread_cleanup_buffer *__prev; >}; > > >enum >{ > PTHREAD_CANCEL_ENABLE, > > PTHREAD_CANCEL_DISABLE > >}; >enum >{ > PTHREAD_CANCEL_DEFERRED, > > PTHREAD_CANCEL_ASYNCHRONOUS > >}; ># 169 "/usr/include/pthread.h" 3 4 > > > > > >extern int pthread_create (pthread_t *__restrict __newthread, > __const pthread_attr_t *__restrict __attr, > void *(*__start_routine) (void *), > void *__restrict __arg) ; > > > > > >extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); > > > > > > > >extern int pthread_join (pthread_t __th, void **__thread_return); > > > > >extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) ; > > > > > > > >extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, > __const struct timespec *__abstime); > > > > > > >extern int pthread_detach (pthread_t __th) ; > > > >extern pthread_t pthread_self (void) __attribute__ ((__const__)); > > >extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) ; > > > > > > > >extern int pthread_attr_init (pthread_attr_t *__attr) ; > > >extern int pthread_attr_destroy (pthread_attr_t *__attr) ; > > >extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, > int *__detachstate) ; > > >extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, > int __detachstate) ; > > > >extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, > size_t *__guardsize) ; > > >extern int pthread_attr_setguardsize (pthread_attr_t *__attr, > size_t __guardsize) ; > > > >extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict > __attr, > struct sched_param *__restrict __param) > ; > > >extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, > __const struct sched_param *__restrict > __param) ; > > >extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict > __attr, int *__restrict __policy) > ; > > >extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) > ; > > >extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict > __attr, int *__restrict __inherit) > ; > > >extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, > int __inherit) ; > > > >extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, > int *__restrict __scope) ; > > >extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) > ; > > >extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict > __attr, void **__restrict __stackaddr) > __attribute__ ((__deprecated__)); > > > > > >extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, > void *__stackaddr) > __attribute__ ((__deprecated__)); > > >extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict > __attr, size_t *__restrict __stacksize) > ; > > > > >extern int pthread_attr_setstacksize (pthread_attr_t *__attr, > size_t __stacksize) ; > > > >extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, > void **__restrict __stackaddr, > size_t *__restrict __stacksize) ; > > > > >extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, > size_t __stacksize) ; > > > > > >extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, > size_t __cpusetsize, > __const cpu_set_t *__cpuset) ; > > > >extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr, > size_t __cpusetsize, > cpu_set_t *__cpuset) ; > > > > > >extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) ; > > > > > > > >extern int pthread_setschedparam (pthread_t __target_thread, int __policy, > __const struct sched_param *__param) > ; > > >extern int pthread_getschedparam (pthread_t __target_thread, > int *__restrict __policy, > struct sched_param *__restrict __param) > ; > > > > >extern int pthread_getconcurrency (void) ; > > >extern int pthread_setconcurrency (int __level) ; > > > > > > > >extern int pthread_yield (void) ; > > > > >extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, > __const cpu_set_t *__cpuset) ; > > >extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, > cpu_set_t *__cpuset) ; ># 394 "/usr/include/pthread.h" 3 4 >extern int pthread_once (pthread_once_t *__once_control, > void (*__init_routine) (void)) ; ># 406 "/usr/include/pthread.h" 3 4 >extern int pthread_setcancelstate (int __state, int *__oldstate); > > > >extern int pthread_setcanceltype (int __type, int *__oldtype); > > >extern int pthread_cancel (pthread_t __th); > > > > >extern void pthread_testcancel (void); > > > > >typedef struct >{ > struct > { > __jmp_buf __cancel_jmp_buf; > int __mask_was_saved; > } __cancel_jmp_buf[1]; > void *__pad[4]; >} __pthread_unwind_buf_t __attribute__ ((__aligned__)); ># 440 "/usr/include/pthread.h" 3 4 >struct __pthread_cleanup_frame >{ > void (*__cancel_routine) (void *); > void *__cancel_arg; > int __do_it; > int __cancel_type; >}; ># 580 "/usr/include/pthread.h" 3 4 >extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf) > __attribute ((regparm (1))); ># 591 "/usr/include/pthread.h" 3 4 >extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf) > __attribute ((regparm (1))); ># 614 "/usr/include/pthread.h" 3 4 >extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf) > __attribute ((regparm (1))); ># 626 "/usr/include/pthread.h" 3 4 >extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf) > __attribute ((regparm (1))); > > > >extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf) > __attribute ((regparm (1))) __attribute ((__noreturn__)) > > __attribute ((__weak__)) > > ; > > > >struct __jmp_buf_tag; >extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) ; > > > > > >extern int pthread_mutex_init (pthread_mutex_t *__mutex, > __const pthread_mutexattr_t *__mutexattr) > ; > > >extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) ; > > >extern int pthread_mutex_trylock (pthread_mutex_t *_mutex) ; > > >extern int pthread_mutex_lock (pthread_mutex_t *__mutex) ; > > > >extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, > __const struct timespec *__restrict > __abstime) ; > > > >extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) ; > > > > > > >extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) ; > > >extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) ; > > >extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * > __restrict __attr, > int *__restrict __pshared) ; > > >extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, > int __pshared) ; > > > >extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict > __attr, int *__restrict __kind) ; > > > > >extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) > ; ># 707 "/usr/include/pthread.h" 3 4 >extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, > __const pthread_rwlockattr_t *__restrict > __attr) ; > > >extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) ; > > >extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) ; > > >extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) ; > > > >extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, > __const struct timespec *__restrict > __abstime) ; > > > >extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) ; > > >extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) ; > > > >extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, > __const struct timespec *__restrict > __abstime) ; > > > >extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) ; > > > > > >extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) ; > > >extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) ; > > >extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * > __restrict __attr, > int *__restrict __pshared) ; > > >extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, > int __pshared) ; > > >extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t * > __restrict __attr, > int *__restrict __pref) ; > > >extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, > int __pref) ; > > > > > > > >extern int pthread_cond_init (pthread_cond_t *__restrict __cond, > __const pthread_condattr_t *__restrict > __cond_attr) ; > > >extern int pthread_cond_destroy (pthread_cond_t *__cond) ; > > >extern int pthread_cond_signal (pthread_cond_t *__cond) ; > > >extern int pthread_cond_broadcast (pthread_cond_t *__cond) ; > > > > > > >extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, > pthread_mutex_t *__restrict __mutex); ># 804 "/usr/include/pthread.h" 3 4 >extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, > pthread_mutex_t *__restrict __mutex, > __const struct timespec *__restrict > __abstime); > > > > >extern int pthread_condattr_init (pthread_condattr_t *__attr) ; > > >extern int pthread_condattr_destroy (pthread_condattr_t *__attr) ; > > >extern int pthread_condattr_getpshared (__const pthread_condattr_t * > __restrict __attr, > int *__restrict __pshared) ; > > >extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, > int __pshared) ; > > > >extern int pthread_condattr_getclock (__const pthread_condattr_t * > __restrict __attr, > __clockid_t *__restrict __clock_id) > ; > > >extern int pthread_condattr_setclock (pthread_condattr_t *__attr, > __clockid_t __clock_id) ; ># 845 "/usr/include/pthread.h" 3 4 >extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) > ; > > >extern int pthread_spin_destroy (pthread_spinlock_t *__lock) ; > > >extern int pthread_spin_lock (pthread_spinlock_t *__lock) ; > > >extern int pthread_spin_trylock (pthread_spinlock_t *__lock) ; > > >extern int pthread_spin_unlock (pthread_spinlock_t *__lock) ; > > > > > > >extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, > __const pthread_barrierattr_t *__restrict > __attr, unsigned int __count) ; > > >extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) ; > > >extern int pthread_barrier_wait (pthread_barrier_t *__barrier) ; > > > >extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) ; > > >extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) ; > > >extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * > __restrict __attr, > int *__restrict __pshared) ; > > >extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, > int __pshared) ; ># 901 "/usr/include/pthread.h" 3 4 >extern int pthread_key_create (pthread_key_t *__key, > void (*__destr_function) (void *)) ; > > >extern int pthread_key_delete (pthread_key_t __key) ; > > >extern void *pthread_getspecific (pthread_key_t __key) ; > > >extern int pthread_setspecific (pthread_key_t __key, > __const void *__pointer) ; > > > > >extern int pthread_getcpuclockid (pthread_t __thread_id, > clockid_t *__clock_id) ; ># 933 "/usr/include/pthread.h" 3 4 >extern int pthread_atfork (void (*__prepare) (void), > void (*__parent) (void), > void (*__child) (void)) ; > > ># 231 "../../../../../exports/include/X11/Xthreads.h" 2 >typedef pthread_t xthread_t; >typedef pthread_key_t xthread_key_t; >typedef pthread_cond_t xcondition_rec; >typedef pthread_mutex_t xmutex_rec; ># 287 "../../../../../exports/include/X11/Xthreads.h" >typedef xcondition_rec *xcondition_t; >typedef xmutex_rec *xmutex_t; ># 183 "../../../../../extras/Mesa/src/glthread.h" 2 > >typedef struct { > xthread_key_t key; > int initMagic; >} _glthread_TSD; > >typedef xthread_t _glthread_Thread; > >typedef xmutex_rec _glthread_Mutex; ># 278 "../../../../../extras/Mesa/src/glthread.h" >extern unsigned long >_glthread_GetID(void); > > >extern void >_glthread_InitTSD(_glthread_TSD *); > > >extern void * >_glthread_GetTSD(_glthread_TSD *); > > >extern void >_glthread_SetTSD(_glthread_TSD *, void *); ># 39 "../../../../../extras/Mesa/src/mtypes.h" 2 > ># 1 "../../../../../extras/Mesa/src/math/m_matrix.h" 1 ># 96 "../../../../../extras/Mesa/src/math/m_matrix.h" >typedef struct { > GLfloat *m; > GLfloat *inv; > GLuint flags; > GLuint type; >} GLmatrix; > > > > >extern void >_math_matrix_ctr( GLmatrix *m ); > >extern void >_math_matrix_dtr( GLmatrix *m ); > >extern void >_math_matrix_alloc_inv( GLmatrix *m ); > >extern void >_math_matrix_mul_matrix( GLmatrix *dest, const GLmatrix *a, const GLmatrix *b ); > >extern void >_math_matrix_mul_floats( GLmatrix *dest, const GLfloat *b ); > >extern void >_math_matrix_loadf( GLmatrix *mat, const GLfloat *m ); > >extern void >_math_matrix_translate( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z ); > >extern void >_math_matrix_rotate( GLmatrix *m, GLfloat angle, > GLfloat x, GLfloat y, GLfloat z ); > >extern void >_math_matrix_scale( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z ); > >extern void >_math_matrix_ortho( GLmatrix *mat, > GLfloat left, GLfloat right, > GLfloat bottom, GLfloat top, > GLfloat nearval, GLfloat farval ); > >extern void >_math_matrix_frustum( GLmatrix *mat, > GLfloat left, GLfloat right, > GLfloat bottom, GLfloat top, > GLfloat nearval, GLfloat farval ); > >extern void >_math_matrix_set_identity( GLmatrix *dest ); > >extern void >_math_matrix_copy( GLmatrix *to, const GLmatrix *from ); > >extern void >_math_matrix_analyse( GLmatrix *mat ); > >extern void >_math_matrix_print( const GLmatrix *m ); > > > > > > >extern void >_math_transposef( GLfloat to[16], const GLfloat from[16] ); > >extern void >_math_transposed( GLdouble to[16], const GLdouble from[16] ); > >extern void >_math_transposefd( GLfloat to[16], const GLdouble from[16] ); ># 41 "../../../../../extras/Mesa/src/mtypes.h" 2 ># 54 "../../../../../extras/Mesa/src/mtypes.h" > typedef GLubyte GLchan; ># 79 "../../../../../extras/Mesa/src/mtypes.h" > typedef GLshort GLaccum; ># 91 "../../../../../extras/Mesa/src/mtypes.h" > typedef GLubyte GLstencil; ># 104 "../../../../../extras/Mesa/src/mtypes.h" >typedef GLuint GLdepth; > > > > > >typedef int GLfixed; > > > > > > >struct _mesa_HashTable; >struct gl_texture_image; >struct gl_texture_object; >typedef struct __GLcontextRec GLcontext; >typedef struct __GLcontextModesRec GLvisual; >typedef struct gl_frame_buffer GLframebuffer; ># 178 "../../../../../extras/Mesa/src/mtypes.h" >struct gl_color_table { > GLenum Format; > GLenum IntFormat; > GLuint Size; > GLvoid *Table; > GLboolean FloatTable; > GLubyte RedSize; > GLubyte GreenSize; > GLubyte BlueSize; > GLubyte AlphaSize; > GLubyte LuminanceSize; > GLubyte IntensitySize; >}; ># 227 "../../../../../extras/Mesa/src/mtypes.h" >struct gl_shine_tab { > struct gl_shine_tab *next, *prev; > GLfloat tab[256 +1]; > GLfloat shininess; > GLuint refcount; >}; > > >struct gl_light { > struct gl_light *next; > struct gl_light *prev; > > GLfloat Ambient[4]; > GLfloat Diffuse[4]; > GLfloat Specular[4]; > GLfloat EyePosition[4]; > GLfloat EyeDirection[4]; > GLfloat SpotExponent; > GLfloat SpotCutoff; > GLfloat _CosCutoff; > GLfloat ConstantAttenuation; > GLfloat LinearAttenuation; > GLfloat QuadraticAttenuation; > GLboolean Enabled; > > > GLuint _Flags; > > GLfloat _Position[4]; > GLfloat _VP_inf_norm[3]; > GLfloat _h_inf_norm[3]; > GLfloat _NormDirection[4]; > GLfloat _VP_inf_spot_attenuation; > > GLfloat _SpotExpTable[512][2]; > GLfloat _MatAmbient[2][3]; > GLfloat _MatDiffuse[2][3]; > GLfloat _MatSpecular[2][3]; > GLfloat _dli; > GLfloat _sli; >}; > > >struct gl_lightmodel { > GLfloat Ambient[4]; > GLboolean LocalViewer; > GLboolean TwoSide; > GLenum ColorControl; > >}; > > >struct gl_material >{ > GLfloat Ambient[4]; > GLfloat Diffuse[4]; > GLfloat Specular[4]; > GLfloat Emission[4]; > GLfloat Shininess; > GLfloat AmbientIndex; > GLfloat DiffuseIndex; > GLfloat SpecularIndex; >}; > > > > > > > >struct gl_accum_attrib { > GLfloat ClearColor[4]; >}; ># 314 "../../../../../extras/Mesa/src/mtypes.h" >struct gl_colorbuffer_attrib { > GLuint ClearIndex; > GLclampf ClearColor[4]; > > GLuint IndexMask; > GLubyte ColorMask[4]; > > GLenum DrawBuffer; > GLubyte _DrawDestMask; > > > GLboolean AlphaEnabled; > GLenum AlphaFunc; > GLclampf AlphaRef; > > > GLboolean BlendEnabled; > GLenum BlendSrcRGB; > GLenum BlendDstRGB; > GLenum BlendSrcA; > GLenum BlendDstA; > GLenum BlendEquation; > GLfloat BlendColor[4]; > > > GLenum LogicOp; > GLboolean IndexLogicOpEnabled; > GLboolean ColorLogicOpEnabled; > GLboolean _LogicOpEnabled; > > GLboolean DitherFlag; >}; > > >struct gl_current_attrib { > > > GLfloat Attrib[16][4]; > > GLuint Index; > GLboolean EdgeFlag; > > > > > GLfloat RasterPos[4]; > GLfloat RasterDistance; > GLfloat RasterColor[4]; > GLfloat RasterSecondaryColor[4]; > GLuint RasterIndex; > GLfloat RasterTexCoords[8][4]; > GLboolean RasterPosValid; >}; > > >struct gl_depthbuffer_attrib { > GLenum Func; > GLfloat Clear; > GLboolean Test; > GLboolean Mask; > GLboolean OcclusionTest; >}; > > >struct gl_enable_attrib { > GLboolean AlphaTest; > GLboolean AutoNormal; > GLboolean Blend; > GLuint ClipPlanes; > GLboolean ColorMaterial; > GLboolean Convolution1D; > GLboolean Convolution2D; > GLboolean Separable2D; > GLboolean CullFace; > GLboolean DepthTest; > GLboolean Dither; > GLboolean Fog; > GLboolean Histogram; > GLboolean Light[8]; > GLboolean Lighting; > GLboolean LineSmooth; > GLboolean LineStipple; > GLboolean IndexLogicOp; > GLboolean ColorLogicOp; > GLboolean Map1Color4; > GLboolean Map1Index; > GLboolean Map1Normal; > GLboolean Map1TextureCoord1; > GLboolean Map1TextureCoord2; > GLboolean Map1TextureCoord3; > GLboolean Map1TextureCoord4; > GLboolean Map1Vertex3; > GLboolean Map1Vertex4; > GLboolean Map1Attrib[16]; > GLboolean Map2Color4; > GLboolean Map2Index; > GLboolean Map2Normal; > GLboolean Map2TextureCoord1; > GLboolean Map2TextureCoord2; > GLboolean Map2TextureCoord3; > GLboolean Map2TextureCoord4; > GLboolean Map2Vertex3; > GLboolean Map2Vertex4; > GLboolean Map2Attrib[16]; > GLboolean MinMax; > GLboolean Normalize; > GLboolean PixelTexture; > GLboolean PointSmooth; > GLboolean PolygonOffsetPoint; > GLboolean PolygonOffsetLine; > GLboolean PolygonOffsetFill; > GLboolean PolygonSmooth; > GLboolean PolygonStipple; > GLboolean RescaleNormals; > GLboolean Scissor; > GLboolean Stencil; > GLboolean MultisampleEnabled; > GLboolean SampleAlphaToCoverage; > GLboolean SampleAlphaToOne; > GLboolean SampleCoverage; > GLboolean SampleCoverageInvert; > GLboolean RasterPositionUnclipped; > GLuint Texture[8]; > GLuint TexGen[8]; > GLboolean VertexProgram; > GLboolean VertexProgramPointSize; > GLboolean VertexProgramTwoSide; > GLboolean PointSprite; >}; > > >struct gl_eval_attrib { > > GLboolean Map1Color4; > GLboolean Map1Index; > GLboolean Map1Normal; > GLboolean Map1TextureCoord1; > GLboolean Map1TextureCoord2; > GLboolean Map1TextureCoord3; > GLboolean Map1TextureCoord4; > GLboolean Map1Vertex3; > GLboolean Map1Vertex4; > GLboolean Map1Attrib[16]; > GLboolean Map2Color4; > GLboolean Map2Index; > GLboolean Map2Normal; > GLboolean Map2TextureCoord1; > GLboolean Map2TextureCoord2; > GLboolean Map2TextureCoord3; > GLboolean Map2TextureCoord4; > GLboolean Map2Vertex3; > GLboolean Map2Vertex4; > GLboolean Map2Attrib[16]; > GLboolean AutoNormal; > > GLint MapGrid1un; > GLfloat MapGrid1u1, MapGrid1u2, MapGrid1du; > GLint MapGrid2un, MapGrid2vn; > GLfloat MapGrid2u1, MapGrid2u2, MapGrid2du; > GLfloat MapGrid2v1, MapGrid2v2, MapGrid2dv; >}; > > >struct gl_fog_attrib { > GLboolean Enabled; > GLfloat Color[4]; > GLfloat Density; > GLfloat Start; > GLfloat End; > GLfloat Index; > GLenum Mode; > GLboolean ColorSumEnabled; > GLenum FogCoordinateSource; >}; > > >struct gl_hint_attrib { > > GLenum PerspectiveCorrection; > GLenum PointSmooth; > GLenum LineSmooth; > GLenum PolygonSmooth; > GLenum Fog; > GLenum ClipVolumeClipping; > GLenum TextureCompression; > GLenum GenerateMipmap; >}; > > >struct gl_histogram_attrib { > GLuint Width; > GLint Format; > GLuint Count[256][4]; > GLboolean Sink; > GLubyte RedSize; > GLubyte GreenSize; > GLubyte BlueSize; > GLubyte AlphaSize; > GLubyte LuminanceSize; >}; > > >struct gl_minmax_attrib { > GLenum Format; > GLboolean Sink; > GLfloat Min[4], Max[4]; >}; > > >struct gl_convolution_attrib { > GLenum Format; > GLenum InternalFormat; > GLuint Width; > GLuint Height; > GLfloat Filter[9 * 9 * 4]; >}; > > > > > > > >struct gl_light_attrib { > struct gl_light Light[8]; > struct gl_lightmodel Model; > > > > struct gl_material Material[2]; > > GLboolean Enabled; > GLenum ShadeModel; > GLenum ColorMaterialFace; > GLenum ColorMaterialMode; > GLuint ColorMaterialBitmask; > GLboolean ColorMaterialEnabled; > > struct gl_light EnabledList; > > > GLboolean _NeedVertices; > GLuint _Flags; > GLfloat _BaseColor[2][3]; >}; > > >struct gl_line_attrib { > GLboolean SmoothFlag; > GLboolean StippleFlag; > GLushort StipplePattern; > GLint StippleFactor; > GLfloat Width; > GLfloat _Width; >}; > > >struct gl_list_attrib { > GLuint ListBase; >}; > > >struct gl_list_opcode { > GLuint size; > void (*execute)( GLcontext *ctx, void *data ); > void (*destroy)( GLcontext *ctx, void *data ); > void (*print)( GLcontext *ctx, void *data ); >}; > > > >struct gl_list_extensions { > struct gl_list_opcode opcode[16]; > GLuint nr_opcodes; >}; > > >struct gl_multisample_attrib { > GLboolean Enabled; > GLboolean SampleAlphaToCoverage; > GLboolean SampleAlphaToOne; > GLboolean SampleCoverage; > GLfloat SampleCoverageValue; > GLboolean SampleCoverageInvert; >}; > > >struct gl_pixel_attrib { > GLenum ReadBuffer; > GLubyte _ReadSrcMask; > > > GLfloat RedBias, RedScale; > GLfloat GreenBias, GreenScale; > GLfloat BlueBias, BlueScale; > GLfloat AlphaBias, AlphaScale; > GLfloat DepthBias, DepthScale; > GLint IndexShift, IndexOffset; > GLboolean MapColorFlag; > GLboolean MapStencilFlag; > GLfloat ZoomX, ZoomY; > > GLint MapStoSsize; > GLint MapItoIsize; > GLint MapItoRsize; > GLint MapItoGsize; > GLint MapItoBsize; > GLint MapItoAsize; > GLint MapRtoRsize; > GLint MapGtoGsize; > GLint MapBtoBsize; > GLint MapAtoAsize; > GLint MapStoS[256]; > GLint MapItoI[256]; > GLfloat MapItoR[256]; > GLfloat MapItoG[256]; > GLfloat MapItoB[256]; > GLfloat MapItoA[256]; > GLubyte MapItoR8[256]; > GLubyte MapItoG8[256]; > GLubyte MapItoB8[256]; > GLubyte MapItoA8[256]; > GLfloat MapRtoR[256]; > GLfloat MapGtoG[256]; > GLfloat MapBtoB[256]; > GLfloat MapAtoA[256]; > > GLboolean HistogramEnabled; > GLboolean MinMaxEnabled; > > GLboolean PixelTextureEnabled; > GLenum FragmentRgbSource; > GLenum FragmentAlphaSource; > > GLfloat PostColorMatrixScale[4]; > GLfloat PostColorMatrixBias[4]; > > GLfloat ColorTableScale[4]; > GLfloat ColorTableBias[4]; > GLboolean ColorTableEnabled; > GLfloat PCCTscale[4]; > GLfloat PCCTbias[4]; > GLboolean PostConvolutionColorTableEnabled; > GLfloat PCMCTscale[4]; > GLfloat PCMCTbias[4]; > GLboolean PostColorMatrixColorTableEnabled; > > GLboolean Convolution1DEnabled; > GLboolean Convolution2DEnabled; > GLboolean Separable2DEnabled; > GLfloat ConvolutionBorderColor[3][4]; > GLenum ConvolutionBorderMode[3]; > GLfloat ConvolutionFilterScale[3][4]; > GLfloat ConvolutionFilterBias[3][4]; > GLfloat PostConvolutionScale[4]; > GLfloat PostConvolutionBias[4]; >}; > > >struct gl_point_attrib { > GLboolean SmoothFlag; > GLfloat Size; > GLfloat _Size; > GLfloat Params[3]; > GLfloat MinSize, MaxSize; > GLfloat Threshold; > GLboolean _Attenuated; > GLboolean PointSprite; > GLboolean CoordReplace[8]; > GLenum SpriteRMode; >}; > > >struct gl_polygon_attrib { > GLenum FrontFace; > GLenum FrontMode; > GLenum BackMode; > GLboolean _FrontBit; > GLboolean CullFlag; > GLboolean SmoothFlag; > GLboolean StippleFlag; > GLenum CullFaceMode; > GLfloat OffsetFactor; > GLfloat OffsetUnits; > GLboolean OffsetPoint; > GLboolean OffsetLine; > GLboolean OffsetFill; >}; > > >struct gl_scissor_attrib { > GLboolean Enabled; > GLint X, Y; > GLsizei Width, Height; >}; > > >struct gl_stencil_attrib { > GLboolean Enabled; > GLboolean TestTwoSide; > GLubyte ActiveFace; > GLenum Function[2]; > GLenum FailFunc[2]; > GLenum ZPassFunc[2]; > GLenum ZFailFunc[2]; > GLstencil Ref[2]; > GLstencil ValueMask[2]; > GLstencil WriteMask[2]; > GLstencil Clear; >}; ># 786 "../../../../../extras/Mesa/src/mtypes.h" >typedef void (*FetchTexelFunc)( const struct gl_texture_image *texImage, > GLint col, GLint row, GLint img, > GLvoid *texelOut ); > > >struct gl_texture_format { > GLint MesaFormat; > > GLenum BaseFormat; > > > > GLubyte RedBits; > GLubyte GreenBits; > GLubyte BlueBits; > GLubyte AlphaBits; > GLubyte LuminanceBits; > GLubyte IntensityBits; > GLubyte IndexBits; > GLubyte DepthBits; > > GLint TexelBytes; > > FetchTexelFunc FetchTexel1D; > FetchTexelFunc FetchTexel2D; > FetchTexelFunc FetchTexel3D; >}; > > > >struct gl_texture_image { > GLenum Format; > > > > > GLint IntFormat; > GLuint Border; > GLuint Width; > GLuint Height; > GLuint Depth; > GLuint RowStride; > GLuint Width2; > GLuint Height2; > GLuint Depth2; > GLuint WidthLog2; > GLuint HeightLog2; > GLuint DepthLog2; > GLuint MaxLog2; > GLfloat WidthScale; > GLfloat HeightScale; > GLfloat DepthScale; > GLvoid *Data; > GLboolean IsClientData; > > > const struct gl_texture_format *TexFormat; > > FetchTexelFunc FetchTexel; > > GLboolean IsCompressed; > GLuint CompressedSize; > > > void *DriverData; >}; > > > >struct gl_texture_object { > _glthread_Mutex Mutex; > GLint RefCount; > GLuint Name; > GLenum Target; > GLfloat Priority; > GLfloat BorderColor[4]; > GLchan _BorderChan[4]; > GLenum WrapS; > GLenum WrapT; > GLenum WrapR; > GLenum MinFilter; > GLenum MagFilter; > GLfloat MinLod; > GLfloat MaxLod; > GLfloat LodBias; > GLint BaseLevel; > GLint MaxLevel; > GLfloat MaxAnisotropy; > GLboolean CompareFlag; > GLenum CompareOperator; > GLfloat ShadowAmbient; > GLenum CompareMode; > GLenum CompareFunc; > GLenum DepthMode; > GLint _MaxLevel; > GLfloat _MaxLambda; > GLboolean GenerateMipmap; > > struct gl_texture_image *Image[12]; > > > > struct gl_texture_image *NegX[12]; > struct gl_texture_image *PosY[12]; > struct gl_texture_image *NegY[12]; > struct gl_texture_image *PosZ[12]; > struct gl_texture_image *NegZ[12]; > > > struct gl_color_table Palette; > > GLboolean Complete; > struct gl_texture_object *Next; > > > void *DriverData; >}; > > > >struct gl_texture_unit { > GLuint Enabled; > GLuint _ReallyEnabled; > > GLenum EnvMode; > GLfloat EnvColor[4]; > GLuint TexGenEnabled; > GLenum GenModeS; > GLenum GenModeT; > GLenum GenModeR; > GLenum GenModeQ; > GLuint _GenBitS; > GLuint _GenBitT; > GLuint _GenBitR; > GLuint _GenBitQ; > GLuint _GenFlags; > GLfloat ObjectPlaneS[4]; > GLfloat ObjectPlaneT[4]; > GLfloat ObjectPlaneR[4]; > GLfloat ObjectPlaneQ[4]; > GLfloat EyePlaneS[4]; > GLfloat EyePlaneT[4]; > GLfloat EyePlaneR[4]; > GLfloat EyePlaneQ[4]; > GLfloat LodBias; > > > GLenum CombineModeRGB; > GLenum CombineModeA; > GLenum CombineSourceRGB[3]; > GLenum CombineSourceA[3]; > GLenum CombineOperandRGB[3]; > GLenum CombineOperandA[3]; > GLuint CombineScaleShiftRGB; > GLuint CombineScaleShiftA; > > struct gl_texture_object *Current1D; > struct gl_texture_object *Current2D; > struct gl_texture_object *Current3D; > struct gl_texture_object *CurrentCubeMap; > struct gl_texture_object *CurrentRect; > > struct gl_texture_object *_Current; > > struct gl_texture_object Saved1D; > struct gl_texture_object Saved2D; > struct gl_texture_object Saved3D; > struct gl_texture_object SavedCubeMap; > struct gl_texture_object SavedRect; >}; > > > >struct gl_texture_attrib { > > GLuint CurrentUnit; > > GLuint _EnabledUnits; > GLuint _GenFlags; > GLuint _TexGenEnabled; > GLuint _TexMatEnabled; > > struct gl_texture_unit Unit[8]; > > struct gl_texture_object *Proxy1D; > struct gl_texture_object *Proxy2D; > struct gl_texture_object *Proxy3D; > struct gl_texture_object *ProxyCubeMap; > struct gl_texture_object *ProxyRect; > > > GLboolean SharedPalette; > struct gl_color_table Palette; >}; > > >struct gl_transform_attrib { > GLenum MatrixMode; > GLfloat EyeUserPlane[6][4]; > GLfloat _ClipUserPlane[6][4]; > GLuint ClipPlanesEnabled; > GLboolean Normalize; > GLboolean RescaleNormals; > GLboolean RasterPositionUnclipped; >}; > > >struct gl_viewport_attrib { > GLint X, Y; > GLsizei Width, Height; > GLfloat Near, Far; > GLmatrix _WindowMap; >}; > > > >struct gl_attrib_node { > GLbitfield kind; > void *data; > struct gl_attrib_node *next; >}; > > > > > >struct gl_pixelstore_attrib { > GLint Alignment; > GLint RowLength; > GLint SkipPixels; > GLint SkipRows; > GLint ImageHeight; > GLint SkipImages; > GLboolean SwapBytes; > GLboolean LsbFirst; > GLboolean ClientStorage; > GLboolean Invert; >}; ># 1032 "../../../../../extras/Mesa/src/mtypes.h" >struct gl_client_array { > GLint Size; > GLenum Type; > GLsizei Stride; > GLsizei StrideB; > void *Ptr; > GLuint Flags; > GLuint Enabled; >}; > > >struct gl_array_attrib { > struct gl_client_array Vertex; > struct gl_client_array Normal; > struct gl_client_array Color; > struct gl_client_array SecondaryColor; > struct gl_client_array FogCoord; > struct gl_client_array Index; > struct gl_client_array TexCoord[8]; > struct gl_client_array EdgeFlag; > > struct gl_client_array VertexAttrib[16]; > > GLint TexCoordInterleaveFactor; > GLint ActiveTexture; > GLuint LockFirst; > GLuint LockCount; > > GLuint _Enabled; > GLuint NewState; >}; > > >struct gl_feedback { > GLenum Type; > GLuint _Mask; > GLfloat *Buffer; > GLuint BufferSize; > GLuint Count; >}; > > >struct gl_selection { > GLuint *Buffer; > GLuint BufferSize; > GLuint BufferCount; > GLuint Hits; > GLuint NameStackDepth; > GLuint NameStack[64]; > GLboolean HitFlag; > GLfloat HitMinZ, HitMaxZ; >}; > > > > > >struct gl_1d_map { > GLuint Order; > GLfloat u1, u2, du; > GLfloat *Points; >}; > > > > > >struct gl_2d_map { > GLuint Uorder; > GLuint Vorder; > GLfloat u1, u2, du; > GLfloat v1, v2, dv; > GLfloat *Points; >}; > > > > > >struct gl_evaluators { > > struct gl_1d_map Map1Vertex3; > struct gl_1d_map Map1Vertex4; > struct gl_1d_map Map1Index; > struct gl_1d_map Map1Color4; > struct gl_1d_map Map1Normal; > struct gl_1d_map Map1Texture1; > struct gl_1d_map Map1Texture2; > struct gl_1d_map Map1Texture3; > struct gl_1d_map Map1Texture4; > struct gl_1d_map Map1Attrib[16]; > > > struct gl_2d_map Map2Vertex3; > struct gl_2d_map Map2Vertex4; > struct gl_2d_map Map2Index; > struct gl_2d_map Map2Color4; > struct gl_2d_map Map2Normal; > struct gl_2d_map Map2Texture1; > struct gl_2d_map Map2Texture2; > struct gl_2d_map Map2Texture3; > struct gl_2d_map Map2Texture4; > struct gl_2d_map Map2Attrib[16]; >}; ># 1163 "../../../../../extras/Mesa/src/mtypes.h" >struct vp_machine >{ > GLfloat Registers[(16 + 15 + 12 + 96)][4]; > GLint AddressReg; >}; > > > >enum vp_opcode >{ > MOV, > LIT, > RCP, > RSQ, > EXP, > LOG, > MUL, > ADD, > DP3, > DP4, > DST, > MIN, > MAX, > SLT, > SGE, > MAD, > ARL, > DPH, > RCC, > SUB, > ABS, > END >}; > > > >struct vp_src_register >{ > GLint Register; > GLuint Swizzle[4]; > GLboolean Negate; > GLboolean RelAddr; >}; > > > >struct vp_dst_register >{ > GLint Register; > GLboolean WriteMask[4]; >}; > > > >struct vp_instruction >{ > enum vp_opcode Opcode; > struct vp_src_register SrcReg[3]; > struct vp_dst_register DstReg; >}; > > > >struct vp_program >{ > GLubyte *String; > struct vp_instruction *Instructions; > GLenum Target; > GLint RefCount; > GLboolean IsPositionInvariant; > GLboolean Resident; > GLuint InputsRead; > GLuint OutputsWritten; >}; > > > > > >struct vertex_program_state >{ > GLboolean Enabled; > GLboolean PointSizeEnabled; > GLboolean TwoSideEnabled; > GLuint CurrentID; > GLint ErrorPos; > struct vp_program *Current; > struct vp_machine Machine; > > GLenum TrackMatrix[96 / 4]; > GLenum TrackMatrixTransform[96 / 4]; >}; > > > > > > >struct gl_shared_state { > _glthread_Mutex Mutex; > GLint RefCount; > struct _mesa_HashTable *DisplayList; > struct _mesa_HashTable *TexObjects; > struct gl_texture_object *TexObjectList; > > > struct gl_texture_object *Default1D; > struct gl_texture_object *Default2D; > struct gl_texture_object *Default3D; > struct gl_texture_object *DefaultCubeMap; > struct gl_texture_object *DefaultRect; > > > struct _mesa_HashTable *VertexPrograms; > > void *DriverData; >}; ># 1288 "../../../../../extras/Mesa/src/mtypes.h" >struct gl_frame_buffer { > GLvisual Visual; > > GLuint Width, Height; > > GLboolean UseSoftwareDepthBuffer; > GLboolean UseSoftwareAccumBuffer; > GLboolean UseSoftwareStencilBuffer; > GLboolean UseSoftwareAlphaBuffers; > > > GLvoid *DepthBuffer; > > > GLstencil *Stencil; > > > GLaccum *Accum; > > > GLvoid *FrontLeftAlpha; > GLvoid *BackLeftAlpha; > GLvoid *FrontRightAlpha; > GLvoid *BackRightAlpha; > > > GLint _Xmin, _Ymin; > GLint _Xmax, _Ymax; >}; > > > > > > >struct gl_constants { > GLint MaxTextureLevels; > GLint Max3DTextureLevels; > GLint MaxCubeTextureLevels; > GLint MaxTextureRectSize; > GLuint MaxTextureUnits; > GLfloat MaxTextureMaxAnisotropy; > GLfloat MaxTextureLodBias; > GLuint MaxArrayLockSize; > GLint SubPixelBits; > GLfloat MinPointSize, MaxPointSize; > GLfloat MinPointSizeAA, MaxPointSizeAA; > GLfloat PointSizeGranularity; > GLfloat MinLineWidth, MaxLineWidth; > GLfloat MinLineWidthAA, MaxLineWidthAA; > GLfloat LineWidthGranularity; > GLuint NumAuxBuffers; > GLuint MaxColorTableSize; > GLuint MaxConvolutionWidth; > GLuint MaxConvolutionHeight; > GLuint MaxClipPlanes; > GLuint MaxLights; >}; > > > > > >struct extension; >struct gl_extensions { > char *ext_string; > struct extension *ext_list; > > > > GLboolean ARB_depth_texture; > GLboolean ARB_imaging; > GLboolean ARB_multisample; > GLboolean ARB_multitexture; > GLboolean ARB_shadow; > GLboolean ARB_texture_border_clamp; > GLboolean ARB_texture_compression; > GLboolean ARB_texture_cube_map; > GLboolean ARB_texture_env_combine; > GLboolean ARB_texture_env_crossbar; > GLboolean ARB_texture_env_dot3; > GLboolean ARB_texture_mirrored_repeat; > GLboolean ARB_window_pos; > GLboolean ATI_texture_env_combine3; > GLboolean ATI_texture_mirror_once; > GLboolean EXT_blend_color; > GLboolean EXT_blend_func_separate; > GLboolean EXT_blend_logic_op; > GLboolean EXT_blend_minmax; > GLboolean EXT_blend_subtract; > GLboolean EXT_convolution; > GLboolean EXT_compiled_vertex_array; > GLboolean EXT_fog_coord; > GLboolean EXT_histogram; > GLboolean EXT_multi_draw_arrays; > GLboolean EXT_paletted_texture; > GLboolean EXT_point_parameters; > GLboolean EXT_shadow_funcs; > GLboolean EXT_secondary_color; > GLboolean EXT_shared_texture_palette; > GLboolean EXT_stencil_wrap; > GLboolean EXT_stencil_two_side; > GLboolean EXT_texture3D; > GLboolean EXT_texture_compression_s3tc; > GLboolean EXT_texture_env_add; > GLboolean EXT_texture_env_combine; > GLboolean EXT_texture_env_dot3; > GLboolean EXT_texture_filter_anisotropic; > GLboolean EXT_texture_lod_bias; > GLboolean EXT_vertex_array_set; > GLboolean HP_occlusion_test; > GLboolean IBM_rasterpos_clip; > GLboolean MESA_pack_invert; > GLboolean MESA_resize_buffers; > GLboolean MESA_ycbcr_texture; > GLboolean NV_blend_square; > GLboolean NV_point_sprite; > GLboolean NV_texture_rectangle; > GLboolean NV_vertex_program; > GLboolean NV_vertex_program1_1; > GLboolean SGI_color_matrix; > GLboolean SGI_color_table; > GLboolean SGIS_generate_mipmap; > GLboolean SGIS_pixel_texture; > GLboolean SGIS_texture_edge_clamp; > GLboolean SGIX_depth_texture; > GLboolean SGIX_pixel_texture; > GLboolean SGIX_shadow; > GLboolean SGIX_shadow_ambient; > GLboolean TDFX_texture_compression_FXT1; > GLboolean APPLE_client_storage; >}; > > > > > >struct matrix_stack >{ > GLmatrix *Top; > GLmatrix *Stack; > GLuint Depth; > GLuint MaxDepth; > GLuint DirtyFlag; >}; ># 1588 "../../../../../extras/Mesa/src/mtypes.h" >union node; >typedef union node Node; > > > ># 1 "../../../../../extras/Mesa/src/dd.h" 1 ># 33 "../../../../../extras/Mesa/src/dd.h" >struct gl_pixelstore_attrib; ># 52 "../../../../../extras/Mesa/src/dd.h" >struct dd_function_table { > > const GLubyte * (*GetString)( GLcontext *ctx, GLenum name ); > > > > > > void (*UpdateState)( GLcontext *ctx, GLuint new_state ); > > > > > > > void (*Clear)( GLcontext *ctx, GLbitfield mask, GLboolean all, > GLint x, GLint y, GLint width, GLint height ); ># 79 "../../../../../extras/Mesa/src/dd.h" > void (*DrawBuffer)( GLcontext *ctx, GLenum buffer ); > > > > > > > > void (*ReadBuffer)( GLcontext *ctx, GLenum buffer ); > > > > > void (*GetBufferSize)( GLframebuffer *buffer, > GLuint *width, GLuint *height ); > > > > > > void (*ResizeBuffers)( GLframebuffer *buffer ); > > > > > > > void (*Finish)( GLcontext *ctx ); > > > > > void (*Flush)( GLcontext *ctx ); > > > > > void (*Error)( GLcontext *ctx ); ># 126 "../../../../../extras/Mesa/src/dd.h" > void (*Accum)( GLcontext *ctx, GLenum op, GLfloat value, > GLint xpos, GLint ypos, GLint width, GLint height ); ># 136 "../../../../../extras/Mesa/src/dd.h" > void (*DrawPixels)( GLcontext *ctx, > GLint x, GLint y, GLsizei width, GLsizei height, > GLenum format, GLenum type, > const struct gl_pixelstore_attrib *unpack, > const GLvoid *pixels ); > > > > > void (*ReadPixels)( GLcontext *ctx, > GLint x, GLint y, GLsizei width, GLsizei height, > GLenum format, GLenum type, > const struct gl_pixelstore_attrib *unpack, > GLvoid *dest ); > > > > void (*CopyPixels)( GLcontext *ctx, > GLint srcx, GLint srcy, > GLsizei width, GLsizei height, > GLint dstx, GLint dsty, GLenum type ); > > > > > void (*Bitmap)( GLcontext *ctx, > GLint x, GLint y, GLsizei width, GLsizei height, > const struct gl_pixelstore_attrib *unpack, > const GLubyte *bitmap ); > > > > > > > const struct gl_texture_format * > (*ChooseTextureFormat)( GLcontext *ctx, GLint internalFormat, > GLenum srcFormat, GLenum srcType ); > > > > > > void (*TexImage1D)( GLcontext *ctx, GLenum target, GLint level, > GLint internalFormat, > GLint width, GLint border, > GLenum format, GLenum type, const GLvoid *pixels, > const struct gl_pixelstore_attrib *packing, > struct gl_texture_object *texObj, > struct gl_texture_image *texImage ); > void (*TexImage2D)( GLcontext *ctx, GLenum target, GLint level, > GLint internalFormat, > GLint width, GLint height, GLint border, > GLenum format, GLenum type, const GLvoid *pixels, > const struct gl_pixelstore_attrib *packing, > struct gl_texture_object *texObj, > struct gl_texture_image *texImage ); > void (*TexImage3D)( GLcontext *ctx, GLenum target, GLint level, > GLint internalFormat, > GLint width, GLint height, GLint depth, GLint border, > GLenum format, GLenum type, const GLvoid *pixels, > const struct gl_pixelstore_attrib *packing, > struct gl_texture_object *texObj, > struct gl_texture_image *texImage ); ># 212 "../../../../../extras/Mesa/src/dd.h" > void (*TexSubImage1D)( GLcontext *ctx, GLenum target, GLint level, > GLint xoffset, GLsizei width, > GLenum format, GLenum type, > const GLvoid *pixels, > const struct gl_pixelstore_attrib *packing, > struct gl_texture_object *texObj, > struct gl_texture_image *texImage ); > void (*TexSubImage2D)( GLcontext *ctx, GLenum target, GLint level, > GLint xoffset, GLint yoffset, > GLsizei width, GLsizei height, > GLenum format, GLenum type, > const GLvoid *pixels, > const struct gl_pixelstore_attrib *packing, > struct gl_texture_object *texObj, > struct gl_texture_image *texImage ); > void (*TexSubImage3D)( GLcontext *ctx, GLenum target, GLint level, > GLint xoffset, GLint yoffset, GLint zoffset, > GLsizei width, GLsizei height, GLint depth, > GLenum format, GLenum type, > const GLvoid *pixels, > const struct gl_pixelstore_attrib *packing, > struct gl_texture_object *texObj, > struct gl_texture_image *texImage ); ># 246 "../../../../../extras/Mesa/src/dd.h" > void (*CopyTexImage1D)( GLcontext *ctx, GLenum target, GLint level, > GLenum internalFormat, GLint x, GLint y, > GLsizei width, GLint border ); > void (*CopyTexImage2D)( GLcontext *ctx, GLenum target, GLint level, > GLenum internalFormat, GLint x, GLint y, > GLsizei width, GLsizei height, GLint border ); > > > > > void (*CopyTexSubImage1D)( GLcontext *ctx, GLenum target, GLint level, > GLint xoffset, > GLint x, GLint y, GLsizei width ); > void (*CopyTexSubImage2D)( GLcontext *ctx, GLenum target, GLint level, > GLint xoffset, GLint yoffset, > GLint x, GLint y, > GLsizei width, GLsizei height ); > void (*CopyTexSubImage3D)( GLcontext *ctx, GLenum target, GLint level, > GLint xoffset, GLint yoffset, GLint zoffset, > GLint x, GLint y, > GLsizei width, GLsizei height ); > > > > > GLboolean (*TestProxyTexImage)(GLcontext *ctx, GLenum target, > GLint level, GLint internalFormat, > GLenum format, GLenum type, > GLint width, GLint height, > GLint depth, GLint border); ># 285 "../../../../../extras/Mesa/src/dd.h" > void (*CompressedTexImage1D)( GLcontext *ctx, GLenum target, > GLint level, GLint internalFormat, > GLsizei width, GLint border, > GLsizei imageSize, const GLvoid *data, > struct gl_texture_object *texObj, > struct gl_texture_image *texImage ); > void (*CompressedTexImage2D)( GLcontext *ctx, GLenum target, > GLint level, GLint internalFormat, > GLsizei width, GLsizei height, GLint border, > GLsizei imageSize, const GLvoid *data, > struct gl_texture_object *texObj, > struct gl_texture_image *texImage ); > void (*CompressedTexImage3D)( GLcontext *ctx, GLenum target, > GLint level, GLint internalFormat, > GLsizei width, GLsizei height, GLsizei depth, > GLint border, > GLsizei imageSize, const GLvoid *data, > struct gl_texture_object *texObj, > struct gl_texture_image *texImage ); ># 316 "../../../../../extras/Mesa/src/dd.h" > void (*CompressedTexSubImage1D)(GLcontext *ctx, GLenum target, GLint level, > GLint xoffset, GLsizei width, > GLenum format, > GLsizei imageSize, const GLvoid *data, > struct gl_texture_object *texObj, > struct gl_texture_image *texImage); > void (*CompressedTexSubImage2D)(GLcontext *ctx, GLenum target, GLint level, > GLint xoffset, GLint yoffset, > GLsizei width, GLint height, > GLenum format, > GLsizei imageSize, const GLvoid *data, > struct gl_texture_object *texObj, > struct gl_texture_image *texImage); > void (*CompressedTexSubImage3D)(GLcontext *ctx, GLenum target, GLint level, > GLint xoffset, GLint yoffset, GLint zoffset, > GLsizei width, GLint height, GLint depth, > GLenum format, > GLsizei imageSize, const GLvoid *data, > struct gl_texture_object *texObj, > struct gl_texture_image *texImage); ># 351 "../../../../../extras/Mesa/src/dd.h" > void (*BindTexture)( GLcontext *ctx, GLenum target, > struct gl_texture_object *tObj ); > > > > void (*CreateTexture)( GLcontext *ctx, struct gl_texture_object *tObj ); > > > > void (*DeleteTexture)( GLcontext *ctx, struct gl_texture_object *tObj ); > > > > > GLboolean (*IsTextureResident)( GLcontext *ctx, > struct gl_texture_object *t ); > > > > void (*PrioritizeTexture)( GLcontext *ctx, struct gl_texture_object *t, > GLclampf priority ); > > > > void (*ActiveTexture)( GLcontext *ctx, GLuint texUnitNumber ); > > > > void (*UpdateTexturePalette)( GLcontext *ctx, > struct gl_texture_object *tObj ); ># 389 "../../../../../extras/Mesa/src/dd.h" > void (*CopyColorTable)( GLcontext *ctx, > GLenum target, GLenum internalformat, > GLint x, GLint y, GLsizei width ); > > void (*CopyColorSubTable)( GLcontext *ctx, > GLenum target, GLsizei start, > GLint x, GLint y, GLsizei width ); > > void (*CopyConvolutionFilter1D)( GLcontext *ctx, GLenum target, > GLenum internalFormat, > GLint x, GLint y, GLsizei width ); > > void (*CopyConvolutionFilter2D)( GLcontext *ctx, GLenum target, > GLenum internalFormat, > GLint x, GLint y, > GLsizei width, GLsizei height ); ># 415 "../../../../../extras/Mesa/src/dd.h" > void (*AlphaFunc)(GLcontext *ctx, GLenum func, GLfloat ref); > void (*BlendColor)(GLcontext *ctx, const GLfloat color[4]); > void (*BlendEquation)(GLcontext *ctx, GLenum mode); > void (*BlendFunc)(GLcontext *ctx, GLenum sfactor, GLenum dfactor); > void (*BlendFuncSeparate)(GLcontext *ctx, > GLenum sfactorRGB, GLenum dfactorRGB, > GLenum sfactorA, GLenum dfactorA); > void (*ClearColor)(GLcontext *ctx, const GLfloat color[4]); > void (*ClearDepth)(GLcontext *ctx, GLclampd d); > void (*ClearIndex)(GLcontext *ctx, GLuint index); > void (*ClearStencil)(GLcontext *ctx, GLint s); > void (*ClipPlane)(GLcontext *ctx, GLenum plane, const GLfloat *equation ); > void (*ColorMask)(GLcontext *ctx, GLboolean rmask, GLboolean gmask, > GLboolean bmask, GLboolean amask ); > void (*ColorMaterial)(GLcontext *ctx, GLenum face, GLenum mode); > void (*CullFace)(GLcontext *ctx, GLenum mode); > void (*FrontFace)(GLcontext *ctx, GLenum mode); > void (*DepthFunc)(GLcontext *ctx, GLenum func); > void (*DepthMask)(GLcontext *ctx, GLboolean flag); > void (*DepthRange)(GLcontext *ctx, GLclampd nearval, GLclampd farval); > void (*Enable)(GLcontext* ctx, GLenum cap, GLboolean state); > void (*Fogfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); > void (*Hint)(GLcontext *ctx, GLenum target, GLenum mode); > void (*IndexMask)(GLcontext *ctx, GLuint mask); > void (*Lightfv)(GLcontext *ctx, GLenum light, > GLenum pname, const GLfloat *params ); > void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); > void (*LineStipple)(GLcontext *ctx, GLint factor, GLushort pattern ); > void (*LineWidth)(GLcontext *ctx, GLfloat width); > void (*LogicOpcode)(GLcontext *ctx, GLenum opcode); > void (*PointParameterfv)(GLcontext *ctx, GLenum pname, > const GLfloat *params); > void (*PointSize)(GLcontext *ctx, GLfloat size); > void (*PolygonMode)(GLcontext *ctx, GLenum face, GLenum mode); > void (*PolygonOffset)(GLcontext *ctx, GLfloat factor, GLfloat units); > void (*PolygonStipple)(GLcontext *ctx, const GLubyte *mask ); > void (*RenderMode)(GLcontext *ctx, GLenum mode ); > void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); > void (*ShadeModel)(GLcontext *ctx, GLenum mode); > void (*StencilFunc)(GLcontext *ctx, GLenum func, GLint ref, GLuint mask); > void (*StencilMask)(GLcontext *ctx, GLuint mask); > void (*StencilOp)(GLcontext *ctx, GLenum fail, GLenum zfail, GLenum zpass); > void (*ActiveStencilFace)(GLcontext *ctx, GLuint face); > void (*TexGen)(GLcontext *ctx, GLenum coord, GLenum pname, > const GLfloat *params); > void (*TexEnv)(GLcontext *ctx, GLenum target, GLenum pname, > const GLfloat *param); > void (*TexParameter)(GLcontext *ctx, GLenum target, > struct gl_texture_object *texObj, > GLenum pname, const GLfloat *params); > void (*TextureMatrix)(GLcontext *ctx, GLuint unit, const GLmatrix *mat); > void (*Viewport)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); > > > > > > > void (*VertexPointer)(GLcontext *ctx, GLint size, GLenum type, > GLsizei stride, const GLvoid *ptr); > void (*NormalPointer)(GLcontext *ctx, GLenum type, > GLsizei stride, const GLvoid *ptr); > void (*ColorPointer)(GLcontext *ctx, GLint size, GLenum type, > GLsizei stride, const GLvoid *ptr); > void (*FogCoordPointer)(GLcontext *ctx, GLenum type, > GLsizei stride, const GLvoid *ptr); > void (*IndexPointer)(GLcontext *ctx, GLenum type, > GLsizei stride, const GLvoid *ptr); > void (*SecondaryColorPointer)(GLcontext *ctx, GLint size, GLenum type, > GLsizei stride, const GLvoid *ptr); > void (*TexCoordPointer)(GLcontext *ctx, GLint size, GLenum type, > GLsizei stride, const GLvoid *ptr); > void (*EdgeFlagPointer)(GLcontext *ctx, GLsizei stride, const GLvoid *ptr); > void (*VertexAttribPointer)(GLcontext *ctx, GLuint index, GLint size, > GLenum type, GLsizei stride, const GLvoid *ptr); > > > > > > > GLboolean (*GetBooleanv)(GLcontext *ctx, GLenum pname, GLboolean *result); > GLboolean (*GetDoublev)(GLcontext *ctx, GLenum pname, GLdouble *result); > GLboolean (*GetFloatv)(GLcontext *ctx, GLenum pname, GLfloat *result); > GLboolean (*GetIntegerv)(GLcontext *ctx, GLenum pname, GLint *result); > GLboolean (*GetPointerv)(GLcontext *ctx, GLenum pname, GLvoid **result); > > > > > > GLuint NeedValidate; > > > > > void (*ValidateTnlModule)( GLcontext *ctx, GLuint new_state ); ># 527 "../../../../../extras/Mesa/src/dd.h" > GLuint CurrentExecPrimitive; > > > > > GLuint CurrentSavePrimitive; > > > > > > > > GLuint NeedFlush; > > > > > > > > void (*FlushVertices)( GLcontext *ctx, GLuint flags ); ># 559 "../../../../../extras/Mesa/src/dd.h" > void (*LightingSpaceChange)( GLcontext *ctx ); > > > > > void (*NewList)( GLcontext *ctx, GLuint list, GLenum mode ); > void (*EndList)( GLcontext *ctx ); > > > > > > void (*BeginCallList)( GLcontext *ctx, GLuint list ); > void (*EndCallList)( GLcontext *ctx ); > > > > > void (*MakeCurrent)( GLcontext *ctx, GLframebuffer *drawBuffer, > GLframebuffer *readBuffer ); > > > > > void (*LockArraysEXT)( GLcontext *ctx, GLint first, GLsizei count ); > void (*UnlockArraysEXT)( GLcontext *ctx ); > > >}; > > > > > > >typedef struct { > void (*ArrayElement)( GLint ); > void (*Color3f)( GLfloat, GLfloat, GLfloat ); > void (*Color3fv)( const GLfloat * ); > void (*Color3ub)( GLubyte, GLubyte, GLubyte ); > void (*Color3ubv)( const GLubyte * ); > void (*Color4f)( GLfloat, GLfloat, GLfloat, GLfloat ); > void (*Color4fv)( const GLfloat * ); > void (*Color4ub)( GLubyte, GLubyte, GLubyte, GLubyte ); > void (*Color4ubv)( const GLubyte * ); > void (*EdgeFlag)( GLboolean ); > void (*EdgeFlagv)( const GLboolean * ); > void (*EvalCoord1f)( GLfloat ); > void (*EvalCoord1fv)( const GLfloat * ); > void (*EvalCoord2f)( GLfloat, GLfloat ); > void (*EvalCoord2fv)( const GLfloat * ); > void (*EvalPoint1)( GLint ); > void (*EvalPoint2)( GLint, GLint ); > void (*FogCoordfEXT)( GLfloat ); > void (*FogCoordfvEXT)( const GLfloat * ); > void (*Indexi)( GLint ); > void (*Indexiv)( const GLint * ); > void (*Materialfv)( GLenum face, GLenum pname, const GLfloat * ); > void (*MultiTexCoord1fARB)( GLenum, GLfloat ); > void (*MultiTexCoord1fvARB)( GLenum, const GLfloat * ); > void (*MultiTexCoord2fARB)( GLenum, GLfloat, GLfloat ); > void (*MultiTexCoord2fvARB)( GLenum, const GLfloat * ); > void (*MultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat ); > void (*MultiTexCoord3fvARB)( GLenum, const GLfloat * ); > void (*MultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat ); > void (*MultiTexCoord4fvARB)( GLenum, const GLfloat * ); > void (*Normal3f)( GLfloat, GLfloat, GLfloat ); > void (*Normal3fv)( const GLfloat * ); > void (*SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat ); > void (*SecondaryColor3fvEXT)( const GLfloat * ); > void (*SecondaryColor3ubEXT)( GLubyte, GLubyte, GLubyte ); > void (*SecondaryColor3ubvEXT)( const GLubyte * ); > void (*TexCoord1f)( GLfloat ); > void (*TexCoord1fv)( const GLfloat * ); > void (*TexCoord2f)( GLfloat, GLfloat ); > void (*TexCoord2fv)( const GLfloat * ); > void (*TexCoord3f)( GLfloat, GLfloat, GLfloat ); > void (*TexCoord3fv)( const GLfloat * ); > void (*TexCoord4f)( GLfloat, GLfloat, GLfloat, GLfloat ); > void (*TexCoord4fv)( const GLfloat * ); > void (*Vertex2f)( GLfloat, GLfloat ); > void (*Vertex2fv)( const GLfloat * ); > void (*Vertex3f)( GLfloat, GLfloat, GLfloat ); > void (*Vertex3fv)( const GLfloat * ); > void (*Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat ); > void (*Vertex4fv)( const GLfloat * ); > void (*CallList)( GLuint ); > void (*Begin)( GLenum ); > void (*End)( void ); > void (*VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); > void (*VertexAttrib4fvNV)( GLuint index, const GLfloat *v ); ># 667 "../../../../../extras/Mesa/src/dd.h" > void (*Rectf)( GLfloat, GLfloat, GLfloat, GLfloat ); > > > > void (*DrawArrays)( GLenum mode, GLint start, GLsizei count ); > void (*DrawElements)( GLenum mode, GLsizei count, GLenum type, > const GLvoid *indices ); > void (*DrawRangeElements)( GLenum mode, GLuint start, > GLuint end, GLsizei count, > GLenum type, const GLvoid *indices ); > > > > > > void (*EvalMesh1)( GLenum mode, GLint i1, GLint i2 ); > void (*EvalMesh2)( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ); ># 692 "../../../../../extras/Mesa/src/dd.h" > GLboolean prefer_float_colors; > > > >} GLvertexformat; ># 1594 "../../../../../extras/Mesa/src/mtypes.h" 2 > > > > > > > >struct gl_tnl_module { > > > GLvertexformat *Current; > > > > > void *Swapped[(sizeof(GLvertexformat) / sizeof(void *))][2]; > GLuint SwapCount; >}; ># 1620 "../../../../../extras/Mesa/src/mtypes.h" >struct __GLcontextRec { > > > > > > __GLimports imports; > __GLexports exports; > > > struct gl_shared_state *Shared; > > > struct _glapi_table *Save; > struct _glapi_table *Exec; > struct _glapi_table *CurrentDispatch; > > GLboolean ExecPrefersFloat; > GLboolean SavePrefersFloat; > > GLvisual Visual; > GLframebuffer *DrawBuffer; > GLframebuffer *ReadBuffer; > > > > > struct dd_function_table Driver; > > void *DriverCtx; > void *DriverMgrCtx; > > > struct gl_constants Const; > > > struct matrix_stack ModelviewMatrixStack; > struct matrix_stack ProjectionMatrixStack; > struct matrix_stack ColorMatrixStack; > struct matrix_stack TextureMatrixStack[8]; > struct matrix_stack ProgramMatrixStack[8]; > struct matrix_stack *CurrentStack; > > > GLmatrix _ModelProjectMatrix; > > > GLuint CallDepth; > GLboolean ExecuteFlag; > GLboolean CompileFlag; > Node *CurrentListPtr; > GLuint CurrentListNum; > Node *CurrentBlock; > GLuint CurrentPos; > > > struct gl_extensions Extensions; > > > GLuint AttribStackDepth; > struct gl_attrib_node *AttribStack[16]; > > > struct gl_accum_attrib Accum; > struct gl_colorbuffer_attrib Color; > struct gl_current_attrib Current; > struct gl_depthbuffer_attrib Depth; > struct gl_eval_attrib Eval; > struct gl_fog_attrib Fog; > struct gl_hint_attrib Hint; > struct gl_light_attrib Light; > struct gl_line_attrib Line; > struct gl_list_attrib List; > struct gl_multisample_attrib Multisample; > struct gl_pixel_attrib Pixel; > struct gl_point_attrib Point; > struct gl_polygon_attrib Polygon; > GLuint PolygonStipple[32]; > struct gl_scissor_attrib Scissor; > struct gl_stencil_attrib Stencil; > struct gl_texture_attrib Texture; > struct gl_transform_attrib Transform; > struct gl_viewport_attrib Viewport; > > > struct gl_histogram_attrib Histogram; > struct gl_minmax_attrib MinMax; > struct gl_convolution_attrib Convolution1D; > struct gl_convolution_attrib Convolution2D; > struct gl_convolution_attrib Separable2D; > > > GLuint ClientAttribStackDepth; > struct gl_attrib_node *ClientAttribStack[16]; > > > struct gl_array_attrib Array; > struct gl_pixelstore_attrib Pack; > struct gl_pixelstore_attrib Unpack; > > struct gl_evaluators EvalMap; > struct gl_feedback Feedback; > struct gl_selection Select; > > struct gl_color_table ColorTable; > struct gl_color_table ProxyColorTable; > struct gl_color_table PostConvolutionColorTable; > struct gl_color_table ProxyPostConvolutionColorTable; > struct gl_color_table PostColorMatrixColorTable; > struct gl_color_table ProxyPostColorMatrixColorTable; > > struct vertex_program_state VertexProgram; > > GLenum ErrorValue; > GLenum RenderMode; > GLuint NewState; > > > GLuint _TriangleCaps; > GLuint _ImageTransferState; > GLfloat _EyeZDir[3]; > GLfloat _ModelViewInvScale; > GLuint _NeedEyeCoords; > GLuint _NeedNormals; > > struct gl_shine_tab *_ShineTable[2]; > struct gl_shine_tab *_ShineTabList; > > struct gl_list_extensions listext; > > > GLboolean OcclusionResult; > GLboolean OcclusionResultSaved; > GLuint _Facing; > > > > > > GLuint DepthMax; > GLfloat DepthMaxF; > GLfloat MRD; > > > GLboolean CatchSignals; > > > GLboolean NoRaster; > GLboolean FirstTimeCurrent; > > > GLboolean NoDither; > > GLboolean Rendering; > > > > > > void *TraceDispatch; > void *TraceCtx; > > > > struct gl_tnl_module TnlModule; > > > > > void *swrast_context; > void *swsetup_context; > void *swtnl_context; > void *swtnl_im; > void *acache_context; > void *aelt_context; >}; > > > >extern const char *_mesa_prim_name[0x0009 +4]; ># 1813 "../../../../../extras/Mesa/src/mtypes.h" >enum _verbose { > VERBOSE_VARRAY = 0x0001, > VERBOSE_TEXTURE = 0x0002, > VERBOSE_IMMEDIATE = 0x0004, > VERBOSE_PIPELINE = 0x0008, > VERBOSE_DRIVER = 0x0010, > VERBOSE_STATE = 0x0020, > VERBOSE_API = 0x0040, > VERBOSE_DISPLAY_LIST = 0x0100, > VERBOSE_LIGHTING = 0x0200, > VERBOSE_PRIMS = 0x0400, > VERBOSE_VERTS = 0x0800 >}; > > >enum _debug { > DEBUG_ALWAYS_FLUSH = 0x1 >}; ># 32 "../../../../../extras/Mesa/src/depth.h" 2 > > > > > > >extern void >_mesa_ClearDepth( GLclampd depth ); > > >extern void >_mesa_DepthFunc( GLenum func ); > > >extern void >_mesa_DepthMask( GLboolean flag ); ># 36 "xm_tri.c" 2 ># 1 "../../../../../extras/Mesa/src/macros.h" 1 ># 37 "xm_tri.c" 2 ># 1 "../../../../../extras/Mesa/src/imports.h" 1 ># 104 "../../../../../extras/Mesa/src/imports.h" >extern void * >_mesa_malloc( size_t bytes ); > >extern void * >_mesa_calloc( size_t bytes ); > >extern void >_mesa_free( void *ptr ); > >extern void * >_mesa_align_malloc( size_t bytes, unsigned long alignment ); > >extern void * >_mesa_align_calloc( size_t bytes, unsigned long alignment ); > >extern void >_mesa_align_free( void *ptr ); > >extern void * >_mesa_memcpy( void *dest, const void *src, size_t n ); > >extern void >_mesa_memset( void *dst, int val, size_t n ); > >extern void >_mesa_memset16( unsigned short *dst, unsigned short val, size_t n ); > >extern void >_mesa_bzero( void *dst, size_t n ); > > >extern double >_mesa_sin(double a); > >extern double >_mesa_cos(double a); > >extern double >_mesa_sqrt(double x); > >extern double >_mesa_pow(double x, double y); > > >extern char * >_mesa_getenv( const char *var ); > >extern char * >_mesa_strstr( const char *haystack, const char *needle ); > >extern char * >_mesa_strncat( char *dest, const char *src, size_t n ); > >extern char * >_mesa_strcpy( char *dest, const char *src ); > >extern char * >_mesa_strncpy( char *dest, const char *src, size_t n ); > >extern size_t >_mesa_strlen( const char *s ); > >extern int >_mesa_strcmp( const char *s1, const char *s2 ); > >extern int >_mesa_strncmp( const char *s1, const char *s2, size_t n ); > >extern char * >_mesa_strdup( const char *s ); > >extern int >_mesa_atoi( const char *s ); > >extern double >_mesa_strtod( const char *s, char **end ); > >extern int >_mesa_sprintf( char *str, const char *fmt, ... ); > >extern void >_mesa_printf( const char *fmtString, ... ); > > >extern void >_mesa_warning( __GLcontext *gc, const char *fmtString, ... ); > >extern void >_mesa_problem( const __GLcontext *ctx, const char *fmtString, ... ); > >extern void >_mesa_error( __GLcontext *ctx, GLenum error, const char *fmtString, ... ); > >extern void >_mesa_debug( const __GLcontext *ctx, const char *fmtString, ... ); > > >extern void >_mesa_init_default_imports( __GLimports *imports, void *driverCtx ); ># 38 "xm_tri.c" 2 ># 1 "../../../../../extras/Mesa/src/mmath.h" 1 ># 154 "../../../../../extras/Mesa/src/mmath.h" >extern float gl_sqrt(float x); ># 346 "../../../../../extras/Mesa/src/mmath.h" >static __inline__ int ifloor(float f) >{ > > int ai, bi; > double af, bf; > union { int i; float f; } u; > > af = (3 << 22) + 0.5 + (double)f; > bf = (3 << 22) + 0.5 - (double)f; > u.f = af; ai = u.i; > u.f = bf; bi = u.i; > return (ai - bi) >> 1; > > > > >} > > > > > > >static __inline__ int iceil(float f) >{ > > int ai, bi; > double af, bf; > union { int i; float f; } u; > af = (3 << 22) + 0.5 + (double)f; > bf = (3 << 22) + 0.5 - (double)f; > u.f = af; ai = u.i; > u.f = bf; bi = u.i; > return (ai - bi + 1) >> 1; > > > > >} ># 439 "../../../../../extras/Mesa/src/mmath.h" >extern float _mesa_ubyte_to_float_color_tab[256]; ># 606 "../../../../../extras/Mesa/src/mmath.h" >static __inline__ int IS_INF_OR_NAN( float x ) >{ > union {float f; int i;} tmp; > tmp.f = x; > return !(int)((unsigned int)((tmp.i & 0x7fffffff)-0x7f800000) >> 31); >} ># 647 "../../../../../extras/Mesa/src/mmath.h" >static __inline__ GLfloat LOG2(GLfloat val) >{ > GLint *exp_ptr = (GLint *) &val; > GLint x = *exp_ptr; > const GLint log_2 = ((x >> 23) & 255) - 128; > x &= ~(255 << 23); > x += 127 << 23; > *exp_ptr = x; > val = ((-1.0f/3) * val + 2) * val - 2.0f/3; > return val + log_2; >} ># 670 "../../../../../extras/Mesa/src/mmath.h" >extern void >_mesa_init_math(void); > > >extern GLuint >_mesa_bitcount(GLuint n); ># 39 "xm_tri.c" 2 > ># 1 "../../../../../extras/Mesa/src/X/xmesaP.h" 1 ># 39 "../../../../../extras/Mesa/src/X/xmesaP.h" ># 1 "../../../../../extras/Mesa/include/GL/xmesa.h" 1 ># 80 "../../../../../extras/Mesa/include/GL/xmesa.h" ># 1 "../../../../../extras/Mesa/include/GL/xmesa_x.h" 1 ># 38 "../../../../../extras/Mesa/include/GL/xmesa_x.h" >typedef Display XMesaDisplay; >typedef Pixmap XMesaPixmap; >typedef Colormap XMesaColormap; >typedef Drawable XMesaDrawable; >typedef Window XMesaWindow; >typedef GC XMesaGC; >typedef XVisualInfo *XMesaVisualInfo; >typedef XImage XMesaImage; >typedef XPoint XMesaPoint; >typedef XColor XMesaColor; ># 81 "../../../../../extras/Mesa/include/GL/xmesa.h" 2 ># 110 "../../../../../extras/Mesa/include/GL/xmesa.h" >typedef struct xmesa_context *XMesaContext; > >typedef struct xmesa_visual *XMesaVisual; > >typedef struct xmesa_buffer *XMesaBuffer; ># 141 "../../../../../extras/Mesa/include/GL/xmesa.h" >extern XMesaVisual XMesaCreateVisual( XMesaDisplay *display, > XMesaVisualInfo visinfo, > GLboolean rgb_flag, > GLboolean alpha_flag, > GLboolean db_flag, > GLboolean stereo_flag, > GLboolean ximage_flag, > GLint depth_size, > GLint stencil_size, > GLint accum_red_size, > GLint accum_green_size, > GLint accum_blue_size, > GLint accum_alpha_size, > GLint num_samples, > GLint level, > GLint visualCaveat ); > > > > >extern void XMesaDestroyVisual( XMesaVisual v ); ># 173 "../../../../../extras/Mesa/include/GL/xmesa.h" >extern XMesaContext XMesaCreateContext( XMesaVisual v, > XMesaContext share_list ); > > > > > >extern void XMesaDestroyContext( XMesaContext c ); > > > > > >extern XMesaBuffer XMesaCreateWindowBuffer( XMesaVisual v, XMesaWindow w ); > > > > > >extern XMesaBuffer XMesaCreatePixmapBuffer( XMesaVisual v, > XMesaPixmap p, > XMesaColormap cmap ); > > > > > >extern void XMesaDestroyBuffer( XMesaBuffer b ); > > > > > > > >extern XMesaBuffer XMesaFindBuffer( XMesaDisplay *dpy, > XMesaDrawable d ); > > > > > > >extern GLboolean XMesaMakeCurrent( XMesaContext c, > XMesaBuffer b ); > > > > > > > >extern GLboolean XMesaMakeCurrent2( XMesaContext c, > XMesaBuffer drawBuffer, > XMesaBuffer readBuffer ); > > > > > >extern GLboolean XMesaUnbindContext( XMesaContext c ); > > > > > >extern XMesaContext XMesaGetCurrentContext( void ); > > > > > >extern XMesaBuffer XMesaGetCurrentBuffer( void ); > > > > > > >extern XMesaBuffer XMesaGetCurrentReadBuffer( void ); > > > > > > >extern void XMesaSwapBuffers( XMesaBuffer b ); > > > > > > > >extern void XMesaCopySubBuffer( XMesaBuffer b, > int x, > int y, > int width, > int height ); ># 284 "../../../../../extras/Mesa/include/GL/xmesa.h" >extern GLboolean XMesaGetBackBuffer( XMesaBuffer b, > XMesaPixmap *pixmap, > XMesaImage **ximage ); ># 300 "../../../../../extras/Mesa/include/GL/xmesa.h" >extern GLboolean XMesaGetDepthBuffer( XMesaBuffer b, > GLint *width, > GLint *height, > GLint *bytesPerValue, > void **buffer ); > > > > > > >extern void XMesaFlush( XMesaContext c ); > > > > > > > >extern const char *XMesaGetString( XMesaContext c, int name ); ># 329 "../../../../../extras/Mesa/include/GL/xmesa.h" >extern void XMesaGarbageCollect( void ); ># 342 "../../../../../extras/Mesa/include/GL/xmesa.h" >extern unsigned long XMesaDitherColor( XMesaContext xmesa, > GLint x, > GLint y, > GLfloat red, > GLfloat green, > GLfloat blue, > GLfloat alpha ); ># 362 "../../../../../extras/Mesa/include/GL/xmesa.h" >extern GLboolean XMesaSetFXmode( GLint mode ); ># 372 "../../../../../extras/Mesa/include/GL/xmesa.h" >extern void XMesaResizeBuffers( XMesaBuffer b ); > > > > > > > >extern XMesaBuffer XMesaCreatePBuffer(XMesaVisual v, XMesaColormap cmap, > unsigned int width, unsigned int height); ># 40 "../../../../../extras/Mesa/src/X/xmesaP.h" 2 > > > > > > > >extern _glthread_Mutex _xmesa_lock; > > > >typedef struct { > GLubyte b; > GLubyte g; > GLubyte r; >} bgr_t; > > > >typedef void (*clear_func)( GLcontext *ctx, > GLboolean all, GLint x, GLint y, > GLint width, GLint height ); > > > > > >struct xmesa_visual { > GLvisual mesa_visual; > XMesaDisplay *display; > > > > XVisualInfo *vishandle; > > XMesaVisualInfo visinfo; > GLint BitsPerPixel; > > GLint level; > GLint VisualCaveat; > > GLboolean ximage_flag; > > GLuint dithered_pf; > GLuint undithered_pf; > > GLfloat RedGamma; > GLfloat GreenGamma; > GLfloat BlueGamma; > > GLint rmult, gmult, bmult; > GLint index_bits; > > > GLint rshift, gshift, bshift; > GLubyte Kernel[16]; > unsigned long RtoPixel[512]; > unsigned long GtoPixel[512]; > unsigned long BtoPixel[512]; > GLubyte PixelToR[256]; > GLubyte PixelToG[256]; > GLubyte PixelToB[256]; > > > short hpcr_rgbTbl[3][256]; > GLboolean hpcr_clear_flag; > GLubyte hpcr_clear_ximage_pattern[2][16]; > XMesaImage *hpcr_clear_ximage; > XMesaPixmap hpcr_clear_pixmap; > > > int bitFlip; >}; > > > > > > >struct xmesa_context { > GLcontext *gl_ctx; > XMesaVisual xm_visual; > XMesaBuffer xm_draw_buffer; > XMesaBuffer xm_read_buffer; > XMesaBuffer xm_buffer; > > XMesaDisplay *display; > GLboolean swapbytes; > GLboolean direct; > > GLuint pixelformat; > > GLubyte clearcolor[4]; > unsigned long clearpixel; >}; > > > >typedef enum { > WINDOW, > GLXWINDOW, > PIXMAP, > PBUFFER >} BufferType; > > > > > >struct xmesa_buffer { > GLframebuffer mesa_buffer; > > GLboolean wasCurrent; > XMesaVisual xm_visual; > > XMesaDisplay *display; > BufferType type; > XMesaDrawable frontbuffer; > XMesaPixmap backpixmap; > XMesaImage *backimage; > > XMesaDrawable buffer; > > > XMesaColormap cmap; > > unsigned long selectedEvents; > > GLint db_state; > > > > > GLuint shm; ># 182 "../../../../../extras/Mesa/src/X/xmesaP.h" > XMesaImage *rowimage; > > GLuint width, height; > > GLint bottom; > GLubyte *ximage_origin1; > GLint ximage_width1; > GLushort *ximage_origin2; > GLint ximage_width2; > GLubyte *ximage_origin3; > GLint ximage_width3; > GLuint *ximage_origin4; > GLint ximage_width4; > > XMesaPixmap stipple_pixmap; > XMesaGC stipple_gc; > > XMesaGC gc; > XMesaGC cleargc; > XMesaGC swapgc; > > > > > > > unsigned long color_table[576]; > > > GLubyte pixel_to_r[65536]; > GLubyte pixel_to_g[65536]; > GLubyte pixel_to_b[65536]; > > > int num_alloced; > > > > unsigned long alloced_colors[256]; ># 231 "../../../../../extras/Mesa/src/X/xmesaP.h" > clear_func front_clear_func; > clear_func back_clear_func; > > struct xmesa_buffer *Next; >}; ># 337 "../../../../../extras/Mesa/src/X/xmesaP.h" >static int kernel8[4 * 4] = { > 0 * 256, 8 * 256, 2 * 256, 10 * 256, > 12 * 256, 4 * 256, 14 * 256, 6 * 256, > 3 * 256, 11 * 256, 1 * 256, 9 * 256, > 15 * 256, 7 * 256, 13 * 256, 5 * 256, >}; ># 373 "../../../../../extras/Mesa/src/X/xmesaP.h" >static GLushort DitherValues[16]; ># 421 "../../../../../extras/Mesa/src/X/xmesaP.h" >static const short HPCR_DRGB[3][2][16] = { >{ > { 16, -4, 1,-11, 14, -6, 3, -9, 15, -5, 2,-10, 13, -7, 4, -8}, > {-15, 5, 0, 12,-13, 7, -2, 10,-14, 6, -1, 11,-12, 8, -3, 9} >}, >{ > {-11, 15, -7, 3, -8, 14, -4, 2,-10, 16, -6, 4, -9, 13, -5, 1}, > { 12,-14, 8, -2, 9,-13, 5, -1, 11,-15, 7, -3, 10,-12, 6, 0} >}, >{ > { 6,-18, 26,-14, 2,-22, 30,-10, 8,-16, 28,-12, 4,-20, 32, -8}, > { -4, 20,-24, 16, 0, 24,-28, 12, -6, 18,-26, 14, -2, 22,-30, 10} >} >}; ># 447 "../../../../../extras/Mesa/src/X/xmesaP.h" >static int const kernel1[16] = { > 0*47, 9*47, 4*47, 12*47, > 6*47, 2*47, 14*47, 8*47, > 10*47, 1*47, 5*47, 11*47, > 7*47, 13*47, 3*47, 15*47 }; ># 497 "../../../../../extras/Mesa/src/X/xmesaP.h" >extern unsigned long >xmesa_color_to_pixel( XMesaContext xmesa, > GLubyte r, GLubyte g, GLubyte b, GLubyte a, > GLuint pixelFormat ); > >extern void xmesa_alloc_back_buffer( XMesaBuffer b ); > >extern void xmesa_init_pointers( GLcontext *ctx ); >extern void xmesa_update_state( GLcontext *ctx, GLuint new_state ); > >extern void xmesa_update_span_funcs( GLcontext *ctx ); > > > > >extern void xmesa_choose_point( GLcontext *ctx ); >extern void xmesa_choose_line( GLcontext *ctx ); >extern void xmesa_choose_triangle( GLcontext *ctx ); > > >extern void xmesa_register_swrast_functions( GLcontext *ctx ); > > > > >extern XMesaBuffer XMesaCreateWindowBuffer2( XMesaVisual v, > XMesaWindow w, > XMesaContext c > ); > > > > > >extern void XMesaSetVisualDisplay( XMesaDisplay *dpy, XMesaVisual v ); >extern GLboolean XMesaForceCurrent(XMesaContext c); >extern GLboolean XMesaLoseCurrent(XMesaContext c); >extern void XMesaReset( void ); > >extern void xmesa_resize_buffers( GLframebuffer *buffer ); ># 41 "xm_tri.c" 2 > > > ># 1 "../../../../../extras/Mesa/src/swrast/s_context.h" 1 ># 39 "../../../../../extras/Mesa/src/swrast/s_context.h" ># 1 "../../../../../extras/Mesa/src/swrast/swrast.h" 1 ># 64 "../../../../../extras/Mesa/src/swrast/swrast.h" >typedef struct { > > > GLfloat win[4]; > GLfloat texcoord[8][4]; > GLchan color[4]; > GLchan specular[4]; > GLfloat fog; > GLuint index; > GLfloat pointSize; >} SWvertex; ># 131 "../../../../../extras/Mesa/src/swrast/swrast.h" >struct span_arrays { > GLchan rgb[2048][3]; > GLchan rgba[2048][4]; > GLuint index[2048]; > GLchan spec[2048][4]; > GLint x[2048]; > GLint y[2048]; > GLdepth z[2048]; > GLfloat fog[2048]; > GLfloat texcoords[8][2048][4]; > GLfloat lambda[8][2048]; > GLfloat coverage[2048]; > > > GLubyte mask[2048]; >}; > > >struct sw_span { > GLint x, y; > > > > GLuint start, end; > > > GLboolean writeAll; > > > GLenum primitive; > > > GLuint facing; > > > > > > GLuint interpMask; ># 180 "../../../../../extras/Mesa/src/swrast/swrast.h" > GLfixed red, redStep; > GLfixed green, greenStep; > GLfixed blue, blueStep; > GLfixed alpha, alphaStep; > GLfixed specRed, specRedStep; > GLfixed specGreen, specGreenStep; > GLfixed specBlue, specBlueStep; > > GLfixed index, indexStep; > GLfixed z, zStep; > GLfloat fog, fogStep; > GLfloat tex[8][4]; > GLfloat texStepX[8][4]; > GLfloat texStepY[8][4]; > GLfixed intTex[2], intTexStep[2]; > > > > > > GLuint arrayMask; > > > > > > > > struct span_arrays *array; >}; ># 225 "../../../../../extras/Mesa/src/swrast/swrast.h" >struct swrast_device_driver; > > > > >extern void >_swrast_alloc_buffers( GLframebuffer *buffer ); > >extern void >_swrast_use_read_buffer( GLcontext *ctx ); > >extern void >_swrast_use_draw_buffer( GLcontext *ctx ); > >extern GLboolean >_swrast_CreateContext( GLcontext *ctx ); > >extern void >_swrast_DestroyContext( GLcontext *ctx ); > > > >extern struct swrast_device_driver * >_swrast_GetDeviceDriverReference( GLcontext *ctx ); > >extern void >_swrast_Bitmap( GLcontext *ctx, > GLint px, GLint py, > GLsizei width, GLsizei height, > const struct gl_pixelstore_attrib *unpack, > const GLubyte *bitmap ); > >extern void >_swrast_CopyPixels( GLcontext *ctx, > GLint srcx, GLint srcy, > GLint destx, GLint desty, > GLsizei width, GLsizei height, > GLenum type ); > >extern void >_swrast_DrawPixels( GLcontext *ctx, > GLint x, GLint y, > GLsizei width, GLsizei height, > GLenum format, GLenum type, > const struct gl_pixelstore_attrib *unpack, > const GLvoid *pixels ); > >extern void >_swrast_ReadPixels( GLcontext *ctx, > GLint x, GLint y, GLsizei width, GLsizei height, > GLenum format, GLenum type, > const struct gl_pixelstore_attrib *unpack, > GLvoid *pixels ); > >extern void >_swrast_Clear( GLcontext *ctx, GLbitfield mask, GLboolean all, > GLint x, GLint y, GLint width, GLint height ); > >extern void >_swrast_Accum( GLcontext *ctx, GLenum op, > GLfloat value, GLint xpos, GLint ypos, > GLint width, GLint height ); > > >extern void >_swrast_DrawBuffer( GLcontext *ctx, GLenum mode ); > > > > >extern void >_swrast_ResetLineStipple( GLcontext *ctx ); > > > > > > >extern void >_swrast_Point( GLcontext *ctx, const SWvertex *v ); > >extern void >_swrast_Line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 ); > >extern void >_swrast_Triangle( GLcontext *ctx, const SWvertex *v0, > const SWvertex *v1, const SWvertex *v2 ); > >extern void >_swrast_Quad( GLcontext *ctx, > const SWvertex *v0, const SWvertex *v1, > const SWvertex *v2, const SWvertex *v3); > >extern void >_swrast_flush( GLcontext *ctx ); > >extern void >_swrast_render_primitive( GLcontext *ctx, GLenum mode ); > >extern void >_swrast_render_start( GLcontext *ctx ); > >extern void >_swrast_render_finish( GLcontext *ctx ); > > > >extern void >_swrast_InvalidateState( GLcontext *ctx, GLuint new_state ); > > > >extern void >_swrast_allow_vertex_fog( GLcontext *ctx, GLboolean value ); > >extern void >_swrast_allow_pixel_fog( GLcontext *ctx, GLboolean value ); > > > >extern void >_swrast_print_vertex( GLcontext *ctx, const SWvertex *v ); > > > > > > >extern void >_swrast_CopyConvolutionFilter2D(GLcontext *ctx, GLenum target, > GLenum internalFormat, > GLint x, GLint y, GLsizei width, > GLsizei height); >extern void >_swrast_CopyConvolutionFilter1D(GLcontext *ctx, GLenum target, > GLenum internalFormat, > GLint x, GLint y, GLsizei width); >extern void >_swrast_CopyColorSubTable( GLcontext *ctx,GLenum target, GLsizei start, > GLint x, GLint y, GLsizei width); >extern void >_swrast_CopyColorTable( GLcontext *ctx, > GLenum target, GLenum internalformat, > GLint x, GLint y, GLsizei width); > > > > > > >extern void >_swrast_copy_teximage1d(GLcontext *ctx, GLenum target, GLint level, > GLenum internalFormat, > GLint x, GLint y, GLsizei width, GLint border); > >extern void >_swrast_copy_teximage2d(GLcontext *ctx, GLenum target, GLint level, > GLenum internalFormat, > GLint x, GLint y, GLsizei width, GLsizei height, > GLint border); > > >extern void >_swrast_copy_texsubimage1d(GLcontext *ctx, GLenum target, GLint level, > GLint xoffset, GLint x, GLint y, GLsizei width); > >extern void >_swrast_copy_texsubimage2d(GLcontext *ctx, > GLenum target, GLint level, > GLint xoffset, GLint yoffset, > GLint x, GLint y, GLsizei width, GLsizei height); > >extern void >_swrast_copy_texsubimage3d(GLcontext *ctx, > GLenum target, GLint level, > GLint xoffset, GLint yoffset, GLint zoffset, > GLint x, GLint y, GLsizei width, GLsizei height); > > > > > > >struct swrast_device_driver { > > void (*SetBuffer)( GLcontext *ctx, GLframebuffer *buffer, GLuint bufferBit); ># 429 "../../../../../extras/Mesa/src/swrast/swrast.h" > void (*SpanRenderStart)(GLcontext *ctx); > void (*SpanRenderFinish)(GLcontext *ctx); ># 446 "../../../../../extras/Mesa/src/swrast/swrast.h" > void (*WriteRGBASpan)( const GLcontext *ctx, > GLuint n, GLint x, GLint y, > const GLchan rgba[][4], const GLubyte mask[] ); > void (*WriteRGBSpan)( const GLcontext *ctx, > GLuint n, GLint x, GLint y, > const GLchan rgb[][3], const GLubyte mask[] ); > > > > > > void (*WriteMonoRGBASpan)( const GLcontext *ctx, GLuint n, GLint x, GLint y, > const GLchan color[4], const GLubyte mask[] ); > > > > void (*WriteRGBAPixels)( const GLcontext *ctx, > GLuint n, const GLint x[], const GLint y[], > const GLchan rgba[][4], const GLubyte mask[] ); > > > > void (*WriteMonoRGBAPixels)( const GLcontext *ctx, > GLuint n, const GLint x[], const GLint y[], > const GLchan color[4], const GLubyte mask[] ); > > > > void (*WriteCI32Span)( const GLcontext *ctx, GLuint n, GLint x, GLint y, > const GLuint index[], const GLubyte mask[] ); > void (*WriteCI8Span)( const GLcontext *ctx, GLuint n, GLint x, GLint y, > const GLubyte index[], const GLubyte mask[] ); > > > > > > void (*WriteMonoCISpan)( const GLcontext *ctx, GLuint n, GLint x, GLint y, > GLuint colorIndex, const GLubyte mask[] ); > > > > > void (*WriteCI32Pixels)( const GLcontext *ctx, > GLuint n, const GLint x[], const GLint y[], > const GLuint index[], const GLubyte mask[] ); > > > > > void (*WriteMonoCIPixels)( const GLcontext *ctx, > GLuint n, const GLint x[], const GLint y[], > GLuint colorIndex, const GLubyte mask[] ); ># 508 "../../../../../extras/Mesa/src/swrast/swrast.h" > void (*ReadCI32Span)( const GLcontext *ctx, > GLuint n, GLint x, GLint y, GLuint index[] ); > > > > void (*ReadRGBASpan)( const GLcontext *ctx, GLuint n, GLint x, GLint y, > GLchan rgba[][4] ); > > > > void (*ReadCI32Pixels)( const GLcontext *ctx, > GLuint n, const GLint x[], const GLint y[], > GLuint indx[], const GLubyte mask[] ); > > > > void (*ReadRGBAPixels)( const GLcontext *ctx, > GLuint n, const GLint x[], const GLint y[], > GLchan rgba[][4], const GLubyte mask[] ); ># 539 "../../../../../extras/Mesa/src/swrast/swrast.h" > void (*WriteDepthSpan)( GLcontext *ctx, GLuint n, GLint x, GLint y, > const GLdepth depth[], const GLubyte mask[] ); > > > > > void (*ReadDepthSpan)( GLcontext *ctx, GLuint n, GLint x, GLint y, > GLdepth depth[] ); > > > > > void (*WriteDepthPixels)( GLcontext *ctx, GLuint n, > const GLint x[], const GLint y[], > const GLdepth depth[], const GLubyte mask[] ); > > > > > void (*ReadDepthPixels)( GLcontext *ctx, GLuint n, > const GLint x[], const GLint y[], > GLdepth depth[] ); ># 571 "../../../../../extras/Mesa/src/swrast/swrast.h" > void (*WriteStencilSpan)( GLcontext *ctx, GLuint n, GLint x, GLint y, > const GLstencil stencil[], const GLubyte mask[] ); > > > > > > void (*ReadStencilSpan)( GLcontext *ctx, GLuint n, GLint x, GLint y, > GLstencil stencil[] ); > > > > void (*WriteStencilPixels)( GLcontext *ctx, GLuint n, > const GLint x[], const GLint y[], > const GLstencil stencil[], > const GLubyte mask[] ); > > > > > > void (*ReadStencilPixels)( GLcontext *ctx, GLuint n, > const GLint x[], const GLint y[], > GLstencil stencil[] ); > > >}; ># 40 "../../../../../extras/Mesa/src/swrast/s_context.h" 2 > > > > >typedef void (*TextureSampleFunc)( GLcontext *ctx, GLuint texUnit, > const struct gl_texture_object *tObj, > GLuint n, GLfloat texcoords[][4], > const GLfloat lambda[], GLchan rgba[][4] ); ># 59 "../../../../../extras/Mesa/src/swrast/s_context.h" >typedef void (*blend_func)( GLcontext *ctx, GLuint n, const GLubyte mask[], > GLchan src[][4], const GLchan dst[][4] ); > > >typedef void (*swrast_point_func)( GLcontext *ctx, const SWvertex *); > >typedef void (*swrast_line_func)( GLcontext *ctx, > const SWvertex *, const SWvertex *); > >typedef void (*swrast_tri_func)( GLcontext *ctx, const SWvertex *, > const SWvertex *, const SWvertex *); ># 107 "../../../../../extras/Mesa/src/swrast/s_context.h" >typedef struct >{ > > > struct swrast_device_driver Driver; > > > > > GLboolean AllowVertexFog; > GLboolean AllowPixelFog; > > > > > GLuint _RasterMask; > GLfloat _MinMagThresh[8]; > GLfloat _backface_sign; > GLboolean _PreferPixelFog; > GLboolean _AnyTextureCombine; > > > > GLboolean _IntegerAccumMode; > GLfloat _IntegerAccumScaler; > > > > > GLuint StippleCounter; > GLuint NewState; > GLuint StateChanges; > GLenum Primitive; > GLuint CurrentBuffer; > > > > > > void (*choose_point)( GLcontext * ); > void (*choose_line)( GLcontext * ); > void (*choose_triangle)( GLcontext * ); > > GLuint invalidate_point; > GLuint invalidate_line; > GLuint invalidate_triangle; > > > > > void (*InvalidateState)( GLcontext *ctx, GLuint new_state ); > > swrast_point_func Point; > swrast_line_func Line; > swrast_tri_func Triangle; > > > > > > > > swrast_point_func SpecPoint; > swrast_line_func SpecLine; > swrast_tri_func SpecTriangle; ># 180 "../../../../../extras/Mesa/src/swrast/s_context.h" > struct span_arrays *SpanArrays; > > > > > struct sw_span PointSpan; > > > > blend_func BlendFunc; > TextureSampleFunc TextureSample[8]; > > > > > GLchan *TexelBuffer; > >} SWcontext; > > >extern void >_swrast_validate_derived( GLcontext *ctx ); ># 45 "xm_tri.c" 2 ># 1 "../../../../../extras/Mesa/src/swrast/s_depth.h" 1 ># 35 "../../../../../extras/Mesa/src/swrast/s_depth.h" >extern GLvoid * >_mesa_zbuffer_address(GLcontext *ctx, GLint x, GLint y); > > > >extern GLuint >_mesa_depth_test_span( GLcontext *ctx, struct sw_span *span); > > > >extern void >_mesa_read_depth_span( GLcontext *ctx, > GLint n, GLint x, GLint y, GLdepth depth[] ); > > >extern void >_mesa_read_depth_span_float( GLcontext *ctx, GLint n, GLint x, GLint y, > GLfloat depth[] ); > > >extern void >_mesa_alloc_depth_buffer( GLframebuffer *buffer ); > > >extern void >_mesa_clear_depth_buffer( GLcontext *ctx ); ># 46 "xm_tri.c" 2 ># 1 "../../../../../extras/Mesa/src/swrast/s_triangle.h" 1 ># 38 "../../../../../extras/Mesa/src/swrast/s_triangle.h" >GLboolean _mesa_cull_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2); > > >void >_swrast_choose_triangle( GLcontext *ctx ); > >void >_swrast_add_spec_terms_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ); ># 47 "xm_tri.c" 2 ># 58 "xm_tri.c" >static void smooth_TRUECOLOR_z_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; > XMesaImage *img = xmesa->xm_buffer->backimage; ># 87 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > const GLint depthBits = ctx->Visual.depthBits; > const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; > const GLfloat maxDepth = ctx->DepthMaxF; > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); > > > (void) fixedToDepthShift; ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > GLfloat dzdx, dzdy; > > > > > > GLfloat drdx, drdy; > GLfloat dgdx, dgdy; > GLfloat dbdx, dbdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); > > > > > span.interpMask |= 0x008; > { > GLfloat eMaj_dz, eBot_dz; > eMaj_dz = vMax->win[2] - vMin->win[2]; > eBot_dz = vMid->win[2] - vMin->win[2]; > dzdx = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); > if (dzdx > maxDepth || dzdx < -maxDepth) { > > dzdx = 0.0; > dzdy = 0.0; > } > else { > dzdy = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); > } > if (depthBits <= 16) > span.zStep = (((int) ((((dzdx) * 2048.0f) >= 0.0F) ? (((dzdx) * 2048.0f) + 0.5F) : (((dzdx) * 2048.0f) - 0.5F)))); > else > span.zStep = (GLint) dzdx; > } ># 370 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.interpMask |= 0x001; > if (ctx->Light.ShadeModel == 0x1D01) { > GLfloat eMaj_dr, eBot_dr; > GLfloat eMaj_dg, eBot_dg; > GLfloat eMaj_db, eBot_db; > > > > eMaj_dr = (GLfloat) ((GLint) vMax->color[0] - > (GLint) vMin->color[0]); > eBot_dr = (GLfloat) ((GLint) vMid->color[0] - > (GLint) vMin->color[0]); > drdx = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); > span.redStep = (((int) ((((drdx) * 2048.0f) >= 0.0F) ? (((drdx) * 2048.0f) + 0.5F) : (((drdx) * 2048.0f) - 0.5F)))); > drdy = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); > eMaj_dg = (GLfloat) ((GLint) vMax->color[1] - > (GLint) vMin->color[1]); > eBot_dg = (GLfloat) ((GLint) vMid->color[1] - > (GLint) vMin->color[1]); > dgdx = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); > span.greenStep = (((int) ((((dgdx) * 2048.0f) >= 0.0F) ? (((dgdx) * 2048.0f) + 0.5F) : (((dgdx) * 2048.0f) - 0.5F)))); > dgdy = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); > eMaj_db = (GLfloat) ((GLint) vMax->color[2] - > (GLint) vMin->color[2]); > eBot_db = (GLfloat) ((GLint) vMid->color[2] - > (GLint) vMin->color[2]); > dbdx = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); > span.blueStep = (((int) ((((dbdx) * 2048.0f) >= 0.0F) ? (((dbdx) * 2048.0f) + 0.5F) : (((dbdx) * 2048.0f) - 0.5F)))); > dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); ># 408 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > ; > span.interpMask |= 0x200; > drdx = drdy = 0.0F; > dgdx = dgdy = 0.0F; > dbdx = dbdy = 0.0F; > span.redStep = 0; > span.greenStep = 0; > span.blueStep = 0; > > > > > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > > > > > > GLushort *zRow = ((void *)0); > int dZRowOuter = 0, dZRowInner; > > GLfixed fz = 0, fdzOuter = 0, fdzInner; > > > > > > GLfixed fr = 0, fdrOuter = 0, fdrInner; > GLfixed fg = 0, fdgOuter = 0, fdgInner; > GLfixed fb = 0, fdbOuter = 0, fdbInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; ># 857 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLfloat z0 = vLower->win[2]; > if (depthBits <= 16) { > > GLfloat tmp = (z0 * 2048.0f + > dzdx * adjx + dzdy * adjy) + 0x00000400; > if (tmp < 0xffffffff / 2) > fz = (GLfixed) tmp; > else > fz = 0xffffffff / 2; > fdzOuter = (((int) ((((dzdy + dxOuter * dzdx) * 2048.0f) >= 0.0F) ? (((dzdy + dxOuter * dzdx) * 2048.0f) + 0.5F) : (((dzdy + dxOuter * dzdx) * 2048.0f) - 0.5F)))); > } > else { > > fz = (GLint) (z0 + dzdx * ((adjx) * (1.0F / 2048.0f)) > + dzdy * ((adjy) * (1.0F / 2048.0f))); > fdzOuter = (GLint) (dzdy + dxOuter * dzdx); > } > > zRow = (GLushort *) > _mesa_zbuffer_address(ctx, ((fxLeftEdge) >> 11), span.y); > dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); > > } > > > > > > > > if (ctx->Light.ShadeModel == 0x1D01) { > fr = (GLfixed) (((vLower->color[0]) << 11) > + drdx * adjx + drdy * adjy) + 0x00000400; > fdrOuter = (((int) ((((drdy + dxOuter * drdx) * 2048.0f) >= 0.0F) ? (((drdy + dxOuter * drdx) * 2048.0f) + 0.5F) : (((drdy + dxOuter * drdx) * 2048.0f) - 0.5F)))); > fg = (GLfixed) (((vLower->color[1]) << 11) > + dgdx * adjx + dgdy * adjy) + 0x00000400; > fdgOuter = (((int) ((((dgdy + dxOuter * dgdx) * 2048.0f) >= 0.0F) ? (((dgdy + dxOuter * dgdx) * 2048.0f) + 0.5F) : (((dgdy + dxOuter * dgdx) * 2048.0f) - 0.5F)))); > fb = (GLfixed) (((vLower->color[2]) << 11) > + dbdx * adjx + dbdy * adjy) + 0x00000400; > fdbOuter = (((int) ((((dbdy + dxOuter * dbdx) * 2048.0f) >= 0.0F) ? (((dbdy + dxOuter * dbdx) * 2048.0f) + 0.5F) : (((dbdy + dxOuter * dbdx) * 2048.0f) - 0.5F)))); > > > > > > } > else { > ; > fr = ((v2->color[0]) << 11); > fg = ((v2->color[1]) << 11); > fb = ((v2->color[2]) << 11); > fdrOuter = fdgOuter = fdbOuter = 0; > > > > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } ># 1071 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > dZRowInner = dZRowOuter + sizeof(GLushort); > > fdzInner = fdzOuter + span.zStep; > > > > > > fdrInner = fdrOuter + span.redStep; > fdgInner = fdgOuter + span.greenStep; > fdbInner = fdbOuter + span.blueStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; > > > span.z = fz; > > > > > > span.red = fr; > span.green = fg; > span.blue = fb; ># 1179 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > > const GLint len = right - span.x - 1; > GLfixed ffrend = span.red + len * span.redStep; > GLfixed ffgend = span.green + len * span.greenStep; > GLfixed ffbend = span.blue + len * span.blueStep; > if (ffrend < 0) { > span.red -= ffrend; > if (span.red < 0) > span.red = 0; > } > if (ffgend < 0) { > span.green -= ffgend; > if (span.green < 0) > span.green = 0; > } > if (ffbend < 0) { > span.blue -= ffbend; > if (span.blue < 0) > span.blue = 0; > } > } ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLint x = span.x, y = ((xmesa->xm_buffer)->bottom-(span.y)); GLuint i; for (i = 0; i < span.end; i++, x++) { const GLushort z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { unsigned long p; p = xmesa->xm_visual->RtoPixel[((span.red) >> 11)] | xmesa->xm_visual->GtoPixel[((span.green) >> 11)] | xmesa->xm_visual->BtoPixel[((span.blue) >> 11)];; ((*((img)->f.put_pixel))((img), (x), (y), (p))); zRow[i] = z; } span.red += span.redStep; span.green += span.greenStep; span.blue += span.blueStep; span.z += span.zStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); > > fz += fdzOuter; > > > > > > fr += fdrOuter; > fg += fdgOuter; > fb += fdbOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); > > fz += fdzInner; > > > > > > fr += fdrInner; > fg += fdgInner; > fb += fdbInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 88 "xm_tri.c" 2 >} > > > > > > >static void smooth_8A8B8G8R_z_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 123 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > const GLint depthBits = ctx->Visual.depthBits; > const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; > const GLfloat maxDepth = ctx->DepthMaxF; > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); > > > (void) fixedToDepthShift; ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > GLfloat dzdx, dzdy; > > > > > > GLfloat drdx, drdy; > GLfloat dgdx, dgdy; > GLfloat dbdx, dbdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); > > > > > span.interpMask |= 0x008; > { > GLfloat eMaj_dz, eBot_dz; > eMaj_dz = vMax->win[2] - vMin->win[2]; > eBot_dz = vMid->win[2] - vMin->win[2]; > dzdx = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); > if (dzdx > maxDepth || dzdx < -maxDepth) { > > dzdx = 0.0; > dzdy = 0.0; > } > else { > dzdy = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); > } > if (depthBits <= 16) > span.zStep = (((int) ((((dzdx) * 2048.0f) >= 0.0F) ? (((dzdx) * 2048.0f) + 0.5F) : (((dzdx) * 2048.0f) - 0.5F)))); > else > span.zStep = (GLint) dzdx; > } ># 370 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.interpMask |= 0x001; > if (ctx->Light.ShadeModel == 0x1D01) { > GLfloat eMaj_dr, eBot_dr; > GLfloat eMaj_dg, eBot_dg; > GLfloat eMaj_db, eBot_db; > > > > eMaj_dr = (GLfloat) ((GLint) vMax->color[0] - > (GLint) vMin->color[0]); > eBot_dr = (GLfloat) ((GLint) vMid->color[0] - > (GLint) vMin->color[0]); > drdx = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); > span.redStep = (((int) ((((drdx) * 2048.0f) >= 0.0F) ? (((drdx) * 2048.0f) + 0.5F) : (((drdx) * 2048.0f) - 0.5F)))); > drdy = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); > eMaj_dg = (GLfloat) ((GLint) vMax->color[1] - > (GLint) vMin->color[1]); > eBot_dg = (GLfloat) ((GLint) vMid->color[1] - > (GLint) vMin->color[1]); > dgdx = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); > span.greenStep = (((int) ((((dgdx) * 2048.0f) >= 0.0F) ? (((dgdx) * 2048.0f) + 0.5F) : (((dgdx) * 2048.0f) - 0.5F)))); > dgdy = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); > eMaj_db = (GLfloat) ((GLint) vMax->color[2] - > (GLint) vMin->color[2]); > eBot_db = (GLfloat) ((GLint) vMid->color[2] - > (GLint) vMin->color[2]); > dbdx = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); > span.blueStep = (((int) ((((dbdx) * 2048.0f) >= 0.0F) ? (((dbdx) * 2048.0f) + 0.5F) : (((dbdx) * 2048.0f) - 0.5F)))); > dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); ># 408 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > ; > span.interpMask |= 0x200; > drdx = drdy = 0.0F; > dgdx = dgdy = 0.0F; > dbdx = dbdy = 0.0F; > span.redStep = 0; > span.greenStep = 0; > span.blueStep = 0; > > > > > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLuint *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; > > > > GLushort *zRow = ((void *)0); > int dZRowOuter = 0, dZRowInner; > > GLfixed fz = 0, fdzOuter = 0, fdzInner; > > > > > > GLfixed fr = 0, fdrOuter = 0, fdrInner; > GLfixed fg = 0, fdgOuter = 0, fdgInner; > GLfixed fb = 0, fdbOuter = 0, fdbInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLuint *) ( (xmesa->xm_buffer)->ximage_origin4 - (span.y) * (xmesa->xm_buffer)->ximage_width4 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLuint); > > } ># 857 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLfloat z0 = vLower->win[2]; > if (depthBits <= 16) { > > GLfloat tmp = (z0 * 2048.0f + > dzdx * adjx + dzdy * adjy) + 0x00000400; > if (tmp < 0xffffffff / 2) > fz = (GLfixed) tmp; > else > fz = 0xffffffff / 2; > fdzOuter = (((int) ((((dzdy + dxOuter * dzdx) * 2048.0f) >= 0.0F) ? (((dzdy + dxOuter * dzdx) * 2048.0f) + 0.5F) : (((dzdy + dxOuter * dzdx) * 2048.0f) - 0.5F)))); > } > else { > > fz = (GLint) (z0 + dzdx * ((adjx) * (1.0F / 2048.0f)) > + dzdy * ((adjy) * (1.0F / 2048.0f))); > fdzOuter = (GLint) (dzdy + dxOuter * dzdx); > } > > zRow = (GLushort *) > _mesa_zbuffer_address(ctx, ((fxLeftEdge) >> 11), span.y); > dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); > > } > > > > > > > > if (ctx->Light.ShadeModel == 0x1D01) { > fr = (GLfixed) (((vLower->color[0]) << 11) > + drdx * adjx + drdy * adjy) + 0x00000400; > fdrOuter = (((int) ((((drdy + dxOuter * drdx) * 2048.0f) >= 0.0F) ? (((drdy + dxOuter * drdx) * 2048.0f) + 0.5F) : (((drdy + dxOuter * drdx) * 2048.0f) - 0.5F)))); > fg = (GLfixed) (((vLower->color[1]) << 11) > + dgdx * adjx + dgdy * adjy) + 0x00000400; > fdgOuter = (((int) ((((dgdy + dxOuter * dgdx) * 2048.0f) >= 0.0F) ? (((dgdy + dxOuter * dgdx) * 2048.0f) + 0.5F) : (((dgdy + dxOuter * dgdx) * 2048.0f) - 0.5F)))); > fb = (GLfixed) (((vLower->color[2]) << 11) > + dbdx * adjx + dbdy * adjy) + 0x00000400; > fdbOuter = (((int) ((((dbdy + dxOuter * dbdx) * 2048.0f) >= 0.0F) ? (((dbdy + dxOuter * dbdx) * 2048.0f) + 0.5F) : (((dbdy + dxOuter * dbdx) * 2048.0f) - 0.5F)))); > > > > > > } > else { > ; > fr = ((v2->color[0]) << 11); > fg = ((v2->color[1]) << 11); > fb = ((v2->color[2]) << 11); > fdrOuter = fdgOuter = fdbOuter = 0; > > > > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLuint); > > > > dZRowInner = dZRowOuter + sizeof(GLushort); > > fdzInner = fdzOuter + span.zStep; > > > > > > fdrInner = fdrOuter + span.redStep; > fdgInner = fdgOuter + span.greenStep; > fdbInner = fdbOuter + span.blueStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; > > > span.z = fz; > > > > > > span.red = fr; > span.green = fg; > span.blue = fb; ># 1179 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > > const GLint len = right - span.x - 1; > GLfixed ffrend = span.red + len * span.redStep; > GLfixed ffgend = span.green + len * span.greenStep; > GLfixed ffbend = span.blue + len * span.blueStep; > if (ffrend < 0) { > span.red -= ffrend; > if (span.red < 0) > span.red = 0; > } > if (ffgend < 0) { > span.green -= ffgend; > if (span.green < 0) > span.green = 0; > } > if (ffbend < 0) { > span.blue -= ffbend; > if (span.blue < 0) > span.blue = 0; > } > } ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; for (i = 0; i < span.end; i++) { const GLushort z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { pRow[i] = ( ((((span.blue) >> 11)) << 16) | ((((span.green) >> 11)) << 8) | (((span.red) >> 11)) ); zRow[i] = z; } span.red += span.redStep; span.green += span.greenStep; span.blue += span.blueStep; span.z += span.zStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLuint *) ((GLubyte *) pRow + dPRowOuter); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); > > fz += fdzOuter; > > > > > > fr += fdrOuter; > fg += fdgOuter; > fb += fdbOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLuint *) ((GLubyte *) pRow + dPRowInner); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); > > fz += fdzInner; > > > > > > fr += fdrInner; > fg += fdgInner; > fb += fdbInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 124 "xm_tri.c" 2 >} > > > > > >static void smooth_8R8G8B_z_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 158 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > const GLint depthBits = ctx->Visual.depthBits; > const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; > const GLfloat maxDepth = ctx->DepthMaxF; > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); > > > (void) fixedToDepthShift; ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > GLfloat dzdx, dzdy; > > > > > > GLfloat drdx, drdy; > GLfloat dgdx, dgdy; > GLfloat dbdx, dbdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); > > > > > span.interpMask |= 0x008; > { > GLfloat eMaj_dz, eBot_dz; > eMaj_dz = vMax->win[2] - vMin->win[2]; > eBot_dz = vMid->win[2] - vMin->win[2]; > dzdx = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); > if (dzdx > maxDepth || dzdx < -maxDepth) { > > dzdx = 0.0; > dzdy = 0.0; > } > else { > dzdy = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); > } > if (depthBits <= 16) > span.zStep = (((int) ((((dzdx) * 2048.0f) >= 0.0F) ? (((dzdx) * 2048.0f) + 0.5F) : (((dzdx) * 2048.0f) - 0.5F)))); > else > span.zStep = (GLint) dzdx; > } ># 370 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.interpMask |= 0x001; > if (ctx->Light.ShadeModel == 0x1D01) { > GLfloat eMaj_dr, eBot_dr; > GLfloat eMaj_dg, eBot_dg; > GLfloat eMaj_db, eBot_db; > > > > eMaj_dr = (GLfloat) ((GLint) vMax->color[0] - > (GLint) vMin->color[0]); > eBot_dr = (GLfloat) ((GLint) vMid->color[0] - > (GLint) vMin->color[0]); > drdx = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); > span.redStep = (((int) ((((drdx) * 2048.0f) >= 0.0F) ? (((drdx) * 2048.0f) + 0.5F) : (((drdx) * 2048.0f) - 0.5F)))); > drdy = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); > eMaj_dg = (GLfloat) ((GLint) vMax->color[1] - > (GLint) vMin->color[1]); > eBot_dg = (GLfloat) ((GLint) vMid->color[1] - > (GLint) vMin->color[1]); > dgdx = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); > span.greenStep = (((int) ((((dgdx) * 2048.0f) >= 0.0F) ? (((dgdx) * 2048.0f) + 0.5F) : (((dgdx) * 2048.0f) - 0.5F)))); > dgdy = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); > eMaj_db = (GLfloat) ((GLint) vMax->color[2] - > (GLint) vMin->color[2]); > eBot_db = (GLfloat) ((GLint) vMid->color[2] - > (GLint) vMin->color[2]); > dbdx = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); > span.blueStep = (((int) ((((dbdx) * 2048.0f) >= 0.0F) ? (((dbdx) * 2048.0f) + 0.5F) : (((dbdx) * 2048.0f) - 0.5F)))); > dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); ># 408 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > ; > span.interpMask |= 0x200; > drdx = drdy = 0.0F; > dgdx = dgdy = 0.0F; > dbdx = dbdy = 0.0F; > span.redStep = 0; > span.greenStep = 0; > span.blueStep = 0; > > > > > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLuint *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; > > > > GLushort *zRow = ((void *)0); > int dZRowOuter = 0, dZRowInner; > > GLfixed fz = 0, fdzOuter = 0, fdzInner; > > > > > > GLfixed fr = 0, fdrOuter = 0, fdrInner; > GLfixed fg = 0, fdgOuter = 0, fdgInner; > GLfixed fb = 0, fdbOuter = 0, fdbInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLuint *) ( (xmesa->xm_buffer)->ximage_origin4 - (span.y) * (xmesa->xm_buffer)->ximage_width4 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLuint); > > } ># 857 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLfloat z0 = vLower->win[2]; > if (depthBits <= 16) { > > GLfloat tmp = (z0 * 2048.0f + > dzdx * adjx + dzdy * adjy) + 0x00000400; > if (tmp < 0xffffffff / 2) > fz = (GLfixed) tmp; > else > fz = 0xffffffff / 2; > fdzOuter = (((int) ((((dzdy + dxOuter * dzdx) * 2048.0f) >= 0.0F) ? (((dzdy + dxOuter * dzdx) * 2048.0f) + 0.5F) : (((dzdy + dxOuter * dzdx) * 2048.0f) - 0.5F)))); > } > else { > > fz = (GLint) (z0 + dzdx * ((adjx) * (1.0F / 2048.0f)) > + dzdy * ((adjy) * (1.0F / 2048.0f))); > fdzOuter = (GLint) (dzdy + dxOuter * dzdx); > } > > zRow = (GLushort *) > _mesa_zbuffer_address(ctx, ((fxLeftEdge) >> 11), span.y); > dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); > > } > > > > > > > > if (ctx->Light.ShadeModel == 0x1D01) { > fr = (GLfixed) (((vLower->color[0]) << 11) > + drdx * adjx + drdy * adjy) + 0x00000400; > fdrOuter = (((int) ((((drdy + dxOuter * drdx) * 2048.0f) >= 0.0F) ? (((drdy + dxOuter * drdx) * 2048.0f) + 0.5F) : (((drdy + dxOuter * drdx) * 2048.0f) - 0.5F)))); > fg = (GLfixed) (((vLower->color[1]) << 11) > + dgdx * adjx + dgdy * adjy) + 0x00000400; > fdgOuter = (((int) ((((dgdy + dxOuter * dgdx) * 2048.0f) >= 0.0F) ? (((dgdy + dxOuter * dgdx) * 2048.0f) + 0.5F) : (((dgdy + dxOuter * dgdx) * 2048.0f) - 0.5F)))); > fb = (GLfixed) (((vLower->color[2]) << 11) > + dbdx * adjx + dbdy * adjy) + 0x00000400; > fdbOuter = (((int) ((((dbdy + dxOuter * dbdx) * 2048.0f) >= 0.0F) ? (((dbdy + dxOuter * dbdx) * 2048.0f) + 0.5F) : (((dbdy + dxOuter * dbdx) * 2048.0f) - 0.5F)))); > > > > > > } > else { > ; > fr = ((v2->color[0]) << 11); > fg = ((v2->color[1]) << 11); > fb = ((v2->color[2]) << 11); > fdrOuter = fdgOuter = fdbOuter = 0; > > > > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLuint); > > > > dZRowInner = dZRowOuter + sizeof(GLushort); > > fdzInner = fdzOuter + span.zStep; > > > > > > fdrInner = fdrOuter + span.redStep; > fdgInner = fdgOuter + span.greenStep; > fdbInner = fdbOuter + span.blueStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; > > > span.z = fz; > > > > > > span.red = fr; > span.green = fg; > span.blue = fb; ># 1179 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > > const GLint len = right - span.x - 1; > GLfixed ffrend = span.red + len * span.redStep; > GLfixed ffgend = span.green + len * span.greenStep; > GLfixed ffbend = span.blue + len * span.blueStep; > if (ffrend < 0) { > span.red -= ffrend; > if (span.red < 0) > span.red = 0; > } > if (ffgend < 0) { > span.green -= ffgend; > if (span.green < 0) > span.green = 0; > } > if (ffbend < 0) { > span.blue -= ffbend; > if (span.blue < 0) > span.blue = 0; > } > } ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; for (i = 0; i < span.end; i++) { const GLushort z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { pRow[i] = ( ((((span.red) >> 11)) << 16) | ((((span.green) >> 11)) << 8) | (((span.blue) >> 11)) ); zRow[i] = z; } span.red += span.redStep; span.green += span.greenStep; span.blue += span.blueStep; span.z += span.zStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLuint *) ((GLubyte *) pRow + dPRowOuter); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); > > fz += fdzOuter; > > > > > > fr += fdrOuter; > fg += fdgOuter; > fb += fdbOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLuint *) ((GLubyte *) pRow + dPRowInner); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); > > fz += fdzInner; > > > > > > fr += fdrInner; > fg += fdgInner; > fb += fdbInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 159 "xm_tri.c" 2 >} > > > > > >static void smooth_8R8G8B24_z_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 195 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > const GLint depthBits = ctx->Visual.depthBits; > const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; > const GLfloat maxDepth = ctx->DepthMaxF; > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); > > > (void) fixedToDepthShift; ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > GLfloat dzdx, dzdy; > > > > > > GLfloat drdx, drdy; > GLfloat dgdx, dgdy; > GLfloat dbdx, dbdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); > > > > > span.interpMask |= 0x008; > { > GLfloat eMaj_dz, eBot_dz; > eMaj_dz = vMax->win[2] - vMin->win[2]; > eBot_dz = vMid->win[2] - vMin->win[2]; > dzdx = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); > if (dzdx > maxDepth || dzdx < -maxDepth) { > > dzdx = 0.0; > dzdy = 0.0; > } > else { > dzdy = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); > } > if (depthBits <= 16) > span.zStep = (((int) ((((dzdx) * 2048.0f) >= 0.0F) ? (((dzdx) * 2048.0f) + 0.5F) : (((dzdx) * 2048.0f) - 0.5F)))); > else > span.zStep = (GLint) dzdx; > } ># 370 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.interpMask |= 0x001; > if (ctx->Light.ShadeModel == 0x1D01) { > GLfloat eMaj_dr, eBot_dr; > GLfloat eMaj_dg, eBot_dg; > GLfloat eMaj_db, eBot_db; > > > > eMaj_dr = (GLfloat) ((GLint) vMax->color[0] - > (GLint) vMin->color[0]); > eBot_dr = (GLfloat) ((GLint) vMid->color[0] - > (GLint) vMin->color[0]); > drdx = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); > span.redStep = (((int) ((((drdx) * 2048.0f) >= 0.0F) ? (((drdx) * 2048.0f) + 0.5F) : (((drdx) * 2048.0f) - 0.5F)))); > drdy = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); > eMaj_dg = (GLfloat) ((GLint) vMax->color[1] - > (GLint) vMin->color[1]); > eBot_dg = (GLfloat) ((GLint) vMid->color[1] - > (GLint) vMin->color[1]); > dgdx = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); > span.greenStep = (((int) ((((dgdx) * 2048.0f) >= 0.0F) ? (((dgdx) * 2048.0f) + 0.5F) : (((dgdx) * 2048.0f) - 0.5F)))); > dgdy = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); > eMaj_db = (GLfloat) ((GLint) vMax->color[2] - > (GLint) vMin->color[2]); > eBot_db = (GLfloat) ((GLint) vMid->color[2] - > (GLint) vMin->color[2]); > dbdx = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); > span.blueStep = (((int) ((((dbdx) * 2048.0f) >= 0.0F) ? (((dbdx) * 2048.0f) + 0.5F) : (((dbdx) * 2048.0f) - 0.5F)))); > dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); ># 408 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > ; > span.interpMask |= 0x200; > drdx = drdy = 0.0F; > dgdx = dgdy = 0.0F; > dbdx = dbdy = 0.0F; > span.redStep = 0; > span.greenStep = 0; > span.blueStep = 0; > > > > > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > bgr_t *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; > > > > GLushort *zRow = ((void *)0); > int dZRowOuter = 0, dZRowInner; > > GLfixed fz = 0, fdzOuter = 0, fdzInner; > > > > > > GLfixed fr = 0, fdrOuter = 0, fdrInner; > GLfixed fg = 0, fdgOuter = 0, fdgInner; > GLfixed fb = 0, fdbOuter = 0, fdbInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (bgr_t *) ( (bgr_t *) ( (xmesa->xm_buffer)->ximage_origin3 - (span.y) * (xmesa->xm_buffer)->ximage_width3 + 3 * (((fxLeftEdge) >> 11)) )); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(bgr_t); > > } ># 857 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLfloat z0 = vLower->win[2]; > if (depthBits <= 16) { > > GLfloat tmp = (z0 * 2048.0f + > dzdx * adjx + dzdy * adjy) + 0x00000400; > if (tmp < 0xffffffff / 2) > fz = (GLfixed) tmp; > else > fz = 0xffffffff / 2; > fdzOuter = (((int) ((((dzdy + dxOuter * dzdx) * 2048.0f) >= 0.0F) ? (((dzdy + dxOuter * dzdx) * 2048.0f) + 0.5F) : (((dzdy + dxOuter * dzdx) * 2048.0f) - 0.5F)))); > } > else { > > fz = (GLint) (z0 + dzdx * ((adjx) * (1.0F / 2048.0f)) > + dzdy * ((adjy) * (1.0F / 2048.0f))); > fdzOuter = (GLint) (dzdy + dxOuter * dzdx); > } > > zRow = (GLushort *) > _mesa_zbuffer_address(ctx, ((fxLeftEdge) >> 11), span.y); > dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); > > } > > > > > > > > if (ctx->Light.ShadeModel == 0x1D01) { > fr = (GLfixed) (((vLower->color[0]) << 11) > + drdx * adjx + drdy * adjy) + 0x00000400; > fdrOuter = (((int) ((((drdy + dxOuter * drdx) * 2048.0f) >= 0.0F) ? (((drdy + dxOuter * drdx) * 2048.0f) + 0.5F) : (((drdy + dxOuter * drdx) * 2048.0f) - 0.5F)))); > fg = (GLfixed) (((vLower->color[1]) << 11) > + dgdx * adjx + dgdy * adjy) + 0x00000400; > fdgOuter = (((int) ((((dgdy + dxOuter * dgdx) * 2048.0f) >= 0.0F) ? (((dgdy + dxOuter * dgdx) * 2048.0f) + 0.5F) : (((dgdy + dxOuter * dgdx) * 2048.0f) - 0.5F)))); > fb = (GLfixed) (((vLower->color[2]) << 11) > + dbdx * adjx + dbdy * adjy) + 0x00000400; > fdbOuter = (((int) ((((dbdy + dxOuter * dbdx) * 2048.0f) >= 0.0F) ? (((dbdy + dxOuter * dbdx) * 2048.0f) + 0.5F) : (((dbdy + dxOuter * dbdx) * 2048.0f) - 0.5F)))); > > > > > > } > else { > ; > fr = ((v2->color[0]) << 11); > fg = ((v2->color[1]) << 11); > fb = ((v2->color[2]) << 11); > fdrOuter = fdgOuter = fdbOuter = 0; > > > > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(bgr_t); > > > > dZRowInner = dZRowOuter + sizeof(GLushort); > > fdzInner = fdzOuter + span.zStep; > > > > > > fdrInner = fdrOuter + span.redStep; > fdgInner = fdgOuter + span.greenStep; > fdbInner = fdbOuter + span.blueStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; > > > span.z = fz; > > > > > > span.red = fr; > span.green = fg; > span.blue = fb; ># 1179 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > > const GLint len = right - span.x - 1; > GLfixed ffrend = span.red + len * span.redStep; > GLfixed ffgend = span.green + len * span.greenStep; > GLfixed ffbend = span.blue + len * span.blueStep; > if (ffrend < 0) { > span.red -= ffrend; > if (span.red < 0) > span.red = 0; > } > if (ffgend < 0) { > span.green -= ffgend; > if (span.green < 0) > span.green = 0; > } > if (ffbend < 0) { > span.blue -= ffbend; > if (span.blue < 0) > span.blue = 0; > } > } ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; for (i = 0; i < span.end; i++) { const GLushort z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { bgr_t *ptr = pRow + i; ptr->r = ((span.red) >> 11); ptr->g = ((span.green) >> 11); ptr->b = ((span.blue) >> 11); zRow[i] = z; } span.red += span.redStep; span.green += span.greenStep; span.blue += span.blueStep; span.z += span.zStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (bgr_t *) ((GLubyte *) pRow + dPRowOuter); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); > > fz += fdzOuter; > > > > > > fr += fdrOuter; > fg += fdgOuter; > fb += fdbOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (bgr_t *) ((GLubyte *) pRow + dPRowInner); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); > > fz += fdzInner; > > > > > > fr += fdrInner; > fg += fdgInner; > fb += fdbInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 196 "xm_tri.c" 2 >} > > > > > >static void smooth_TRUEDITHER_z_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; > XMesaImage *img = xmesa->xm_buffer->backimage; ># 231 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > const GLint depthBits = ctx->Visual.depthBits; > const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; > const GLfloat maxDepth = ctx->DepthMaxF; > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); > > > (void) fixedToDepthShift; ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > GLfloat dzdx, dzdy; > > > > > > GLfloat drdx, drdy; > GLfloat dgdx, dgdy; > GLfloat dbdx, dbdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); > > > > > span.interpMask |= 0x008; > { > GLfloat eMaj_dz, eBot_dz; > eMaj_dz = vMax->win[2] - vMin->win[2]; > eBot_dz = vMid->win[2] - vMin->win[2]; > dzdx = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); > if (dzdx > maxDepth || dzdx < -maxDepth) { > > dzdx = 0.0; > dzdy = 0.0; > } > else { > dzdy = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); > } > if (depthBits <= 16) > span.zStep = (((int) ((((dzdx) * 2048.0f) >= 0.0F) ? (((dzdx) * 2048.0f) + 0.5F) : (((dzdx) * 2048.0f) - 0.5F)))); > else > span.zStep = (GLint) dzdx; > } ># 370 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.interpMask |= 0x001; > if (ctx->Light.ShadeModel == 0x1D01) { > GLfloat eMaj_dr, eBot_dr; > GLfloat eMaj_dg, eBot_dg; > GLfloat eMaj_db, eBot_db; > > > > eMaj_dr = (GLfloat) ((GLint) vMax->color[0] - > (GLint) vMin->color[0]); > eBot_dr = (GLfloat) ((GLint) vMid->color[0] - > (GLint) vMin->color[0]); > drdx = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); > span.redStep = (((int) ((((drdx) * 2048.0f) >= 0.0F) ? (((drdx) * 2048.0f) + 0.5F) : (((drdx) * 2048.0f) - 0.5F)))); > drdy = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); > eMaj_dg = (GLfloat) ((GLint) vMax->color[1] - > (GLint) vMin->color[1]); > eBot_dg = (GLfloat) ((GLint) vMid->color[1] - > (GLint) vMin->color[1]); > dgdx = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); > span.greenStep = (((int) ((((dgdx) * 2048.0f) >= 0.0F) ? (((dgdx) * 2048.0f) + 0.5F) : (((dgdx) * 2048.0f) - 0.5F)))); > dgdy = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); > eMaj_db = (GLfloat) ((GLint) vMax->color[2] - > (GLint) vMin->color[2]); > eBot_db = (GLfloat) ((GLint) vMid->color[2] - > (GLint) vMin->color[2]); > dbdx = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); > span.blueStep = (((int) ((((dbdx) * 2048.0f) >= 0.0F) ? (((dbdx) * 2048.0f) + 0.5F) : (((dbdx) * 2048.0f) - 0.5F)))); > dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); ># 408 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > ; > span.interpMask |= 0x200; > drdx = drdy = 0.0F; > dgdx = dgdy = 0.0F; > dbdx = dbdy = 0.0F; > span.redStep = 0; > span.greenStep = 0; > span.blueStep = 0; > > > > > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > > > > > > GLushort *zRow = ((void *)0); > int dZRowOuter = 0, dZRowInner; > > GLfixed fz = 0, fdzOuter = 0, fdzInner; > > > > > > GLfixed fr = 0, fdrOuter = 0, fdrInner; > GLfixed fg = 0, fdgOuter = 0, fdgInner; > GLfixed fb = 0, fdbOuter = 0, fdbInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; ># 857 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLfloat z0 = vLower->win[2]; > if (depthBits <= 16) { > > GLfloat tmp = (z0 * 2048.0f + > dzdx * adjx + dzdy * adjy) + 0x00000400; > if (tmp < 0xffffffff / 2) > fz = (GLfixed) tmp; > else > fz = 0xffffffff / 2; > fdzOuter = (((int) ((((dzdy + dxOuter * dzdx) * 2048.0f) >= 0.0F) ? (((dzdy + dxOuter * dzdx) * 2048.0f) + 0.5F) : (((dzdy + dxOuter * dzdx) * 2048.0f) - 0.5F)))); > } > else { > > fz = (GLint) (z0 + dzdx * ((adjx) * (1.0F / 2048.0f)) > + dzdy * ((adjy) * (1.0F / 2048.0f))); > fdzOuter = (GLint) (dzdy + dxOuter * dzdx); > } > > zRow = (GLushort *) > _mesa_zbuffer_address(ctx, ((fxLeftEdge) >> 11), span.y); > dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); > > } > > > > > > > > if (ctx->Light.ShadeModel == 0x1D01) { > fr = (GLfixed) (((vLower->color[0]) << 11) > + drdx * adjx + drdy * adjy) + 0x00000400; > fdrOuter = (((int) ((((drdy + dxOuter * drdx) * 2048.0f) >= 0.0F) ? (((drdy + dxOuter * drdx) * 2048.0f) + 0.5F) : (((drdy + dxOuter * drdx) * 2048.0f) - 0.5F)))); > fg = (GLfixed) (((vLower->color[1]) << 11) > + dgdx * adjx + dgdy * adjy) + 0x00000400; > fdgOuter = (((int) ((((dgdy + dxOuter * dgdx) * 2048.0f) >= 0.0F) ? (((dgdy + dxOuter * dgdx) * 2048.0f) + 0.5F) : (((dgdy + dxOuter * dgdx) * 2048.0f) - 0.5F)))); > fb = (GLfixed) (((vLower->color[2]) << 11) > + dbdx * adjx + dbdy * adjy) + 0x00000400; > fdbOuter = (((int) ((((dbdy + dxOuter * dbdx) * 2048.0f) >= 0.0F) ? (((dbdy + dxOuter * dbdx) * 2048.0f) + 0.5F) : (((dbdy + dxOuter * dbdx) * 2048.0f) - 0.5F)))); > > > > > > } > else { > ; > fr = ((v2->color[0]) << 11); > fg = ((v2->color[1]) << 11); > fb = ((v2->color[2]) << 11); > fdrOuter = fdgOuter = fdbOuter = 0; > > > > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } ># 1071 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > dZRowInner = dZRowOuter + sizeof(GLushort); > > fdzInner = fdzOuter + span.zStep; > > > > > > fdrInner = fdrOuter + span.redStep; > fdgInner = fdgOuter + span.greenStep; > fdbInner = fdbOuter + span.blueStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; > > > span.z = fz; > > > > > > span.red = fr; > span.green = fg; > span.blue = fb; ># 1179 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > > const GLint len = right - span.x - 1; > GLfixed ffrend = span.red + len * span.redStep; > GLfixed ffgend = span.green + len * span.greenStep; > GLfixed ffbend = span.blue + len * span.blueStep; > if (ffrend < 0) { > span.red -= ffrend; > if (span.red < 0) > span.red = 0; > } > if (ffgend < 0) { > span.green -= ffgend; > if (span.green < 0) > span.green = 0; > } > if (ffbend < 0) { > span.blue -= ffbend; > if (span.blue < 0) > span.blue = 0; > } > } ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; GLint x = span.x, y = ((xmesa->xm_buffer)->bottom-(span.y)); for (i = 0; i < span.end; i++, x++) { const GLushort z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { unsigned long p; { int d = xmesa->xm_visual->Kernel[((x)&3) | (((y)&3)<<2)]; p = xmesa->xm_visual->RtoPixel[(((span.red) >> 11))+d] | xmesa->xm_visual->GtoPixel[(((span.green) >> 11))+d] | xmesa->xm_visual->BtoPixel[(((span.blue) >> 11))+d]; }; ((*((img)->f.put_pixel))((img), (x), (y), (p))); zRow[i] = z; } span.red += span.redStep; span.green += span.greenStep; span.blue += span.blueStep; span.z += span.zStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); > > fz += fdzOuter; > > > > > > fr += fdrOuter; > fg += fdgOuter; > fb += fdbOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); > > fz += fdzInner; > > > > > > fr += fdrInner; > fg += fdgInner; > fb += fdbInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 232 "xm_tri.c" 2 >} > > > > > >static void smooth_5R6G5B_z_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 266 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > const GLint depthBits = ctx->Visual.depthBits; > const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; > const GLfloat maxDepth = ctx->DepthMaxF; > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); > > > (void) fixedToDepthShift; ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > GLfloat dzdx, dzdy; > > > > > > GLfloat drdx, drdy; > GLfloat dgdx, dgdy; > GLfloat dbdx, dbdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); > > > > > span.interpMask |= 0x008; > { > GLfloat eMaj_dz, eBot_dz; > eMaj_dz = vMax->win[2] - vMin->win[2]; > eBot_dz = vMid->win[2] - vMin->win[2]; > dzdx = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); > if (dzdx > maxDepth || dzdx < -maxDepth) { > > dzdx = 0.0; > dzdy = 0.0; > } > else { > dzdy = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); > } > if (depthBits <= 16) > span.zStep = (((int) ((((dzdx) * 2048.0f) >= 0.0F) ? (((dzdx) * 2048.0f) + 0.5F) : (((dzdx) * 2048.0f) - 0.5F)))); > else > span.zStep = (GLint) dzdx; > } ># 370 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.interpMask |= 0x001; > if (ctx->Light.ShadeModel == 0x1D01) { > GLfloat eMaj_dr, eBot_dr; > GLfloat eMaj_dg, eBot_dg; > GLfloat eMaj_db, eBot_db; > > > > eMaj_dr = (GLfloat) ((GLint) vMax->color[0] - > (GLint) vMin->color[0]); > eBot_dr = (GLfloat) ((GLint) vMid->color[0] - > (GLint) vMin->color[0]); > drdx = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); > span.redStep = (((int) ((((drdx) * 2048.0f) >= 0.0F) ? (((drdx) * 2048.0f) + 0.5F) : (((drdx) * 2048.0f) - 0.5F)))); > drdy = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); > eMaj_dg = (GLfloat) ((GLint) vMax->color[1] - > (GLint) vMin->color[1]); > eBot_dg = (GLfloat) ((GLint) vMid->color[1] - > (GLint) vMin->color[1]); > dgdx = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); > span.greenStep = (((int) ((((dgdx) * 2048.0f) >= 0.0F) ? (((dgdx) * 2048.0f) + 0.5F) : (((dgdx) * 2048.0f) - 0.5F)))); > dgdy = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); > eMaj_db = (GLfloat) ((GLint) vMax->color[2] - > (GLint) vMin->color[2]); > eBot_db = (GLfloat) ((GLint) vMid->color[2] - > (GLint) vMin->color[2]); > dbdx = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); > span.blueStep = (((int) ((((dbdx) * 2048.0f) >= 0.0F) ? (((dbdx) * 2048.0f) + 0.5F) : (((dbdx) * 2048.0f) - 0.5F)))); > dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); ># 408 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > ; > span.interpMask |= 0x200; > drdx = drdy = 0.0F; > dgdx = dgdy = 0.0F; > dbdx = dbdy = 0.0F; > span.redStep = 0; > span.greenStep = 0; > span.blueStep = 0; > > > > > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLushort *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; > > > > GLushort *zRow = ((void *)0); > int dZRowOuter = 0, dZRowInner; > > GLfixed fz = 0, fdzOuter = 0, fdzInner; > > > > > > GLfixed fr = 0, fdrOuter = 0, fdrInner; > GLfixed fg = 0, fdgOuter = 0, fdgInner; > GLfixed fb = 0, fdbOuter = 0, fdbInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLushort *) ( (xmesa->xm_buffer)->ximage_origin2 - (span.y) * (xmesa->xm_buffer)->ximage_width2 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLushort); > > } ># 857 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLfloat z0 = vLower->win[2]; > if (depthBits <= 16) { > > GLfloat tmp = (z0 * 2048.0f + > dzdx * adjx + dzdy * adjy) + 0x00000400; > if (tmp < 0xffffffff / 2) > fz = (GLfixed) tmp; > else > fz = 0xffffffff / 2; > fdzOuter = (((int) ((((dzdy + dxOuter * dzdx) * 2048.0f) >= 0.0F) ? (((dzdy + dxOuter * dzdx) * 2048.0f) + 0.5F) : (((dzdy + dxOuter * dzdx) * 2048.0f) - 0.5F)))); > } > else { > > fz = (GLint) (z0 + dzdx * ((adjx) * (1.0F / 2048.0f)) > + dzdy * ((adjy) * (1.0F / 2048.0f))); > fdzOuter = (GLint) (dzdy + dxOuter * dzdx); > } > > zRow = (GLushort *) > _mesa_zbuffer_address(ctx, ((fxLeftEdge) >> 11), span.y); > dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); > > } > > > > > > > > if (ctx->Light.ShadeModel == 0x1D01) { > fr = (GLfixed) (((vLower->color[0]) << 11) > + drdx * adjx + drdy * adjy) + 0x00000400; > fdrOuter = (((int) ((((drdy + dxOuter * drdx) * 2048.0f) >= 0.0F) ? (((drdy + dxOuter * drdx) * 2048.0f) + 0.5F) : (((drdy + dxOuter * drdx) * 2048.0f) - 0.5F)))); > fg = (GLfixed) (((vLower->color[1]) << 11) > + dgdx * adjx + dgdy * adjy) + 0x00000400; > fdgOuter = (((int) ((((dgdy + dxOuter * dgdx) * 2048.0f) >= 0.0F) ? (((dgdy + dxOuter * dgdx) * 2048.0f) + 0.5F) : (((dgdy + dxOuter * dgdx) * 2048.0f) - 0.5F)))); > fb = (GLfixed) (((vLower->color[2]) << 11) > + dbdx * adjx + dbdy * adjy) + 0x00000400; > fdbOuter = (((int) ((((dbdy + dxOuter * dbdx) * 2048.0f) >= 0.0F) ? (((dbdy + dxOuter * dbdx) * 2048.0f) + 0.5F) : (((dbdy + dxOuter * dbdx) * 2048.0f) - 0.5F)))); > > > > > > } > else { > ; > fr = ((v2->color[0]) << 11); > fg = ((v2->color[1]) << 11); > fb = ((v2->color[2]) << 11); > fdrOuter = fdgOuter = fdbOuter = 0; > > > > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLushort); > > > > dZRowInner = dZRowOuter + sizeof(GLushort); > > fdzInner = fdzOuter + span.zStep; > > > > > > fdrInner = fdrOuter + span.redStep; > fdgInner = fdgOuter + span.greenStep; > fdbInner = fdbOuter + span.blueStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; > > > span.z = fz; > > > > > > span.red = fr; > span.green = fg; > span.blue = fb; ># 1179 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > > const GLint len = right - span.x - 1; > GLfixed ffrend = span.red + len * span.redStep; > GLfixed ffgend = span.green + len * span.greenStep; > GLfixed ffbend = span.blue + len * span.blueStep; > if (ffrend < 0) { > span.red -= ffrend; > if (span.red < 0) > span.red = 0; > } > if (ffgend < 0) { > span.green -= ffgend; > if (span.green < 0) > span.green = 0; > } > if (ffbend < 0) { > span.blue -= ffbend; > if (span.blue < 0) > span.blue = 0; > } > } ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; for (i = 0; i < span.end; i++) { const GLushort z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { pRow[i] = ( (((((span.red) >> 11)) & 0xf8) << 8) | (((((span.green) >> 11)) & 0xfc) << 3) | ((((span.blue) >> 11)) >> 3) ); zRow[i] = z; } span.red += span.redStep; span.green += span.greenStep; span.blue += span.blueStep; span.z += span.zStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLushort *) ((GLubyte *) pRow + dPRowOuter); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); > > fz += fdzOuter; > > > > > > fr += fdrOuter; > fg += fdgOuter; > fb += fdbOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLushort *) ((GLubyte *) pRow + dPRowInner); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); > > fz += fdzInner; > > > > > > fr += fdrInner; > fg += fdgInner; > fb += fdbInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 267 "xm_tri.c" 2 >} > > > > > >static void smooth_DITHER_5R6G5B_z_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 302 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > const GLint depthBits = ctx->Visual.depthBits; > const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; > const GLfloat maxDepth = ctx->DepthMaxF; > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); > > > (void) fixedToDepthShift; ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > GLfloat dzdx, dzdy; > > > > > > GLfloat drdx, drdy; > GLfloat dgdx, dgdy; > GLfloat dbdx, dbdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); > > > > > span.interpMask |= 0x008; > { > GLfloat eMaj_dz, eBot_dz; > eMaj_dz = vMax->win[2] - vMin->win[2]; > eBot_dz = vMid->win[2] - vMin->win[2]; > dzdx = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); > if (dzdx > maxDepth || dzdx < -maxDepth) { > > dzdx = 0.0; > dzdy = 0.0; > } > else { > dzdy = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); > } > if (depthBits <= 16) > span.zStep = (((int) ((((dzdx) * 2048.0f) >= 0.0F) ? (((dzdx) * 2048.0f) + 0.5F) : (((dzdx) * 2048.0f) - 0.5F)))); > else > span.zStep = (GLint) dzdx; > } ># 370 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.interpMask |= 0x001; > if (ctx->Light.ShadeModel == 0x1D01) { > GLfloat eMaj_dr, eBot_dr; > GLfloat eMaj_dg, eBot_dg; > GLfloat eMaj_db, eBot_db; > > > > eMaj_dr = (GLfloat) ((GLint) vMax->color[0] - > (GLint) vMin->color[0]); > eBot_dr = (GLfloat) ((GLint) vMid->color[0] - > (GLint) vMin->color[0]); > drdx = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); > span.redStep = (((int) ((((drdx) * 2048.0f) >= 0.0F) ? (((drdx) * 2048.0f) + 0.5F) : (((drdx) * 2048.0f) - 0.5F)))); > drdy = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); > eMaj_dg = (GLfloat) ((GLint) vMax->color[1] - > (GLint) vMin->color[1]); > eBot_dg = (GLfloat) ((GLint) vMid->color[1] - > (GLint) vMin->color[1]); > dgdx = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); > span.greenStep = (((int) ((((dgdx) * 2048.0f) >= 0.0F) ? (((dgdx) * 2048.0f) + 0.5F) : (((dgdx) * 2048.0f) - 0.5F)))); > dgdy = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); > eMaj_db = (GLfloat) ((GLint) vMax->color[2] - > (GLint) vMin->color[2]); > eBot_db = (GLfloat) ((GLint) vMid->color[2] - > (GLint) vMin->color[2]); > dbdx = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); > span.blueStep = (((int) ((((dbdx) * 2048.0f) >= 0.0F) ? (((dbdx) * 2048.0f) + 0.5F) : (((dbdx) * 2048.0f) - 0.5F)))); > dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); ># 408 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > ; > span.interpMask |= 0x200; > drdx = drdy = 0.0F; > dgdx = dgdy = 0.0F; > dbdx = dbdy = 0.0F; > span.redStep = 0; > span.greenStep = 0; > span.blueStep = 0; > > > > > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLushort *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; > > > > GLushort *zRow = ((void *)0); > int dZRowOuter = 0, dZRowInner; > > GLfixed fz = 0, fdzOuter = 0, fdzInner; > > > > > > GLfixed fr = 0, fdrOuter = 0, fdrInner; > GLfixed fg = 0, fdgOuter = 0, fdgInner; > GLfixed fb = 0, fdbOuter = 0, fdbInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLushort *) ( (xmesa->xm_buffer)->ximage_origin2 - (span.y) * (xmesa->xm_buffer)->ximage_width2 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLushort); > > } ># 857 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLfloat z0 = vLower->win[2]; > if (depthBits <= 16) { > > GLfloat tmp = (z0 * 2048.0f + > dzdx * adjx + dzdy * adjy) + 0x00000400; > if (tmp < 0xffffffff / 2) > fz = (GLfixed) tmp; > else > fz = 0xffffffff / 2; > fdzOuter = (((int) ((((dzdy + dxOuter * dzdx) * 2048.0f) >= 0.0F) ? (((dzdy + dxOuter * dzdx) * 2048.0f) + 0.5F) : (((dzdy + dxOuter * dzdx) * 2048.0f) - 0.5F)))); > } > else { > > fz = (GLint) (z0 + dzdx * ((adjx) * (1.0F / 2048.0f)) > + dzdy * ((adjy) * (1.0F / 2048.0f))); > fdzOuter = (GLint) (dzdy + dxOuter * dzdx); > } > > zRow = (GLushort *) > _mesa_zbuffer_address(ctx, ((fxLeftEdge) >> 11), span.y); > dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); > > } > > > > > > > > if (ctx->Light.ShadeModel == 0x1D01) { > fr = (GLfixed) (((vLower->color[0]) << 11) > + drdx * adjx + drdy * adjy) + 0x00000400; > fdrOuter = (((int) ((((drdy + dxOuter * drdx) * 2048.0f) >= 0.0F) ? (((drdy + dxOuter * drdx) * 2048.0f) + 0.5F) : (((drdy + dxOuter * drdx) * 2048.0f) - 0.5F)))); > fg = (GLfixed) (((vLower->color[1]) << 11) > + dgdx * adjx + dgdy * adjy) + 0x00000400; > fdgOuter = (((int) ((((dgdy + dxOuter * dgdx) * 2048.0f) >= 0.0F) ? (((dgdy + dxOuter * dgdx) * 2048.0f) + 0.5F) : (((dgdy + dxOuter * dgdx) * 2048.0f) - 0.5F)))); > fb = (GLfixed) (((vLower->color[2]) << 11) > + dbdx * adjx + dbdy * adjy) + 0x00000400; > fdbOuter = (((int) ((((dbdy + dxOuter * dbdx) * 2048.0f) >= 0.0F) ? (((dbdy + dxOuter * dbdx) * 2048.0f) + 0.5F) : (((dbdy + dxOuter * dbdx) * 2048.0f) - 0.5F)))); > > > > > > } > else { > ; > fr = ((v2->color[0]) << 11); > fg = ((v2->color[1]) << 11); > fb = ((v2->color[2]) << 11); > fdrOuter = fdgOuter = fdbOuter = 0; > > > > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLushort); > > > > dZRowInner = dZRowOuter + sizeof(GLushort); > > fdzInner = fdzOuter + span.zStep; > > > > > > fdrInner = fdrOuter + span.redStep; > fdgInner = fdgOuter + span.greenStep; > fdbInner = fdbOuter + span.blueStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; > > > span.z = fz; > > > > > > span.red = fr; > span.green = fg; > span.blue = fb; ># 1179 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > > const GLint len = right - span.x - 1; > GLfixed ffrend = span.red + len * span.redStep; > GLfixed ffgend = span.green + len * span.greenStep; > GLfixed ffbend = span.blue + len * span.blueStep; > if (ffrend < 0) { > span.red -= ffrend; > if (span.red < 0) > span.red = 0; > } > if (ffgend < 0) { > span.green -= ffgend; > if (span.green < 0) > span.green = 0; > } > if (ffbend < 0) { > span.blue -= ffbend; > if (span.blue < 0) > span.blue = 0; > } > } ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; GLint x = span.x, y = ((xmesa->xm_buffer)->bottom-(span.y)); for (i = 0; i < span.end; i++, x++) { const GLushort z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { { int d = xmesa->xm_visual->Kernel[((x)&3) | (((y)&3)<<2)]; pRow[i] = xmesa->xm_visual->RtoPixel[(((span.red) >> 11))+d] | xmesa->xm_visual->GtoPixel[(((span.green) >> 11))+d] | xmesa->xm_visual->BtoPixel[(((span.blue) >> 11))+d]; }; zRow[i] = z; } span.red += span.redStep; span.green += span.greenStep; span.blue += span.blueStep; span.z += span.zStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLushort *) ((GLubyte *) pRow + dPRowOuter); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); > > fz += fdzOuter; > > > > > > fr += fdrOuter; > fg += fdgOuter; > fb += fdbOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLushort *) ((GLubyte *) pRow + dPRowInner); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); > > fz += fdzInner; > > > > > > fr += fdrInner; > fg += fdgInner; > fb += fdbInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 303 "xm_tri.c" 2 >} > > > > > >static void smooth_DITHER8_z_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 339 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > const GLint depthBits = ctx->Visual.depthBits; > const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; > const GLfloat maxDepth = ctx->DepthMaxF; > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); > > > (void) fixedToDepthShift; ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > GLfloat dzdx, dzdy; > > > > > > GLfloat drdx, drdy; > GLfloat dgdx, dgdy; > GLfloat dbdx, dbdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); > > > > > span.interpMask |= 0x008; > { > GLfloat eMaj_dz, eBot_dz; > eMaj_dz = vMax->win[2] - vMin->win[2]; > eBot_dz = vMid->win[2] - vMin->win[2]; > dzdx = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); > if (dzdx > maxDepth || dzdx < -maxDepth) { > > dzdx = 0.0; > dzdy = 0.0; > } > else { > dzdy = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); > } > if (depthBits <= 16) > span.zStep = (((int) ((((dzdx) * 2048.0f) >= 0.0F) ? (((dzdx) * 2048.0f) + 0.5F) : (((dzdx) * 2048.0f) - 0.5F)))); > else > span.zStep = (GLint) dzdx; > } ># 370 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.interpMask |= 0x001; > if (ctx->Light.ShadeModel == 0x1D01) { > GLfloat eMaj_dr, eBot_dr; > GLfloat eMaj_dg, eBot_dg; > GLfloat eMaj_db, eBot_db; > > > > eMaj_dr = (GLfloat) ((GLint) vMax->color[0] - > (GLint) vMin->color[0]); > eBot_dr = (GLfloat) ((GLint) vMid->color[0] - > (GLint) vMin->color[0]); > drdx = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); > span.redStep = (((int) ((((drdx) * 2048.0f) >= 0.0F) ? (((drdx) * 2048.0f) + 0.5F) : (((drdx) * 2048.0f) - 0.5F)))); > drdy = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); > eMaj_dg = (GLfloat) ((GLint) vMax->color[1] - > (GLint) vMin->color[1]); > eBot_dg = (GLfloat) ((GLint) vMid->color[1] - > (GLint) vMin->color[1]); > dgdx = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); > span.greenStep = (((int) ((((dgdx) * 2048.0f) >= 0.0F) ? (((dgdx) * 2048.0f) + 0.5F) : (((dgdx) * 2048.0f) - 0.5F)))); > dgdy = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); > eMaj_db = (GLfloat) ((GLint) vMax->color[2] - > (GLint) vMin->color[2]); > eBot_db = (GLfloat) ((GLint) vMid->color[2] - > (GLint) vMin->color[2]); > dbdx = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); > span.blueStep = (((int) ((((dbdx) * 2048.0f) >= 0.0F) ? (((dbdx) * 2048.0f) + 0.5F) : (((dbdx) * 2048.0f) - 0.5F)))); > dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); ># 408 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > ; > span.interpMask |= 0x200; > drdx = drdy = 0.0F; > dgdx = dgdy = 0.0F; > dbdx = dbdy = 0.0F; > span.redStep = 0; > span.greenStep = 0; > span.blueStep = 0; > > > > > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLubyte *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; > > > > GLushort *zRow = ((void *)0); > int dZRowOuter = 0, dZRowInner; > > GLfixed fz = 0, fdzOuter = 0, fdzInner; > > > > > > GLfixed fr = 0, fdrOuter = 0, fdrInner; > GLfixed fg = 0, fdgOuter = 0, fdgInner; > GLfixed fb = 0, fdbOuter = 0, fdbInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLubyte *) ( (xmesa->xm_buffer)->ximage_origin1 - (span.y) * (xmesa->xm_buffer)->ximage_width1 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLubyte); > > } ># 857 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLfloat z0 = vLower->win[2]; > if (depthBits <= 16) { > > GLfloat tmp = (z0 * 2048.0f + > dzdx * adjx + dzdy * adjy) + 0x00000400; > if (tmp < 0xffffffff / 2) > fz = (GLfixed) tmp; > else > fz = 0xffffffff / 2; > fdzOuter = (((int) ((((dzdy + dxOuter * dzdx) * 2048.0f) >= 0.0F) ? (((dzdy + dxOuter * dzdx) * 2048.0f) + 0.5F) : (((dzdy + dxOuter * dzdx) * 2048.0f) - 0.5F)))); > } > else { > > fz = (GLint) (z0 + dzdx * ((adjx) * (1.0F / 2048.0f)) > + dzdy * ((adjy) * (1.0F / 2048.0f))); > fdzOuter = (GLint) (dzdy + dxOuter * dzdx); > } > > zRow = (GLushort *) > _mesa_zbuffer_address(ctx, ((fxLeftEdge) >> 11), span.y); > dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); > > } > > > > > > > > if (ctx->Light.ShadeModel == 0x1D01) { > fr = (GLfixed) (((vLower->color[0]) << 11) > + drdx * adjx + drdy * adjy) + 0x00000400; > fdrOuter = (((int) ((((drdy + dxOuter * drdx) * 2048.0f) >= 0.0F) ? (((drdy + dxOuter * drdx) * 2048.0f) + 0.5F) : (((drdy + dxOuter * drdx) * 2048.0f) - 0.5F)))); > fg = (GLfixed) (((vLower->color[1]) << 11) > + dgdx * adjx + dgdy * adjy) + 0x00000400; > fdgOuter = (((int) ((((dgdy + dxOuter * dgdx) * 2048.0f) >= 0.0F) ? (((dgdy + dxOuter * dgdx) * 2048.0f) + 0.5F) : (((dgdy + dxOuter * dgdx) * 2048.0f) - 0.5F)))); > fb = (GLfixed) (((vLower->color[2]) << 11) > + dbdx * adjx + dbdy * adjy) + 0x00000400; > fdbOuter = (((int) ((((dbdy + dxOuter * dbdx) * 2048.0f) >= 0.0F) ? (((dbdy + dxOuter * dbdx) * 2048.0f) + 0.5F) : (((dbdy + dxOuter * dbdx) * 2048.0f) - 0.5F)))); > > > > > > } > else { > ; > fr = ((v2->color[0]) << 11); > fg = ((v2->color[1]) << 11); > fb = ((v2->color[2]) << 11); > fdrOuter = fdgOuter = fdbOuter = 0; > > > > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLubyte); > > > > dZRowInner = dZRowOuter + sizeof(GLushort); > > fdzInner = fdzOuter + span.zStep; > > > > > > fdrInner = fdrOuter + span.redStep; > fdgInner = fdgOuter + span.greenStep; > fdbInner = fdbOuter + span.blueStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; > > > span.z = fz; > > > > > > span.red = fr; > span.green = fg; > span.blue = fb; ># 1179 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > > const GLint len = right - span.x - 1; > GLfixed ffrend = span.red + len * span.redStep; > GLfixed ffgend = span.green + len * span.greenStep; > GLfixed ffbend = span.blue + len * span.blueStep; > if (ffrend < 0) { > span.red -= ffrend; > if (span.red < 0) > span.red = 0; > } > if (ffgend < 0) { > span.green -= ffgend; > if (span.green < 0) > span.green = 0; > } > if (ffbend < 0) { > span.blue -= ffbend; > if (span.blue < 0) > span.blue = 0; > } > } ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; GLint x = span.x, y = ((xmesa->xm_buffer)->bottom-(span.y)); int __d; unsigned long *ctable = xmesa->xm_buffer->color_table; int *kernel = &kernel8[ ((y)&3) << 2 ];; for (i = 0; i < span.end; i++, x++) { const GLushort z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { pRow[i] = (GLubyte) (__d = kernel[(x)&3], ctable[((((((unsigned)(((4 * 4) * (9 - 1) + 1) * (((span.green) >> 11)) + __d)) >> 12)) << 6) | (((((unsigned)(((4 * 4) * (5 - 1) + 1) * (((span.blue) >> 11)) + __d)) >> 12)) << 3) | ((((unsigned)(((4 * 4) * (5 - 1) + 1) * (((span.red) >> 11)) + __d)) >> 12)))]); zRow[i] = z; } span.red += span.redStep; span.green += span.greenStep; span.blue += span.blueStep; span.z += span.zStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLubyte *) ((GLubyte *) pRow + dPRowOuter); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); > > fz += fdzOuter; > > > > > > fr += fdrOuter; > fg += fdgOuter; > fb += fdbOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLubyte *) ((GLubyte *) pRow + dPRowInner); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); > > fz += fdzInner; > > > > > > fr += fdrInner; > fg += fdgInner; > fb += fdbInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 340 "xm_tri.c" 2 >} > > > > > >static void smooth_DITHER_z_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; > XMesaImage *img = xmesa->xm_buffer->backimage; ># 375 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > const GLint depthBits = ctx->Visual.depthBits; > const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; > const GLfloat maxDepth = ctx->DepthMaxF; > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); > > > (void) fixedToDepthShift; ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > GLfloat dzdx, dzdy; > > > > > > GLfloat drdx, drdy; > GLfloat dgdx, dgdy; > GLfloat dbdx, dbdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); > > > > > span.interpMask |= 0x008; > { > GLfloat eMaj_dz, eBot_dz; > eMaj_dz = vMax->win[2] - vMin->win[2]; > eBot_dz = vMid->win[2] - vMin->win[2]; > dzdx = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); > if (dzdx > maxDepth || dzdx < -maxDepth) { > > dzdx = 0.0; > dzdy = 0.0; > } > else { > dzdy = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); > } > if (depthBits <= 16) > span.zStep = (((int) ((((dzdx) * 2048.0f) >= 0.0F) ? (((dzdx) * 2048.0f) + 0.5F) : (((dzdx) * 2048.0f) - 0.5F)))); > else > span.zStep = (GLint) dzdx; > } ># 370 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.interpMask |= 0x001; > if (ctx->Light.ShadeModel == 0x1D01) { > GLfloat eMaj_dr, eBot_dr; > GLfloat eMaj_dg, eBot_dg; > GLfloat eMaj_db, eBot_db; > > > > eMaj_dr = (GLfloat) ((GLint) vMax->color[0] - > (GLint) vMin->color[0]); > eBot_dr = (GLfloat) ((GLint) vMid->color[0] - > (GLint) vMin->color[0]); > drdx = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); > span.redStep = (((int) ((((drdx) * 2048.0f) >= 0.0F) ? (((drdx) * 2048.0f) + 0.5F) : (((drdx) * 2048.0f) - 0.5F)))); > drdy = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); > eMaj_dg = (GLfloat) ((GLint) vMax->color[1] - > (GLint) vMin->color[1]); > eBot_dg = (GLfloat) ((GLint) vMid->color[1] - > (GLint) vMin->color[1]); > dgdx = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); > span.greenStep = (((int) ((((dgdx) * 2048.0f) >= 0.0F) ? (((dgdx) * 2048.0f) + 0.5F) : (((dgdx) * 2048.0f) - 0.5F)))); > dgdy = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); > eMaj_db = (GLfloat) ((GLint) vMax->color[2] - > (GLint) vMin->color[2]); > eBot_db = (GLfloat) ((GLint) vMid->color[2] - > (GLint) vMin->color[2]); > dbdx = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); > span.blueStep = (((int) ((((dbdx) * 2048.0f) >= 0.0F) ? (((dbdx) * 2048.0f) + 0.5F) : (((dbdx) * 2048.0f) - 0.5F)))); > dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); ># 408 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > ; > span.interpMask |= 0x200; > drdx = drdy = 0.0F; > dgdx = dgdy = 0.0F; > dbdx = dbdy = 0.0F; > span.redStep = 0; > span.greenStep = 0; > span.blueStep = 0; > > > > > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > > > > > > GLushort *zRow = ((void *)0); > int dZRowOuter = 0, dZRowInner; > > GLfixed fz = 0, fdzOuter = 0, fdzInner; > > > > > > GLfixed fr = 0, fdrOuter = 0, fdrInner; > GLfixed fg = 0, fdgOuter = 0, fdgInner; > GLfixed fb = 0, fdbOuter = 0, fdbInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; ># 857 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLfloat z0 = vLower->win[2]; > if (depthBits <= 16) { > > GLfloat tmp = (z0 * 2048.0f + > dzdx * adjx + dzdy * adjy) + 0x00000400; > if (tmp < 0xffffffff / 2) > fz = (GLfixed) tmp; > else > fz = 0xffffffff / 2; > fdzOuter = (((int) ((((dzdy + dxOuter * dzdx) * 2048.0f) >= 0.0F) ? (((dzdy + dxOuter * dzdx) * 2048.0f) + 0.5F) : (((dzdy + dxOuter * dzdx) * 2048.0f) - 0.5F)))); > } > else { > > fz = (GLint) (z0 + dzdx * ((adjx) * (1.0F / 2048.0f)) > + dzdy * ((adjy) * (1.0F / 2048.0f))); > fdzOuter = (GLint) (dzdy + dxOuter * dzdx); > } > > zRow = (GLushort *) > _mesa_zbuffer_address(ctx, ((fxLeftEdge) >> 11), span.y); > dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); > > } > > > > > > > > if (ctx->Light.ShadeModel == 0x1D01) { > fr = (GLfixed) (((vLower->color[0]) << 11) > + drdx * adjx + drdy * adjy) + 0x00000400; > fdrOuter = (((int) ((((drdy + dxOuter * drdx) * 2048.0f) >= 0.0F) ? (((drdy + dxOuter * drdx) * 2048.0f) + 0.5F) : (((drdy + dxOuter * drdx) * 2048.0f) - 0.5F)))); > fg = (GLfixed) (((vLower->color[1]) << 11) > + dgdx * adjx + dgdy * adjy) + 0x00000400; > fdgOuter = (((int) ((((dgdy + dxOuter * dgdx) * 2048.0f) >= 0.0F) ? (((dgdy + dxOuter * dgdx) * 2048.0f) + 0.5F) : (((dgdy + dxOuter * dgdx) * 2048.0f) - 0.5F)))); > fb = (GLfixed) (((vLower->color[2]) << 11) > + dbdx * adjx + dbdy * adjy) + 0x00000400; > fdbOuter = (((int) ((((dbdy + dxOuter * dbdx) * 2048.0f) >= 0.0F) ? (((dbdy + dxOuter * dbdx) * 2048.0f) + 0.5F) : (((dbdy + dxOuter * dbdx) * 2048.0f) - 0.5F)))); > > > > > > } > else { > ; > fr = ((v2->color[0]) << 11); > fg = ((v2->color[1]) << 11); > fb = ((v2->color[2]) << 11); > fdrOuter = fdgOuter = fdbOuter = 0; > > > > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } ># 1071 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > dZRowInner = dZRowOuter + sizeof(GLushort); > > fdzInner = fdzOuter + span.zStep; > > > > > > fdrInner = fdrOuter + span.redStep; > fdgInner = fdgOuter + span.greenStep; > fdbInner = fdbOuter + span.blueStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; > > > span.z = fz; > > > > > > span.red = fr; > span.green = fg; > span.blue = fb; ># 1179 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > > const GLint len = right - span.x - 1; > GLfixed ffrend = span.red + len * span.redStep; > GLfixed ffgend = span.green + len * span.greenStep; > GLfixed ffbend = span.blue + len * span.blueStep; > if (ffrend < 0) { > span.red -= ffrend; > if (span.red < 0) > span.red = 0; > } > if (ffgend < 0) { > span.green -= ffgend; > if (span.green < 0) > span.green = 0; > } > if (ffbend < 0) { > span.blue -= ffbend; > if (span.blue < 0) > span.blue = 0; > } > } ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; GLint x = span.x, y = ((xmesa->xm_buffer)->bottom-(span.y)); int __d; unsigned long *ctable = xmesa->xm_buffer->color_table; int *kernel = &kernel8[ ((y)&3) << 2 ];; for (i = 0; i < span.end; i++, x++) { const GLushort z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { unsigned long p = (__d = kernel[(x)&3], ctable[((((((unsigned)(((4 * 4) * (9 - 1) + 1) * (((span.green) >> 11)) + __d)) >> 12)) << 6) | (((((unsigned)(((4 * 4) * (5 - 1) + 1) * (((span.blue) >> 11)) + __d)) >> 12)) << 3) | ((((unsigned)(((4 * 4) * (5 - 1) + 1) * (((span.red) >> 11)) + __d)) >> 12)))]); ((*((img)->f.put_pixel))((img), (x), (y), (p))); zRow[i] = z; } span.red += span.redStep; span.green += span.greenStep; span.blue += span.blueStep; span.z += span.zStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); > > fz += fdzOuter; > > > > > > fr += fdrOuter; > fg += fdgOuter; > fb += fdbOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); > > fz += fdzInner; > > > > > > fr += fdrInner; > fg += fdgInner; > fb += fdbInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 376 "xm_tri.c" 2 >} > > > > > >static void smooth_LOOKUP8_z_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 411 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > const GLint depthBits = ctx->Visual.depthBits; > const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; > const GLfloat maxDepth = ctx->DepthMaxF; > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); > > > (void) fixedToDepthShift; ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > GLfloat dzdx, dzdy; > > > > > > GLfloat drdx, drdy; > GLfloat dgdx, dgdy; > GLfloat dbdx, dbdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); > > > > > span.interpMask |= 0x008; > { > GLfloat eMaj_dz, eBot_dz; > eMaj_dz = vMax->win[2] - vMin->win[2]; > eBot_dz = vMid->win[2] - vMin->win[2]; > dzdx = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); > if (dzdx > maxDepth || dzdx < -maxDepth) { > > dzdx = 0.0; > dzdy = 0.0; > } > else { > dzdy = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); > } > if (depthBits <= 16) > span.zStep = (((int) ((((dzdx) * 2048.0f) >= 0.0F) ? (((dzdx) * 2048.0f) + 0.5F) : (((dzdx) * 2048.0f) - 0.5F)))); > else > span.zStep = (GLint) dzdx; > } ># 370 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.interpMask |= 0x001; > if (ctx->Light.ShadeModel == 0x1D01) { > GLfloat eMaj_dr, eBot_dr; > GLfloat eMaj_dg, eBot_dg; > GLfloat eMaj_db, eBot_db; > > > > eMaj_dr = (GLfloat) ((GLint) vMax->color[0] - > (GLint) vMin->color[0]); > eBot_dr = (GLfloat) ((GLint) vMid->color[0] - > (GLint) vMin->color[0]); > drdx = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); > span.redStep = (((int) ((((drdx) * 2048.0f) >= 0.0F) ? (((drdx) * 2048.0f) + 0.5F) : (((drdx) * 2048.0f) - 0.5F)))); > drdy = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); > eMaj_dg = (GLfloat) ((GLint) vMax->color[1] - > (GLint) vMin->color[1]); > eBot_dg = (GLfloat) ((GLint) vMid->color[1] - > (GLint) vMin->color[1]); > dgdx = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); > span.greenStep = (((int) ((((dgdx) * 2048.0f) >= 0.0F) ? (((dgdx) * 2048.0f) + 0.5F) : (((dgdx) * 2048.0f) - 0.5F)))); > dgdy = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); > eMaj_db = (GLfloat) ((GLint) vMax->color[2] - > (GLint) vMin->color[2]); > eBot_db = (GLfloat) ((GLint) vMid->color[2] - > (GLint) vMin->color[2]); > dbdx = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); > span.blueStep = (((int) ((((dbdx) * 2048.0f) >= 0.0F) ? (((dbdx) * 2048.0f) + 0.5F) : (((dbdx) * 2048.0f) - 0.5F)))); > dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); ># 408 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > ; > span.interpMask |= 0x200; > drdx = drdy = 0.0F; > dgdx = dgdy = 0.0F; > dbdx = dbdy = 0.0F; > span.redStep = 0; > span.greenStep = 0; > span.blueStep = 0; > > > > > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLubyte *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; > > > > GLushort *zRow = ((void *)0); > int dZRowOuter = 0, dZRowInner; > > GLfixed fz = 0, fdzOuter = 0, fdzInner; > > > > > > GLfixed fr = 0, fdrOuter = 0, fdrInner; > GLfixed fg = 0, fdgOuter = 0, fdgInner; > GLfixed fb = 0, fdbOuter = 0, fdbInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLubyte *) ( (xmesa->xm_buffer)->ximage_origin1 - (span.y) * (xmesa->xm_buffer)->ximage_width1 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLubyte); > > } ># 857 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLfloat z0 = vLower->win[2]; > if (depthBits <= 16) { > > GLfloat tmp = (z0 * 2048.0f + > dzdx * adjx + dzdy * adjy) + 0x00000400; > if (tmp < 0xffffffff / 2) > fz = (GLfixed) tmp; > else > fz = 0xffffffff / 2; > fdzOuter = (((int) ((((dzdy + dxOuter * dzdx) * 2048.0f) >= 0.0F) ? (((dzdy + dxOuter * dzdx) * 2048.0f) + 0.5F) : (((dzdy + dxOuter * dzdx) * 2048.0f) - 0.5F)))); > } > else { > > fz = (GLint) (z0 + dzdx * ((adjx) * (1.0F / 2048.0f)) > + dzdy * ((adjy) * (1.0F / 2048.0f))); > fdzOuter = (GLint) (dzdy + dxOuter * dzdx); > } > > zRow = (GLushort *) > _mesa_zbuffer_address(ctx, ((fxLeftEdge) >> 11), span.y); > dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); > > } > > > > > > > > if (ctx->Light.ShadeModel == 0x1D01) { > fr = (GLfixed) (((vLower->color[0]) << 11) > + drdx * adjx + drdy * adjy) + 0x00000400; > fdrOuter = (((int) ((((drdy + dxOuter * drdx) * 2048.0f) >= 0.0F) ? (((drdy + dxOuter * drdx) * 2048.0f) + 0.5F) : (((drdy + dxOuter * drdx) * 2048.0f) - 0.5F)))); > fg = (GLfixed) (((vLower->color[1]) << 11) > + dgdx * adjx + dgdy * adjy) + 0x00000400; > fdgOuter = (((int) ((((dgdy + dxOuter * dgdx) * 2048.0f) >= 0.0F) ? (((dgdy + dxOuter * dgdx) * 2048.0f) + 0.5F) : (((dgdy + dxOuter * dgdx) * 2048.0f) - 0.5F)))); > fb = (GLfixed) (((vLower->color[2]) << 11) > + dbdx * adjx + dbdy * adjy) + 0x00000400; > fdbOuter = (((int) ((((dbdy + dxOuter * dbdx) * 2048.0f) >= 0.0F) ? (((dbdy + dxOuter * dbdx) * 2048.0f) + 0.5F) : (((dbdy + dxOuter * dbdx) * 2048.0f) - 0.5F)))); > > > > > > } > else { > ; > fr = ((v2->color[0]) << 11); > fg = ((v2->color[1]) << 11); > fb = ((v2->color[2]) << 11); > fdrOuter = fdgOuter = fdbOuter = 0; > > > > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLubyte); > > > > dZRowInner = dZRowOuter + sizeof(GLushort); > > fdzInner = fdzOuter + span.zStep; > > > > > > fdrInner = fdrOuter + span.redStep; > fdgInner = fdgOuter + span.greenStep; > fdbInner = fdbOuter + span.blueStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; > > > span.z = fz; > > > > > > span.red = fr; > span.green = fg; > span.blue = fb; ># 1179 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > > const GLint len = right - span.x - 1; > GLfixed ffrend = span.red + len * span.redStep; > GLfixed ffgend = span.green + len * span.greenStep; > GLfixed ffbend = span.blue + len * span.blueStep; > if (ffrend < 0) { > span.red -= ffrend; > if (span.red < 0) > span.red = 0; > } > if (ffgend < 0) { > span.green -= ffgend; > if (span.green < 0) > span.green = 0; > } > if (ffbend < 0) { > span.blue -= ffbend; > if (span.blue < 0) > span.blue = 0; > } > } ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; unsigned long *ctable = xmesa->xm_buffer->color_table; for (i = 0; i < span.end; i++) { const GLushort z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { pRow[i] = ctable[((((((unsigned)(((4 * 4) * (9 - 1) + 1) * (((span.green) >> 11)))) >> 12)) << 6) | (((((unsigned)(((4 * 4) * (5 - 1) + 1) * (((span.blue) >> 11)))) >> 12)) << 3) | ((((unsigned)(((4 * 4) * (5 - 1) + 1) * (((span.red) >> 11)))) >> 12)))]; zRow[i] = z; } span.red += span.redStep; span.green += span.greenStep; span.blue += span.blueStep; span.z += span.zStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLubyte *) ((GLubyte *) pRow + dPRowOuter); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); > > fz += fdzOuter; > > > > > > fr += fdrOuter; > fg += fdgOuter; > fb += fdbOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLubyte *) ((GLubyte *) pRow + dPRowInner); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); > > fz += fdzInner; > > > > > > fr += fdrInner; > fg += fdgInner; > fb += fdbInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 412 "xm_tri.c" 2 >} > > > > > > >static void smooth_HPCR_z_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 448 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > const GLint depthBits = ctx->Visual.depthBits; > const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; > const GLfloat maxDepth = ctx->DepthMaxF; > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); > > > (void) fixedToDepthShift; ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > GLfloat dzdx, dzdy; > > > > > > GLfloat drdx, drdy; > GLfloat dgdx, dgdy; > GLfloat dbdx, dbdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); > > > > > span.interpMask |= 0x008; > { > GLfloat eMaj_dz, eBot_dz; > eMaj_dz = vMax->win[2] - vMin->win[2]; > eBot_dz = vMid->win[2] - vMin->win[2]; > dzdx = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); > if (dzdx > maxDepth || dzdx < -maxDepth) { > > dzdx = 0.0; > dzdy = 0.0; > } > else { > dzdy = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); > } > if (depthBits <= 16) > span.zStep = (((int) ((((dzdx) * 2048.0f) >= 0.0F) ? (((dzdx) * 2048.0f) + 0.5F) : (((dzdx) * 2048.0f) - 0.5F)))); > else > span.zStep = (GLint) dzdx; > } ># 370 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.interpMask |= 0x001; > if (ctx->Light.ShadeModel == 0x1D01) { > GLfloat eMaj_dr, eBot_dr; > GLfloat eMaj_dg, eBot_dg; > GLfloat eMaj_db, eBot_db; > > > > eMaj_dr = (GLfloat) ((GLint) vMax->color[0] - > (GLint) vMin->color[0]); > eBot_dr = (GLfloat) ((GLint) vMid->color[0] - > (GLint) vMin->color[0]); > drdx = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); > span.redStep = (((int) ((((drdx) * 2048.0f) >= 0.0F) ? (((drdx) * 2048.0f) + 0.5F) : (((drdx) * 2048.0f) - 0.5F)))); > drdy = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); > eMaj_dg = (GLfloat) ((GLint) vMax->color[1] - > (GLint) vMin->color[1]); > eBot_dg = (GLfloat) ((GLint) vMid->color[1] - > (GLint) vMin->color[1]); > dgdx = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); > span.greenStep = (((int) ((((dgdx) * 2048.0f) >= 0.0F) ? (((dgdx) * 2048.0f) + 0.5F) : (((dgdx) * 2048.0f) - 0.5F)))); > dgdy = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); > eMaj_db = (GLfloat) ((GLint) vMax->color[2] - > (GLint) vMin->color[2]); > eBot_db = (GLfloat) ((GLint) vMid->color[2] - > (GLint) vMin->color[2]); > dbdx = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); > span.blueStep = (((int) ((((dbdx) * 2048.0f) >= 0.0F) ? (((dbdx) * 2048.0f) + 0.5F) : (((dbdx) * 2048.0f) - 0.5F)))); > dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); ># 408 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > ; > span.interpMask |= 0x200; > drdx = drdy = 0.0F; > dgdx = dgdy = 0.0F; > dbdx = dbdy = 0.0F; > span.redStep = 0; > span.greenStep = 0; > span.blueStep = 0; > > > > > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLubyte *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; > > > > GLushort *zRow = ((void *)0); > int dZRowOuter = 0, dZRowInner; > > GLfixed fz = 0, fdzOuter = 0, fdzInner; > > > > > > GLfixed fr = 0, fdrOuter = 0, fdrInner; > GLfixed fg = 0, fdgOuter = 0, fdgInner; > GLfixed fb = 0, fdbOuter = 0, fdbInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLubyte *) ( (xmesa->xm_buffer)->ximage_origin1 - (span.y) * (xmesa->xm_buffer)->ximage_width1 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLubyte); > > } ># 857 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLfloat z0 = vLower->win[2]; > if (depthBits <= 16) { > > GLfloat tmp = (z0 * 2048.0f + > dzdx * adjx + dzdy * adjy) + 0x00000400; > if (tmp < 0xffffffff / 2) > fz = (GLfixed) tmp; > else > fz = 0xffffffff / 2; > fdzOuter = (((int) ((((dzdy + dxOuter * dzdx) * 2048.0f) >= 0.0F) ? (((dzdy + dxOuter * dzdx) * 2048.0f) + 0.5F) : (((dzdy + dxOuter * dzdx) * 2048.0f) - 0.5F)))); > } > else { > > fz = (GLint) (z0 + dzdx * ((adjx) * (1.0F / 2048.0f)) > + dzdy * ((adjy) * (1.0F / 2048.0f))); > fdzOuter = (GLint) (dzdy + dxOuter * dzdx); > } > > zRow = (GLushort *) > _mesa_zbuffer_address(ctx, ((fxLeftEdge) >> 11), span.y); > dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); > > } > > > > > > > > if (ctx->Light.ShadeModel == 0x1D01) { > fr = (GLfixed) (((vLower->color[0]) << 11) > + drdx * adjx + drdy * adjy) + 0x00000400; > fdrOuter = (((int) ((((drdy + dxOuter * drdx) * 2048.0f) >= 0.0F) ? (((drdy + dxOuter * drdx) * 2048.0f) + 0.5F) : (((drdy + dxOuter * drdx) * 2048.0f) - 0.5F)))); > fg = (GLfixed) (((vLower->color[1]) << 11) > + dgdx * adjx + dgdy * adjy) + 0x00000400; > fdgOuter = (((int) ((((dgdy + dxOuter * dgdx) * 2048.0f) >= 0.0F) ? (((dgdy + dxOuter * dgdx) * 2048.0f) + 0.5F) : (((dgdy + dxOuter * dgdx) * 2048.0f) - 0.5F)))); > fb = (GLfixed) (((vLower->color[2]) << 11) > + dbdx * adjx + dbdy * adjy) + 0x00000400; > fdbOuter = (((int) ((((dbdy + dxOuter * dbdx) * 2048.0f) >= 0.0F) ? (((dbdy + dxOuter * dbdx) * 2048.0f) + 0.5F) : (((dbdy + dxOuter * dbdx) * 2048.0f) - 0.5F)))); > > > > > > } > else { > ; > fr = ((v2->color[0]) << 11); > fg = ((v2->color[1]) << 11); > fb = ((v2->color[2]) << 11); > fdrOuter = fdgOuter = fdbOuter = 0; > > > > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLubyte); > > > > dZRowInner = dZRowOuter + sizeof(GLushort); > > fdzInner = fdzOuter + span.zStep; > > > > > > fdrInner = fdrOuter + span.redStep; > fdgInner = fdgOuter + span.greenStep; > fdbInner = fdbOuter + span.blueStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; > > > span.z = fz; > > > > > > span.red = fr; > span.green = fg; > span.blue = fb; ># 1179 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > > const GLint len = right - span.x - 1; > GLfixed ffrend = span.red + len * span.redStep; > GLfixed ffgend = span.green + len * span.greenStep; > GLfixed ffbend = span.blue + len * span.blueStep; > if (ffrend < 0) { > span.red -= ffrend; > if (span.red < 0) > span.red = 0; > } > if (ffgend < 0) { > span.green -= ffgend; > if (span.green < 0) > span.green = 0; > } > if (ffbend < 0) { > span.blue -= ffbend; > if (span.blue < 0) > span.blue = 0; > } > } ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; GLint x = span.x, y = ((xmesa->xm_buffer)->bottom-(span.y)); for (i = 0; i < span.end; i++, x++) { const GLushort z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { pRow[i] = ( ((xmesa->xm_visual->hpcr_rgbTbl[0][((span.red) >> 11)] + HPCR_DRGB[0][(y)&1][(x)&15]) & 0xE0) |(((xmesa->xm_visual->hpcr_rgbTbl[1][((span.green) >> 11)] + HPCR_DRGB[1][(y)&1][(x)&15]) & 0xE0)>>3) | ((xmesa->xm_visual->hpcr_rgbTbl[2][((span.blue) >> 11)] + HPCR_DRGB[2][(y)&1][(x)&15])>>6) ); zRow[i] = z; } span.red += span.redStep; span.green += span.greenStep; span.blue += span.blueStep; span.z += span.zStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLubyte *) ((GLubyte *) pRow + dPRowOuter); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); > > fz += fdzOuter; > > > > > > fr += fdrOuter; > fg += fdgOuter; > fb += fdbOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLubyte *) ((GLubyte *) pRow + dPRowInner); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); > > fz += fdzInner; > > > > > > fr += fdrInner; > fg += fdgInner; > fb += fdbInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 449 "xm_tri.c" 2 >} > > > > > >static void flat_TRUECOLOR_z_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; > XMesaImage *img = xmesa->xm_buffer->backimage; ># 480 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > const GLint depthBits = ctx->Visual.depthBits; > const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; > const GLfloat maxDepth = ctx->DepthMaxF; > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); > > > (void) fixedToDepthShift; ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > GLfloat dzdx, dzdy; ># 332 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > unsigned long pixel; pixel = xmesa->xm_visual->RtoPixel[v2->color[0]] | xmesa->xm_visual->GtoPixel[v2->color[1]] | xmesa->xm_visual->BtoPixel[v2->color[2]];; > > > scan_from_left_to_right = (oneOverArea < 0.0F); > > > > > span.interpMask |= 0x008; > { > GLfloat eMaj_dz, eBot_dz; > eMaj_dz = vMax->win[2] - vMin->win[2]; > eBot_dz = vMid->win[2] - vMin->win[2]; > dzdx = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); > if (dzdx > maxDepth || dzdx < -maxDepth) { > > dzdx = 0.0; > dzdy = 0.0; > } > else { > dzdy = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); > } > if (depthBits <= 16) > span.zStep = (((int) ((((dzdx) * 2048.0f) >= 0.0F) ? (((dzdx) * 2048.0f) + 0.5F) : (((dzdx) * 2048.0f) - 0.5F)))); > else > span.zStep = (GLint) dzdx; > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > > > > > > GLushort *zRow = ((void *)0); > int dZRowOuter = 0, dZRowInner; > > GLfixed fz = 0, fdzOuter = 0, fdzInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; ># 857 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLfloat z0 = vLower->win[2]; > if (depthBits <= 16) { > > GLfloat tmp = (z0 * 2048.0f + > dzdx * adjx + dzdy * adjy) + 0x00000400; > if (tmp < 0xffffffff / 2) > fz = (GLfixed) tmp; > else > fz = 0xffffffff / 2; > fdzOuter = (((int) ((((dzdy + dxOuter * dzdx) * 2048.0f) >= 0.0F) ? (((dzdy + dxOuter * dzdx) * 2048.0f) + 0.5F) : (((dzdy + dxOuter * dzdx) * 2048.0f) - 0.5F)))); > } > else { > > fz = (GLint) (z0 + dzdx * ((adjx) * (1.0F / 2048.0f)) > + dzdy * ((adjy) * (1.0F / 2048.0f))); > fdzOuter = (GLint) (dzdy + dxOuter * dzdx); > } > > zRow = (GLushort *) > _mesa_zbuffer_address(ctx, ((fxLeftEdge) >> 11), span.y); > dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } ># 1071 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > dZRowInner = dZRowOuter + sizeof(GLushort); > > fdzInner = fdzOuter + span.zStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; > > > span.z = fz; ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; GLint x = span.x, y = ((xmesa->xm_buffer)->bottom-(span.y)); for (i = 0; i < span.end; i++, x++) { const GLushort z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { ((*((img)->f.put_pixel))((img), (x), (y), (pixel))); zRow[i] = z; } span.z += span.zStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); > > fz += fdzOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); > > fz += fdzInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 481 "xm_tri.c" 2 >} > > > > > >static void flat_8A8B8G8R_z_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 512 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > const GLint depthBits = ctx->Visual.depthBits; > const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; > const GLfloat maxDepth = ctx->DepthMaxF; > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); > > > (void) fixedToDepthShift; ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > GLfloat dzdx, dzdy; ># 332 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > unsigned long p = ( ((v2->color[2]) << 16) | ((v2->color[1]) << 8) | (v2->color[0]) ); > > > scan_from_left_to_right = (oneOverArea < 0.0F); > > > > > span.interpMask |= 0x008; > { > GLfloat eMaj_dz, eBot_dz; > eMaj_dz = vMax->win[2] - vMin->win[2]; > eBot_dz = vMid->win[2] - vMin->win[2]; > dzdx = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); > if (dzdx > maxDepth || dzdx < -maxDepth) { > > dzdx = 0.0; > dzdy = 0.0; > } > else { > dzdy = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); > } > if (depthBits <= 16) > span.zStep = (((int) ((((dzdx) * 2048.0f) >= 0.0F) ? (((dzdx) * 2048.0f) + 0.5F) : (((dzdx) * 2048.0f) - 0.5F)))); > else > span.zStep = (GLint) dzdx; > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLuint *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; > > > > GLushort *zRow = ((void *)0); > int dZRowOuter = 0, dZRowInner; > > GLfixed fz = 0, fdzOuter = 0, fdzInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLuint *) ( (xmesa->xm_buffer)->ximage_origin4 - (span.y) * (xmesa->xm_buffer)->ximage_width4 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLuint); > > } ># 857 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLfloat z0 = vLower->win[2]; > if (depthBits <= 16) { > > GLfloat tmp = (z0 * 2048.0f + > dzdx * adjx + dzdy * adjy) + 0x00000400; > if (tmp < 0xffffffff / 2) > fz = (GLfixed) tmp; > else > fz = 0xffffffff / 2; > fdzOuter = (((int) ((((dzdy + dxOuter * dzdx) * 2048.0f) >= 0.0F) ? (((dzdy + dxOuter * dzdx) * 2048.0f) + 0.5F) : (((dzdy + dxOuter * dzdx) * 2048.0f) - 0.5F)))); > } > else { > > fz = (GLint) (z0 + dzdx * ((adjx) * (1.0F / 2048.0f)) > + dzdy * ((adjy) * (1.0F / 2048.0f))); > fdzOuter = (GLint) (dzdy + dxOuter * dzdx); > } > > zRow = (GLushort *) > _mesa_zbuffer_address(ctx, ((fxLeftEdge) >> 11), span.y); > dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLuint); > > > > dZRowInner = dZRowOuter + sizeof(GLushort); > > fdzInner = fdzOuter + span.zStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; > > > span.z = fz; ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; for (i = 0; i < span.end; i++) { const GLushort z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { pRow[i] = (GLuint) p; zRow[i] = z; } span.z += span.zStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLuint *) ((GLubyte *) pRow + dPRowOuter); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); > > fz += fdzOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLuint *) ((GLubyte *) pRow + dPRowInner); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); > > fz += fdzInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 513 "xm_tri.c" 2 >} > > > > > >static void flat_8R8G8B_z_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 544 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > const GLint depthBits = ctx->Visual.depthBits; > const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; > const GLfloat maxDepth = ctx->DepthMaxF; > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); > > > (void) fixedToDepthShift; ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > GLfloat dzdx, dzdy; ># 332 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > unsigned long p = ( ((v2->color[0]) << 16) | ((v2->color[1]) << 8) | (v2->color[2]) ); > > > scan_from_left_to_right = (oneOverArea < 0.0F); > > > > > span.interpMask |= 0x008; > { > GLfloat eMaj_dz, eBot_dz; > eMaj_dz = vMax->win[2] - vMin->win[2]; > eBot_dz = vMid->win[2] - vMin->win[2]; > dzdx = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); > if (dzdx > maxDepth || dzdx < -maxDepth) { > > dzdx = 0.0; > dzdy = 0.0; > } > else { > dzdy = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); > } > if (depthBits <= 16) > span.zStep = (((int) ((((dzdx) * 2048.0f) >= 0.0F) ? (((dzdx) * 2048.0f) + 0.5F) : (((dzdx) * 2048.0f) - 0.5F)))); > else > span.zStep = (GLint) dzdx; > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLuint *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; > > > > GLushort *zRow = ((void *)0); > int dZRowOuter = 0, dZRowInner; > > GLfixed fz = 0, fdzOuter = 0, fdzInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLuint *) ( (xmesa->xm_buffer)->ximage_origin4 - (span.y) * (xmesa->xm_buffer)->ximage_width4 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLuint); > > } ># 857 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLfloat z0 = vLower->win[2]; > if (depthBits <= 16) { > > GLfloat tmp = (z0 * 2048.0f + > dzdx * adjx + dzdy * adjy) + 0x00000400; > if (tmp < 0xffffffff / 2) > fz = (GLfixed) tmp; > else > fz = 0xffffffff / 2; > fdzOuter = (((int) ((((dzdy + dxOuter * dzdx) * 2048.0f) >= 0.0F) ? (((dzdy + dxOuter * dzdx) * 2048.0f) + 0.5F) : (((dzdy + dxOuter * dzdx) * 2048.0f) - 0.5F)))); > } > else { > > fz = (GLint) (z0 + dzdx * ((adjx) * (1.0F / 2048.0f)) > + dzdy * ((adjy) * (1.0F / 2048.0f))); > fdzOuter = (GLint) (dzdy + dxOuter * dzdx); > } > > zRow = (GLushort *) > _mesa_zbuffer_address(ctx, ((fxLeftEdge) >> 11), span.y); > dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLuint); > > > > dZRowInner = dZRowOuter + sizeof(GLushort); > > fdzInner = fdzOuter + span.zStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; > > > span.z = fz; ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; for (i = 0; i < span.end; i++) { GLushort z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { pRow[i] = (GLuint) p; zRow[i] = z; } span.z += span.zStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLuint *) ((GLubyte *) pRow + dPRowOuter); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); > > fz += fdzOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLuint *) ((GLubyte *) pRow + dPRowInner); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); > > fz += fdzInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 545 "xm_tri.c" 2 >} > > > > > >static void flat_8R8G8B24_z_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; > const GLubyte *color = v2->color; ># 577 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > const GLint depthBits = ctx->Visual.depthBits; > const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; > const GLfloat maxDepth = ctx->DepthMaxF; > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); > > > (void) fixedToDepthShift; ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > GLfloat dzdx, dzdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); > > > > > span.interpMask |= 0x008; > { > GLfloat eMaj_dz, eBot_dz; > eMaj_dz = vMax->win[2] - vMin->win[2]; > eBot_dz = vMid->win[2] - vMin->win[2]; > dzdx = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); > if (dzdx > maxDepth || dzdx < -maxDepth) { > > dzdx = 0.0; > dzdy = 0.0; > } > else { > dzdy = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); > } > if (depthBits <= 16) > span.zStep = (((int) ((((dzdx) * 2048.0f) >= 0.0F) ? (((dzdx) * 2048.0f) + 0.5F) : (((dzdx) * 2048.0f) - 0.5F)))); > else > span.zStep = (GLint) dzdx; > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > bgr_t *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; > > > > GLushort *zRow = ((void *)0); > int dZRowOuter = 0, dZRowInner; > > GLfixed fz = 0, fdzOuter = 0, fdzInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (bgr_t *) ( (bgr_t *) ( (xmesa->xm_buffer)->ximage_origin3 - (span.y) * (xmesa->xm_buffer)->ximage_width3 + 3 * (((fxLeftEdge) >> 11)) )); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(bgr_t); > > } ># 857 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLfloat z0 = vLower->win[2]; > if (depthBits <= 16) { > > GLfloat tmp = (z0 * 2048.0f + > dzdx * adjx + dzdy * adjy) + 0x00000400; > if (tmp < 0xffffffff / 2) > fz = (GLfixed) tmp; > else > fz = 0xffffffff / 2; > fdzOuter = (((int) ((((dzdy + dxOuter * dzdx) * 2048.0f) >= 0.0F) ? (((dzdy + dxOuter * dzdx) * 2048.0f) + 0.5F) : (((dzdy + dxOuter * dzdx) * 2048.0f) - 0.5F)))); > } > else { > > fz = (GLint) (z0 + dzdx * ((adjx) * (1.0F / 2048.0f)) > + dzdy * ((adjy) * (1.0F / 2048.0f))); > fdzOuter = (GLint) (dzdy + dxOuter * dzdx); > } > > zRow = (GLushort *) > _mesa_zbuffer_address(ctx, ((fxLeftEdge) >> 11), span.y); > dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(bgr_t); > > > > dZRowInner = dZRowOuter + sizeof(GLushort); > > fdzInner = fdzOuter + span.zStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; > > > span.z = fz; ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; for (i = 0; i < span.end; i++) { const GLushort z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { bgr_t *ptr = pRow + i; ptr->r = color[0]; ptr->g = color[1]; ptr->b = color[2]; zRow[i] = z; } span.z += span.zStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (bgr_t *) ((GLubyte *) pRow + dPRowOuter); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); > > fz += fdzOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (bgr_t *) ((GLubyte *) pRow + dPRowInner); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); > > fz += fdzInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 578 "xm_tri.c" 2 >} > > > > > >static void flat_TRUEDITHER_z_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; > XMesaImage *img = xmesa->xm_buffer->backimage; ># 608 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > const GLint depthBits = ctx->Visual.depthBits; > const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; > const GLfloat maxDepth = ctx->DepthMaxF; > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); > > > (void) fixedToDepthShift; ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > GLfloat dzdx, dzdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); > > > > > span.interpMask |= 0x008; > { > GLfloat eMaj_dz, eBot_dz; > eMaj_dz = vMax->win[2] - vMin->win[2]; > eBot_dz = vMid->win[2] - vMin->win[2]; > dzdx = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); > if (dzdx > maxDepth || dzdx < -maxDepth) { > > dzdx = 0.0; > dzdy = 0.0; > } > else { > dzdy = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); > } > if (depthBits <= 16) > span.zStep = (((int) ((((dzdx) * 2048.0f) >= 0.0F) ? (((dzdx) * 2048.0f) + 0.5F) : (((dzdx) * 2048.0f) - 0.5F)))); > else > span.zStep = (GLint) dzdx; > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > > > > > > GLushort *zRow = ((void *)0); > int dZRowOuter = 0, dZRowInner; > > GLfixed fz = 0, fdzOuter = 0, fdzInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; ># 857 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLfloat z0 = vLower->win[2]; > if (depthBits <= 16) { > > GLfloat tmp = (z0 * 2048.0f + > dzdx * adjx + dzdy * adjy) + 0x00000400; > if (tmp < 0xffffffff / 2) > fz = (GLfixed) tmp; > else > fz = 0xffffffff / 2; > fdzOuter = (((int) ((((dzdy + dxOuter * dzdx) * 2048.0f) >= 0.0F) ? (((dzdy + dxOuter * dzdx) * 2048.0f) + 0.5F) : (((dzdy + dxOuter * dzdx) * 2048.0f) - 0.5F)))); > } > else { > > fz = (GLint) (z0 + dzdx * ((adjx) * (1.0F / 2048.0f)) > + dzdy * ((adjy) * (1.0F / 2048.0f))); > fdzOuter = (GLint) (dzdy + dxOuter * dzdx); > } > > zRow = (GLushort *) > _mesa_zbuffer_address(ctx, ((fxLeftEdge) >> 11), span.y); > dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } ># 1071 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > dZRowInner = dZRowOuter + sizeof(GLushort); > > fdzInner = fdzOuter + span.zStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; > > > span.z = fz; ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; GLint x = span.x, y = ((xmesa->xm_buffer)->bottom-(span.y)); for (i = 0; i < span.end; i++, x++) { const GLushort z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { unsigned long p; { int d = xmesa->xm_visual->Kernel[((x)&3) | (((y)&3)<<2)]; p = xmesa->xm_visual->RtoPixel[(v2->color[0])+d] | xmesa->xm_visual->GtoPixel[(v2->color[1])+d] | xmesa->xm_visual->BtoPixel[(v2->color[2])+d]; }; ((*((img)->f.put_pixel))((img), (x), (y), (p))); zRow[i] = z; } span.z += span.zStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); > > fz += fdzOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); > > fz += fdzInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 609 "xm_tri.c" 2 >} > > > > > >static void flat_5R6G5B_z_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 640 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > const GLint depthBits = ctx->Visual.depthBits; > const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; > const GLfloat maxDepth = ctx->DepthMaxF; > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); > > > (void) fixedToDepthShift; ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > GLfloat dzdx, dzdy; ># 332 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > unsigned long p = ( (((v2->color[0]) & 0xf8) << 8) | (((v2->color[1]) & 0xfc) << 3) | ((v2->color[2]) >> 3) ); > > > scan_from_left_to_right = (oneOverArea < 0.0F); > > > > > span.interpMask |= 0x008; > { > GLfloat eMaj_dz, eBot_dz; > eMaj_dz = vMax->win[2] - vMin->win[2]; > eBot_dz = vMid->win[2] - vMin->win[2]; > dzdx = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); > if (dzdx > maxDepth || dzdx < -maxDepth) { > > dzdx = 0.0; > dzdy = 0.0; > } > else { > dzdy = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); > } > if (depthBits <= 16) > span.zStep = (((int) ((((dzdx) * 2048.0f) >= 0.0F) ? (((dzdx) * 2048.0f) + 0.5F) : (((dzdx) * 2048.0f) - 0.5F)))); > else > span.zStep = (GLint) dzdx; > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLushort *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; > > > > GLushort *zRow = ((void *)0); > int dZRowOuter = 0, dZRowInner; > > GLfixed fz = 0, fdzOuter = 0, fdzInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLushort *) ( (xmesa->xm_buffer)->ximage_origin2 - (span.y) * (xmesa->xm_buffer)->ximage_width2 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLushort); > > } ># 857 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLfloat z0 = vLower->win[2]; > if (depthBits <= 16) { > > GLfloat tmp = (z0 * 2048.0f + > dzdx * adjx + dzdy * adjy) + 0x00000400; > if (tmp < 0xffffffff / 2) > fz = (GLfixed) tmp; > else > fz = 0xffffffff / 2; > fdzOuter = (((int) ((((dzdy + dxOuter * dzdx) * 2048.0f) >= 0.0F) ? (((dzdy + dxOuter * dzdx) * 2048.0f) + 0.5F) : (((dzdy + dxOuter * dzdx) * 2048.0f) - 0.5F)))); > } > else { > > fz = (GLint) (z0 + dzdx * ((adjx) * (1.0F / 2048.0f)) > + dzdy * ((adjy) * (1.0F / 2048.0f))); > fdzOuter = (GLint) (dzdy + dxOuter * dzdx); > } > > zRow = (GLushort *) > _mesa_zbuffer_address(ctx, ((fxLeftEdge) >> 11), span.y); > dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLushort); > > > > dZRowInner = dZRowOuter + sizeof(GLushort); > > fdzInner = fdzOuter + span.zStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; > > > span.z = fz; ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; for (i = 0; i < span.end; i++) { const GLushort z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { pRow[i] = (GLushort) p; zRow[i] = z; } span.z += span.zStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLushort *) ((GLubyte *) pRow + dPRowOuter); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); > > fz += fdzOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLushort *) ((GLubyte *) pRow + dPRowInner); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); > > fz += fdzInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 641 "xm_tri.c" 2 >} > > > > > >static void flat_DITHER_5R6G5B_z_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; > const GLubyte *color = v2->color; ># 672 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > const GLint depthBits = ctx->Visual.depthBits; > const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; > const GLfloat maxDepth = ctx->DepthMaxF; > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); > > > (void) fixedToDepthShift; ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > GLfloat dzdx, dzdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); > > > > > span.interpMask |= 0x008; > { > GLfloat eMaj_dz, eBot_dz; > eMaj_dz = vMax->win[2] - vMin->win[2]; > eBot_dz = vMid->win[2] - vMin->win[2]; > dzdx = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); > if (dzdx > maxDepth || dzdx < -maxDepth) { > > dzdx = 0.0; > dzdy = 0.0; > } > else { > dzdy = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); > } > if (depthBits <= 16) > span.zStep = (((int) ((((dzdx) * 2048.0f) >= 0.0F) ? (((dzdx) * 2048.0f) + 0.5F) : (((dzdx) * 2048.0f) - 0.5F)))); > else > span.zStep = (GLint) dzdx; > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLushort *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; > > > > GLushort *zRow = ((void *)0); > int dZRowOuter = 0, dZRowInner; > > GLfixed fz = 0, fdzOuter = 0, fdzInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLushort *) ( (xmesa->xm_buffer)->ximage_origin2 - (span.y) * (xmesa->xm_buffer)->ximage_width2 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLushort); > > } ># 857 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLfloat z0 = vLower->win[2]; > if (depthBits <= 16) { > > GLfloat tmp = (z0 * 2048.0f + > dzdx * adjx + dzdy * adjy) + 0x00000400; > if (tmp < 0xffffffff / 2) > fz = (GLfixed) tmp; > else > fz = 0xffffffff / 2; > fdzOuter = (((int) ((((dzdy + dxOuter * dzdx) * 2048.0f) >= 0.0F) ? (((dzdy + dxOuter * dzdx) * 2048.0f) + 0.5F) : (((dzdy + dxOuter * dzdx) * 2048.0f) - 0.5F)))); > } > else { > > fz = (GLint) (z0 + dzdx * ((adjx) * (1.0F / 2048.0f)) > + dzdy * ((adjy) * (1.0F / 2048.0f))); > fdzOuter = (GLint) (dzdy + dxOuter * dzdx); > } > > zRow = (GLushort *) > _mesa_zbuffer_address(ctx, ((fxLeftEdge) >> 11), span.y); > dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLushort); > > > > dZRowInner = dZRowOuter + sizeof(GLushort); > > fdzInner = fdzOuter + span.zStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; > > > span.z = fz; ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; GLint x = span.x, y = ((xmesa->xm_buffer)->bottom-(span.y)); for (i = 0; i < span.end; i++, x++) { const GLushort z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { { int d = xmesa->xm_visual->Kernel[((x)&3) | (((y)&3)<<2)]; pRow[i] = xmesa->xm_visual->RtoPixel[(color[0])+d] | xmesa->xm_visual->GtoPixel[(color[1])+d] | xmesa->xm_visual->BtoPixel[(color[2])+d]; }; zRow[i] = z; } span.z += span.zStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLushort *) ((GLubyte *) pRow + dPRowOuter); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); > > fz += fdzOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLushort *) ((GLubyte *) pRow + dPRowInner); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); > > fz += fdzInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 673 "xm_tri.c" 2 >} > > > > > >static void flat_DITHER8_z_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 706 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > const GLint depthBits = ctx->Visual.depthBits; > const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; > const GLfloat maxDepth = ctx->DepthMaxF; > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); > > > (void) fixedToDepthShift; ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > GLfloat dzdx, dzdy; ># 332 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { unsigned long *ctable = xmesa->xm_buffer->color_table; int msdr = ((4 * 4)*((5)-1)+1) * (v2->color[0]); int msdg = ((4 * 4)*((9)-1)+1) * (v2->color[1]); int msdb = ((4 * 4)*((5)-1)+1) * (v2->color[2]); int i; for (i=0;i<16;i++) { int k = kernel8[i]; int j = ((((msdg+k)>>12) << 6) | (((msdb+k)>>12) << 3) | ((msdr+k)>>12)); DitherValues[i] = (GLushort) ctable[j]; } }; > > > scan_from_left_to_right = (oneOverArea < 0.0F); > > > > > span.interpMask |= 0x008; > { > GLfloat eMaj_dz, eBot_dz; > eMaj_dz = vMax->win[2] - vMin->win[2]; > eBot_dz = vMid->win[2] - vMin->win[2]; > dzdx = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); > if (dzdx > maxDepth || dzdx < -maxDepth) { > > dzdx = 0.0; > dzdy = 0.0; > } > else { > dzdy = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); > } > if (depthBits <= 16) > span.zStep = (((int) ((((dzdx) * 2048.0f) >= 0.0F) ? (((dzdx) * 2048.0f) + 0.5F) : (((dzdx) * 2048.0f) - 0.5F)))); > else > span.zStep = (GLint) dzdx; > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLubyte *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; > > > > GLushort *zRow = ((void *)0); > int dZRowOuter = 0, dZRowInner; > > GLfixed fz = 0, fdzOuter = 0, fdzInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLubyte *) ( (xmesa->xm_buffer)->ximage_origin1 - (span.y) * (xmesa->xm_buffer)->ximage_width1 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLubyte); > > } ># 857 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLfloat z0 = vLower->win[2]; > if (depthBits <= 16) { > > GLfloat tmp = (z0 * 2048.0f + > dzdx * adjx + dzdy * adjy) + 0x00000400; > if (tmp < 0xffffffff / 2) > fz = (GLfixed) tmp; > else > fz = 0xffffffff / 2; > fdzOuter = (((int) ((((dzdy + dxOuter * dzdx) * 2048.0f) >= 0.0F) ? (((dzdy + dxOuter * dzdx) * 2048.0f) + 0.5F) : (((dzdy + dxOuter * dzdx) * 2048.0f) - 0.5F)))); > } > else { > > fz = (GLint) (z0 + dzdx * ((adjx) * (1.0F / 2048.0f)) > + dzdy * ((adjy) * (1.0F / 2048.0f))); > fdzOuter = (GLint) (dzdy + dxOuter * dzdx); > } > > zRow = (GLushort *) > _mesa_zbuffer_address(ctx, ((fxLeftEdge) >> 11), span.y); > dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLubyte); > > > > dZRowInner = dZRowOuter + sizeof(GLushort); > > fdzInner = fdzOuter + span.zStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; > > > span.z = fz; ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; GLint x = span.x, y = ((xmesa->xm_buffer)->bottom-(span.y)); GLushort *ditherRow = DitherValues + ( ((((xmesa->xm_buffer)->bottom-(y)))&3) << 2);; for (i = 0; i < span.end; i++, x++) { const GLushort z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { pRow[i] = (GLubyte) ditherRow[(x)&3]; zRow[i] = z; } span.z += span.zStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLubyte *) ((GLubyte *) pRow + dPRowOuter); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); > > fz += fdzOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLubyte *) ((GLubyte *) pRow + dPRowInner); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); > > fz += fdzInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 707 "xm_tri.c" 2 >} > > > > > >static void flat_DITHER_z_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; > XMesaImage *img = xmesa->xm_buffer->backimage; ># 739 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > const GLint depthBits = ctx->Visual.depthBits; > const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; > const GLfloat maxDepth = ctx->DepthMaxF; > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); > > > (void) fixedToDepthShift; ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > GLfloat dzdx, dzdy; ># 332 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { unsigned long *ctable = xmesa->xm_buffer->color_table; int msdr = ((4 * 4)*((5)-1)+1) * (v2->color[0]); int msdg = ((4 * 4)*((9)-1)+1) * (v2->color[1]); int msdb = ((4 * 4)*((5)-1)+1) * (v2->color[2]); int i; for (i=0;i<16;i++) { int k = kernel8[i]; int j = ((((msdg+k)>>12) << 6) | (((msdb+k)>>12) << 3) | ((msdr+k)>>12)); DitherValues[i] = (GLushort) ctable[j]; } }; > > > scan_from_left_to_right = (oneOverArea < 0.0F); > > > > > span.interpMask |= 0x008; > { > GLfloat eMaj_dz, eBot_dz; > eMaj_dz = vMax->win[2] - vMin->win[2]; > eBot_dz = vMid->win[2] - vMin->win[2]; > dzdx = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); > if (dzdx > maxDepth || dzdx < -maxDepth) { > > dzdx = 0.0; > dzdy = 0.0; > } > else { > dzdy = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); > } > if (depthBits <= 16) > span.zStep = (((int) ((((dzdx) * 2048.0f) >= 0.0F) ? (((dzdx) * 2048.0f) + 0.5F) : (((dzdx) * 2048.0f) - 0.5F)))); > else > span.zStep = (GLint) dzdx; > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > > > > > > GLushort *zRow = ((void *)0); > int dZRowOuter = 0, dZRowInner; > > GLfixed fz = 0, fdzOuter = 0, fdzInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; ># 857 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLfloat z0 = vLower->win[2]; > if (depthBits <= 16) { > > GLfloat tmp = (z0 * 2048.0f + > dzdx * adjx + dzdy * adjy) + 0x00000400; > if (tmp < 0xffffffff / 2) > fz = (GLfixed) tmp; > else > fz = 0xffffffff / 2; > fdzOuter = (((int) ((((dzdy + dxOuter * dzdx) * 2048.0f) >= 0.0F) ? (((dzdy + dxOuter * dzdx) * 2048.0f) + 0.5F) : (((dzdy + dxOuter * dzdx) * 2048.0f) - 0.5F)))); > } > else { > > fz = (GLint) (z0 + dzdx * ((adjx) * (1.0F / 2048.0f)) > + dzdy * ((adjy) * (1.0F / 2048.0f))); > fdzOuter = (GLint) (dzdy + dxOuter * dzdx); > } > > zRow = (GLushort *) > _mesa_zbuffer_address(ctx, ((fxLeftEdge) >> 11), span.y); > dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } ># 1071 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > dZRowInner = dZRowOuter + sizeof(GLushort); > > fdzInner = fdzOuter + span.zStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; > > > span.z = fz; ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; GLint x = span.x, y = ((xmesa->xm_buffer)->bottom-(span.y)); GLushort *ditherRow = DitherValues + ( ((y)&3) << 2);; for (i = 0; i < span.end; i++, x++) { const GLushort z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { unsigned long p = ditherRow[(x)&3]; ((*((img)->f.put_pixel))((img), (x), (y), (p))); zRow[i] = z; } span.z += span.zStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); > > fz += fdzOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); > > fz += fdzInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 740 "xm_tri.c" 2 >} > > > > > >static void flat_HPCR_z_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 773 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > const GLint depthBits = ctx->Visual.depthBits; > const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; > const GLfloat maxDepth = ctx->DepthMaxF; > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); > > > (void) fixedToDepthShift; ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > GLfloat dzdx, dzdy; ># 332 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > GLubyte r = v2->color[0]; GLubyte g = v2->color[1]; GLubyte b = v2->color[2]; > > > scan_from_left_to_right = (oneOverArea < 0.0F); > > > > > span.interpMask |= 0x008; > { > GLfloat eMaj_dz, eBot_dz; > eMaj_dz = vMax->win[2] - vMin->win[2]; > eBot_dz = vMid->win[2] - vMin->win[2]; > dzdx = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); > if (dzdx > maxDepth || dzdx < -maxDepth) { > > dzdx = 0.0; > dzdy = 0.0; > } > else { > dzdy = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); > } > if (depthBits <= 16) > span.zStep = (((int) ((((dzdx) * 2048.0f) >= 0.0F) ? (((dzdx) * 2048.0f) + 0.5F) : (((dzdx) * 2048.0f) - 0.5F)))); > else > span.zStep = (GLint) dzdx; > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLubyte *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; > > > > GLushort *zRow = ((void *)0); > int dZRowOuter = 0, dZRowInner; > > GLfixed fz = 0, fdzOuter = 0, fdzInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLubyte *) ( (xmesa->xm_buffer)->ximage_origin1 - (span.y) * (xmesa->xm_buffer)->ximage_width1 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLubyte); > > } ># 857 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLfloat z0 = vLower->win[2]; > if (depthBits <= 16) { > > GLfloat tmp = (z0 * 2048.0f + > dzdx * adjx + dzdy * adjy) + 0x00000400; > if (tmp < 0xffffffff / 2) > fz = (GLfixed) tmp; > else > fz = 0xffffffff / 2; > fdzOuter = (((int) ((((dzdy + dxOuter * dzdx) * 2048.0f) >= 0.0F) ? (((dzdy + dxOuter * dzdx) * 2048.0f) + 0.5F) : (((dzdy + dxOuter * dzdx) * 2048.0f) - 0.5F)))); > } > else { > > fz = (GLint) (z0 + dzdx * ((adjx) * (1.0F / 2048.0f)) > + dzdy * ((adjy) * (1.0F / 2048.0f))); > fdzOuter = (GLint) (dzdy + dxOuter * dzdx); > } > > zRow = (GLushort *) > _mesa_zbuffer_address(ctx, ((fxLeftEdge) >> 11), span.y); > dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLubyte); > > > > dZRowInner = dZRowOuter + sizeof(GLushort); > > fdzInner = fdzOuter + span.zStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; > > > span.z = fz; ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; GLint x = span.x, y = ((xmesa->xm_buffer)->bottom-(span.y)); for (i = 0; i < span.end; i++, x++) { const GLushort z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { pRow[i] = (GLubyte) ( ((xmesa->xm_visual->hpcr_rgbTbl[0][r] + HPCR_DRGB[0][(y)&1][(x)&15]) & 0xE0) |(((xmesa->xm_visual->hpcr_rgbTbl[1][g] + HPCR_DRGB[1][(y)&1][(x)&15]) & 0xE0)>>3) | ((xmesa->xm_visual->hpcr_rgbTbl[2][b] + HPCR_DRGB[2][(y)&1][(x)&15])>>6) ); zRow[i] = z; } span.z += span.zStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLubyte *) ((GLubyte *) pRow + dPRowOuter); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); > > fz += fdzOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLubyte *) ((GLubyte *) pRow + dPRowInner); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); > > fz += fdzInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 774 "xm_tri.c" 2 >} > > > > > >static void flat_LOOKUP8_z_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 808 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > const GLint depthBits = ctx->Visual.depthBits; > const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; > const GLfloat maxDepth = ctx->DepthMaxF; > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); > > > (void) fixedToDepthShift; ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > GLfloat dzdx, dzdy; ># 332 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > unsigned long *ctable = xmesa->xm_buffer->color_table; GLubyte r = v2->color[0]; GLubyte g = v2->color[1]; GLubyte b = v2->color[2]; GLubyte p = ctable[((((((unsigned)(((4 * 4) * (9 - 1) + 1) * (g))) >> 12)) << 6) | (((((unsigned)(((4 * 4) * (5 - 1) + 1) * (b))) >> 12)) << 3) | ((((unsigned)(((4 * 4) * (5 - 1) + 1) * (r))) >> 12)))]; > > > scan_from_left_to_right = (oneOverArea < 0.0F); > > > > > span.interpMask |= 0x008; > { > GLfloat eMaj_dz, eBot_dz; > eMaj_dz = vMax->win[2] - vMin->win[2]; > eBot_dz = vMid->win[2] - vMin->win[2]; > dzdx = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); > if (dzdx > maxDepth || dzdx < -maxDepth) { > > dzdx = 0.0; > dzdy = 0.0; > } > else { > dzdy = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); > } > if (depthBits <= 16) > span.zStep = (((int) ((((dzdx) * 2048.0f) >= 0.0F) ? (((dzdx) * 2048.0f) + 0.5F) : (((dzdx) * 2048.0f) - 0.5F)))); > else > span.zStep = (GLint) dzdx; > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLubyte *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; > > > > GLushort *zRow = ((void *)0); > int dZRowOuter = 0, dZRowInner; > > GLfixed fz = 0, fdzOuter = 0, fdzInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLubyte *) ( (xmesa->xm_buffer)->ximage_origin1 - (span.y) * (xmesa->xm_buffer)->ximage_width1 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLubyte); > > } ># 857 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLfloat z0 = vLower->win[2]; > if (depthBits <= 16) { > > GLfloat tmp = (z0 * 2048.0f + > dzdx * adjx + dzdy * adjy) + 0x00000400; > if (tmp < 0xffffffff / 2) > fz = (GLfixed) tmp; > else > fz = 0xffffffff / 2; > fdzOuter = (((int) ((((dzdy + dxOuter * dzdx) * 2048.0f) >= 0.0F) ? (((dzdy + dxOuter * dzdx) * 2048.0f) + 0.5F) : (((dzdy + dxOuter * dzdx) * 2048.0f) - 0.5F)))); > } > else { > > fz = (GLint) (z0 + dzdx * ((adjx) * (1.0F / 2048.0f)) > + dzdy * ((adjy) * (1.0F / 2048.0f))); > fdzOuter = (GLint) (dzdy + dxOuter * dzdx); > } > > zRow = (GLushort *) > _mesa_zbuffer_address(ctx, ((fxLeftEdge) >> 11), span.y); > dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLubyte); > > > > dZRowInner = dZRowOuter + sizeof(GLushort); > > fdzInner = fdzOuter + span.zStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; > > > span.z = fz; ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; for (i = 0; i < span.end; i++) { const GLushort z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { pRow[i] = p; zRow[i] = z; } span.z += span.zStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLubyte *) ((GLubyte *) pRow + dPRowOuter); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); > > fz += fdzOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLubyte *) ((GLubyte *) pRow + dPRowInner); > > > > zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); > > fz += fdzInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 809 "xm_tri.c" 2 >} > > > > > > >static void smooth_TRUECOLOR_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; > XMesaImage *img = xmesa->xm_buffer->backimage; ># 837 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > > > > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > > > > > > > GLfloat drdx, drdy; > GLfloat dgdx, dgdy; > GLfloat dbdx, dbdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); ># 370 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.interpMask |= 0x001; > if (ctx->Light.ShadeModel == 0x1D01) { > GLfloat eMaj_dr, eBot_dr; > GLfloat eMaj_dg, eBot_dg; > GLfloat eMaj_db, eBot_db; > > > > eMaj_dr = (GLfloat) ((GLint) vMax->color[0] - > (GLint) vMin->color[0]); > eBot_dr = (GLfloat) ((GLint) vMid->color[0] - > (GLint) vMin->color[0]); > drdx = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); > span.redStep = (((int) ((((drdx) * 2048.0f) >= 0.0F) ? (((drdx) * 2048.0f) + 0.5F) : (((drdx) * 2048.0f) - 0.5F)))); > drdy = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); > eMaj_dg = (GLfloat) ((GLint) vMax->color[1] - > (GLint) vMin->color[1]); > eBot_dg = (GLfloat) ((GLint) vMid->color[1] - > (GLint) vMin->color[1]); > dgdx = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); > span.greenStep = (((int) ((((dgdx) * 2048.0f) >= 0.0F) ? (((dgdx) * 2048.0f) + 0.5F) : (((dgdx) * 2048.0f) - 0.5F)))); > dgdy = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); > eMaj_db = (GLfloat) ((GLint) vMax->color[2] - > (GLint) vMin->color[2]); > eBot_db = (GLfloat) ((GLint) vMid->color[2] - > (GLint) vMin->color[2]); > dbdx = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); > span.blueStep = (((int) ((((dbdx) * 2048.0f) >= 0.0F) ? (((dbdx) * 2048.0f) + 0.5F) : (((dbdx) * 2048.0f) - 0.5F)))); > dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); ># 408 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > ; > span.interpMask |= 0x200; > drdx = drdy = 0.0F; > dgdx = dgdy = 0.0F; > dbdx = dbdy = 0.0F; > span.redStep = 0; > span.greenStep = 0; > span.blueStep = 0; > > > > > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; ># 726 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > GLfixed fr = 0, fdrOuter = 0, fdrInner; > GLfixed fg = 0, fdgOuter = 0, fdgInner; > GLfixed fb = 0, fdbOuter = 0, fdbInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; ># 888 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (ctx->Light.ShadeModel == 0x1D01) { > fr = (GLfixed) (((vLower->color[0]) << 11) > + drdx * adjx + drdy * adjy) + 0x00000400; > fdrOuter = (((int) ((((drdy + dxOuter * drdx) * 2048.0f) >= 0.0F) ? (((drdy + dxOuter * drdx) * 2048.0f) + 0.5F) : (((drdy + dxOuter * drdx) * 2048.0f) - 0.5F)))); > fg = (GLfixed) (((vLower->color[1]) << 11) > + dgdx * adjx + dgdy * adjy) + 0x00000400; > fdgOuter = (((int) ((((dgdy + dxOuter * dgdx) * 2048.0f) >= 0.0F) ? (((dgdy + dxOuter * dgdx) * 2048.0f) + 0.5F) : (((dgdy + dxOuter * dgdx) * 2048.0f) - 0.5F)))); > fb = (GLfixed) (((vLower->color[2]) << 11) > + dbdx * adjx + dbdy * adjy) + 0x00000400; > fdbOuter = (((int) ((((dbdy + dxOuter * dbdx) * 2048.0f) >= 0.0F) ? (((dbdy + dxOuter * dbdx) * 2048.0f) + 0.5F) : (((dbdy + dxOuter * dbdx) * 2048.0f) - 0.5F)))); > > > > > > } > else { > ; > fr = ((v2->color[0]) << 11); > fg = ((v2->color[1]) << 11); > fb = ((v2->color[2]) << 11); > fdrOuter = fdgOuter = fdbOuter = 0; > > > > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } ># 1079 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fdrInner = fdrOuter + span.redStep; > fdgInner = fdgOuter + span.greenStep; > fdbInner = fdbOuter + span.blueStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; ># 1137 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.red = fr; > span.green = fg; > span.blue = fb; ># 1179 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > > const GLint len = right - span.x - 1; > GLfixed ffrend = span.red + len * span.redStep; > GLfixed ffgend = span.green + len * span.greenStep; > GLfixed ffbend = span.blue + len * span.blueStep; > if (ffrend < 0) { > span.red -= ffrend; > if (span.red < 0) > span.red = 0; > } > if (ffgend < 0) { > span.green -= ffgend; > if (span.green < 0) > span.green = 0; > } > if (ffbend < 0) { > span.blue -= ffbend; > if (span.blue < 0) > span.blue = 0; > } > } ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; GLint x = span.x, y = ((xmesa->xm_buffer)->bottom-(span.y)); for (i = 0; i < span.end; i++, x++) { unsigned long p; p = xmesa->xm_visual->RtoPixel[((span.red) >> 11)] | xmesa->xm_visual->GtoPixel[((span.green) >> 11)] | xmesa->xm_visual->BtoPixel[((span.blue) >> 11)];; ((*((img)->f.put_pixel))((img), (x), (y), (p))); span.red += span.redStep; span.green += span.greenStep; span.blue += span.blueStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; ># 1275 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fr += fdrOuter; > fg += fdgOuter; > fb += fdbOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { ># 1328 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fr += fdrInner; > fg += fdgInner; > fb += fdbInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 838 "xm_tri.c" 2 >} > > > > > >static void smooth_8A8B8G8R_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 864 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > > > > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > > > > > > > GLfloat drdx, drdy; > GLfloat dgdx, dgdy; > GLfloat dbdx, dbdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); ># 370 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.interpMask |= 0x001; > if (ctx->Light.ShadeModel == 0x1D01) { > GLfloat eMaj_dr, eBot_dr; > GLfloat eMaj_dg, eBot_dg; > GLfloat eMaj_db, eBot_db; > > > > eMaj_dr = (GLfloat) ((GLint) vMax->color[0] - > (GLint) vMin->color[0]); > eBot_dr = (GLfloat) ((GLint) vMid->color[0] - > (GLint) vMin->color[0]); > drdx = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); > span.redStep = (((int) ((((drdx) * 2048.0f) >= 0.0F) ? (((drdx) * 2048.0f) + 0.5F) : (((drdx) * 2048.0f) - 0.5F)))); > drdy = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); > eMaj_dg = (GLfloat) ((GLint) vMax->color[1] - > (GLint) vMin->color[1]); > eBot_dg = (GLfloat) ((GLint) vMid->color[1] - > (GLint) vMin->color[1]); > dgdx = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); > span.greenStep = (((int) ((((dgdx) * 2048.0f) >= 0.0F) ? (((dgdx) * 2048.0f) + 0.5F) : (((dgdx) * 2048.0f) - 0.5F)))); > dgdy = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); > eMaj_db = (GLfloat) ((GLint) vMax->color[2] - > (GLint) vMin->color[2]); > eBot_db = (GLfloat) ((GLint) vMid->color[2] - > (GLint) vMin->color[2]); > dbdx = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); > span.blueStep = (((int) ((((dbdx) * 2048.0f) >= 0.0F) ? (((dbdx) * 2048.0f) + 0.5F) : (((dbdx) * 2048.0f) - 0.5F)))); > dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); ># 408 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > ; > span.interpMask |= 0x200; > drdx = drdy = 0.0F; > dgdx = dgdy = 0.0F; > dbdx = dbdy = 0.0F; > span.redStep = 0; > span.greenStep = 0; > span.blueStep = 0; > > > > > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLuint *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; ># 726 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > GLfixed fr = 0, fdrOuter = 0, fdrInner; > GLfixed fg = 0, fdgOuter = 0, fdgInner; > GLfixed fb = 0, fdbOuter = 0, fdbInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLuint *) ( (xmesa->xm_buffer)->ximage_origin4 - (span.y) * (xmesa->xm_buffer)->ximage_width4 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLuint); > > } ># 888 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (ctx->Light.ShadeModel == 0x1D01) { > fr = (GLfixed) (((vLower->color[0]) << 11) > + drdx * adjx + drdy * adjy) + 0x00000400; > fdrOuter = (((int) ((((drdy + dxOuter * drdx) * 2048.0f) >= 0.0F) ? (((drdy + dxOuter * drdx) * 2048.0f) + 0.5F) : (((drdy + dxOuter * drdx) * 2048.0f) - 0.5F)))); > fg = (GLfixed) (((vLower->color[1]) << 11) > + dgdx * adjx + dgdy * adjy) + 0x00000400; > fdgOuter = (((int) ((((dgdy + dxOuter * dgdx) * 2048.0f) >= 0.0F) ? (((dgdy + dxOuter * dgdx) * 2048.0f) + 0.5F) : (((dgdy + dxOuter * dgdx) * 2048.0f) - 0.5F)))); > fb = (GLfixed) (((vLower->color[2]) << 11) > + dbdx * adjx + dbdy * adjy) + 0x00000400; > fdbOuter = (((int) ((((dbdy + dxOuter * dbdx) * 2048.0f) >= 0.0F) ? (((dbdy + dxOuter * dbdx) * 2048.0f) + 0.5F) : (((dbdy + dxOuter * dbdx) * 2048.0f) - 0.5F)))); > > > > > > } > else { > ; > fr = ((v2->color[0]) << 11); > fg = ((v2->color[1]) << 11); > fb = ((v2->color[2]) << 11); > fdrOuter = fdgOuter = fdbOuter = 0; > > > > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLuint); ># 1079 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fdrInner = fdrOuter + span.redStep; > fdgInner = fdgOuter + span.greenStep; > fdbInner = fdbOuter + span.blueStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; ># 1137 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.red = fr; > span.green = fg; > span.blue = fb; ># 1179 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > > const GLint len = right - span.x - 1; > GLfixed ffrend = span.red + len * span.redStep; > GLfixed ffgend = span.green + len * span.greenStep; > GLfixed ffbend = span.blue + len * span.blueStep; > if (ffrend < 0) { > span.red -= ffrend; > if (span.red < 0) > span.red = 0; > } > if (ffgend < 0) { > span.green -= ffgend; > if (span.green < 0) > span.green = 0; > } > if (ffbend < 0) { > span.blue -= ffbend; > if (span.blue < 0) > span.blue = 0; > } > } ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; for (i = 0; i < span.end; i++) { pRow[i] = ( ((((span.blue) >> 11)) << 16) | ((((span.green) >> 11)) << 8) | (((span.red) >> 11)) ); span.red += span.redStep; span.green += span.greenStep; span.blue += span.blueStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLuint *) ((GLubyte *) pRow + dPRowOuter); ># 1275 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fr += fdrOuter; > fg += fdgOuter; > fb += fdbOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLuint *) ((GLubyte *) pRow + dPRowInner); ># 1328 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fr += fdrInner; > fg += fdgInner; > fb += fdbInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 865 "xm_tri.c" 2 >} > > > > > >static void smooth_8R8G8B_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 891 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > > > > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > > > > > > > GLfloat drdx, drdy; > GLfloat dgdx, dgdy; > GLfloat dbdx, dbdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); ># 370 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.interpMask |= 0x001; > if (ctx->Light.ShadeModel == 0x1D01) { > GLfloat eMaj_dr, eBot_dr; > GLfloat eMaj_dg, eBot_dg; > GLfloat eMaj_db, eBot_db; > > > > eMaj_dr = (GLfloat) ((GLint) vMax->color[0] - > (GLint) vMin->color[0]); > eBot_dr = (GLfloat) ((GLint) vMid->color[0] - > (GLint) vMin->color[0]); > drdx = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); > span.redStep = (((int) ((((drdx) * 2048.0f) >= 0.0F) ? (((drdx) * 2048.0f) + 0.5F) : (((drdx) * 2048.0f) - 0.5F)))); > drdy = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); > eMaj_dg = (GLfloat) ((GLint) vMax->color[1] - > (GLint) vMin->color[1]); > eBot_dg = (GLfloat) ((GLint) vMid->color[1] - > (GLint) vMin->color[1]); > dgdx = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); > span.greenStep = (((int) ((((dgdx) * 2048.0f) >= 0.0F) ? (((dgdx) * 2048.0f) + 0.5F) : (((dgdx) * 2048.0f) - 0.5F)))); > dgdy = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); > eMaj_db = (GLfloat) ((GLint) vMax->color[2] - > (GLint) vMin->color[2]); > eBot_db = (GLfloat) ((GLint) vMid->color[2] - > (GLint) vMin->color[2]); > dbdx = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); > span.blueStep = (((int) ((((dbdx) * 2048.0f) >= 0.0F) ? (((dbdx) * 2048.0f) + 0.5F) : (((dbdx) * 2048.0f) - 0.5F)))); > dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); ># 408 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > ; > span.interpMask |= 0x200; > drdx = drdy = 0.0F; > dgdx = dgdy = 0.0F; > dbdx = dbdy = 0.0F; > span.redStep = 0; > span.greenStep = 0; > span.blueStep = 0; > > > > > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLuint *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; ># 726 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > GLfixed fr = 0, fdrOuter = 0, fdrInner; > GLfixed fg = 0, fdgOuter = 0, fdgInner; > GLfixed fb = 0, fdbOuter = 0, fdbInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLuint *) ( (xmesa->xm_buffer)->ximage_origin4 - (span.y) * (xmesa->xm_buffer)->ximage_width4 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLuint); > > } ># 888 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (ctx->Light.ShadeModel == 0x1D01) { > fr = (GLfixed) (((vLower->color[0]) << 11) > + drdx * adjx + drdy * adjy) + 0x00000400; > fdrOuter = (((int) ((((drdy + dxOuter * drdx) * 2048.0f) >= 0.0F) ? (((drdy + dxOuter * drdx) * 2048.0f) + 0.5F) : (((drdy + dxOuter * drdx) * 2048.0f) - 0.5F)))); > fg = (GLfixed) (((vLower->color[1]) << 11) > + dgdx * adjx + dgdy * adjy) + 0x00000400; > fdgOuter = (((int) ((((dgdy + dxOuter * dgdx) * 2048.0f) >= 0.0F) ? (((dgdy + dxOuter * dgdx) * 2048.0f) + 0.5F) : (((dgdy + dxOuter * dgdx) * 2048.0f) - 0.5F)))); > fb = (GLfixed) (((vLower->color[2]) << 11) > + dbdx * adjx + dbdy * adjy) + 0x00000400; > fdbOuter = (((int) ((((dbdy + dxOuter * dbdx) * 2048.0f) >= 0.0F) ? (((dbdy + dxOuter * dbdx) * 2048.0f) + 0.5F) : (((dbdy + dxOuter * dbdx) * 2048.0f) - 0.5F)))); > > > > > > } > else { > ; > fr = ((v2->color[0]) << 11); > fg = ((v2->color[1]) << 11); > fb = ((v2->color[2]) << 11); > fdrOuter = fdgOuter = fdbOuter = 0; > > > > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLuint); ># 1079 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fdrInner = fdrOuter + span.redStep; > fdgInner = fdgOuter + span.greenStep; > fdbInner = fdbOuter + span.blueStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; ># 1137 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.red = fr; > span.green = fg; > span.blue = fb; ># 1179 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > > const GLint len = right - span.x - 1; > GLfixed ffrend = span.red + len * span.redStep; > GLfixed ffgend = span.green + len * span.greenStep; > GLfixed ffbend = span.blue + len * span.blueStep; > if (ffrend < 0) { > span.red -= ffrend; > if (span.red < 0) > span.red = 0; > } > if (ffgend < 0) { > span.green -= ffgend; > if (span.green < 0) > span.green = 0; > } > if (ffbend < 0) { > span.blue -= ffbend; > if (span.blue < 0) > span.blue = 0; > } > } ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; for (i = 0; i < span.end; i++) { pRow[i] = ( ((((span.red) >> 11)) << 16) | ((((span.green) >> 11)) << 8) | (((span.blue) >> 11)) ); span.red += span.redStep; span.green += span.greenStep; span.blue += span.blueStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLuint *) ((GLubyte *) pRow + dPRowOuter); ># 1275 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fr += fdrOuter; > fg += fdgOuter; > fb += fdbOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLuint *) ((GLubyte *) pRow + dPRowInner); ># 1328 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fr += fdrInner; > fg += fdgInner; > fb += fdbInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 892 "xm_tri.c" 2 >} > > > > > >static void smooth_8R8G8B24_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 920 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > > > > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > > > > > > > GLfloat drdx, drdy; > GLfloat dgdx, dgdy; > GLfloat dbdx, dbdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); ># 370 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.interpMask |= 0x001; > if (ctx->Light.ShadeModel == 0x1D01) { > GLfloat eMaj_dr, eBot_dr; > GLfloat eMaj_dg, eBot_dg; > GLfloat eMaj_db, eBot_db; > > > > eMaj_dr = (GLfloat) ((GLint) vMax->color[0] - > (GLint) vMin->color[0]); > eBot_dr = (GLfloat) ((GLint) vMid->color[0] - > (GLint) vMin->color[0]); > drdx = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); > span.redStep = (((int) ((((drdx) * 2048.0f) >= 0.0F) ? (((drdx) * 2048.0f) + 0.5F) : (((drdx) * 2048.0f) - 0.5F)))); > drdy = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); > eMaj_dg = (GLfloat) ((GLint) vMax->color[1] - > (GLint) vMin->color[1]); > eBot_dg = (GLfloat) ((GLint) vMid->color[1] - > (GLint) vMin->color[1]); > dgdx = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); > span.greenStep = (((int) ((((dgdx) * 2048.0f) >= 0.0F) ? (((dgdx) * 2048.0f) + 0.5F) : (((dgdx) * 2048.0f) - 0.5F)))); > dgdy = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); > eMaj_db = (GLfloat) ((GLint) vMax->color[2] - > (GLint) vMin->color[2]); > eBot_db = (GLfloat) ((GLint) vMid->color[2] - > (GLint) vMin->color[2]); > dbdx = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); > span.blueStep = (((int) ((((dbdx) * 2048.0f) >= 0.0F) ? (((dbdx) * 2048.0f) + 0.5F) : (((dbdx) * 2048.0f) - 0.5F)))); > dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); ># 408 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > ; > span.interpMask |= 0x200; > drdx = drdy = 0.0F; > dgdx = dgdy = 0.0F; > dbdx = dbdy = 0.0F; > span.redStep = 0; > span.greenStep = 0; > span.blueStep = 0; > > > > > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > bgr_t *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; ># 726 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > GLfixed fr = 0, fdrOuter = 0, fdrInner; > GLfixed fg = 0, fdgOuter = 0, fdgInner; > GLfixed fb = 0, fdbOuter = 0, fdbInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (bgr_t *) ( (bgr_t *) ( (xmesa->xm_buffer)->ximage_origin3 - (span.y) * (xmesa->xm_buffer)->ximage_width3 + 3 * (((fxLeftEdge) >> 11)) )); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(bgr_t); > > } ># 888 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (ctx->Light.ShadeModel == 0x1D01) { > fr = (GLfixed) (((vLower->color[0]) << 11) > + drdx * adjx + drdy * adjy) + 0x00000400; > fdrOuter = (((int) ((((drdy + dxOuter * drdx) * 2048.0f) >= 0.0F) ? (((drdy + dxOuter * drdx) * 2048.0f) + 0.5F) : (((drdy + dxOuter * drdx) * 2048.0f) - 0.5F)))); > fg = (GLfixed) (((vLower->color[1]) << 11) > + dgdx * adjx + dgdy * adjy) + 0x00000400; > fdgOuter = (((int) ((((dgdy + dxOuter * dgdx) * 2048.0f) >= 0.0F) ? (((dgdy + dxOuter * dgdx) * 2048.0f) + 0.5F) : (((dgdy + dxOuter * dgdx) * 2048.0f) - 0.5F)))); > fb = (GLfixed) (((vLower->color[2]) << 11) > + dbdx * adjx + dbdy * adjy) + 0x00000400; > fdbOuter = (((int) ((((dbdy + dxOuter * dbdx) * 2048.0f) >= 0.0F) ? (((dbdy + dxOuter * dbdx) * 2048.0f) + 0.5F) : (((dbdy + dxOuter * dbdx) * 2048.0f) - 0.5F)))); > > > > > > } > else { > ; > fr = ((v2->color[0]) << 11); > fg = ((v2->color[1]) << 11); > fb = ((v2->color[2]) << 11); > fdrOuter = fdgOuter = fdbOuter = 0; > > > > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(bgr_t); ># 1079 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fdrInner = fdrOuter + span.redStep; > fdgInner = fdgOuter + span.greenStep; > fdbInner = fdbOuter + span.blueStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; ># 1137 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.red = fr; > span.green = fg; > span.blue = fb; ># 1179 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > > const GLint len = right - span.x - 1; > GLfixed ffrend = span.red + len * span.redStep; > GLfixed ffgend = span.green + len * span.greenStep; > GLfixed ffbend = span.blue + len * span.blueStep; > if (ffrend < 0) { > span.red -= ffrend; > if (span.red < 0) > span.red = 0; > } > if (ffgend < 0) { > span.green -= ffgend; > if (span.green < 0) > span.green = 0; > } > if (ffbend < 0) { > span.blue -= ffbend; > if (span.blue < 0) > span.blue = 0; > } > } ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; bgr_t *pixel = pRow; for (i = 0; i < span.end; i++, pixel++) { pixel->r = ((span.red) >> 11); pixel->g = ((span.green) >> 11); pixel->b = ((span.blue) >> 11); span.red += span.redStep; span.green += span.greenStep; span.blue += span.blueStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (bgr_t *) ((GLubyte *) pRow + dPRowOuter); ># 1275 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fr += fdrOuter; > fg += fdgOuter; > fb += fdbOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (bgr_t *) ((GLubyte *) pRow + dPRowInner); ># 1328 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fr += fdrInner; > fg += fdgInner; > fb += fdbInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 921 "xm_tri.c" 2 >} > > > > > >static void smooth_TRUEDITHER_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; > XMesaImage *img = xmesa->xm_buffer->backimage; ># 948 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > > > > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > > > > > > > GLfloat drdx, drdy; > GLfloat dgdx, dgdy; > GLfloat dbdx, dbdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); ># 370 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.interpMask |= 0x001; > if (ctx->Light.ShadeModel == 0x1D01) { > GLfloat eMaj_dr, eBot_dr; > GLfloat eMaj_dg, eBot_dg; > GLfloat eMaj_db, eBot_db; > > > > eMaj_dr = (GLfloat) ((GLint) vMax->color[0] - > (GLint) vMin->color[0]); > eBot_dr = (GLfloat) ((GLint) vMid->color[0] - > (GLint) vMin->color[0]); > drdx = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); > span.redStep = (((int) ((((drdx) * 2048.0f) >= 0.0F) ? (((drdx) * 2048.0f) + 0.5F) : (((drdx) * 2048.0f) - 0.5F)))); > drdy = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); > eMaj_dg = (GLfloat) ((GLint) vMax->color[1] - > (GLint) vMin->color[1]); > eBot_dg = (GLfloat) ((GLint) vMid->color[1] - > (GLint) vMin->color[1]); > dgdx = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); > span.greenStep = (((int) ((((dgdx) * 2048.0f) >= 0.0F) ? (((dgdx) * 2048.0f) + 0.5F) : (((dgdx) * 2048.0f) - 0.5F)))); > dgdy = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); > eMaj_db = (GLfloat) ((GLint) vMax->color[2] - > (GLint) vMin->color[2]); > eBot_db = (GLfloat) ((GLint) vMid->color[2] - > (GLint) vMin->color[2]); > dbdx = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); > span.blueStep = (((int) ((((dbdx) * 2048.0f) >= 0.0F) ? (((dbdx) * 2048.0f) + 0.5F) : (((dbdx) * 2048.0f) - 0.5F)))); > dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); ># 408 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > ; > span.interpMask |= 0x200; > drdx = drdy = 0.0F; > dgdx = dgdy = 0.0F; > dbdx = dbdy = 0.0F; > span.redStep = 0; > span.greenStep = 0; > span.blueStep = 0; > > > > > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; ># 726 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > GLfixed fr = 0, fdrOuter = 0, fdrInner; > GLfixed fg = 0, fdgOuter = 0, fdgInner; > GLfixed fb = 0, fdbOuter = 0, fdbInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; ># 888 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (ctx->Light.ShadeModel == 0x1D01) { > fr = (GLfixed) (((vLower->color[0]) << 11) > + drdx * adjx + drdy * adjy) + 0x00000400; > fdrOuter = (((int) ((((drdy + dxOuter * drdx) * 2048.0f) >= 0.0F) ? (((drdy + dxOuter * drdx) * 2048.0f) + 0.5F) : (((drdy + dxOuter * drdx) * 2048.0f) - 0.5F)))); > fg = (GLfixed) (((vLower->color[1]) << 11) > + dgdx * adjx + dgdy * adjy) + 0x00000400; > fdgOuter = (((int) ((((dgdy + dxOuter * dgdx) * 2048.0f) >= 0.0F) ? (((dgdy + dxOuter * dgdx) * 2048.0f) + 0.5F) : (((dgdy + dxOuter * dgdx) * 2048.0f) - 0.5F)))); > fb = (GLfixed) (((vLower->color[2]) << 11) > + dbdx * adjx + dbdy * adjy) + 0x00000400; > fdbOuter = (((int) ((((dbdy + dxOuter * dbdx) * 2048.0f) >= 0.0F) ? (((dbdy + dxOuter * dbdx) * 2048.0f) + 0.5F) : (((dbdy + dxOuter * dbdx) * 2048.0f) - 0.5F)))); > > > > > > } > else { > ; > fr = ((v2->color[0]) << 11); > fg = ((v2->color[1]) << 11); > fb = ((v2->color[2]) << 11); > fdrOuter = fdgOuter = fdbOuter = 0; > > > > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } ># 1079 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fdrInner = fdrOuter + span.redStep; > fdgInner = fdgOuter + span.greenStep; > fdbInner = fdbOuter + span.blueStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; ># 1137 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.red = fr; > span.green = fg; > span.blue = fb; ># 1179 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > > const GLint len = right - span.x - 1; > GLfixed ffrend = span.red + len * span.redStep; > GLfixed ffgend = span.green + len * span.greenStep; > GLfixed ffbend = span.blue + len * span.blueStep; > if (ffrend < 0) { > span.red -= ffrend; > if (span.red < 0) > span.red = 0; > } > if (ffgend < 0) { > span.green -= ffgend; > if (span.green < 0) > span.green = 0; > } > if (ffbend < 0) { > span.blue -= ffbend; > if (span.blue < 0) > span.blue = 0; > } > } ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; GLint x = span.x, y = ((xmesa->xm_buffer)->bottom-(span.y)); for (i = 0; i < span.end; i++, x++) { unsigned long p; { int d = xmesa->xm_visual->Kernel[((x)&3) | (((y)&3)<<2)]; p = xmesa->xm_visual->RtoPixel[(((span.red) >> 11))+d] | xmesa->xm_visual->GtoPixel[(((span.green) >> 11))+d] | xmesa->xm_visual->BtoPixel[(((span.blue) >> 11))+d]; }; ((*((img)->f.put_pixel))((img), (x), (y), (p))); span.red += span.redStep; span.green += span.greenStep; span.blue += span.blueStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; ># 1275 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fr += fdrOuter; > fg += fdgOuter; > fb += fdbOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { ># 1328 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fr += fdrInner; > fg += fdgInner; > fb += fdbInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 949 "xm_tri.c" 2 >} > > > > > >static void smooth_5R6G5B_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 975 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > > > > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > > > > > > > GLfloat drdx, drdy; > GLfloat dgdx, dgdy; > GLfloat dbdx, dbdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); ># 370 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.interpMask |= 0x001; > if (ctx->Light.ShadeModel == 0x1D01) { > GLfloat eMaj_dr, eBot_dr; > GLfloat eMaj_dg, eBot_dg; > GLfloat eMaj_db, eBot_db; > > > > eMaj_dr = (GLfloat) ((GLint) vMax->color[0] - > (GLint) vMin->color[0]); > eBot_dr = (GLfloat) ((GLint) vMid->color[0] - > (GLint) vMin->color[0]); > drdx = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); > span.redStep = (((int) ((((drdx) * 2048.0f) >= 0.0F) ? (((drdx) * 2048.0f) + 0.5F) : (((drdx) * 2048.0f) - 0.5F)))); > drdy = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); > eMaj_dg = (GLfloat) ((GLint) vMax->color[1] - > (GLint) vMin->color[1]); > eBot_dg = (GLfloat) ((GLint) vMid->color[1] - > (GLint) vMin->color[1]); > dgdx = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); > span.greenStep = (((int) ((((dgdx) * 2048.0f) >= 0.0F) ? (((dgdx) * 2048.0f) + 0.5F) : (((dgdx) * 2048.0f) - 0.5F)))); > dgdy = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); > eMaj_db = (GLfloat) ((GLint) vMax->color[2] - > (GLint) vMin->color[2]); > eBot_db = (GLfloat) ((GLint) vMid->color[2] - > (GLint) vMin->color[2]); > dbdx = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); > span.blueStep = (((int) ((((dbdx) * 2048.0f) >= 0.0F) ? (((dbdx) * 2048.0f) + 0.5F) : (((dbdx) * 2048.0f) - 0.5F)))); > dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); ># 408 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > ; > span.interpMask |= 0x200; > drdx = drdy = 0.0F; > dgdx = dgdy = 0.0F; > dbdx = dbdy = 0.0F; > span.redStep = 0; > span.greenStep = 0; > span.blueStep = 0; > > > > > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLushort *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; ># 726 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > GLfixed fr = 0, fdrOuter = 0, fdrInner; > GLfixed fg = 0, fdgOuter = 0, fdgInner; > GLfixed fb = 0, fdbOuter = 0, fdbInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLushort *) ( (xmesa->xm_buffer)->ximage_origin2 - (span.y) * (xmesa->xm_buffer)->ximage_width2 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLushort); > > } ># 888 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (ctx->Light.ShadeModel == 0x1D01) { > fr = (GLfixed) (((vLower->color[0]) << 11) > + drdx * adjx + drdy * adjy) + 0x00000400; > fdrOuter = (((int) ((((drdy + dxOuter * drdx) * 2048.0f) >= 0.0F) ? (((drdy + dxOuter * drdx) * 2048.0f) + 0.5F) : (((drdy + dxOuter * drdx) * 2048.0f) - 0.5F)))); > fg = (GLfixed) (((vLower->color[1]) << 11) > + dgdx * adjx + dgdy * adjy) + 0x00000400; > fdgOuter = (((int) ((((dgdy + dxOuter * dgdx) * 2048.0f) >= 0.0F) ? (((dgdy + dxOuter * dgdx) * 2048.0f) + 0.5F) : (((dgdy + dxOuter * dgdx) * 2048.0f) - 0.5F)))); > fb = (GLfixed) (((vLower->color[2]) << 11) > + dbdx * adjx + dbdy * adjy) + 0x00000400; > fdbOuter = (((int) ((((dbdy + dxOuter * dbdx) * 2048.0f) >= 0.0F) ? (((dbdy + dxOuter * dbdx) * 2048.0f) + 0.5F) : (((dbdy + dxOuter * dbdx) * 2048.0f) - 0.5F)))); > > > > > > } > else { > ; > fr = ((v2->color[0]) << 11); > fg = ((v2->color[1]) << 11); > fb = ((v2->color[2]) << 11); > fdrOuter = fdgOuter = fdbOuter = 0; > > > > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLushort); ># 1079 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fdrInner = fdrOuter + span.redStep; > fdgInner = fdgOuter + span.greenStep; > fdbInner = fdbOuter + span.blueStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; ># 1137 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.red = fr; > span.green = fg; > span.blue = fb; ># 1179 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > > const GLint len = right - span.x - 1; > GLfixed ffrend = span.red + len * span.redStep; > GLfixed ffgend = span.green + len * span.greenStep; > GLfixed ffbend = span.blue + len * span.blueStep; > if (ffrend < 0) { > span.red -= ffrend; > if (span.red < 0) > span.red = 0; > } > if (ffgend < 0) { > span.green -= ffgend; > if (span.green < 0) > span.green = 0; > } > if (ffbend < 0) { > span.blue -= ffbend; > if (span.blue < 0) > span.blue = 0; > } > } ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; for (i = 0; i < span.end; i++) { pRow[i] = (GLushort) ( (((((span.red) >> 11)) & 0xf8) << 8) | (((((span.green) >> 11)) & 0xfc) << 3) | ((((span.blue) >> 11)) >> 3) ); span.red += span.redStep; span.green += span.greenStep; span.blue += span.blueStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLushort *) ((GLubyte *) pRow + dPRowOuter); ># 1275 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fr += fdrOuter; > fg += fdgOuter; > fb += fdbOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLushort *) ((GLubyte *) pRow + dPRowInner); ># 1328 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fr += fdrInner; > fg += fdgInner; > fb += fdbInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 976 "xm_tri.c" 2 >} > > > > > >static void smooth_DITHER_5R6G5B_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 1003 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > > > > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > > > > > > > GLfloat drdx, drdy; > GLfloat dgdx, dgdy; > GLfloat dbdx, dbdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); ># 370 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.interpMask |= 0x001; > if (ctx->Light.ShadeModel == 0x1D01) { > GLfloat eMaj_dr, eBot_dr; > GLfloat eMaj_dg, eBot_dg; > GLfloat eMaj_db, eBot_db; > > > > eMaj_dr = (GLfloat) ((GLint) vMax->color[0] - > (GLint) vMin->color[0]); > eBot_dr = (GLfloat) ((GLint) vMid->color[0] - > (GLint) vMin->color[0]); > drdx = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); > span.redStep = (((int) ((((drdx) * 2048.0f) >= 0.0F) ? (((drdx) * 2048.0f) + 0.5F) : (((drdx) * 2048.0f) - 0.5F)))); > drdy = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); > eMaj_dg = (GLfloat) ((GLint) vMax->color[1] - > (GLint) vMin->color[1]); > eBot_dg = (GLfloat) ((GLint) vMid->color[1] - > (GLint) vMin->color[1]); > dgdx = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); > span.greenStep = (((int) ((((dgdx) * 2048.0f) >= 0.0F) ? (((dgdx) * 2048.0f) + 0.5F) : (((dgdx) * 2048.0f) - 0.5F)))); > dgdy = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); > eMaj_db = (GLfloat) ((GLint) vMax->color[2] - > (GLint) vMin->color[2]); > eBot_db = (GLfloat) ((GLint) vMid->color[2] - > (GLint) vMin->color[2]); > dbdx = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); > span.blueStep = (((int) ((((dbdx) * 2048.0f) >= 0.0F) ? (((dbdx) * 2048.0f) + 0.5F) : (((dbdx) * 2048.0f) - 0.5F)))); > dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); ># 408 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > ; > span.interpMask |= 0x200; > drdx = drdy = 0.0F; > dgdx = dgdy = 0.0F; > dbdx = dbdy = 0.0F; > span.redStep = 0; > span.greenStep = 0; > span.blueStep = 0; > > > > > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLushort *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; ># 726 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > GLfixed fr = 0, fdrOuter = 0, fdrInner; > GLfixed fg = 0, fdgOuter = 0, fdgInner; > GLfixed fb = 0, fdbOuter = 0, fdbInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLushort *) ( (xmesa->xm_buffer)->ximage_origin2 - (span.y) * (xmesa->xm_buffer)->ximage_width2 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLushort); > > } ># 888 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (ctx->Light.ShadeModel == 0x1D01) { > fr = (GLfixed) (((vLower->color[0]) << 11) > + drdx * adjx + drdy * adjy) + 0x00000400; > fdrOuter = (((int) ((((drdy + dxOuter * drdx) * 2048.0f) >= 0.0F) ? (((drdy + dxOuter * drdx) * 2048.0f) + 0.5F) : (((drdy + dxOuter * drdx) * 2048.0f) - 0.5F)))); > fg = (GLfixed) (((vLower->color[1]) << 11) > + dgdx * adjx + dgdy * adjy) + 0x00000400; > fdgOuter = (((int) ((((dgdy + dxOuter * dgdx) * 2048.0f) >= 0.0F) ? (((dgdy + dxOuter * dgdx) * 2048.0f) + 0.5F) : (((dgdy + dxOuter * dgdx) * 2048.0f) - 0.5F)))); > fb = (GLfixed) (((vLower->color[2]) << 11) > + dbdx * adjx + dbdy * adjy) + 0x00000400; > fdbOuter = (((int) ((((dbdy + dxOuter * dbdx) * 2048.0f) >= 0.0F) ? (((dbdy + dxOuter * dbdx) * 2048.0f) + 0.5F) : (((dbdy + dxOuter * dbdx) * 2048.0f) - 0.5F)))); > > > > > > } > else { > ; > fr = ((v2->color[0]) << 11); > fg = ((v2->color[1]) << 11); > fb = ((v2->color[2]) << 11); > fdrOuter = fdgOuter = fdbOuter = 0; > > > > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLushort); ># 1079 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fdrInner = fdrOuter + span.redStep; > fdgInner = fdgOuter + span.greenStep; > fdbInner = fdbOuter + span.blueStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; ># 1137 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.red = fr; > span.green = fg; > span.blue = fb; ># 1179 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > > const GLint len = right - span.x - 1; > GLfixed ffrend = span.red + len * span.redStep; > GLfixed ffgend = span.green + len * span.greenStep; > GLfixed ffbend = span.blue + len * span.blueStep; > if (ffrend < 0) { > span.red -= ffrend; > if (span.red < 0) > span.red = 0; > } > if (ffgend < 0) { > span.green -= ffgend; > if (span.green < 0) > span.green = 0; > } > if (ffbend < 0) { > span.blue -= ffbend; > if (span.blue < 0) > span.blue = 0; > } > } ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; GLint x = span.x, y = ((xmesa->xm_buffer)->bottom-(span.y)); for (i = 0; i < span.end; i++, x++) { { int d = xmesa->xm_visual->Kernel[((x)&3) | (((y)&3)<<2)]; pRow[i] = xmesa->xm_visual->RtoPixel[(((span.red) >> 11))+d] | xmesa->xm_visual->GtoPixel[(((span.green) >> 11))+d] | xmesa->xm_visual->BtoPixel[(((span.blue) >> 11))+d]; }; span.red += span.redStep; span.green += span.greenStep; span.blue += span.blueStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLushort *) ((GLubyte *) pRow + dPRowOuter); ># 1275 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fr += fdrOuter; > fg += fdgOuter; > fb += fdbOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLushort *) ((GLubyte *) pRow + dPRowInner); ># 1328 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fr += fdrInner; > fg += fdgInner; > fb += fdbInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 1004 "xm_tri.c" 2 >} > > > > > >static void smooth_DITHER8_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 1032 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > > > > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > > > > > > > GLfloat drdx, drdy; > GLfloat dgdx, dgdy; > GLfloat dbdx, dbdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); ># 370 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.interpMask |= 0x001; > if (ctx->Light.ShadeModel == 0x1D01) { > GLfloat eMaj_dr, eBot_dr; > GLfloat eMaj_dg, eBot_dg; > GLfloat eMaj_db, eBot_db; > > > > eMaj_dr = (GLfloat) ((GLint) vMax->color[0] - > (GLint) vMin->color[0]); > eBot_dr = (GLfloat) ((GLint) vMid->color[0] - > (GLint) vMin->color[0]); > drdx = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); > span.redStep = (((int) ((((drdx) * 2048.0f) >= 0.0F) ? (((drdx) * 2048.0f) + 0.5F) : (((drdx) * 2048.0f) - 0.5F)))); > drdy = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); > eMaj_dg = (GLfloat) ((GLint) vMax->color[1] - > (GLint) vMin->color[1]); > eBot_dg = (GLfloat) ((GLint) vMid->color[1] - > (GLint) vMin->color[1]); > dgdx = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); > span.greenStep = (((int) ((((dgdx) * 2048.0f) >= 0.0F) ? (((dgdx) * 2048.0f) + 0.5F) : (((dgdx) * 2048.0f) - 0.5F)))); > dgdy = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); > eMaj_db = (GLfloat) ((GLint) vMax->color[2] - > (GLint) vMin->color[2]); > eBot_db = (GLfloat) ((GLint) vMid->color[2] - > (GLint) vMin->color[2]); > dbdx = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); > span.blueStep = (((int) ((((dbdx) * 2048.0f) >= 0.0F) ? (((dbdx) * 2048.0f) + 0.5F) : (((dbdx) * 2048.0f) - 0.5F)))); > dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); ># 408 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > ; > span.interpMask |= 0x200; > drdx = drdy = 0.0F; > dgdx = dgdy = 0.0F; > dbdx = dbdy = 0.0F; > span.redStep = 0; > span.greenStep = 0; > span.blueStep = 0; > > > > > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLubyte *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; ># 726 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > GLfixed fr = 0, fdrOuter = 0, fdrInner; > GLfixed fg = 0, fdgOuter = 0, fdgInner; > GLfixed fb = 0, fdbOuter = 0, fdbInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLubyte *) ( (xmesa->xm_buffer)->ximage_origin1 - (span.y) * (xmesa->xm_buffer)->ximage_width1 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLubyte); > > } ># 888 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (ctx->Light.ShadeModel == 0x1D01) { > fr = (GLfixed) (((vLower->color[0]) << 11) > + drdx * adjx + drdy * adjy) + 0x00000400; > fdrOuter = (((int) ((((drdy + dxOuter * drdx) * 2048.0f) >= 0.0F) ? (((drdy + dxOuter * drdx) * 2048.0f) + 0.5F) : (((drdy + dxOuter * drdx) * 2048.0f) - 0.5F)))); > fg = (GLfixed) (((vLower->color[1]) << 11) > + dgdx * adjx + dgdy * adjy) + 0x00000400; > fdgOuter = (((int) ((((dgdy + dxOuter * dgdx) * 2048.0f) >= 0.0F) ? (((dgdy + dxOuter * dgdx) * 2048.0f) + 0.5F) : (((dgdy + dxOuter * dgdx) * 2048.0f) - 0.5F)))); > fb = (GLfixed) (((vLower->color[2]) << 11) > + dbdx * adjx + dbdy * adjy) + 0x00000400; > fdbOuter = (((int) ((((dbdy + dxOuter * dbdx) * 2048.0f) >= 0.0F) ? (((dbdy + dxOuter * dbdx) * 2048.0f) + 0.5F) : (((dbdy + dxOuter * dbdx) * 2048.0f) - 0.5F)))); > > > > > > } > else { > ; > fr = ((v2->color[0]) << 11); > fg = ((v2->color[1]) << 11); > fb = ((v2->color[2]) << 11); > fdrOuter = fdgOuter = fdbOuter = 0; > > > > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLubyte); ># 1079 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fdrInner = fdrOuter + span.redStep; > fdgInner = fdgOuter + span.greenStep; > fdbInner = fdbOuter + span.blueStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; ># 1137 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.red = fr; > span.green = fg; > span.blue = fb; ># 1179 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > > const GLint len = right - span.x - 1; > GLfixed ffrend = span.red + len * span.redStep; > GLfixed ffgend = span.green + len * span.greenStep; > GLfixed ffbend = span.blue + len * span.blueStep; > if (ffrend < 0) { > span.red -= ffrend; > if (span.red < 0) > span.red = 0; > } > if (ffgend < 0) { > span.green -= ffgend; > if (span.green < 0) > span.green = 0; > } > if (ffbend < 0) { > span.blue -= ffbend; > if (span.blue < 0) > span.blue = 0; > } > } ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; GLint x = span.x, y = ((xmesa->xm_buffer)->bottom-(span.y)); int __d; unsigned long *ctable = xmesa->xm_buffer->color_table; int *kernel = &kernel8[ ((y)&3) << 2 ];; for (i = 0; i < span.end; i++, x++) { pRow[i] = (GLubyte) (__d = kernel[(x)&3], ctable[((((((unsigned)(((4 * 4) * (9 - 1) + 1) * (((span.green) >> 11)) + __d)) >> 12)) << 6) | (((((unsigned)(((4 * 4) * (5 - 1) + 1) * (((span.blue) >> 11)) + __d)) >> 12)) << 3) | ((((unsigned)(((4 * 4) * (5 - 1) + 1) * (((span.red) >> 11)) + __d)) >> 12)))]); span.red += span.redStep; span.green += span.greenStep; span.blue += span.blueStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLubyte *) ((GLubyte *) pRow + dPRowOuter); ># 1275 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fr += fdrOuter; > fg += fdgOuter; > fb += fdbOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLubyte *) ((GLubyte *) pRow + dPRowInner); ># 1328 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fr += fdrInner; > fg += fdgInner; > fb += fdbInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 1033 "xm_tri.c" 2 >} > > > > > >static void smooth_DITHER_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; > XMesaImage *img = xmesa->xm_buffer->backimage; ># 1060 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > > > > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > > > > > > > GLfloat drdx, drdy; > GLfloat dgdx, dgdy; > GLfloat dbdx, dbdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); ># 370 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.interpMask |= 0x001; > if (ctx->Light.ShadeModel == 0x1D01) { > GLfloat eMaj_dr, eBot_dr; > GLfloat eMaj_dg, eBot_dg; > GLfloat eMaj_db, eBot_db; > > > > eMaj_dr = (GLfloat) ((GLint) vMax->color[0] - > (GLint) vMin->color[0]); > eBot_dr = (GLfloat) ((GLint) vMid->color[0] - > (GLint) vMin->color[0]); > drdx = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); > span.redStep = (((int) ((((drdx) * 2048.0f) >= 0.0F) ? (((drdx) * 2048.0f) + 0.5F) : (((drdx) * 2048.0f) - 0.5F)))); > drdy = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); > eMaj_dg = (GLfloat) ((GLint) vMax->color[1] - > (GLint) vMin->color[1]); > eBot_dg = (GLfloat) ((GLint) vMid->color[1] - > (GLint) vMin->color[1]); > dgdx = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); > span.greenStep = (((int) ((((dgdx) * 2048.0f) >= 0.0F) ? (((dgdx) * 2048.0f) + 0.5F) : (((dgdx) * 2048.0f) - 0.5F)))); > dgdy = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); > eMaj_db = (GLfloat) ((GLint) vMax->color[2] - > (GLint) vMin->color[2]); > eBot_db = (GLfloat) ((GLint) vMid->color[2] - > (GLint) vMin->color[2]); > dbdx = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); > span.blueStep = (((int) ((((dbdx) * 2048.0f) >= 0.0F) ? (((dbdx) * 2048.0f) + 0.5F) : (((dbdx) * 2048.0f) - 0.5F)))); > dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); ># 408 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > ; > span.interpMask |= 0x200; > drdx = drdy = 0.0F; > dgdx = dgdy = 0.0F; > dbdx = dbdy = 0.0F; > span.redStep = 0; > span.greenStep = 0; > span.blueStep = 0; > > > > > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; ># 726 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > GLfixed fr = 0, fdrOuter = 0, fdrInner; > GLfixed fg = 0, fdgOuter = 0, fdgInner; > GLfixed fb = 0, fdbOuter = 0, fdbInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; ># 888 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (ctx->Light.ShadeModel == 0x1D01) { > fr = (GLfixed) (((vLower->color[0]) << 11) > + drdx * adjx + drdy * adjy) + 0x00000400; > fdrOuter = (((int) ((((drdy + dxOuter * drdx) * 2048.0f) >= 0.0F) ? (((drdy + dxOuter * drdx) * 2048.0f) + 0.5F) : (((drdy + dxOuter * drdx) * 2048.0f) - 0.5F)))); > fg = (GLfixed) (((vLower->color[1]) << 11) > + dgdx * adjx + dgdy * adjy) + 0x00000400; > fdgOuter = (((int) ((((dgdy + dxOuter * dgdx) * 2048.0f) >= 0.0F) ? (((dgdy + dxOuter * dgdx) * 2048.0f) + 0.5F) : (((dgdy + dxOuter * dgdx) * 2048.0f) - 0.5F)))); > fb = (GLfixed) (((vLower->color[2]) << 11) > + dbdx * adjx + dbdy * adjy) + 0x00000400; > fdbOuter = (((int) ((((dbdy + dxOuter * dbdx) * 2048.0f) >= 0.0F) ? (((dbdy + dxOuter * dbdx) * 2048.0f) + 0.5F) : (((dbdy + dxOuter * dbdx) * 2048.0f) - 0.5F)))); > > > > > > } > else { > ; > fr = ((v2->color[0]) << 11); > fg = ((v2->color[1]) << 11); > fb = ((v2->color[2]) << 11); > fdrOuter = fdgOuter = fdbOuter = 0; > > > > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } ># 1079 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fdrInner = fdrOuter + span.redStep; > fdgInner = fdgOuter + span.greenStep; > fdbInner = fdbOuter + span.blueStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; ># 1137 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.red = fr; > span.green = fg; > span.blue = fb; ># 1179 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > > const GLint len = right - span.x - 1; > GLfixed ffrend = span.red + len * span.redStep; > GLfixed ffgend = span.green + len * span.greenStep; > GLfixed ffbend = span.blue + len * span.blueStep; > if (ffrend < 0) { > span.red -= ffrend; > if (span.red < 0) > span.red = 0; > } > if (ffgend < 0) { > span.green -= ffgend; > if (span.green < 0) > span.green = 0; > } > if (ffbend < 0) { > span.blue -= ffbend; > if (span.blue < 0) > span.blue = 0; > } > } ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; GLint x = span.x, y = ((xmesa->xm_buffer)->bottom-(span.y)); int __d; unsigned long *ctable = xmesa->xm_buffer->color_table; int *kernel = &kernel8[ ((y)&3) << 2 ];; for (i = 0; i < span.end; i++, x++) { unsigned long p = (__d = kernel[(x)&3], ctable[((((((unsigned)(((4 * 4) * (9 - 1) + 1) * (((span.green) >> 11)) + __d)) >> 12)) << 6) | (((((unsigned)(((4 * 4) * (5 - 1) + 1) * (((span.blue) >> 11)) + __d)) >> 12)) << 3) | ((((unsigned)(((4 * 4) * (5 - 1) + 1) * (((span.red) >> 11)) + __d)) >> 12)))]); ((*((img)->f.put_pixel))((img), (x), (y), (p))); span.red += span.redStep; span.green += span.greenStep; span.blue += span.blueStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; ># 1275 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fr += fdrOuter; > fg += fdgOuter; > fb += fdbOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { ># 1328 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fr += fdrInner; > fg += fdgInner; > fb += fdbInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 1061 "xm_tri.c" 2 >} > > > > > >static void smooth_LOOKUP8_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 1088 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > > > > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > > > > > > > GLfloat drdx, drdy; > GLfloat dgdx, dgdy; > GLfloat dbdx, dbdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); ># 370 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.interpMask |= 0x001; > if (ctx->Light.ShadeModel == 0x1D01) { > GLfloat eMaj_dr, eBot_dr; > GLfloat eMaj_dg, eBot_dg; > GLfloat eMaj_db, eBot_db; > > > > eMaj_dr = (GLfloat) ((GLint) vMax->color[0] - > (GLint) vMin->color[0]); > eBot_dr = (GLfloat) ((GLint) vMid->color[0] - > (GLint) vMin->color[0]); > drdx = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); > span.redStep = (((int) ((((drdx) * 2048.0f) >= 0.0F) ? (((drdx) * 2048.0f) + 0.5F) : (((drdx) * 2048.0f) - 0.5F)))); > drdy = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); > eMaj_dg = (GLfloat) ((GLint) vMax->color[1] - > (GLint) vMin->color[1]); > eBot_dg = (GLfloat) ((GLint) vMid->color[1] - > (GLint) vMin->color[1]); > dgdx = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); > span.greenStep = (((int) ((((dgdx) * 2048.0f) >= 0.0F) ? (((dgdx) * 2048.0f) + 0.5F) : (((dgdx) * 2048.0f) - 0.5F)))); > dgdy = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); > eMaj_db = (GLfloat) ((GLint) vMax->color[2] - > (GLint) vMin->color[2]); > eBot_db = (GLfloat) ((GLint) vMid->color[2] - > (GLint) vMin->color[2]); > dbdx = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); > span.blueStep = (((int) ((((dbdx) * 2048.0f) >= 0.0F) ? (((dbdx) * 2048.0f) + 0.5F) : (((dbdx) * 2048.0f) - 0.5F)))); > dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); ># 408 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > ; > span.interpMask |= 0x200; > drdx = drdy = 0.0F; > dgdx = dgdy = 0.0F; > dbdx = dbdy = 0.0F; > span.redStep = 0; > span.greenStep = 0; > span.blueStep = 0; > > > > > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLubyte *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; ># 726 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > GLfixed fr = 0, fdrOuter = 0, fdrInner; > GLfixed fg = 0, fdgOuter = 0, fdgInner; > GLfixed fb = 0, fdbOuter = 0, fdbInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLubyte *) ( (xmesa->xm_buffer)->ximage_origin1 - (span.y) * (xmesa->xm_buffer)->ximage_width1 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLubyte); > > } ># 888 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (ctx->Light.ShadeModel == 0x1D01) { > fr = (GLfixed) (((vLower->color[0]) << 11) > + drdx * adjx + drdy * adjy) + 0x00000400; > fdrOuter = (((int) ((((drdy + dxOuter * drdx) * 2048.0f) >= 0.0F) ? (((drdy + dxOuter * drdx) * 2048.0f) + 0.5F) : (((drdy + dxOuter * drdx) * 2048.0f) - 0.5F)))); > fg = (GLfixed) (((vLower->color[1]) << 11) > + dgdx * adjx + dgdy * adjy) + 0x00000400; > fdgOuter = (((int) ((((dgdy + dxOuter * dgdx) * 2048.0f) >= 0.0F) ? (((dgdy + dxOuter * dgdx) * 2048.0f) + 0.5F) : (((dgdy + dxOuter * dgdx) * 2048.0f) - 0.5F)))); > fb = (GLfixed) (((vLower->color[2]) << 11) > + dbdx * adjx + dbdy * adjy) + 0x00000400; > fdbOuter = (((int) ((((dbdy + dxOuter * dbdx) * 2048.0f) >= 0.0F) ? (((dbdy + dxOuter * dbdx) * 2048.0f) + 0.5F) : (((dbdy + dxOuter * dbdx) * 2048.0f) - 0.5F)))); > > > > > > } > else { > ; > fr = ((v2->color[0]) << 11); > fg = ((v2->color[1]) << 11); > fb = ((v2->color[2]) << 11); > fdrOuter = fdgOuter = fdbOuter = 0; > > > > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLubyte); ># 1079 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fdrInner = fdrOuter + span.redStep; > fdgInner = fdgOuter + span.greenStep; > fdbInner = fdbOuter + span.blueStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; ># 1137 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.red = fr; > span.green = fg; > span.blue = fb; ># 1179 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > > const GLint len = right - span.x - 1; > GLfixed ffrend = span.red + len * span.redStep; > GLfixed ffgend = span.green + len * span.greenStep; > GLfixed ffbend = span.blue + len * span.blueStep; > if (ffrend < 0) { > span.red -= ffrend; > if (span.red < 0) > span.red = 0; > } > if (ffgend < 0) { > span.green -= ffgend; > if (span.green < 0) > span.green = 0; > } > if (ffbend < 0) { > span.blue -= ffbend; > if (span.blue < 0) > span.blue = 0; > } > } ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; unsigned long *ctable = xmesa->xm_buffer->color_table; for (i = 0; i < span.end; i++) { pRow[i] = ctable[((((((unsigned)(((4 * 4) * (9 - 1) + 1) * (((span.green) >> 11)))) >> 12)) << 6) | (((((unsigned)(((4 * 4) * (5 - 1) + 1) * (((span.blue) >> 11)))) >> 12)) << 3) | ((((unsigned)(((4 * 4) * (5 - 1) + 1) * (((span.red) >> 11)))) >> 12)))]; span.red += span.redStep; span.green += span.greenStep; span.blue += span.blueStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLubyte *) ((GLubyte *) pRow + dPRowOuter); ># 1275 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fr += fdrOuter; > fg += fdgOuter; > fb += fdbOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLubyte *) ((GLubyte *) pRow + dPRowInner); ># 1328 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fr += fdrInner; > fg += fdgInner; > fb += fdbInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 1089 "xm_tri.c" 2 >} > > > > > > >static void smooth_HPCR_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 1117 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > > > > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; > > > > > > > > GLfloat drdx, drdy; > GLfloat dgdx, dgdy; > GLfloat dbdx, dbdy; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); ># 370 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.interpMask |= 0x001; > if (ctx->Light.ShadeModel == 0x1D01) { > GLfloat eMaj_dr, eBot_dr; > GLfloat eMaj_dg, eBot_dg; > GLfloat eMaj_db, eBot_db; > > > > eMaj_dr = (GLfloat) ((GLint) vMax->color[0] - > (GLint) vMin->color[0]); > eBot_dr = (GLfloat) ((GLint) vMid->color[0] - > (GLint) vMin->color[0]); > drdx = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); > span.redStep = (((int) ((((drdx) * 2048.0f) >= 0.0F) ? (((drdx) * 2048.0f) + 0.5F) : (((drdx) * 2048.0f) - 0.5F)))); > drdy = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); > eMaj_dg = (GLfloat) ((GLint) vMax->color[1] - > (GLint) vMin->color[1]); > eBot_dg = (GLfloat) ((GLint) vMid->color[1] - > (GLint) vMin->color[1]); > dgdx = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); > span.greenStep = (((int) ((((dgdx) * 2048.0f) >= 0.0F) ? (((dgdx) * 2048.0f) + 0.5F) : (((dgdx) * 2048.0f) - 0.5F)))); > dgdy = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); > eMaj_db = (GLfloat) ((GLint) vMax->color[2] - > (GLint) vMin->color[2]); > eBot_db = (GLfloat) ((GLint) vMid->color[2] - > (GLint) vMin->color[2]); > dbdx = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); > span.blueStep = (((int) ((((dbdx) * 2048.0f) >= 0.0F) ? (((dbdx) * 2048.0f) + 0.5F) : (((dbdx) * 2048.0f) - 0.5F)))); > dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); ># 408 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > ; > span.interpMask |= 0x200; > drdx = drdy = 0.0F; > dgdx = dgdy = 0.0F; > dbdx = dbdy = 0.0F; > span.redStep = 0; > span.greenStep = 0; > span.blueStep = 0; > > > > > } ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLubyte *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; ># 726 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > GLfixed fr = 0, fdrOuter = 0, fdrInner; > GLfixed fg = 0, fdgOuter = 0, fdgInner; > GLfixed fb = 0, fdbOuter = 0, fdbInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLubyte *) ( (xmesa->xm_buffer)->ximage_origin1 - (span.y) * (xmesa->xm_buffer)->ximage_width1 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLubyte); > > } ># 888 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (ctx->Light.ShadeModel == 0x1D01) { > fr = (GLfixed) (((vLower->color[0]) << 11) > + drdx * adjx + drdy * adjy) + 0x00000400; > fdrOuter = (((int) ((((drdy + dxOuter * drdx) * 2048.0f) >= 0.0F) ? (((drdy + dxOuter * drdx) * 2048.0f) + 0.5F) : (((drdy + dxOuter * drdx) * 2048.0f) - 0.5F)))); > fg = (GLfixed) (((vLower->color[1]) << 11) > + dgdx * adjx + dgdy * adjy) + 0x00000400; > fdgOuter = (((int) ((((dgdy + dxOuter * dgdx) * 2048.0f) >= 0.0F) ? (((dgdy + dxOuter * dgdx) * 2048.0f) + 0.5F) : (((dgdy + dxOuter * dgdx) * 2048.0f) - 0.5F)))); > fb = (GLfixed) (((vLower->color[2]) << 11) > + dbdx * adjx + dbdy * adjy) + 0x00000400; > fdbOuter = (((int) ((((dbdy + dxOuter * dbdx) * 2048.0f) >= 0.0F) ? (((dbdy + dxOuter * dbdx) * 2048.0f) + 0.5F) : (((dbdy + dxOuter * dbdx) * 2048.0f) - 0.5F)))); > > > > > > } > else { > ; > fr = ((v2->color[0]) << 11); > fg = ((v2->color[1]) << 11); > fb = ((v2->color[2]) << 11); > fdrOuter = fdgOuter = fdbOuter = 0; > > > > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLubyte); ># 1079 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fdrInner = fdrOuter + span.redStep; > fdgInner = fdgOuter + span.greenStep; > fdbInner = fdbOuter + span.blueStep; ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; ># 1137 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > span.red = fr; > span.green = fg; > span.blue = fb; ># 1179 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > > const GLint len = right - span.x - 1; > GLfixed ffrend = span.red + len * span.redStep; > GLfixed ffgend = span.green + len * span.greenStep; > GLfixed ffbend = span.blue + len * span.blueStep; > if (ffrend < 0) { > span.red -= ffrend; > if (span.red < 0) > span.red = 0; > } > if (ffgend < 0) { > span.green -= ffgend; > if (span.green < 0) > span.green = 0; > } > if (ffbend < 0) { > span.blue -= ffbend; > if (span.blue < 0) > span.blue = 0; > } > } ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; GLint x = span.x, y = ((xmesa->xm_buffer)->bottom-(span.y)); for (i = 0; i < span.end; i++, x++) { pRow[i] = ( ((xmesa->xm_visual->hpcr_rgbTbl[0][((span.red) >> 11)] + HPCR_DRGB[0][(y)&1][(x)&15]) & 0xE0) |(((xmesa->xm_visual->hpcr_rgbTbl[1][((span.green) >> 11)] + HPCR_DRGB[1][(y)&1][(x)&15]) & 0xE0)>>3) | ((xmesa->xm_visual->hpcr_rgbTbl[2][((span.blue) >> 11)] + HPCR_DRGB[2][(y)&1][(x)&15])>>6) ); span.red += span.redStep; span.green += span.greenStep; span.blue += span.blueStep; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLubyte *) ((GLubyte *) pRow + dPRowOuter); ># 1275 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fr += fdrOuter; > fg += fdgOuter; > fb += fdbOuter; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLubyte *) ((GLubyte *) pRow + dPRowInner); ># 1328 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > fr += fdrInner; > fg += fdgInner; > fb += fdbInner; ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 1118 "xm_tri.c" 2 >} > > > > > >static void flat_TRUECOLOR_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; > XMesaImage *img = xmesa->xm_buffer->backimage; ># 1142 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > > > > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; ># 332 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > unsigned long pixel; pixel = xmesa->xm_visual->RtoPixel[v2->color[0]] | xmesa->xm_visual->GtoPixel[v2->color[1]] | xmesa->xm_visual->BtoPixel[v2->color[2]];; > > > scan_from_left_to_right = (oneOverArea < 0.0F); ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; GLint x = span.x, y = ((xmesa->xm_buffer)->bottom-(span.y)); for (i = 0; i < span.end; i++, x++) { ((*((img)->f.put_pixel))((img), (x), (y), (pixel))); }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 1143 "xm_tri.c" 2 >} > > > > > >static void flat_8A8B8G8R_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 1167 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > > > > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; ># 332 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > unsigned long p = ( ((v2->color[2]) << 16) | ((v2->color[1]) << 8) | (v2->color[0]) ); > > > scan_from_left_to_right = (oneOverArea < 0.0F); ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLuint *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLuint *) ( (xmesa->xm_buffer)->ximage_origin4 - (span.y) * (xmesa->xm_buffer)->ximage_width4 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLuint); > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLuint); ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; for (i = 0; i < span.end; i++) { pRow[i] = (GLuint) p; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLuint *) ((GLubyte *) pRow + dPRowOuter); ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLuint *) ((GLubyte *) pRow + dPRowInner); ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 1168 "xm_tri.c" 2 >} > > > > > >static void flat_8R8G8B_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 1192 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > > > > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; ># 332 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > unsigned long p = ( ((v2->color[0]) << 16) | ((v2->color[1]) << 8) | (v2->color[2]) ); > > > scan_from_left_to_right = (oneOverArea < 0.0F); ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLuint *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLuint *) ( (xmesa->xm_buffer)->ximage_origin4 - (span.y) * (xmesa->xm_buffer)->ximage_width4 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLuint); > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLuint); ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; for (i = 0; i < span.end; i++) { pRow[i] = (GLuint) p; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLuint *) ((GLubyte *) pRow + dPRowOuter); ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLuint *) ((GLubyte *) pRow + dPRowInner); ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 1193 "xm_tri.c" 2 >} > > > > > >static void flat_8R8G8B24_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; > const GLubyte *color = v2->color; ># 1218 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > > > > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > bgr_t *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (bgr_t *) ( (bgr_t *) ( (xmesa->xm_buffer)->ximage_origin3 - (span.y) * (xmesa->xm_buffer)->ximage_width3 + 3 * (((fxLeftEdge) >> 11)) )); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(bgr_t); > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(bgr_t); ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; bgr_t *pixel = pRow; for (i = 0; i < span.end; i++, pixel++) { pixel->r = color[0]; pixel->g = color[1]; pixel->b = color[2]; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (bgr_t *) ((GLubyte *) pRow + dPRowOuter); ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (bgr_t *) ((GLubyte *) pRow + dPRowInner); ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 1219 "xm_tri.c" 2 >} > > > > >static void flat_TRUEDITHER_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; > XMesaImage *img = xmesa->xm_buffer->backimage; ># 1241 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > > > > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; GLint x = span.x, y = ((xmesa->xm_buffer)->bottom-(span.y)); for (i = 0; i < span.end; i++, x++) { unsigned long p; { int d = xmesa->xm_visual->Kernel[((x)&3) | (((y)&3)<<2)]; p = xmesa->xm_visual->RtoPixel[(v2->color[0])+d] | xmesa->xm_visual->GtoPixel[(v2->color[1])+d] | xmesa->xm_visual->BtoPixel[(v2->color[2])+d]; }; ((*((img)->f.put_pixel))((img), (x), (y), (p))); }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 1242 "xm_tri.c" 2 >} > > > > > > >static void flat_5R6G5B_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 1267 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > > > > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; ># 332 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > unsigned long p = ( (((v2->color[0]) & 0xf8) << 8) | (((v2->color[1]) & 0xfc) << 3) | ((v2->color[2]) >> 3) ); > > > scan_from_left_to_right = (oneOverArea < 0.0F); ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLushort *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLushort *) ( (xmesa->xm_buffer)->ximage_origin2 - (span.y) * (xmesa->xm_buffer)->ximage_width2 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLushort); > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLushort); ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; for (i = 0; i < span.end; i++) { pRow[i] = (GLushort) p; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLushort *) ((GLubyte *) pRow + dPRowOuter); ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLushort *) ((GLubyte *) pRow + dPRowInner); ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 1268 "xm_tri.c" 2 >} > > > > > >static void flat_DITHER_5R6G5B_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; > const GLubyte *color = v2->color; ># 1292 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > > > > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; ># 335 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > scan_from_left_to_right = (oneOverArea < 0.0F); ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLushort *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLushort *) ( (xmesa->xm_buffer)->ximage_origin2 - (span.y) * (xmesa->xm_buffer)->ximage_width2 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLushort); > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLushort); ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; GLint x = span.x, y = ((xmesa->xm_buffer)->bottom-(span.y)); for (i = 0; i < span.end; i++, x++) { { int d = xmesa->xm_visual->Kernel[((x)&3) | (((y)&3)<<2)]; pRow[i] = xmesa->xm_visual->RtoPixel[(color[0])+d] | xmesa->xm_visual->GtoPixel[(color[1])+d] | xmesa->xm_visual->BtoPixel[(color[2])+d]; }; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLushort *) ((GLubyte *) pRow + dPRowOuter); ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLushort *) ((GLubyte *) pRow + dPRowInner); ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 1293 "xm_tri.c" 2 >} > > > > > >static void flat_DITHER8_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 1319 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > > > > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; ># 332 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { unsigned long *ctable = xmesa->xm_buffer->color_table; int msdr = ((4 * 4)*((5)-1)+1) * (v2->color[0]); int msdg = ((4 * 4)*((9)-1)+1) * (v2->color[1]); int msdb = ((4 * 4)*((5)-1)+1) * (v2->color[2]); int i; for (i=0;i<16;i++) { int k = kernel8[i]; int j = ((((msdg+k)>>12) << 6) | (((msdb+k)>>12) << 3) | ((msdr+k)>>12)); DitherValues[i] = (GLushort) ctable[j]; } }; > > > scan_from_left_to_right = (oneOverArea < 0.0F); ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLubyte *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLubyte *) ( (xmesa->xm_buffer)->ximage_origin1 - (span.y) * (xmesa->xm_buffer)->ximage_width1 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLubyte); > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLubyte); ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; GLint x = span.x, y = ((xmesa->xm_buffer)->bottom-(span.y)); GLushort *ditherRow = DitherValues + ( ((((xmesa->xm_buffer)->bottom-(y)))&3) << 2);; for (i = 0; i < span.end; i++, x++) { pRow[i] = (GLubyte) ditherRow[(x)&3]; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLubyte *) ((GLubyte *) pRow + dPRowOuter); ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLubyte *) ((GLubyte *) pRow + dPRowInner); ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 1320 "xm_tri.c" 2 >} > > > > > >static void flat_DITHER_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; > XMesaImage *img = xmesa->xm_buffer->backimage; ># 1345 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > > > > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; ># 332 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { unsigned long *ctable = xmesa->xm_buffer->color_table; int msdr = ((4 * 4)*((5)-1)+1) * (v2->color[0]); int msdg = ((4 * 4)*((9)-1)+1) * (v2->color[1]); int msdb = ((4 * 4)*((5)-1)+1) * (v2->color[2]); int i; for (i=0;i<16;i++) { int k = kernel8[i]; int j = ((((msdg+k)>>12) << 6) | (((msdb+k)>>12) << 3) | ((msdr+k)>>12)); DitherValues[i] = (GLushort) ctable[j]; } }; > > > scan_from_left_to_right = (oneOverArea < 0.0F); ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; GLint x = span.x, y = ((xmesa->xm_buffer)->bottom-(span.y)); GLushort *ditherRow = DitherValues + ( ((y)&3) << 2);; for (i = 0; i < span.end; i++, x++) { unsigned long p = ditherRow[(x)&3]; ((*((img)->f.put_pixel))((img), (x), (y), (p))); }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 1346 "xm_tri.c" 2 >} > > > > > >static void flat_HPCR_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 1372 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > > > > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; ># 332 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > GLubyte r = v2->color[0]; GLubyte g = v2->color[1]; GLubyte b = v2->color[2]; > > > scan_from_left_to_right = (oneOverArea < 0.0F); ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLubyte *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLubyte *) ( (xmesa->xm_buffer)->ximage_origin1 - (span.y) * (xmesa->xm_buffer)->ximage_width1 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLubyte); > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLubyte); ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; GLint x = span.x, y = ((xmesa->xm_buffer)->bottom-(span.y)); for (i = 0; i < span.end; i++, x++) { pRow[i] = (GLubyte) ( ((xmesa->xm_visual->hpcr_rgbTbl[0][r] + HPCR_DRGB[0][(y)&1][(x)&15]) & 0xE0) |(((xmesa->xm_visual->hpcr_rgbTbl[1][g] + HPCR_DRGB[1][(y)&1][(x)&15]) & 0xE0)>>3) | ((xmesa->xm_visual->hpcr_rgbTbl[2][b] + HPCR_DRGB[2][(y)&1][(x)&15])>>6) ); }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLubyte *) ((GLubyte *) pRow + dPRowOuter); ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLubyte *) ((GLubyte *) pRow + dPRowInner); ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 1373 "xm_tri.c" 2 >} > > > > > >static void flat_LOOKUP8_triangle( GLcontext *ctx, > const SWvertex *v0, > const SWvertex *v1, > const SWvertex *v2 ) >{ > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; ># 1400 "xm_tri.c" ># 1 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" 1 ># 92 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" >{ > typedef struct { > const SWvertex *v0, *v1; > GLfloat dx; > GLfloat dy; > GLfixed fdxdy; > GLfixed fsx; > GLfixed fsy; > GLfloat adjy; > GLint lines; > GLfixed fx0; > } EdgeT; > > > > > > > > EdgeT eMaj, eTop, eBot; > GLfloat oneOverArea; > const SWvertex *vMin, *vMid, *vMax; > float bf = ((SWcontext *)ctx->swrast_context)->_backface_sign; > const GLint snapMask = ~((0x00000800 / (1 << 4)) - 1); > GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; > > struct sw_span span; > > do { (span).primitive = (0x0009); (span).interpMask = (0); (span).arrayMask = (0); (span).start = 0; (span).end = (0); (span).facing = 0; (span).array = ((SWcontext *)ctx->swrast_context)->SpanArrays; } while (0); ># 136 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > const GLfixed fy0 = (((int) ((((v0->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v0->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v0->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy1 = (((int) ((((v1->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v1->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v1->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > const GLfixed fy2 = (((int) ((((v2->win[1] - 0.5F) * 2048.0f) >= 0.0F) ? (((v2->win[1] - 0.5F) * 2048.0f) + 0.5F) : (((v2->win[1] - 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > > if (fy0 <= fy1) { > if (fy1 <= fy2) { > > vMin = v0; vMid = v1; vMax = v2; > vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; > } > else if (fy2 <= fy0) { > > vMin = v2; vMid = v0; vMax = v1; > vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; > } > else { > > vMin = v0; vMid = v2; vMax = v1; > vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; > bf = -bf; > } > } > else { > if (fy0 <= fy2) { > > vMin = v1; vMid = v0; vMax = v2; > vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; > bf = -bf; > } > else if (fy2 <= fy1) { > > vMin = v2; vMid = v1; vMax = v0; > vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; > bf = -bf; > } > else { > > vMin = v1; vMid = v2; vMax = v0; > vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; > } > } > > > vMin_fx = (((int) ((((vMin->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMin->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMin->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMid_fx = (((int) ((((vMid->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMid->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMid->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > vMax_fx = (((int) ((((vMax->win[0] + 0.5F) * 2048.0f) >= 0.0F) ? (((vMax->win[0] + 0.5F) * 2048.0f) + 0.5F) : (((vMax->win[0] + 0.5F) * 2048.0f) - 0.5F)))) & snapMask; > } > > > eMaj.v0 = vMin; eMaj.v1 = vMax; > eTop.v0 = vMid; eTop.v1 = vMax; > eBot.v0 = vMin; eBot.v1 = vMid; > > > eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / 2048.0f)); > eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / 2048.0f)); > eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / 2048.0f)); > eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / 2048.0f)); > eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / 2048.0f)); > eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / 2048.0f)); > > > { > const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > > > if (area * bf < 0.0) > return; > > if (IS_INF_OR_NAN(area) || area == 0.0F) > return; > > oneOverArea = 1.0F / area; > } > > > ctx->OcclusionResult = 0x1; > > span.facing = ctx->_Facing; > > > { > eMaj.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eMaj.lines = (((((vMax_fy - eMaj.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eMaj.lines > 0) { > GLfloat dxdy = eMaj.dx / eMaj.dy; > eMaj.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); > eMaj.fx0 = vMin_fx; > eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * dxdy); > } > else { > return; > } > > eTop.fsy = (((vMid_fy) + 0x00000800 - 1) & (~0x000007FF)); > eTop.lines = (((((vMax_fy - eTop.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eTop.lines > 0) { > GLfloat dxdy = eTop.dx / eTop.dy; > eTop.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); > eTop.fx0 = vMid_fx; > eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * dxdy); > } > > eBot.fsy = (((vMin_fy) + 0x00000800 - 1) & (~0x000007FF)); > eBot.lines = (((((vMid_fy - eBot.fsy) + 0x00000800 - 1) & (~0x000007FF))) >> 11); > if (eBot.lines > 0) { > GLfloat dxdy = eBot.dx / eBot.dy; > eBot.fdxdy = (((int) ((((dxdy) * 2048.0f) >= 0.0F) ? (((dxdy) * 2048.0f) + 0.5F) : (((dxdy) * 2048.0f) - 0.5F)))); > eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); > eBot.fx0 = vMin_fx; > eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * dxdy); > } > } ># 287 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > GLint scan_from_left_to_right; ># 332 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > unsigned long *ctable = xmesa->xm_buffer->color_table; GLubyte r = v2->color[0]; GLubyte g = v2->color[1]; GLubyte b = v2->color[2]; GLubyte p = ctable[((((((unsigned)(((4 * 4) * (9 - 1) + 1) * (g))) >> 12)) << 6) | (((((unsigned)(((4 * 4) * (5 - 1) + 1) * (b))) >> 12)) << 3) | ((((unsigned)(((4 * 4) * (5 - 1) + 1) * (r))) >> 12)))]; > > > scan_from_left_to_right = (oneOverArea < 0.0F); ># 700 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > { > int subTriangle; > GLfixed fx; > GLfixed fxLeftEdge = 0, fxRightEdge = 0; > GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; > GLfixed fdxOuter; > int idxOuter; > float dxOuter; > GLfixed fError = 0, fdError = 0; > float adjx, adjy; > GLfixed fy; > > GLubyte *pRow = ((void *)0); > int dPRowOuter = 0, dPRowInner; ># 773 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > for (subTriangle=0; subTriangle<=1; subTriangle++) { > EdgeT *eLeft, *eRight; > int setupLeft, setupRight; > int lines; > > if (subTriangle==0) { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eBot; > lines = eRight->lines; > setupLeft = 1; > setupRight = 1; > } > else { > eLeft = &eBot; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 1; > } > } > else { > > if (scan_from_left_to_right) { > eLeft = &eMaj; > eRight = &eTop; > lines = eRight->lines; > setupLeft = 0; > setupRight = 1; > } > else { > eLeft = &eTop; > eRight = &eMaj; > lines = eLeft->lines; > setupLeft = 1; > setupRight = 0; > } > if (lines == 0) > return; > } > > if (setupLeft && eLeft->lines > 0) { > const SWvertex *vLower; > GLfixed fsx = eLeft->fsx; > fx = (((fsx) + 0x00000800 - 1) & (~0x000007FF)); > fError = fx - fsx - 0x00000800; > fxLeftEdge = fsx - 1; > fdxLeftEdge = eLeft->fdxdy; > fdxOuter = ((fdxLeftEdge - 1) & (~0x000007FF)); > fdError = fdxOuter - fdxLeftEdge + 0x00000800; > idxOuter = ((fdxOuter) >> 11); > dxOuter = (float) idxOuter; > (void) dxOuter; > > fy = eLeft->fsy; > span.y = ((fy) >> 11); > > adjx = (float)(fx - eLeft->fx0); > adjy = eLeft->adjy; > (void) adjx; > (void) adjy; > > vLower = eLeft->v0; > (void) vLower; > > > { > pRow = (GLubyte *) ( (xmesa->xm_buffer)->ximage_origin1 - (span.y) * (xmesa->xm_buffer)->ximage_width1 + (((fxLeftEdge) >> 11)) ); > dPRowOuter = -((int)(xmesa->xm_buffer->backimage->bytes_per_line)) + idxOuter * sizeof(GLubyte); > > } ># 1052 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > > > if (setupRight && eRight->lines>0) { > fxRightEdge = eRight->fsx - 1; > fdxRightEdge = eRight->fdxdy; > } > > if (lines==0) { > continue; > } > > > > > dPRowInner = dPRowOuter + sizeof(GLubyte); ># 1118 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > while (lines > 0) { > > > const GLint right = ((fxRightEdge) >> 11); > > span.x = ((fxLeftEdge) >> 11); > > if (right <= span.x) > span.end = 0; > else > span.end = right - span.x; ># 1242 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > if (span.end > 0) { > GLuint i; for (i = 0; i < span.end; i++) { pRow[i] = (GLubyte) p; }; > } > > > > > > > > (span.y)++; > lines--; > > fxLeftEdge += fdxLeftEdge; > fxRightEdge += fdxRightEdge; > > > fError += fdError; > if (fError >= 0) { > fError -= 0x00000800; > > pRow = (GLubyte *) ((GLubyte *) pRow + dPRowOuter); ># 1313 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > else { > > pRow = (GLubyte *) ((GLubyte *) pRow + dPRowInner); ># 1366 "../../../../../extras/Mesa/src/swrast/s_tritemp.h" > } > } > > } > > } > > > > } >} ># 1401 "xm_tri.c" 2 >} ># 1513 "xm_tri.c" >static swrast_tri_func get_triangle_func( GLcontext *ctx ) >{ > SWcontext *swrast = ((SWcontext *)ctx->swrast_context); > XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; > int depth = xmesa->xm_visual->visinfo->depth; > > (void) kernel1; > > > > > > if (ctx->RenderMode != 0x1C00) return (swrast_tri_func) ((void *)0); > if (ctx->Polygon.SmoothFlag) return (swrast_tri_func) ((void *)0); > if (ctx->Texture._EnabledUnits) return (swrast_tri_func) ((void *)0); > if (swrast->_RasterMask & 0x400) return (swrast_tri_func) ((void *)0); > if (ctx->Polygon.CullFlag && > ctx->Polygon.CullFaceMode == 0x0408) > return (swrast_tri_func) ((void *)0); > > if (xmesa->xm_buffer->buffer==0L) { > if ( ctx->Light.ShadeModel==0x1D01 > && swrast->_RasterMask==0x004 > && ctx->Depth.Func==0x0201 > && ctx->Depth.Mask==0x1 > && ctx->Visual.depthBits == 16 > && ctx->Polygon.StippleFlag==0x0) { > switch (xmesa->pixelformat) { > case 2: > return smooth_TRUECOLOR_z_triangle; > case 4: > return smooth_8A8B8G8R_z_triangle; > case 5: > return smooth_8R8G8B_z_triangle; > case 12: > return smooth_8R8G8B24_z_triangle; > case 3: > return smooth_TRUEDITHER_z_triangle; > case 6: > return smooth_5R6G5B_z_triangle; > case 13: > return smooth_DITHER_5R6G5B_z_triangle; > case 9: > return smooth_HPCR_z_triangle; > case 7: > if (depth == 8) > return smooth_DITHER8_z_triangle; > else > return smooth_DITHER_z_triangle; > break; > case 8: > if (depth == 8) > return smooth_LOOKUP8_z_triangle; > else > return (swrast_tri_func) ((void *)0); > default: > return (swrast_tri_func) ((void *)0); > } > } > if ( ctx->Light.ShadeModel==0x1D00 > && swrast->_RasterMask==0x004 > && ctx->Depth.Func==0x0201 > && ctx->Depth.Mask==0x1 > && ctx->Visual.depthBits == 16 > && ctx->Polygon.StippleFlag==0x0) { > switch (xmesa->pixelformat) { > case 2: > return flat_TRUECOLOR_z_triangle; > case 4: > return flat_8A8B8G8R_z_triangle; > case 5: > return flat_8R8G8B_z_triangle; > case 12: > return flat_8R8G8B24_z_triangle; > case 3: > return flat_TRUEDITHER_z_triangle; > case 6: > return flat_5R6G5B_z_triangle; > case 13: > return flat_DITHER_5R6G5B_z_triangle; > case 9: > return flat_HPCR_z_triangle; > case 7: > if (depth == 8) > return flat_DITHER8_z_triangle; > else > return flat_DITHER_z_triangle; > break; > case 8: > if (depth == 8) > return flat_LOOKUP8_z_triangle; > else > return (swrast_tri_func) ((void *)0); > default: > return (swrast_tri_func) ((void *)0); > } > } > if ( swrast->_RasterMask==0 > && ctx->Light.ShadeModel==0x1D01 > && ctx->Polygon.StippleFlag==0x0) { > switch (xmesa->pixelformat) { > case 2: > return smooth_TRUECOLOR_triangle; > case 4: > return smooth_8A8B8G8R_triangle; > case 5: > return smooth_8R8G8B_triangle; > case 12: > return smooth_8R8G8B24_triangle; > case 3: > return smooth_TRUEDITHER_triangle; > case 6: > return smooth_5R6G5B_triangle; > case 13: > return smooth_DITHER_5R6G5B_triangle; > case 9: > return smooth_HPCR_triangle; > case 7: > if (depth == 8) > return smooth_DITHER8_triangle; > else > return smooth_DITHER_triangle; > break; > case 8: > if (depth == 8) > return smooth_LOOKUP8_triangle; > else > return (swrast_tri_func) ((void *)0); > default: > return (swrast_tri_func) ((void *)0); > } > } > > if ( swrast->_RasterMask==0 > && ctx->Light.ShadeModel==0x1D00 > && ctx->Polygon.StippleFlag==0x0) { > switch (xmesa->pixelformat) { > case 2: > return flat_TRUECOLOR_triangle; > case 3: > return flat_TRUEDITHER_triangle; > case 4: > return flat_8A8B8G8R_triangle; > case 5: > return flat_8R8G8B_triangle; > case 12: > return flat_8R8G8B24_triangle; > case 6: > return flat_5R6G5B_triangle; > case 13: > return flat_DITHER_5R6G5B_triangle; > case 9: > return flat_HPCR_triangle; > case 7: > if (depth == 8) > return flat_DITHER8_triangle; > else > return flat_DITHER_triangle; > break; > case 8: > if (depth == 8) > return flat_LOOKUP8_triangle; > else > return (swrast_tri_func) ((void *)0); > default: > return (swrast_tri_func) ((void *)0); > } > } > > return (swrast_tri_func) ((void *)0); > } > else { > > return (swrast_tri_func) ((void *)0); > } >} > > > > > > >void xmesa_choose_triangle( GLcontext *ctx ) >{ > SWcontext *swrast = ((SWcontext *)ctx->swrast_context); > > if (!(swrast->Triangle = get_triangle_func( ctx ))) > _swrast_choose_triangle( ctx ); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 65058
: 40212