Subversion Repositories Kolibri OS

Rev

Rev 2881 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2881 Rev 2984
Line 952... Line 952...
952
	movq	mm0,.cby
952
	movq	mm0,.cby
953
	movq	mm1,.cey
953
	movq	mm1,.cey
954
	movq	mm2,.dby
954
	movq	mm2,.dby
955
	movq	mm3,.dey
955
	movq	mm3,.dey
956
end if
956
end if
-
 
957
if Ext >= SSE2
-
 
958
	mov    eax,TEXTURE_SIZE
-
 
959
	movd   xmm1,eax
-
 
960
	shufps xmm1,xmm1,0
-
 
961
	push   dword  TEX_X
-
 
962
	push   dword  -TEX_X
-
 
963
	push   dword  1
-
 
964
	push   dword  -1
-
 
965
	movups xmm2,[esp]
-
 
966
	movd   xmm3,.bmap
-
 
967
	shufps xmm3,xmm3,0
-
 
968
end if
-
 
969
 
957
;align 16
970
;align 16
958
     .draw:
971
     .draw:
959
    ; if TEX = SHIFTING   ;bump drawing only in shifting mode
972
    ; if TEX = SHIFTING   ;bump drawing only in shifting mode
960
	mov	esi,.czbuff	 ; .czbuff current address in buffer
973
	mov	esi,.czbuff	 ; .czbuff current address in buffer
961
	mov	ebx,.cz 	 ; .cz - cur z position
974
	mov	ebx,.cz 	 ; .cz - cur z position
Line 975... Line 988...
975
	sar	esi,ROUND
988
	sar	esi,ROUND
976
end if
989
end if
977
	shl	eax,TEX_SHIFT	;-
990
	shl	eax,TEX_SHIFT	;-
978
	add	esi,eax 	;-  ; esi - current bump map index
991
	add	esi,eax 	;-  ; esi - current bump map index
Line -... Line 992...
-
 
992
 
-
 
993
if Ext = SSE2
-
 
994
	movd	xmm0,esi
-
 
995
	shufps	xmm0,xmm0,0
-
 
996
	paddd	xmm0,xmm2
-
 
997
	pand	xmm0,xmm1
-
 
998
	paddd	xmm0,xmm3
-
 
999
 
-
 
1000
	movd	ebx,xmm0
-
 
1001
	movzx	eax,byte[ebx]
-
 
1002
;
-
 
1003
;        shufps  xmm0,xmm0,11100001b
-
 
1004
	psrldq	xmm0,4
-
 
1005
	movd	ebx,xmm0
-
 
1006
	movzx	ebx,byte[ebx]
-
 
1007
	sub	eax,ebx
-
 
1008
;
-
 
1009
;        shufps  xmm0,xmm0,11111110b
-
 
1010
	psrldq	xmm0,4
-
 
1011
	movd	ebx,xmm0
-
 
1012
	movzx	edx, byte [ebx]
-
 
1013
;
-
 
1014
;        shufps  xmm0,xmm0,11111111b
-
 
1015
	psrldq	xmm0,4
-
 
1016
	movd	ebx,xmm0
-
 
1017
	movzx	ebx, byte [ebx]
-
 
1018
	sub	edx,ebx
-
 
1019
;
-
 
1020
else
979
 
1021
 
980
	mov	ebx,esi
1022
	mov	ebx,esi
981
	dec	ebx
1023
	dec	ebx
982
	and	ebx,TEXTURE_SIZE
1024
	and	ebx,TEXTURE_SIZE
983
	add	ebx,.bmap
1025
	add	ebx,.bmap
Line 1002... Line 1044...
1002
	and	ebx,TEXTURE_SIZE
1044
	and	ebx,TEXTURE_SIZE
1003
	add	ebx,.bmap
1045
	add	ebx,.bmap
1004
	movzx	ebx,byte [ebx]
1046
	movzx	ebx,byte [ebx]
Line 1005... Line 1047...
1005
 
1047
 
-
 
1048
	sub	edx,ebx
1006
	sub	edx,ebx
1049
end if
1007
     ;  eax - horizontal sub
1050
     ;  eax - horizontal sub
1008
     ;  edx - vertical   sub
1051
     ;  edx - vertical   sub
1009
if Ext = NON
1052
if Ext = NON
1010
	mov	ebx,.cex       ;.cex - current env map X
1053
	mov	ebx,.cex       ;.cex - current env map X