diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2002-04-02 16:16:14 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2002-04-02 16:16:14 +0000 |
commit | 01bcd83defe1e258007a4449edb8bd3072f008b0 (patch) | |
tree | 4cd4985cae38d114b616b4dd985734402b9a9ad7 /src/mesa/x86 | |
parent | 1537b63fce36f87b3606d0e7cdca2d10bbdffd56 (diff) | |
download | external_mesa3d-01bcd83defe1e258007a4449edb8bd3072f008b0.zip external_mesa3d-01bcd83defe1e258007a4449edb8bd3072f008b0.tar.gz external_mesa3d-01bcd83defe1e258007a4449edb8bd3072f008b0.tar.bz2 |
updates from Jose Fonseca
Diffstat (limited to 'src/mesa/x86')
-rw-r--r-- | src/mesa/x86/mmx_blend.S | 55 |
1 files changed, 30 insertions, 25 deletions
diff --git a/src/mesa/x86/mmx_blend.S b/src/mesa/x86/mmx_blend.S index 154b8ef..88908bd 100644 --- a/src/mesa/x86/mmx_blend.S +++ b/src/mesa/x86/mmx_blend.S @@ -7,25 +7,35 @@ SEG_TEXT ALIGNTEXT16 GLOBL GLNAME(_mesa_mmx_blend_transparency) +/* + * void blend_transparency( GLcontext *ctx, + * GLuint n, + * const GLubyte mask[], + * GLchan rgba[][4], + * CONST GLchan dest[][4] ) + * + * Common transparency blending mode. + */ GLNAME( _mesa_mmx_blend_transparency ): PUSH_L ( EBP ) MOV_L ( ESP, EBP ) SUB_L ( CONST(52), ESP ) PUSH_L ( EBX ) + MOV_L ( CONST(16711680), REGOFF(-8, EBP) ) MOV_L ( CONST(16711680), REGOFF(-4, EBP) ) MOV_L ( CONST(0), REGOFF(-16, EBP) ) MOV_L ( CONST(-1), REGOFF(-12, EBP) ) MOV_L ( CONST(-1), REGOFF(-24, EBP) ) MOV_L ( CONST(0), REGOFF(-20, EBP) ) - MOV_L ( REGOFF(24, EBP), EAX ) + MOV_L ( REGOFF(24, EBP), EAX ) /* rgba */ ADD_L ( CONST(4), EAX ) MOV_L ( EAX, EDX ) - AND_L ( REGOFF(20, EBP), EDX ) + AND_L ( REGOFF(20, EBP), EDX ) /* mask */ MOV_L ( EDX, EAX ) AND_L ( CONST(4), EAX ) CMP_L ( CONST(8), EAX ) - JNE ( LLBL(GMBT_2) ) + JNE ( LLBL(GMBT_no_align) ) MOV_L ( REGOFF(20, EBP), EAX ) ADD_L ( CONST(3), EAX ) XOR_L ( EDX, EDX ) @@ -116,28 +126,28 @@ GLNAME( _mesa_mmx_blend_transparency ): ADD_L ( CONST(4), REGOFF(20, EBP) ) ADD_L ( CONST(4), REGOFF(24, EBP) ) DEC_L ( REGOFF(12, EBP) ) -LLBL(GMBT_2): +LLBL(GMBT_skip_runin): - CMP_L ( CONST(0), REGOFF(12, EBP) ) - JE ( LLBL(GMBT_3) ) - MOV_L ( CONST(0), REGOFF(-28, EBP) ) + CMP_L ( CONST(0), REGOFF(12, EBP) ) /* n == 0 */ + JE ( LLBL(GMBT_zero_length) ) + MOV_L ( CONST(0), REGOFF(-28, EBP) ) ALIGNTEXT4 -LLBL(GMBT_4): +LLBL(GMBT_main_loop): MOV_L ( REGOFF(12, EBP), EDX ) MOV_L ( EDX, EAX ) - SHR_L ( CONST(1), EAX ) + SHR_L ( CONST(1), EAX ) /* eax = n/2 */ CMP_L ( EAX, REGOFF(-28, EBP) ) - JB ( LLBL(GMBT_7) ) - JMP ( LLBL(GMBT_5) ) + JB ( LLBL(GMBT_no_jump) ) + JMP ( LLBL(GMBT_end_loop) ) ALIGNTEXT16 -LLBL(GMBT_7): +LLBL(GMBT_nojump): MOV_L ( REGOFF(-28, EBP), EAX ) LEA_L ( REGDIS(0,EAX,2), EDX ) - MOV_L ( REGOFF(16, EBP), EAX ) + MOV_L ( REGOFF(16, EBP), EAX ) /* mask */ CMP_B ( CONST(0), REGBI(EAX,EDX) ) - JE ( LLBL(GMBT_6) ) + JE ( LLBL(GMBT_masked) ) MOV_L ( REGOFF(-28, EBP), EAX ) MOV_L ( EAX, EDX ) LEA_L ( REGDIS(0,EDX,8), ECX ) @@ -195,25 +205,22 @@ LLBL(GMBT_7): POR ( MM1, MM4 ) MOVQ ( MM4, REGIND(EAX) ) - -LLBL(GMBT_8): - -LLBL(GMBT_6): +LLBL(GMBT_masked): INC_L ( REGOFF(-28, EBP) ) - JMP ( LLBL(GMBT_4) ) + JMP ( LLBL(GMBT_main_loop) ) ALIGNTEXT16 -LLBL(GMBT_5): +LLBL(GMBT_end_loop): EMMS -LLBL(GMBT_3): +LLBL(GMBT_runout): MOV_L ( REGOFF(12, EBP), EAX ) AND_L ( CONST(1), EAX ) TEST_L ( EAX, EAX ) - JE ( LLBL(GMBT_9) ) + JE ( LLBL(GMBT_skip_runout) ) MOV_L ( REGOFF(12, EBP), EAX ) LEA_L ( REGDIS(0,EAX,4), EDX ) MOV_L ( EDX, EAX ) @@ -342,9 +349,7 @@ LLBL(GMBT_3): LEA_L ( REGOFF(-1, EAX), EDX ) MOV_B ( REGOFF(-32, EBP), AL ) MOV_B ( AL, REGIND(EDX) ) -LLBL(GMBT_9): - -LLBL(GMBT_1): +LLBL(GMBT_skip_runout): MOV_L ( REGOFF(-56, EBP), EBX ) MOV_L ( EBP, ESP ) |