Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
virgl-es
mesa
Commits
c25151dd
Commit
c25151dd
authored
Aug 20, 2010
by
Keith Whitwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
llvmpipe: cull zero-area triangles early
parent
98f3ff8f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/gallium/drivers/llvmpipe/lp_setup_tri.c
src/gallium/drivers/llvmpipe/lp_setup_tri.c
+3
-2
No files found.
src/gallium/drivers/llvmpipe/lp_setup_tri.c
View file @
c25151dd
...
...
@@ -819,9 +819,10 @@ static void triangle_both( struct lp_setup_context *setup,
const
float
fy
=
v1
[
0
][
1
]
-
v2
[
0
][
1
];
/* det = cross(e,f).z */
if
(
ex
*
fy
-
ey
*
fx
<
0
.
0
f
)
const
float
det
=
ex
*
fy
-
ey
*
fx
;
if
(
det
<
0
.
0
f
)
triangle_ccw
(
setup
,
v0
,
v1
,
v2
);
else
else
if
(
det
>
0
.
0
f
)
triangle_cw
(
setup
,
v0
,
v1
,
v2
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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