diff --git a/GPU/Directx9/StateMappingDX9.cpp b/GPU/Directx9/StateMappingDX9.cpp index 426b8f3eae..61b88dd8fa 100644 --- a/GPU/Directx9/StateMappingDX9.cpp +++ b/GPU/Directx9/StateMappingDX9.cpp @@ -306,8 +306,6 @@ void DrawEngineDX9::ApplyDrawStateLate() { // At this point, we know if the vertices are full alpha or not. // TODO: Set the nearest/linear here (since we correctly know if alpha/color tests are needed)? if (!gstate.isModeClear()) { - // TODO: Test texture? - textureCache_->ApplyTexture(); if (fboTexNeedBind_) { @@ -319,6 +317,8 @@ void DrawEngineDX9::ApplyDrawStateLate() { fboTexBound_ = true; fboTexNeedBind_ = false; } + + // TODO: Test texture? } } diff --git a/GPU/GLES/StateMapping.cpp b/GPU/GLES/StateMapping.cpp index db229b954e..2dc2b702eb 100644 --- a/GPU/GLES/StateMapping.cpp +++ b/GPU/GLES/StateMapping.cpp @@ -373,10 +373,6 @@ void DrawEngineGLES::ApplyDrawStateLate() { // At this point, we know if the vertices are full alpha or not. // TODO: Set the nearest/linear here (since we correctly know if alpha/color tests are needed)? if (!gstate.isModeClear()) { - if (gstate.isAlphaTestEnabled() || gstate.isColorTestEnabled()) { - fragmentTestCache_->BindTestTexture(GL_TEXTURE2); - } - if (fboTexNeedBind_) { // Note that this is positions, not UVs, that we need the copy from. framebufferManager_->BindFramebufferColor(GL_TEXTURE1, gstate.getFrameBufRawAddress(), nullptr, BINDFBCOLOR_MAY_COPY); @@ -394,5 +390,10 @@ void DrawEngineGLES::ApplyDrawStateLate() { // Apply the texture after the FBO tex, since it might unbind the texture. // TODO: Could use a separate texture unit to be safer? textureCache_->ApplyTexture(); + + // Apply last, once we know the alpha params of the texture. + if (gstate.isAlphaTestEnabled() || gstate.isColorTestEnabled()) { + fragmentTestCache_->BindTestTexture(GL_TEXTURE2); + } } }