diff --git a/Source/Core/VideoCommon/Src/PixelShaderManager.cpp b/Source/Core/VideoCommon/Src/PixelShaderManager.cpp index f349176684..304d3df941 100644 --- a/Source/Core/VideoCommon/Src/PixelShaderManager.cpp +++ b/Source/Core/VideoCommon/Src/PixelShaderManager.cpp @@ -34,7 +34,6 @@ static bool s_bFogColorChanged; static bool s_bFogParamChanged; static float lastDepthRange[2]; // 0 = far z, 1 = far - near static float lastRGBAfull[2][4][4]; -static float lastCustomTexScale[8][2]; static u8 s_nTexDimsChanged; static u8 s_nIndTexScaleChanged; static u32 lastAlpha; @@ -43,8 +42,6 @@ static u32 lastZBias; void PixelShaderManager::Init() { - for (int i = 0; i < 8; i++) - lastCustomTexScale[i][0] = lastCustomTexScale[i][1] = 1.0f; lastAlpha = 0; memset(lastTexDims, 0, sizeof(lastTexDims)); lastZBias = 0; @@ -55,8 +52,8 @@ void PixelShaderManager::Init() void PixelShaderManager::Dirty() { s_nColorsChanged[0] = s_nColorsChanged[1] = 15; - s_nTexDimsChanged = true; - s_nIndTexScaleChanged = true; + s_nTexDimsChanged = 0xFF; + s_nIndTexScaleChanged = 0xFF; s_nIndTexMtxChanged = 15; s_bAlphaChanged = s_bZBiasChanged = s_bZTextureTypeChanged = s_bDepthRangeChanged = true; s_bFogColorChanged = s_bFogParamChanged = true; @@ -210,9 +207,6 @@ void PixelShaderManager::SetConstants() } s_bFogParamChanged = false; } - - for (int i = 0; i < 8; i++) - lastCustomTexScale[i][0] = lastCustomTexScale[i][1] = 1.0f; } void PixelShaderManager::SetPSTextureDims(int texid) @@ -224,8 +218,8 @@ void PixelShaderManager::SetPSTextureDims(int texid) TCoordInfo& tc = bpmem.texcoords[texid]; fdims[0] = 1.0f / (float)(lastTexDims[texid] & 0xffff); fdims[1] = 1.0f / (float)((lastTexDims[texid] >> 16) & 0xfff); - fdims[2] = (float)(tc.s.scale_minus_1 + 1) * lastCustomTexScale[texid][0]; - fdims[3] = (float)(tc.t.scale_minus_1 + 1) * lastCustomTexScale[texid][1]; + fdims[2] = (float)(tc.s.scale_minus_1 + 1); + fdims[3] = (float)(tc.t.scale_minus_1 + 1); PRIM_LOG("texdims%d: %f %f %f %f\n", texid, fdims[0], fdims[1], fdims[2], fdims[3]); SetPSConstant4fv(C_TEXDIMS + texid, fdims); @@ -276,16 +270,6 @@ void PixelShaderManager::SetTexDims(int texmapid, u32 width, u32 height, u32 wra } } -void PixelShaderManager::SetCustomTexScale(int texmapid, float x, float y) -{ - if (lastCustomTexScale[texmapid][0] != x || lastCustomTexScale[texmapid][1] != y) - { - s_nTexDimsChanged |= 1 << texmapid; - lastCustomTexScale[texmapid][0] = x; - lastCustomTexScale[texmapid][1] = y; - } -} - void PixelShaderManager::SetZTextureBias(u32 bias) { if (lastZBias != bias) diff --git a/Source/Core/VideoCommon/Src/PixelShaderManager.h b/Source/Core/VideoCommon/Src/PixelShaderManager.h index 61a3c50662..a838e75c91 100644 --- a/Source/Core/VideoCommon/Src/PixelShaderManager.h +++ b/Source/Core/VideoCommon/Src/PixelShaderManager.h @@ -41,7 +41,6 @@ public: static void SetAlpha(const AlphaFunc& alpha); static void SetDestAlpha(const ConstantAlpha& alpha); static void SetTexDims(int texmapid, u32 width, u32 height, u32 wraps, u32 wrapt); - static void SetCustomTexScale(int texmapid, float x, float y); static void SetZTextureBias(u32 bias); static void SetViewport(float* viewport,int VIndex = -1); static void SetIndMatrixChanged(int matrixidx); diff --git a/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.h b/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.h index 118b0cd7cc..d3c7fe85b5 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.h +++ b/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.h @@ -41,14 +41,12 @@ public: unsigned int w, h, fmt, MipLevels; int Scaledw, Scaledh; - float scaleX, scaleY; // for hires texutres - bool isRenderTarget; bool isNonPow2; TCacheEntry() : texture(NULL), addr(0), size_in_bytes(0), hash(0), paletteHash(0), oldpixel(0), frameCount(0), w(0), h(0), fmt(0), MipLevels(0), Scaledw(0), Scaledh(0), - scaleX(1.f), scaleY(1.f), isRenderTarget(false), isNonPow2(true) {} + isRenderTarget(false), isNonPow2(true) {} void Destroy(bool shutdown); bool IntersectsMemoryRange(u32 range_address, u32 range_size); diff --git a/Source/Plugins/Plugin_VideoDX11/Src/VertexManager.cpp b/Source/Plugins/Plugin_VideoDX11/Src/VertexManager.cpp index c54c80aae1..8694f6955d 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/VertexManager.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/VertexManager.cpp @@ -330,8 +330,6 @@ void Flush() if (tentry) { PixelShaderManager::SetTexDims(i, tentry->w, tentry->h, 0, 0); - if (tentry->scaleX != 1.0f || tentry->scaleY != 1.0f) - PixelShaderManager::SetCustomTexScale(i, tentry->scaleX, tentry->scaleY); } else { diff --git a/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp b/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp index 91f0b6a442..79c086abad 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp @@ -274,8 +274,6 @@ TextureCache::TCacheEntry *TextureCache::Load(int stage, u32 address, int width, { expandedWidth = width; expandedHeight = height; - entry.scaleX = (float) width / oldWidth; - entry.scaleY = (float) height / oldHeight; } } diff --git a/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.h b/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.h index e9240240b1..a5edb61f27 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.h +++ b/Source/Plugins/Plugin_VideoDX9/Src/TextureCache.h @@ -42,8 +42,6 @@ public: int w, h, fmt,MipLevels; int Scaledw, Scaledh; - float scaleX, scaleY; // Hires texutres need this - bool isRenderTarget; bool isDynamic;// mofified from cpu bool isNonPow2; @@ -58,8 +56,6 @@ public: addr = 0; size_in_bytes = 0; frameCount = 0; - scaleX = 1.0f; - scaleY = 1.0f; isNonPow2 = true; w = 0; h = 0; diff --git a/Source/Plugins/Plugin_VideoDX9/Src/VertexManager.cpp b/Source/Plugins/Plugin_VideoDX9/Src/VertexManager.cpp index 804165c7bd..3e8b2b0ed0 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/VertexManager.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/VertexManager.cpp @@ -260,8 +260,6 @@ void Flush() if (tentry) { PixelShaderManager::SetTexDims(i, tentry->w, tentry->h, 0, 0); - if (tentry->scaleX != 1.0f || tentry->scaleY != 1.0f) - PixelShaderManager::SetCustomTexScale(i, tentry->scaleX, tentry->scaleY); } else {