Skip to content

Commit

Permalink
Support tex level factor 000001 (fixed at 0, that is, mipmapping off)
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Jun 20, 2013
1 parent 1fe20cb commit eaede89
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 2 additions & 3 deletions GPU/GLES/DisplayListInterpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -956,9 +956,8 @@ void GLES_GPU::ExecuteOp(u32 op, u32 diff) {
break;

case GE_CMD_TEXLEVEL:
if (data == 1)
WARN_LOG_REPORT_ONCE(texLevel1, G3D, "Unsupported texture level bias settings: %06x", data)
else if (data != 0)
// We support 000001, it means fixed at mip level 0. Don't report 0 as it's normal.
if (data != 1 && data != 0)
WARN_LOG_REPORT_ONCE(texLevel2, G3D, "Unsupported texture level bias settings: %06x", data);

This comment has been minimized.

Copy link
@unknownbrackets

unknownbrackets Jun 20, 2013

Collaborator

Oh, darn, I'm sure I had meant to make those log strings different to see how common each one was... oops (doesn't matter now.)

-[Unknown]

break;
#endif
Expand Down
5 changes: 4 additions & 1 deletion GPU/GLES/TextureCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,9 @@ void TextureCache::UpdateSamplingParams(TexCacheEntry &entry, bool force) {
bool sClamp = gstate.texwrap & 1;
bool tClamp = (gstate.texwrap>>8) & 1;


bool noMip = gstate.texlevel == 0x000001; // Fix texlevel at 0

if (entry.maxLevel == 0) {
// Enforce no mip filtering, for safety.
minFilt &= 1; // no mipmaps yet
Expand All @@ -511,7 +514,7 @@ void TextureCache::UpdateSamplingParams(TexCacheEntry &entry, bool force) {
minFilt |= 1;
}

if (!g_Config.bMipMap) {
if (!g_Config.bMipMap || noMip) {
magFilt &= 1;
minFilt &= 1;
}
Expand Down

6 comments on commit eaede89

@solarmystic
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this rectify problems some games get when mipmapping is set to ON by default? #2286

@hrydgard
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the idea. Please report if it works.

@hrydgard
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this stuff doesn't fix Tactics Ogre with mipmapping on, which is very weird.

@dbz400
Copy link
Contributor

@dbz400 dbz400 commented on eaede89 Jun 21, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously , mippmapping ON fixes the following wrong textures on WIN platform (though Android never will ) . Starting from this commit , mippmapping ON or OFF didn't fix the wrong textures anymore on WIN platform .

1

@hrydgard
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I think this needs more work. I'll revert it.

@dbz400
Copy link
Contributor

@dbz400 dbz400 commented on eaede89 Jun 21, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Retest and should be back to normal now with mipmapping ON .

1

Please sign in to comment.