Rev 8719 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8719 | Rev 9512 | ||
---|---|---|---|
Line 14... | Line 14... | ||
14 | .y2 equ [ebp-8] |
14 | .y2 equ [ebp-8] |
15 | .x3 equ [ebp-10] |
15 | .x3 equ [ebp-10] |
16 | .y3 equ [ebp-12] |
16 | .y3 equ [ebp-12] |
Line 17... | Line 17... | ||
17 | 17 | ||
18 | .dx12 equ dword[ebp-20] |
18 | .dx12 equ dword[ebp-20] |
19 | .dx13 equ dword[ebp-24] |
19 | .dz12 equ dword[ebp-24] |
20 | .dx23 equ dword[ebp-28] |
20 | .dx13 equ dword[ebp-28] |
21 | .dz12 equ dword[ebp-32] |
21 | .dz13 equ dword[ebp-32] |
22 | .dz13 equ dword[ebp-36] |
22 | .dx23 equ dword[ebp-36] |
23 | .dz23 equ dword[ebp-40] |
23 | .dz23 equ dword[ebp-40] |
24 | .zz2 equ [ebp-44] |
24 | .zz2 equ [ebp-44] |
25 | .zz1 equ [ebp-48] |
25 | .zz1 equ [ebp-48] |
26 | .z3 equ [ebp-56] |
26 | .z3 equ [ebp-56] |
27 | .z2 equ [ebp-60] |
27 | .z2 equ [ebp-60] |
28 | .z1 equ [ebp-64] |
28 | .z1 equ [ebp-64] |
Line 29... | Line 29... | ||
29 | .s_buff equ [ebp-68] |
29 | ;.s_buff equ [ebp-68] |
30 | 30 | ||
31 | push ebp |
31 | push ebp |
32 | mov ebp,esp |
32 | mov ebp,esp |
33 | sub esp,128 |
33 | ; sub esp,128 |
34 | and ebp,0xfffffff0 |
34 | ; and ebp,0xfffffff0 |
35 | .sort2: |
35 | .sort2: |
36 | cmp ax,bx |
36 | cmp ax,bx |
37 | jle .sort1 |
37 | jle .sort1 |
Line 42... | Line 42... | ||
42 | jle .sort3 |
42 | jle .sort3 |
43 | xchg ebx,ecx |
43 | xchg ebx,ecx |
44 | shufps xmm0,xmm0,11011000b |
44 | shufps xmm0,xmm0,11011000b |
45 | jmp .sort2 |
45 | jmp .sort2 |
46 | .sort3: |
46 | .sort3: |
47 | mov .y1,eax ; store triangle coordinates in user friendly variables |
47 | ; mov .y1,eax ; store triangle coordinates in user friendly variables |
48 | mov .y2,ebx |
48 | ; mov .y2,ebx |
49 | mov .y3,ecx |
49 | ; mov .y3,ecx |
- | 50 | push eax |
|
- | 51 | push ebx |
|
- | 52 | push ecx |
|
- | 53 | sub esp,60 |
|
- | 54 | ||
Line 50... | Line 55... | ||
50 | 55 | ||
51 | ; mov edx,100.11 |
56 | ; mov edx,100.11 |
52 | ; movd xmm0,edx |
57 | ; movd xmm0,edx |
Line 53... | Line 58... | ||
53 | ; shufps xmm0,xmm0,11100000b |
58 | ; shufps xmm0,xmm0,11100000b |
54 | 59 | ||
55 | movaps .z1,xmm0 |
60 | movups .z1,xmm0 |
56 | ; mov dword .z1,edx |
61 | ; mov dword .z1,edx |
57 | ; mov .z2,edx |
62 | ; mov .z2,edx |
Line 58... | Line 63... | ||
58 | ; mov .z3,edx |
63 | ; mov .z3,edx |
59 | mov .s_buff,esi |
64 | ; mov .s_buff,esi |
60 | 65 | ||
61 | mov edx,80008000h ; eax,ebx,ecx are ANDd together into edx which means that |
66 | mov edx,80008000h ; eax,ebx,ecx are ANDd together into edx which means that |
Line 155... | Line 160... | ||
155 | ; movq xmm0,.zz1 |
160 | ; movq xmm0,.zz1 |
156 | movlps xmm0,.zz1 |
161 | movlps xmm0,.zz1 |
157 | ; mov edx,0.11 |
162 | ; mov edx,0.11 |
158 | ; movd xmm0,edx |
163 | ; movd xmm0,edx |
159 | ; shufps xmm0,xmm0,11100000b |
164 | ; shufps xmm0,xmm0,11100000b |
160 | mov esi,.s_buff |
165 | ; mov esi,.s_buff |
Line 161... | Line 166... | ||
161 | 166 | ||
Line 162... | Line 167... | ||
162 | call stencil_line |
167 | call stencil_line |
163 | 168 | ||
Line 190... | Line 195... | ||
190 | pushad |
195 | pushad |
Line 191... | Line 196... | ||
191 | 196 | ||
192 | sar ebx,ROUND2 |
197 | sar ebx,ROUND2 |
193 | sar eax,ROUND2 |
198 | sar eax,ROUND2 |
194 | movlps xmm0,.zz1 |
199 | movlps xmm0,.zz1 |
Line 195... | Line 200... | ||
195 | mov esi,.s_buff |
200 | ; mov esi,.s_buff |
Line 196... | Line 201... | ||
196 | 201 | ||
Line 213... | Line 218... | ||
213 | add cx,1 |
218 | add cx,1 |
214 | cmp cx,.y3 |
219 | cmp cx,.y3 |
215 | jl .loop2 |
220 | jl .loop2 |
216 | .loop2_end: |
221 | .loop2_end: |
Line 217... | Line 222... | ||
217 | 222 | ||
218 | add esp,128 |
223 | mov esp,ebp |
Line 219... | Line 224... | ||
219 | pop ebp |
224 | pop ebp |
Line 220... | Line 225... | ||
220 | 225 | ||
Line 310... | Line 315... | ||
310 | 315 | ||
311 | mov ecx,.x2 |
316 | mov ecx,.x2 |
312 | sub ecx,.x1 |
317 | sub ecx,.x1 |
313 | movss xmm2,.z1 ; cz |
318 | movss xmm2,.z1 ; cz |
314 | .ccalc: |
319 | .ccalc: |
315 | movss xmm1,xmm2 |
320 | ; movss xmm1,xmm2 |
316 | cmpltss xmm1,dword[esi] |
321 | ; cmpltss xmm1,dword[esi] |
317 | movd eax,xmm1 |
322 | ; movd eax,xmm1 |
- | 323 | ; cmp eax,-1 |
|
318 | cmp eax,-1 |
324 | comiss xmm2,[esi] |
319 | jnz @f |
325 | ja @f |
320 | movss dword[esi],xmm2 |
326 | movss dword[esi],xmm2 |
321 | @@: |
327 | @@: |
322 | add esi,4 |
328 | add esi,4 |
323 | addss xmm2,.dz |
329 | addss xmm2,.dz |
324 | sub ecx,1 |
330 | ; sub ecx,1 |
- | 331 | ; jnz .ccalc |
|
325 | jnz .ccalc |
332 | loop .ccalc |
326 | .l_quit: |
333 | .l_quit: |
327 | mov esp,ebp |
334 | mov esp,ebp |
328 | pop ebp |
335 | pop ebp |