Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joshua Ashton
mesa
Commits
f990cbc7
Commit
f990cbc7
authored
Feb 05, 2004
by
Keith Whitwell
Browse files
Reorganize two functions which seem to be tickling a gcc bug
parent
52755b8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/mesa/math/m_matrix.c
View file @
f990cbc7
...
...
@@ -911,21 +911,28 @@ _math_matrix_frustum( GLmatrix *mat,
GLfloat
bottom
,
GLfloat
top
,
GLfloat
nearval
,
GLfloat
farval
)
{
GLfloat
x
,
y
,
a
,
b
,
c
,
d
;
GLfloat
m
[
16
];
x
=
(
2
.
0
F
*
nearval
)
/
(
right
-
left
);
y
=
(
2
.
0
F
*
nearval
)
/
(
top
-
bottom
);
a
=
(
right
+
left
)
/
(
right
-
left
);
b
=
(
top
+
bottom
)
/
(
top
-
bottom
);
c
=
-
(
farval
+
nearval
)
/
(
farval
-
nearval
);
d
=
-
(
2
.
0
F
*
farval
*
nearval
)
/
(
farval
-
nearval
);
/* error? */
#define M(row,col) m[col*4+row]
M
(
0
,
0
)
=
x
;
M
(
0
,
1
)
=
0
.
0
F
;
M
(
0
,
2
)
=
a
;
M
(
0
,
3
)
=
0
.
0
F
;
M
(
1
,
0
)
=
0
.
0
F
;
M
(
1
,
1
)
=
y
;
M
(
1
,
2
)
=
b
;
M
(
1
,
3
)
=
0
.
0
F
;
M
(
2
,
0
)
=
0
.
0
F
;
M
(
2
,
1
)
=
0
.
0
F
;
M
(
2
,
2
)
=
c
;
M
(
2
,
3
)
=
d
;
M
(
3
,
0
)
=
0
.
0
F
;
M
(
3
,
1
)
=
0
.
0
F
;
M
(
3
,
2
)
=
-
1
.
0
F
;
M
(
3
,
3
)
=
0
.
0
F
;
M
(
0
,
0
)
=
(
2
.
0
F
*
nearval
)
/
(
right
-
left
);
M
(
0
,
1
)
=
0
.
0
F
;
M
(
0
,
2
)
=
(
right
+
left
)
/
(
right
-
left
);
M
(
0
,
3
)
=
0
.
0
F
;
M
(
1
,
0
)
=
0
.
0
F
;
M
(
1
,
1
)
=
(
2
.
0
F
*
nearval
)
/
(
top
-
bottom
);
M
(
1
,
2
)
=
(
top
+
bottom
)
/
(
top
-
bottom
);
M
(
1
,
3
)
=
0
.
0
F
;
M
(
2
,
0
)
=
0
.
0
F
;
M
(
2
,
1
)
=
0
.
0
F
;
M
(
2
,
2
)
=
-
(
farval
+
nearval
)
/
(
farval
-
nearval
);
M
(
2
,
3
)
=
-
(
2
.
0
F
*
farval
*
nearval
)
/
(
farval
-
nearval
);
M
(
3
,
0
)
=
0
.
0
F
;
M
(
3
,
1
)
=
0
.
0
F
;
M
(
3
,
2
)
=
-
1
.
0
F
;
M
(
3
,
3
)
=
0
.
0
F
;
#undef M
matrix_multf
(
mat
,
m
,
MAT_FLAG_PERSPECTIVE
);
...
...
@@ -951,22 +958,28 @@ _math_matrix_ortho( GLmatrix *mat,
GLfloat
bottom
,
GLfloat
top
,
GLfloat
nearval
,
GLfloat
farval
)
{
GLfloat
x
,
y
,
z
;
GLfloat
tx
,
ty
,
tz
;
GLfloat
m
[
16
];
x
=
2
.
0
F
/
(
right
-
left
);
y
=
2
.
0
F
/
(
top
-
bottom
);
z
=
-
2
.
0
F
/
(
farval
-
nearval
);
tx
=
-
(
right
+
left
)
/
(
right
-
left
);
ty
=
-
(
top
+
bottom
)
/
(
top
-
bottom
);
tz
=
-
(
farval
+
nearval
)
/
(
farval
-
nearval
);
#define M(row,col) m[col*4+row]
M
(
0
,
0
)
=
x
;
M
(
0
,
1
)
=
0
.
0
F
;
M
(
0
,
2
)
=
0
.
0
F
;
M
(
0
,
3
)
=
tx
;
M
(
1
,
0
)
=
0
.
0
F
;
M
(
1
,
1
)
=
y
;
M
(
1
,
2
)
=
0
.
0
F
;
M
(
1
,
3
)
=
ty
;
M
(
2
,
0
)
=
0
.
0
F
;
M
(
2
,
1
)
=
0
.
0
F
;
M
(
2
,
2
)
=
z
;
M
(
2
,
3
)
=
tz
;
M
(
3
,
0
)
=
0
.
0
F
;
M
(
3
,
1
)
=
0
.
0
F
;
M
(
3
,
2
)
=
0
.
0
F
;
M
(
3
,
3
)
=
1
.
0
F
;
M
(
0
,
0
)
=
2
.
0
F
/
(
right
-
left
);
M
(
0
,
1
)
=
0
.
0
F
;
M
(
0
,
2
)
=
0
.
0
F
;
M
(
0
,
3
)
=
-
(
right
+
left
)
/
(
right
-
left
);
M
(
1
,
0
)
=
0
.
0
F
;
M
(
1
,
1
)
=
2
.
0
F
/
(
top
-
bottom
);
M
(
1
,
2
)
=
0
.
0
F
;
M
(
1
,
3
)
=
-
(
top
+
bottom
)
/
(
top
-
bottom
);
M
(
2
,
0
)
=
0
.
0
F
;
M
(
2
,
1
)
=
0
.
0
F
;
M
(
2
,
2
)
=
-
2
.
0
F
/
(
farval
-
nearval
);
M
(
2
,
3
)
=
-
(
farval
+
nearval
)
/
(
farval
-
nearval
);
M
(
3
,
0
)
=
0
.
0
F
;
M
(
3
,
1
)
=
0
.
0
F
;
M
(
3
,
2
)
=
0
.
0
F
;
M
(
3
,
3
)
=
1
.
0
F
;
#undef M
matrix_multf
(
mat
,
m
,
(
MAT_FLAG_GENERAL_SCALE
|
MAT_FLAG_TRANSLATION
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment