mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Texture lod bias should be signed
This commit is contained in:
parent
d8df88bc1f
commit
a6523dd507
2 changed files with 2 additions and 8 deletions
|
@ -1581,12 +1581,6 @@ void GLES_GPU::ExecuteOpInternal(u32 op, u32 diff) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
case GE_CMD_TEXLEVEL:
|
case GE_CMD_TEXLEVEL:
|
||||||
#ifndef MOBILE_DEVICE
|
|
||||||
if (data == 1)
|
|
||||||
WARN_LOG_REPORT_ONCE(texLevel1, G3D, "Unsupported texture level bias settings: %06x", data)
|
|
||||||
else if (data != 0)
|
|
||||||
WARN_LOG_REPORT_ONCE(texLevel2, G3D, "Unsupported texture level bias settings: %06x", data);
|
|
||||||
#endif
|
|
||||||
if (diff)
|
if (diff)
|
||||||
gstate_c.textureChanged = true;
|
gstate_c.textureChanged = true;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -489,8 +489,8 @@ void TextureCache::UpdateSamplingParams(TexCacheEntry &entry, bool force) {
|
||||||
// Enforce no mip filtering, for safety.
|
// Enforce no mip filtering, for safety.
|
||||||
minFilt &= 1; // no mipmaps yet
|
minFilt &= 1; // no mipmaps yet
|
||||||
} else {
|
} else {
|
||||||
// TODO: Is this a signed value? Which direction?
|
// Texture lod bias should be signed.
|
||||||
float lodBias = 0.0; // -(float)((gstate.texlevel >> 16) & 0xFF) / 16.0f;
|
float lodBias = (float)(int)(s8)((gstate.texlevel >> 16) & 0xFF) / 16.0f;
|
||||||
if (force || entry.lodBias != lodBias) {
|
if (force || entry.lodBias != lodBias) {
|
||||||
#ifndef USING_GLES2
|
#ifndef USING_GLES2
|
||||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_LOD_BIAS, lodBias);
|
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_LOD_BIAS, lodBias);
|
||||||
|
|
Loading…
Add table
Reference in a new issue