Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 298913 Details for
Bug 394889
[ICE/4.5] media-libs/mesa-7.11.2 - swrast/s_tritemp.h:908:1: internal compiler error: in simplify_subreg, at simplify-rtx.c:5147
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
mostly reduced s_triangle.i
s_triangle.i (text/plain), 1.98 KB, created by
SpanKY
on 2012-01-14 10:18:46 UTC
(
hide
)
Description:
mostly reduced s_triangle.i
Filename:
MIME Type:
Creator:
SpanKY
Created:
2012-01-14 10:18:46 UTC
Size:
1.98 KB
patch
obsolete
>static __inline__ int IS_INF_OR_NAN(float x) >{ > union { > float f; > int i; > } tmp; > tmp.f = x; > return tmp.i; >} > >static void simple_textured_triangle(float **v1) >{ > float **v0; > float **v2; > typedef struct { > float dx; > float dy; > int fsx; > int fx0; > int lines; > } EdgeT; > EdgeT eMaj; > EdgeT eTop; > EdgeT eBot; > float oneOverArea; > float **vMin; > float **vMid; > float **vMax; > int vMin_fx; > int vMin_fy; > int vMid_fx; > int vMid_fy; > int vMax_fx; > int vMax_fy; > if (v1[0][1] <= v2[0][1]) { > vMin = v0; > vMax = v1; > vMin_fy = v0[0][1]; > } > vMin_fx = vMin[0][0]; > vMid_fx = > vMid[4][0] ? ((vMid[4][0] * (float)2048) + > 0.5F) : ((vMid[4][0] * (float)2048) - 0.5F); > eMaj.dx = (vMax_fx - vMin_fx) * (1.0F / (float)2048); > eMaj.dy = (vMax_fy - vMin_fy) * (1.0F / (float)2048); > eTop.dx = (vMax_fx - vMid_fx) * (1.0F / (float)2048); > eBot.dy = (vMid_fy - vMin_fy) * (1.0F / (float)2048); > float area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; > if (IS_INF_OR_NAN(area)) > return; > oneOverArea = 1.0F / area; > eBot.fx0 = vMin_fx; > int scan_from_left_to_right; > float eMaj_ds = (vMax[4][0] - vMin[4][0]); > float eBot_ds; > float stepx = oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); > int step = (stepx >= 0.0F) ? stepx : (stepx * (float)2048) - 0.5F; > int subTriangle; > int fxRightEdge = 0; > for (subTriangle = 0; subTriangle <= 1; subTriangle++) { > EdgeT *eRight; > int lines; > if (subTriangle == 0) { > if (scan_from_left_to_right) { > eRight = &eBot; > lines = eRight->lines; > } else { > eRight = &eMaj; > } > } else { > if (scan_from_left_to_right) { > eRight = &eTop; > } > fxRightEdge = eRight->fsx; > } > while (lines > 0) { > int end; > int x; > int y; > x = 0; > if (fxRightEdge <= x) > end = 0; > else > end = fxRightEdge - x; > if (end > 0 && y >= 0) { > int i; > char *rgb; > for (i = 0; i < end; i++) { > int it; > char *texture; > rgb[i] = texture[it]; > it += step; > } > PutRowRGB(rgb); > } > } > } >} > >void *foo() >{ > return simple_textured_triangle; >}
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 394889
:
295995
|
295997
| 298913