From 4a34eb5e96a4585146b5c7bf32b1217a527b49aa Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Fri, 17 Dec 2021 16:39:09 -0500 Subject: [PATCH] Disable ASM column / span entirely Causes strange unidentifiable bugs, and testing with tape who has a few framerate issues. perfstats outputted practically the same frames for everyone. Whatever frame drops exist are simply something else and ASM is not helping at all, so decided it's not worth it. Behind a define anyway, if someone decides to fix it anyway. --- src/screen.c | 10 +++++++++- src/screen.h | 6 ++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/screen.c b/src/screen.c index 3cf8e80d3..25dcbb1f7 100644 --- a/src/screen.c +++ b/src/screen.c @@ -49,13 +49,17 @@ // -------------------------------------------- void (*colfunc)(void); void (*colfuncs[COLDRAWFUNC_MAX])(void); +#ifdef USE_COL_SPAN_ASM void (*colfuncs_asm[COLDRAWFUNC_MAX])(void); +#endif int colfunctype; void (*spanfunc)(void); void (*spanfuncs[SPANDRAWFUNC_MAX])(void); void (*spanfuncs_npo2[SPANDRAWFUNC_MAX])(void); +#ifdef USE_COL_SPAN_ASM void (*spanfuncs_asm[SPANDRAWFUNC_MAX])(void); +#endif // ------------------ // global video state @@ -160,7 +164,7 @@ void SCR_SetDrawFuncs(void) spanfuncs_npo2[SPANDRAWFUNC_TILTEDWATER] = R_DrawTiltedTranslucentWaterSpan_NPO2_8; spanfuncs_npo2[SPANDRAWFUNC_FOG] = NULL; // Not needed -#ifdef RUSEASM +#if (defined(RUSEASM) && defined(USE_COL_SPAN_ASM)) if (R_ASM) { if (R_MMX) @@ -210,11 +214,13 @@ void R_SetColumnFunc(size_t id, boolean brightmapped) colfunctype = id; +#ifdef USE_COL_SPAN_ASM if (colfuncs_asm[id] != NULL && brightmapped == false) { colfunc = colfuncs_asm[id]; } else +#endif { colfunc = colfuncs[id]; } @@ -228,10 +234,12 @@ void R_SetSpanFunc(size_t id, boolean npo2, boolean brightmapped) { spanfunc = spanfuncs_npo2[id]; } +#ifdef USE_COL_SPAN_ASM else if (spanfuncs_asm[id] != NULL && brightmapped == false) { spanfunc = spanfuncs_asm[id]; } +#endif else { spanfunc = spanfuncs[id]; diff --git a/src/screen.h b/src/screen.h index 86807be76..66c52dd67 100644 --- a/src/screen.h +++ b/src/screen.h @@ -116,6 +116,8 @@ extern vmode_t specialmodes[NUMSPECIALMODES]; // color mode dependent drawer function pointers // --------------------------------------------- +#define USE_COL_SPAN_ASM 0 + #define BASEDRAWFUNC 0 enum @@ -135,7 +137,9 @@ enum extern void (*colfunc)(void); extern void (*colfuncs[COLDRAWFUNC_MAX])(void); +#ifdef USE_COL_SPAN_ASM extern void (*colfuncs_asm[COLDRAWFUNC_MAX])(void); +#endif extern int colfunctype; enum @@ -165,7 +169,9 @@ enum extern void (*spanfunc)(void); extern void (*spanfuncs[SPANDRAWFUNC_MAX])(void); extern void (*spanfuncs_npo2[SPANDRAWFUNC_MAX])(void); +#ifdef USE_COL_SPAN_ASM extern void (*spanfuncs_asm[SPANDRAWFUNC_MAX])(void); +#endif // ----- // CPUID