Subversion Repositories Kolibri OS

Rev

Rev 8719 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8719 Rev 9237
Line 735... Line 735...
735
        jl      .next_line
735
        jl      .next_line
736
ret
736
ret
Line 737... Line 737...
737
 
737
 
738
blur_screen:    ;blur n times  ; blur or fire
738
blur_screen:    ;blur n times  ; blur or fire
-
 
739
;in - ecx  times count
-
 
740
;     ax - render mode
739
;in - ecx  times count
741
 
740
;.counter equ dword[esp-4]
742
 .val      equ  dword[ebp-4]
-
 
743
 .dr_model equ  word[ebp-6]
-
 
744
 .fire     equ  dword[ebp-10]
741
.counter1 equ dword[esp-8]
745
 
742
if Ext>=SSE2
746
if Ext>=SSE2
743
         push       ebp
747
         push       ebp
-
 
748
         mov        ebp,esp
-
 
749
         sub        esp,10
-
 
750
      ;   xorps      xmm5,xmm5
-
 
751
      ;   or         edx,edx
744
         mov        ebp,esp
752
      ;   jz         @f
745
         push       dword 0x01010101
753
         mov        .val,0x01010101
746
         movss      xmm5,[esp]
754
         movss      xmm5,.val
-
 
755
         shufps     xmm5,xmm5,0
-
 
756
      @@:
-
 
757
         mov        .dr_model,ax
-
 
758
 
747
         shufps     xmm5,xmm5,0
759
 
748
     .again_blur:
760
     .again_blur:
749
         push       ecx
761
         push       ecx
750
         mov        edi,[screen_ptr]
762
         mov        edi,[screen_ptr]
751
         movzx      ecx,word[size_x_var]  ;SIZE_X*3/4
-
 
752
 
763
         movzx      ecx,word[size_x_var]  ;SIZE_X*3/4
753
         cmp         [dr_flag],12
764
         cmp         .dr_model,11
754
         jge        @f
765
         jge        @f
755
         lea        ecx,[ecx*3+1]
766
         lea        ecx,[ecx*3+3]
756
         shr        ecx,2
767
         shr        ecx,2
Line 757... Line 768...
757
       @@:
768
       @@:
758
 
769
 
759
         xor        eax,eax
770
         xor        eax,eax
760
         rep        stosd
771
         rep        stosd
761
   if 1
772
   if 1
762
         movzx      ebx,word[size_x_var]
773
         movzx      ebx,word[size_x_var]
763
         movzx      ecx,word[size_y_var]
774
         movzx      ecx,word[size_y_var]
764
         sub        ecx,3
775
         sub        ecx,3
765
         imul       ecx,ebx
776
         imul       ecx,ebx
766
         cmp        [dr_flag],12  ; 32 bit per pix cause
777
         cmp        .dr_model,11  ; 32 bit per pix cause
767
         jge        @f
778
         jge        @f
768
         lea        ecx,[ecx*3]
779
         lea        ecx,[ecx*3]
769
         shr        ecx,4
780
         shr        ecx,4
Line 779... Line 790...
779
         push       ecx
790
         push       ecx
780
         movups     xmm0,[edi+ebx]
791
         movups     xmm0,[edi+ebx]
781
         mov        ecx,edi
792
         mov        ecx,edi
782
         sub        ecx,ebx
793
         sub        ecx,ebx
783
         movups     xmm1,[ecx]
794
         movups     xmm1,[ecx]
784
         cmp         [dr_flag],12
795
         cmp        .dr_model,12
785
         jge        @f
796
         jge        @f
786
         movups     xmm2,[edi-3]
797
         movups     xmm2,[edi-3]
787
         movups     xmm3,[edi+3]
798
         movups     xmm3,[edi+3]
788
         jmp        .f
799
         jmp        .f
789
        @@:
800
        @@:
Line 800... Line 811...
800
         pop        ecx
811
         pop        ecx
801
         loop       .blr
812
         loop       .blr
802
    end if
813
    end if
803
         xor        eax,eax
814
         xor        eax,eax
804
         movzx      ecx,word[size_x_var]
815
         movzx      ecx,word[size_x_var]
805
         cmp        [dr_flag],12
816
         cmp        .dr_model,11
806
         jge        @f
817
         jge        @f
807
         lea        ecx,[ecx*3]
818
         lea        ecx,[ecx*3+3]
808
         shr        ecx,2
819
         shr        ecx,2
809
        @@:
820
        @@:
810
    ;     mov        ecx,SIZE_X*3/4
821
    ;     mov        ecx,SIZE_X*3/4
811
         rep        stosd
822
         rep        stosd
812
         pop        ecx
823
         pop        ecx