- Added an assembly version of rt_shaded4cols, since that's the main decal

drawing function. The most improvement came from being able to turn some
  constant variables into immediate values with self-modifying code, but I
  also managed to reorder it to make it a little faster. It's about 9% faster
  than VC++'s code and 19% faster than GCC's code. That's not a huge
  improvement (for VC++), but at least it's measurable.
- Removed the solid fill "optimization" from rt_shaded4cols(), because in my
  testing, it didn't help any and in fact, hurt just a little bit.
- In the name of simplification, all the rt_tlate* drawers were changed to do
  the translation in one step and the drawing in another. This lets me call
  the untranslated drawer to do the real drawing instead of mostly duplicating
  them. Performance wise, there is practically no difference from before.


SVN r771 (trunk)
This commit is contained in:
Randy Heit 2008-02-27 03:11:35 +00:00
commit 9cb674c60c
8 changed files with 361 additions and 493 deletions

View file

@ -80,6 +80,7 @@ int detailyshift; // [RH] Y shift for vertical detail level
extern "C" void STACK_ARGS DoubleHoriz_MMX (int height, int width, BYTE *dest, int pitch);
extern "C" void STACK_ARGS DoubleHorizVert_MMX (int height, int width, BYTE *dest, int pitch);
extern "C" void STACK_ARGS DoubleVert_ASM (int height, int width, BYTE *dest, int pitch);
extern "C" void R_SetupShadedCol();
#endif
// [RH] Pointers to the different column drawers.
@ -94,7 +95,7 @@ void (*R_DrawSpan)(void);
void (*R_DrawSpanMasked)(void);
void (*R_DrawSpanTranslucent)(void);
void (*R_DrawSpanMaskedTranslucent)(void);
void (*rt_map4cols)(int,int,int);
void (STACK_ARGS *rt_map4cols)(int,int,int);
//
// R_DrawColumn
@ -2270,6 +2271,7 @@ ESPSResult R_SetPatchStyle (FRenderStyle style, fixed_t alpha, int translation,
{
dc_colormap += fixedlightlev;
}
R_SetupShadedCol();
return r_columnmethod ? DoDraw1 : DoDraw0;
}