source: trunk/Packages/bgrabitmap/lineartexscan2.inc

Last change on this file was 2, checked in by chronos, 5 years ago
File size: 1.4 KB
Line 
1 {$IFDEF PARAM_USESSE} {$asmmode intel}
2 asm
3 xorps xmm4,xmm4
4 xorps xmm5,xmm5
5 movlps xmm4, texPos
6 movlps xmm5, texStep
7 {$IFNDEF PARAM_USEINTERPOLATION}
8 {$IFDEF PARAM_USESSE2}
9 cvtps2dq xmm3,xmm4
10 movlps intTexPos,xmm3
11 {$ENDIF}
12 {$ENDIF}
13 end;
14 {$ENDIF}
15
16 for i := ix1 to ix2 do
17 begin
18 DrawPixelInlineWithAlphaCheck(pdest,
19 {$IFDEF PARAM_USELIGHTING} ApplyLightnessFast( {$ENDIF}
20 {$IFDEF PARAM_USEINTERPOLATION}
21 scanAtFunc(texPos.x,texPos.y)
22 {$ELSE}
23 {$IFDEF PARAM_USESSE2}
24 scanAtIntegerFunc(intTexPos.x,intTexPos.y)
25 {$ELSE}
26 scanAtIntegerFunc(round(texPos.x),round(texPos.y))
27 {$ENDIF}
28 {$ENDIF}
29 {$IFDEF PARAM_USELIGHTING} ,light) {$ENDIF}
30 );
31 {$IFDEF PARAM_USESSE}
32 asm
33 addps xmm4,xmm5
34 {$IFNDEF PARAM_USEINTERPOLATION}
35 {$IFDEF PARAM_USESSE2}
36 cvtps2dq xmm3,xmm4
37 movlps intTexPos,xmm3
38 {$ELSE}
39 movlps texPos,xmm4
40 {$ENDIF}
41 {$ELSE}
42 movlps texPos,xmm4
43 {$ENDIF}
44 end;
45 {$ELSE}
46 texPos += texStep;
47 {$ENDIF}
48
49 {$IFDEF PARAM_USELIGHTING}
50 NextLight;
51 {$ENDIF}
52 inc(pdest);
53 end;
Note: See TracBrowser for help on using the repository browser.