Just tried some rough calculations to see the cycle count, to see if using Downscaling with longwords could be worth it. i assume you upscale the mipmap like below.
Mipmap upscale:
Code:
move.w (a1),(a0)+ ; 12 cycles
move.w (a1)+,(a0)+ ; 12 cycles
move.w (a1),(a0)+ ; 12 cycles
move.w (a1)+,(a0)+ ; 12 cycles
= 48 cycles
Mipmap downscale:
Code:
move.w (a1)+,(a0)+ ; 12 cycles
move.w (a1)+,(a0)+ ; 12 cycles
addq.l #2,A1 ; 4 cycles
move.w (a1)+,(a0)+ ; 12 cycles
move.w (a1)+,(a0)+ ; 12 cycles
= 52 cycles
Mipmap downscale with longwords:
Code:
move.l (a1)+,(a0)+ ; 20 cycles
addq.l #4,A1 ; 8 cycles
move.l (a1)+,(a0)+ ; 20 cycles
= 48 cycles
So in some cases downscaling with longwords would be faster than mipmap upscaling* So in some cases downscaling with longwords would be as fast as mipmap upscaling, and downscaling with words are in some cases only 4 cycles slower per 4 pixels. or am i missing the point here? ofcourse using longwords with mipmap upscaling would also in some cases be even faster.
Just an idea to take advantage of this:
for walls between 63 - 48 use downscaling of 64px texture with longwords where possible, and for 47-33 use mipmap upscaling of 32px texture with longwords where possible.
as mentioned, i would'nt mind if i had to manually hand optimize every wall height below 64 pixels
EDIT: *Changed the cycle count after Tony corrected me