Advertisement

Resolving AGI in inner pixel loop

Started by May 20, 2001 11:33 AM
-1 comments, last by Nick3135 23 years, 8 months ago
Does anyone have an idea how to resolve the AGI in the following piece of assembly code? shr edx, 16 ; 1 lea eax, [eax+esp+02000h] ; 1 - 1 lea ebx, [ebx+ebp+02000h] ; 1 and eax, 0F8077FFh ; 1 - 1 and ebx, 007F87FFh ; 1 mov ecx, [esi+edx*4] ; 1 - 1 lea edx, [eax+ebx] ; 2 ; Exp_AGI_U mov [edi+0], ecx ; 1 - 1 It''s currently a 5-cycle code for Pentium, but I really would like to make it 4-cycle. It''s for an affine texture mapper, and making it one cycle faster would mean a big speedup. I already have a 4-cycle inner pixel loop, but it doesn''t use texture tiling and it''s not free to do Unreal style dithering: add ebx, ebp ; 1 - 1 sbb edx, edx ; 1 add eax, esp ; 1 - 1 mov [edi+0], ecx ; 1 mov ecx, [esi*4] ; 1 - 1 adc esi, [VStep+4+edx*4] ; 2 Theoretically this is the fastest Pentium version of this method. Does anyone know good resources about fast inner pixel loops, like the one from Unreal? Thanks, Nick

This topic is closed to new replies.

Advertisement