Skip to content

Commit

Permalink
gsdx-hw: EmulateAtst -> Remove unused tex parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
lightningterror committed Nov 4, 2020
1 parent 246dab3 commit a15d3d5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions plugins/GSdx/Renderers/DX11/GSRendererDX11.cpp
Expand Up @@ -993,7 +993,7 @@ void GSRendererDX11::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sou
}
else
{
EmulateAtst(tex, ps_cb.FogColor_AREF, ps_atst, false);
EmulateAtst(ps_cb.FogColor_AREF, ps_atst, false);
m_ps_sel.atst = ps_atst;
}

Expand Down Expand Up @@ -1083,13 +1083,13 @@ void GSRendererDX11::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sou
{
// Enable ATE as first pass to update the depth
// of pixels that passed the alpha test
EmulateAtst(tex, ps_cb.FogColor_AREF, ps_atst, false);
EmulateAtst(ps_cb.FogColor_AREF, ps_atst, false);
}
else
{
// second pass will process the pixels that failed
// the alpha test
EmulateAtst(tex, ps_cb.FogColor_AREF, ps_atst, true);
EmulateAtst(ps_cb.FogColor_AREF, ps_atst, true);
}

m_ps_sel.atst = ps_atst;
Expand Down
3 changes: 1 addition & 2 deletions plugins/GSdx/Renderers/HW/GSRendererHW.cpp
Expand Up @@ -438,7 +438,7 @@ void GSRendererHW::Lines2Sprites()
}
}

void GSRendererHW::EmulateAtst(const GSTextureCache::Source* tex, GSVector4& FogColor_AREF, uint8& ps_atst, const bool pass_2)
void GSRendererHW::EmulateAtst(GSVector4& FogColor_AREF, uint8& ps_atst, const bool pass_2)
{
static const uint32 inverted_atst[] = {ATST_ALWAYS, ATST_NEVER, ATST_GEQUAL, ATST_GREATER, ATST_NOTEQUAL, ATST_LESS, ATST_LEQUAL, ATST_EQUAL};

Expand Down Expand Up @@ -476,7 +476,6 @@ void GSRendererHW::EmulateAtst(const GSTextureCache::Source* tex, GSVector4& Fog
FogColor_AREF.a = (float)m_context->TEST.AREF;
ps_atst = 4;
break;

case ATST_NEVER: // Draw won't be done so no need to implement it in shader
case ATST_ALWAYS:
default:
Expand Down
2 changes: 1 addition & 1 deletion plugins/GSdx/Renderers/HW/GSRendererHW.h
Expand Up @@ -175,7 +175,7 @@ class GSRendererHW : public GSRenderer
GSVector2i GetCustomResolution();
void SetScaling();
void Lines2Sprites();
void EmulateAtst(const GSTextureCache::Source* tex, GSVector4& FogColor_AREF, uint8& atst, const bool pass_2);
void EmulateAtst(GSVector4& FogColor_AREF, uint8& atst, const bool pass_2);
void ConvertSpriteTextureShuffle(bool& write_ba, bool& read_ba);
GSVector4 RealignTargetTextureCoordinate(const GSTextureCache::Source* tex);
GSVector4i ComputeBoundingBox(const GSVector2& rtscale, const GSVector2i& rtsize);
Expand Down
6 changes: 3 additions & 3 deletions plugins/GSdx/Renderers/OpenGL/GSRendererOGL.cpp
Expand Up @@ -1219,7 +1219,7 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
m_om_dssel.zwe = false;
m_om_csel.wa = false;
} else {
EmulateAtst(tex, ps_cb.FogColor_AREF, ps_atst, false);
EmulateAtst(ps_cb.FogColor_AREF, ps_atst, false);
m_ps_sel.atst = ps_atst;
}

Expand Down Expand Up @@ -1336,13 +1336,13 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
{
// Enable ATE as first pass to update the depth
// of pixels that passed the alpha test
EmulateAtst(tex, ps_cb.FogColor_AREF, ps_atst, false);
EmulateAtst(ps_cb.FogColor_AREF, ps_atst, false);
}
else
{
// second pass will process the pixels that failed
// the alpha test
EmulateAtst(tex, ps_cb.FogColor_AREF, ps_atst, true);
EmulateAtst(ps_cb.FogColor_AREF, ps_atst, true);
}

m_ps_sel.atst = ps_atst;
Expand Down

0 comments on commit a15d3d5

Please sign in to comment.