1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184
| ; 394 : _mm_empty();
mov edx, DWORD PTR [esi+16]
mov esi, DWORD PTR [esi+4]
imul edx, ecx
mov esi, DWORD PTR [esi+4]
lea edx, DWORD PTR [esi+edx*4]
mov ebx, DWORD PTR _MinX$[esp+480]
imul ebx, DWORD PTR _DY$[esp+480]
mov DWORD PTR _ColorBuffer$[esp+480], edx
mov edx, DWORD PTR tv667[esp+480]
imul edx, DWORD PTR _X3$[esp+480]
mov esi, edi
imul esi, eax
sub edx, esi
mov esi, DWORD PTR _DX$[esp+480]
mov eax, ecx
imul eax, esi
imul esi, DWORD PTR _Y1$[esp+480]
sub eax, ebx
mov ebx, DWORD PTR _MinX$[esp+480]
imul ebx, DWORD PTR _DY$[esp+484]
sub eax, esi
mov esi, DWORD PTR _DY$[esp+480]
imul esi, DWORD PTR _X1$[esp+480]
add eax, esi
mov esi, DWORD PTR _DX$[esp+484]
imul ecx, esi
imul esi, DWORD PTR _Y2$[esp+480]
sub ecx, ebx
mov ebx, DWORD PTR _MinX$[esp+480]
imul ebx, DWORD PTR tv667[esp+480]
sub ecx, esi
mov esi, DWORD PTR _DY$[esp+484]
imul esi, DWORD PTR _X2$[esp+480]
add ecx, esi
mov esi, DWORD PTR _MinY$[esp+480]
imul esi, edi
sub esi, ebx
mov ebx, DWORD PTR _MinX$[esp+480]
imul ebx, DWORD PTR tv667[esp+480]
add esi, edx
mov DWORD PTR _CY$[esp+488], esi
mov esi, DWORD PTR _MinY$[esp+480]
imul esi, edi
sub esi, ebx
add esi, edx
emms
mov dx, WORD PTR _CY$[esp+488]
mov WORD PTR tv768[esp+486], ax
mov ax, WORD PTR _DX$[esp+484]
mov WORD PTR tv768[esp+484], cx
mov cx, WORD PTR _DX$[esp+480]
mov WORD PTR tv768[esp+482], dx
mov dx, WORD PTR _DY$[esp+484]
mov WORD PTR tv768[esp+480], si
movq mm1, MMWORD PTR tv768[esp+480]
mov WORD PTR tv763[esp+484], ax
mov eax, DWORD PTR tv667[esp+480]
mov WORD PTR tv763[esp+486], cx
mov ecx, DWORD PTR _MinY$[esp+480]
mov WORD PTR tv763[esp+480], di
mov WORD PTR tv763[esp+482], di
movq mm4, MMWORD PTR tv763[esp+480]
mov WORD PTR tv758[esp+480], ax
mov WORD PTR tv758[esp+482], ax
mov ax, WORD PTR _DY$[esp+480]
mov WORD PTR tv758[esp+486], ax
mov eax, DWORD PTR _MaxY$[esp+480]
cmp ecx, eax
mov WORD PTR tv758[esp+484], dx
movq mm2, MMWORD PTR tv758[esp+480]
pxor mm3, mm3
jg SHORT $L19403
mov edi, DWORD PTR _MinX$[esp+480]
mov edx, DWORD PTR _ZValue$[esp+480]
mov esi, DWORD PTR _MaxX$[esp+480]
sub eax, ecx
mov ecx, DWORD PTR _ColorBuffer$[esp+480]
inc eax
mov DWORD PTR tv575[esp+480], eax
$L16453:
cmp edi, esi
movq mm0, mm1
mov eax, edi
jg SHORT $L16460
npad 2
$L16458:
; 372 : {
; 373 : //if ((CX1 >= 0) && (CX2 >= 0) && (CX3 >= 0))
; 374 : if (!_mm_movemask_pi8(_mm_cmpgt_pi16(Zeromm, CXmm)))
movq mm5, mm3
pcmpgtw mm5, mm0
pmovmskb ebx, mm5
test ebx, ebx
jne SHORT $L16463
; 375 : {
; 376 : if (ZValue < ColorBuffer[x])
cmp edx, DWORD PTR [ecx+eax*4]
jae SHORT $L16463
; 377 : ColorBuffer[x] = ZValue;
mov DWORD PTR [ecx+eax*4], edx
$L16463:
; 339 :
; 340 : // Go to the first pixel to test
; 341 : uint32* ColorBuffer = m_Maps[0].GetArray();
; 342 : ColorBuffer += MinY * m_Size;
; 343 :
; 344 : // Half-edge constants
; 345 : int C1 = DY[0] * X1 - DX[0] * Y1;
; 346 : int C2 = DY[1] * X2 - DX[1] * Y2;
; 347 : int C3 = DY[2] * X3 - DX[2] * Y3;
; 348 :
; 349 : int CY[] =
; 350 : {
; 351 : C1 + DX[0] * MinY - DY[0] * MinX,
; 352 : C2 + DX[1] * MinY - DY[1] * MinX,
; 353 : C3 + DX[2] * MinY - DY[2] * MinX,
; 354 : C3 + DX[3] * MinY - DY[3] * MinX
; 355 : };
; 356 :
; 357 : _mm_empty();
; 358 :
; 359 : __m64 CYmm = _mm_set_pi16(CY[0], CY[1], CY[2], CY[3]);
; 360 : __m64 DXmm = _mm_set_pi16(DX[0], DX[1], DX[2], DX[3]);
; 361 : __m64 DYmm = _mm_set_pi16(DY[0], DY[1], DY[2], DY[3]);
; 362 : __m64 Zeromm = _mm_setzero_si64();
; 363 :
; 364 : for (int y = MinY; y <= MaxY; ++y)
; 365 : {
; 366 : __m64 CXmm = CYmm;
; 367 : //int CX1 = CY[0];
; 368 : //int CX2 = CY[1];
; 369 : //int CX3 = CY[2];
; 370 :
; 371 : for (int x = MinX; x <= MaxX; ++x)
inc eax
cmp eax, esi
; 378 : }
; 379 :
; 380 : CXmm = _mm_subs_pi16(CXmm, DYmm);
psubsw mm0, mm2
jle SHORT $L16458
$L16460:
; 381 : //CX1 -= DY[0];
; 382 : //CX2 -= DY[1];
; 383 : //CX3 -= DY[2];
; 384 : }
; 385 :
; 386 : CYmm = _mm_adds_pi16(CYmm, DXmm);
; 387 : //CY[0] += DX[0];
; 388 : //CY[1] += DX[1];
; 389 : //CY[2] += DX[2];
; 390 :
; 391 : ColorBuffer += m_Size;
mov eax, DWORD PTR _this$[esp+480]
mov eax, DWORD PTR [eax+16]
lea ecx, DWORD PTR [ecx+eax*4]
mov eax, DWORD PTR tv575[esp+480]
dec eax
paddsw mm1, mm4
mov DWORD PTR tv575[esp+480], eax
jne SHORT $L16453
$L19403:
; 392 : }
; 393 :
; 394 : _mm_empty();
emms
; 395 : } |
Partager