Skip to content

Commit

Permalink
- do not use floor sprites for splitting geometry.
Browse files Browse the repository at this point in the history
This is way too expensive on maps with lots of sprites. Instead, run them through the case for slope sprites which should be sufficient here
Also let rendered_* count the actual draw calls, not processed objects, because that is the most relevant metric for checking performance issues.
  • Loading branch information
coelckers committed Jan 13, 2022
1 parent 899ced5 commit 8281374
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion source/core/rendering/scene/hw_drawlist.cpp
Expand Up @@ -1169,7 +1169,6 @@ void HWDrawList::DrawSorted(HWDrawInfo *di, FRenderState &state, SortNode * head
void HWDrawList::DrawSorted(HWDrawInfo *di, FRenderState &state)
{
if (drawitems.Size() == 0) return;

if (!sorted)
{
screen->mVertexData->Map();
Expand Down
2 changes: 1 addition & 1 deletion source/core/rendering/scene/hw_drawlistadd.cpp
Expand Up @@ -100,7 +100,7 @@ void HWDrawInfo::AddFlat(HWFlat *flat)
{
// translucent portals go into the translucent border list.
list = flat->Sprite? GLDL_TRANSLUCENT : GLDL_TRANSLUCENTBORDER;
slopespr = (flat->Sprite && flat->Sprite->clipdist & TSPR_SLOPESPRITE);
slopespr = !!(flat->Sprite);//&& flat->Sprite->clipdist& TSPR_SLOPESPRITE);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion source/core/rendering/scene/hw_flats.cpp
Expand Up @@ -218,6 +218,7 @@ void HWFlat::MakeVertices(HWDrawInfo* di)
//==========================================================================
void HWFlat::DrawFlat(HWDrawInfo *di, FRenderState &state, bool translucent)
{
rendered_flats++;
if (screen->BuffersArePersistent() && !Sprite)
{
MakeVertices(di);
Expand Down Expand Up @@ -291,7 +292,6 @@ void HWFlat::PutFlat(HWDrawInfo *di, int whichplane)
MakeVertices(di);
}
di->AddFlat(this);
rendered_flats++;
}

//==========================================================================
Expand Down
2 changes: 1 addition & 1 deletion source/core/rendering/scene/hw_walls.cpp
Expand Up @@ -253,6 +253,7 @@ void HWWall::RenderTranslucentWall(HWDrawInfo *di, FRenderState &state)
//==========================================================================
void HWWall::DrawWall(HWDrawInfo *di, FRenderState &state, bool translucent)
{
rendered_lines++;
if (screen->BuffersArePersistent())
{
/*
Expand Down Expand Up @@ -397,7 +398,6 @@ void HWWall::SetupLights(HWDrawInfo *di, FDynLightData &lightdata)
//==========================================================================
void HWWall::PutWall(HWDrawInfo *di, bool translucent)
{
rendered_lines++;
if (translucent || (texture && texture->GetTranslucency() && type == RENDERWALL_M2S))
{
flags |= HWF_TRANSLUCENT;
Expand Down

0 comments on commit 8281374

Please sign in to comment.