Disabled the AVX intrinsics

This commit is contained in:
Magnus Norddahl 2016-06-19 23:37:22 +02:00
parent b322043724
commit d3bc68a160
2 changed files with 17 additions and 59 deletions

View File

@ -58,7 +58,6 @@ extern float rw_lightstep;
extern int wallshade;
CVAR(Bool, r_multithreaded, true, 0)
CVAR(Bool, r_linearlight, false, 0)
#ifndef NO_SSE
@ -71,7 +70,7 @@ CVAR(Bool, r_linearlight, false, 0)
#define VEC_SHADE_INIT4 SSE_SHADE_INIT4
#define VEC_SHADE SSE_SHADE
#include "r_draw_rgba_sse.h"
/*
// Generate AVX drawers:
#undef VecCommand
#undef VEC_SHADE_SIMPLE_INIT
@ -88,7 +87,7 @@ CVAR(Bool, r_linearlight, false, 0)
#define VEC_SHADE_INIT4 AVX_LINEAR_SHADE_INIT4
#define VEC_SHADE AVX_LINEAR_SHADE
#include "r_draw_rgba_sse.h"
*/
#endif
/////////////////////////////////////////////////////////////////////////////
@ -3652,10 +3651,7 @@ void R_DrawSpan_rgba()
#ifdef NO_SSE
DrawerCommandQueue::QueueCommand<DrawSpanRGBACommand>();
#else
if (!r_linearlight)
DrawerCommandQueue::QueueCommand<DrawSpanRGBA_SSE_Command>();
else
DrawerCommandQueue::QueueCommand<DrawSpanRGBA_AVX_Command>();
DrawerCommandQueue::QueueCommand<DrawSpanRGBA_SSE_Command>();
#endif
}
@ -3709,10 +3705,7 @@ void vlinec4_rgba()
#ifdef NO_SSE
DrawerCommandQueue::QueueCommand<Vlinec4RGBACommand>();
#else
if (!r_linearlight)
DrawerCommandQueue::QueueCommand<Vlinec4RGBA_SSE_Command>();
else
DrawerCommandQueue::QueueCommand<Vlinec4RGBA_AVX_Command>();
DrawerCommandQueue::QueueCommand<Vlinec4RGBA_SSE_Command>();
#endif
for (int i = 0; i < 4; i++)
vplce[i] += vince[i] * dc_count;
@ -3729,10 +3722,7 @@ void mvlinec4_rgba()
#ifdef NO_SSE
DrawerCommandQueue::QueueCommand<Mvlinec4RGBACommand>();
#else
if (!r_linearlight)
DrawerCommandQueue::QueueCommand<Mvlinec4RGBA_SSE_Command>();
else
DrawerCommandQueue::QueueCommand<Mvlinec4RGBA_AVX_Command>();
DrawerCommandQueue::QueueCommand<Mvlinec4RGBA_SSE_Command>();
#endif
for (int i = 0; i < 4; i++)
vplce[i] += vince[i] * dc_count;
@ -3749,10 +3739,7 @@ void tmvline4_add_rgba()
#ifdef NO_SSE
DrawerCommandQueue::QueueCommand<Tmvline4AddRGBACommand>();
#else
if (!r_linearlight)
DrawerCommandQueue::QueueCommand<Tmvline4AddRGBA_SSE_Command>();
else
DrawerCommandQueue::QueueCommand<Tmvline4AddRGBA_AVX_Command>();
DrawerCommandQueue::QueueCommand<Tmvline4AddRGBA_SSE_Command>();
#endif
for (int i = 0; i < 4; i++)
vplce[i] += vince[i] * dc_count;
@ -3769,10 +3756,7 @@ void tmvline4_addclamp_rgba()
#ifdef NO_SSE
DrawerCommandQueue::QueueCommand<Tmvline4AddClampRGBACommand>();
#else
if (!r_linearlight)
DrawerCommandQueue::QueueCommand<Tmvline4AddClampRGBA_SSE_Command>();
else
DrawerCommandQueue::QueueCommand<Tmvline4AddClampRGBA_AVX_Command>();
DrawerCommandQueue::QueueCommand<Tmvline4AddClampRGBA_SSE_Command>();
#endif
for (int i = 0; i < 4; i++)
vplce[i] += vince[i] * dc_count;
@ -3789,10 +3773,7 @@ void tmvline4_subclamp_rgba()
#ifdef NO_SSE
DrawerCommandQueue::QueueCommand<Tmvline4SubClampRGBACommand>();
#else
if (!r_linearlight)
DrawerCommandQueue::QueueCommand<Tmvline4SubClampRGBA_SSE_Command>();
else
DrawerCommandQueue::QueueCommand<Tmvline4SubClampRGBA_AVX_Command>();
DrawerCommandQueue::QueueCommand<Tmvline4SubClampRGBA_SSE_Command>();
#endif
for (int i = 0; i < 4; i++)
vplce[i] += vince[i] * dc_count;
@ -3809,10 +3790,7 @@ void tmvline4_revsubclamp_rgba()
#ifdef NO_SSE
DrawerCommandQueue::QueueCommand<Tmvline4RevSubClampRGBACommand>();
#else
if (!r_linearlight)
DrawerCommandQueue::QueueCommand<Tmvline4RevSubClampRGBA_SSE_Command>();
else
DrawerCommandQueue::QueueCommand<Tmvline4RevSubClampRGBA_AVX_Command>();
DrawerCommandQueue::QueueCommand<Tmvline4RevSubClampRGBA_SSE_Command>();
#endif
for (int i = 0; i < 4; i++)
vplce[i] += vince[i] * dc_count;

View File

@ -51,8 +51,6 @@ extern unsigned int dc_tspans[4][MAXHEIGHT];
extern unsigned int *dc_ctspan[4];
extern unsigned int *horizspan[4];
EXTERN_CVAR(Bool, r_linearlight)
#ifndef NO_SSE
// Generate SSE drawers:
@ -64,7 +62,7 @@ EXTERN_CVAR(Bool, r_linearlight)
#define VEC_SHADE_INIT4 SSE_SHADE_INIT4
#define VEC_SHADE SSE_SHADE
#include "r_drawt_rgba_sse.h"
/*
// Generate AVX drawers:
#undef VecCommand
#undef VEC_SHADE_SIMPLE_INIT
@ -81,7 +79,7 @@ EXTERN_CVAR(Bool, r_linearlight)
#define VEC_SHADE_INIT4 AVX_LINEAR_SHADE_INIT4
#define VEC_SHADE AVX_LINEAR_SHADE
#include "r_drawt_rgba_sse.h"
*/
#endif
/////////////////////////////////////////////////////////////////////////////
@ -1311,10 +1309,7 @@ void rt_map4cols_rgba (int sx, int yl, int yh)
#ifdef NO_SSE
DrawerCommandQueue::QueueCommand<RtMap4colsRGBACommand>(sx, yl, yh);
#else
if (!r_linearlight)
DrawerCommandQueue::QueueCommand<RtMap4colsRGBA_SSE_Command>(sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<RtMap4colsRGBA_AVX_Command>(sx, yl, yh);
DrawerCommandQueue::QueueCommand<RtMap4colsRGBA_SSE_Command>(sx, yl, yh);
#endif
}
@ -1354,10 +1349,7 @@ void rt_add4cols_rgba (int sx, int yl, int yh)
#ifdef NO_SSE
DrawerCommandQueue::QueueCommand<RtAdd4colsRGBACommand>(sx, yl, yh);
#else
if (!r_linearlight)
DrawerCommandQueue::QueueCommand<RtAdd4colsRGBA_SSE_Command>(sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<RtAdd4colsRGBA_AVX_Command>(sx, yl, yh);
DrawerCommandQueue::QueueCommand<RtAdd4colsRGBA_SSE_Command>(sx, yl, yh);
#endif
}
@ -1387,10 +1379,7 @@ void rt_shaded4cols_rgba (int sx, int yl, int yh)
#ifdef NO_SSE
DrawerCommandQueue::QueueCommand<RtShaded4colsRGBACommand>(sx, yl, yh);
#else
if (!r_linearlight)
DrawerCommandQueue::QueueCommand<RtShaded4colsRGBA_SSE_Command>(sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<RtShaded4colsRGBA_AVX_Command>(sx, yl, yh);
DrawerCommandQueue::QueueCommand<RtShaded4colsRGBA_SSE_Command>(sx, yl, yh);
#endif
}
@ -1406,10 +1395,7 @@ void rt_addclamp4cols_rgba (int sx, int yl, int yh)
#ifdef NO_SSE
DrawerCommandQueue::QueueCommand<RtAddClamp4colsRGBACommand>(sx, yl, yh);
#else
if (!r_linearlight)
DrawerCommandQueue::QueueCommand<RtAddClamp4colsRGBA_SSE_Command>(sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<RtAddClamp4colsRGBA_AVX_Command>(sx, yl, yh);
DrawerCommandQueue::QueueCommand<RtAddClamp4colsRGBA_SSE_Command>(sx, yl, yh);
#endif
}
@ -1439,10 +1425,7 @@ void rt_subclamp4cols_rgba (int sx, int yl, int yh)
#ifdef NO_SSE
DrawerCommandQueue::QueueCommand<RtSubClamp4colsRGBACommand>(sx, yl, yh);
#else
if (!r_linearlight)
DrawerCommandQueue::QueueCommand<RtSubClamp4colsRGBA_SSE_Command>(sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<RtSubClamp4colsRGBA_AVX_Command>(sx, yl, yh);
DrawerCommandQueue::QueueCommand<RtSubClamp4colsRGBA_SSE_Command>(sx, yl, yh);
#endif
}
@ -1472,10 +1455,7 @@ void rt_revsubclamp4cols_rgba (int sx, int yl, int yh)
#ifdef NO_SSE
DrawerCommandQueue::QueueCommand<RtRevSubClamp4colsRGBACommand>(sx, yl, yh);
#else
if (!r_linearlight)
DrawerCommandQueue::QueueCommand<RtRevSubClamp4colsRGBA_SSE_Command>(sx, yl, yh);
else
DrawerCommandQueue::QueueCommand<RtRevSubClamp4colsRGBA_AVX_Command>(sx, yl, yh);
DrawerCommandQueue::QueueCommand<RtRevSubClamp4colsRGBA_SSE_Command>(sx, yl, yh);
#endif
}