mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Determine alpha test texture after texture.
Because, of course, this reads texture alpha parameters for blending optimizations. Fixes #8970.
This commit is contained in:
parent
f77ba7ba3a
commit
26809c1d7a
2 changed files with 7 additions and 6 deletions
|
@ -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?
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue