mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 05:31:00 +00:00
Removed r_columnmethod as its performance gains are too insignificant to justify its complexity on the codebase
This commit is contained in:
parent
8231032f89
commit
b0febec986
7 changed files with 10 additions and 207 deletions
|
@ -445,7 +445,7 @@ namespace swrenderer
|
|||
if (style.BlendOp == STYLEOP_Fuzz)
|
||||
{
|
||||
colfunc = fuzzcolfunc;
|
||||
return DoDraw0;
|
||||
return DoDraw;
|
||||
}
|
||||
else if (style == LegacyRenderStyles[STYLE_Shaded])
|
||||
{
|
||||
|
@ -466,8 +466,7 @@ namespace swrenderer
|
|||
{
|
||||
R_SetColorMapLight(basecolormap, 0, 0);
|
||||
}
|
||||
bool active_columnmethod = r_columnmethod && !r_swtruecolor;
|
||||
return active_columnmethod ? DoDraw1 : DoDraw0;
|
||||
return DoDraw;
|
||||
}
|
||||
|
||||
fglevel = GetAlpha(style.SrcAlpha, alpha);
|
||||
|
@ -500,8 +499,7 @@ namespace swrenderer
|
|||
{
|
||||
return DontDraw;
|
||||
}
|
||||
bool active_columnmethod = r_columnmethod && !r_swtruecolor;
|
||||
return active_columnmethod ? DoDraw1 : DoDraw0;
|
||||
return DoDraw;
|
||||
}
|
||||
|
||||
ESPSResult R_SetPatchStyle(FRenderStyle style, float alpha, int translation, uint32_t color)
|
||||
|
|
|
@ -15,7 +15,6 @@ EXTERN_CVAR(Float, r_lod_bias);
|
|||
EXTERN_CVAR(Int, r_drawfuzz);
|
||||
EXTERN_CVAR(Bool, r_drawtrans);
|
||||
EXTERN_CVAR(Float, transsouls);
|
||||
EXTERN_CVAR(Int, r_columnmethod);
|
||||
EXTERN_CVAR(Bool, r_dynlights);
|
||||
|
||||
namespace swrenderer
|
||||
|
@ -131,8 +130,7 @@ namespace swrenderer
|
|||
enum ESPSResult
|
||||
{
|
||||
DontDraw, // not useful to draw this
|
||||
DoDraw0, // draw this as if r_columnmethod is 0
|
||||
DoDraw1, // draw this as if r_columnmethod is 1
|
||||
DoDraw // draw this
|
||||
};
|
||||
|
||||
ESPSResult R_SetPatchStyle(FRenderStyle style, fixed_t alpha, int translation, uint32_t color);
|
||||
|
|
|
@ -65,18 +65,6 @@
|
|||
CVAR (String, r_viewsize, "", CVAR_NOSET)
|
||||
CVAR (Bool, r_shadercolormaps, true, CVAR_ARCHIVE)
|
||||
|
||||
CUSTOM_CVAR (Int, r_columnmethod, 1, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
{
|
||||
if (self != 0 && self != 1)
|
||||
{
|
||||
self = 1;
|
||||
}
|
||||
else
|
||||
{ // Trigger the change
|
||||
setsizeneeded = true;
|
||||
}
|
||||
}
|
||||
|
||||
CVAR(Int, r_portal_recursions, 4, CVAR_ARCHIVE)
|
||||
CVAR(Bool, r_highlight_portals, false, CVAR_ARCHIVE)
|
||||
|
||||
|
|
|
@ -415,46 +415,13 @@ void R_RenderMaskedSegRange (drawseg_t *ds, int x1, int x2)
|
|||
mceilingclip = wallupper;
|
||||
|
||||
// draw the columns one at a time
|
||||
if (drawmode == DoDraw0)
|
||||
if (drawmode == DoDraw)
|
||||
{
|
||||
for (dc_x = x1; dc_x < x2; ++dc_x)
|
||||
{
|
||||
BlastMaskedColumn (tex, false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// [RH] Draw up to four columns at once
|
||||
int stop = x2 & ~3;
|
||||
|
||||
if (x1 >= x2)
|
||||
goto clearfog;
|
||||
|
||||
dc_x = x1;
|
||||
|
||||
while ((dc_x < stop) && (dc_x & 3))
|
||||
{
|
||||
BlastMaskedColumn (tex, false);
|
||||
dc_x++;
|
||||
}
|
||||
|
||||
while (dc_x < stop)
|
||||
{
|
||||
rt_initcols(nullptr);
|
||||
BlastMaskedColumn (tex, true); dc_x++;
|
||||
BlastMaskedColumn (tex, true); dc_x++;
|
||||
BlastMaskedColumn (tex, true); dc_x++;
|
||||
BlastMaskedColumn (tex, true);
|
||||
rt_draw4cols (dc_x - 3);
|
||||
dc_x++;
|
||||
}
|
||||
|
||||
while (dc_x < x2)
|
||||
{
|
||||
BlastMaskedColumn (tex, false);
|
||||
dc_x++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{ // Texture does wrap vertically.
|
||||
|
@ -2346,42 +2313,6 @@ static void R_RenderDecal (side_t *wall, DBaseDecal *decal, drawseg_t *clipper,
|
|||
}
|
||||
else
|
||||
{
|
||||
int stop4;
|
||||
|
||||
if (mode == DoDraw0)
|
||||
{ // 1 column at a time
|
||||
stop4 = dc_x;
|
||||
}
|
||||
else // DoDraw1
|
||||
{ // up to 4 columns at a time
|
||||
stop4 = x2 & ~3;
|
||||
}
|
||||
|
||||
while ((dc_x < stop4) && (dc_x & 3))
|
||||
{
|
||||
if (calclighting)
|
||||
{ // calculate lighting
|
||||
R_SetColorMapLight(usecolormap, rw_light, wallshade);
|
||||
}
|
||||
R_WallSpriteColumn (false);
|
||||
dc_x++;
|
||||
}
|
||||
|
||||
while (dc_x < stop4)
|
||||
{
|
||||
if (calclighting)
|
||||
{ // calculate lighting
|
||||
R_SetColorMapLight(usecolormap, rw_light, wallshade);
|
||||
}
|
||||
rt_initcols(nullptr);
|
||||
for (int zz = 4; zz; --zz)
|
||||
{
|
||||
R_WallSpriteColumn (true);
|
||||
dc_x++;
|
||||
}
|
||||
rt_draw4cols (dc_x - 4);
|
||||
}
|
||||
|
||||
while (dc_x < x2)
|
||||
{
|
||||
if (calclighting)
|
||||
|
|
|
@ -530,7 +530,7 @@ void R_DrawVisSprite (vissprite_t *vis)
|
|||
{
|
||||
fixed_t frac;
|
||||
FTexture *tex;
|
||||
int x2, stop4;
|
||||
int x2;
|
||||
fixed_t xiscale;
|
||||
ESPSResult mode;
|
||||
bool ispsprite = (!vis->sector && vis->gpos != FVector3(0, 0, 0));
|
||||
|
@ -554,17 +554,6 @@ void R_DrawVisSprite (vissprite_t *vis)
|
|||
|
||||
if (mode != DontDraw)
|
||||
{
|
||||
if (mode == DoDraw0)
|
||||
{
|
||||
// One column at a time
|
||||
stop4 = vis->x1;
|
||||
}
|
||||
else // DoDraw1
|
||||
{
|
||||
// Up to four columns at a time
|
||||
stop4 = vis->x2 & ~3;
|
||||
}
|
||||
|
||||
tex = vis->pic;
|
||||
spryscale = vis->yscale;
|
||||
sprflipvert = false;
|
||||
|
@ -592,27 +581,6 @@ void R_DrawVisSprite (vissprite_t *vis)
|
|||
|
||||
if (dc_x < x2)
|
||||
{
|
||||
while ((dc_x < stop4) && (dc_x & 3))
|
||||
{
|
||||
if (ispsprite || !R_ClipSpriteColumnWithPortals(vis))
|
||||
R_DrawMaskedColumn (tex, frac, false);
|
||||
dc_x++;
|
||||
frac += xiscale;
|
||||
}
|
||||
|
||||
while (dc_x < stop4)
|
||||
{
|
||||
rt_initcols(nullptr);
|
||||
for (int zz = 4; zz; --zz)
|
||||
{
|
||||
if (ispsprite || !R_ClipSpriteColumnWithPortals(vis))
|
||||
R_DrawMaskedColumn (tex, frac, true);
|
||||
dc_x++;
|
||||
frac += xiscale;
|
||||
}
|
||||
rt_draw4cols (dc_x - 4);
|
||||
}
|
||||
|
||||
while (dc_x < x2)
|
||||
{
|
||||
if (ispsprite || !R_ClipSpriteColumnWithPortals(vis))
|
||||
|
@ -708,44 +676,6 @@ void R_DrawWallSprite(vissprite_t *spr)
|
|||
}
|
||||
else
|
||||
{
|
||||
int stop4;
|
||||
|
||||
if (mode == DoDraw0)
|
||||
{ // 1 column at a time
|
||||
stop4 = dc_x;
|
||||
}
|
||||
else // DoDraw1
|
||||
{ // up to 4 columns at a time
|
||||
stop4 = x2 & ~3;
|
||||
}
|
||||
|
||||
while ((dc_x < stop4) && (dc_x & 3))
|
||||
{
|
||||
if (calclighting)
|
||||
{ // calculate lighting
|
||||
R_SetColorMapLight(usecolormap, rw_light, shade);
|
||||
}
|
||||
if (!R_ClipSpriteColumnWithPortals(spr))
|
||||
R_WallSpriteColumn(false);
|
||||
dc_x++;
|
||||
}
|
||||
|
||||
while (dc_x < stop4)
|
||||
{
|
||||
if (calclighting)
|
||||
{ // calculate lighting
|
||||
R_SetColorMapLight(usecolormap, rw_light, shade);
|
||||
}
|
||||
rt_initcols(nullptr);
|
||||
for (int zz = 4; zz; --zz)
|
||||
{
|
||||
if (!R_ClipSpriteColumnWithPortals(spr))
|
||||
R_WallSpriteColumn(true);
|
||||
dc_x++;
|
||||
}
|
||||
rt_draw4cols(dc_x - 4);
|
||||
}
|
||||
|
||||
while (dc_x < x2)
|
||||
{
|
||||
if (calclighting)
|
||||
|
|
|
@ -210,8 +210,6 @@ void DCanvas::DrawTextureParms(FTexture *img, DrawParms &parms)
|
|||
|
||||
if (mode != DontDraw)
|
||||
{
|
||||
int stop4;
|
||||
|
||||
double centeryback = CenterY;
|
||||
CenterY = 0;
|
||||
|
||||
|
@ -277,56 +275,17 @@ void DCanvas::DrawTextureParms(FTexture *img, DrawParms &parms)
|
|||
x2 = parms.rclip;
|
||||
}
|
||||
|
||||
// Drawing short output ought to fit in the data cache well enough
|
||||
// if we draw one column at a time, so do that, since it's simpler.
|
||||
if (parms.destheight < 32 || (parms.dclip - parms.uclip) < 32)
|
||||
{
|
||||
mode = DoDraw0;
|
||||
}
|
||||
|
||||
dc_x = int(x0);
|
||||
int x2_i = int(x2);
|
||||
fixed_t xiscale_i = FLOAT2FIXED(xiscale);
|
||||
|
||||
if (mode == DoDraw0)
|
||||
while (dc_x < x2_i)
|
||||
{
|
||||
// One column at a time
|
||||
stop4 = dc_x;
|
||||
}
|
||||
else // DoDraw1`
|
||||
{
|
||||
// Up to four columns at a time
|
||||
stop4 = x2_i & ~3;
|
||||
R_DrawMaskedColumn(img, frac, false, !parms.masked);
|
||||
dc_x++;
|
||||
frac += xiscale_i;
|
||||
}
|
||||
|
||||
if (dc_x < x2_i)
|
||||
{
|
||||
while ((dc_x < stop4) && (dc_x & 3))
|
||||
{
|
||||
R_DrawMaskedColumn(img, frac, false, !parms.masked);
|
||||
dc_x++;
|
||||
frac += xiscale_i;
|
||||
}
|
||||
|
||||
while (dc_x < stop4)
|
||||
{
|
||||
rt_initcols(nullptr);
|
||||
for (int zz = 4; zz; --zz)
|
||||
{
|
||||
R_DrawMaskedColumn(img, frac, true, !parms.masked);
|
||||
dc_x++;
|
||||
frac += xiscale_i;
|
||||
}
|
||||
rt_draw4cols(dc_x - 4);
|
||||
}
|
||||
|
||||
while (dc_x < x2_i)
|
||||
{
|
||||
R_DrawMaskedColumn(img, frac, false, !parms.masked);
|
||||
dc_x++;
|
||||
frac += xiscale_i;
|
||||
}
|
||||
}
|
||||
CenterY = centeryback;
|
||||
}
|
||||
R_FinishSetPatchStyle ();
|
||||
|
|
|
@ -704,7 +704,6 @@ OptionMenu "VideoOptions"
|
|||
Slider "$DSPLYMNU_BLOODFADE", "blood_fade_scalar", 0.0, 1.0, 0.05, 2
|
||||
Slider "$DSPLYMNU_PICKUPFADE", "pickup_fade_scalar", 0.0, 1.0, 0.05, 2
|
||||
Slider "$DSPLYMNU_WATERFADE", "underwater_fade_scalar", 0.0, 1.0, 0.05, 2
|
||||
Option "$DSPLYMNU_COLUMNMETHOD", "r_columnmethod", "ColumnMethods"
|
||||
Option "$DSPLYMNU_BLENDMETHOD", "r_blendmethod", "BlendMethods"
|
||||
|
||||
StaticText " "
|
||||
|
|
Loading…
Reference in a new issue