From 032c340f50dcec7c4338e8001ac2925f150739b4 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Sun, 19 Mar 2017 12:47:12 +0100 Subject: [PATCH] Revert "Vertexcache ComputeMiniHashRange: Doesn't make sense to hash more data than the step size." This reverts commit 0bbb61e5d24b7735c986496902c0b99adf88c770. --- GPU/D3D11/DrawEngineD3D11.cpp | 3 +-- GPU/Directx9/DrawEngineDX9.cpp | 3 +-- GPU/GLES/DrawEngineGLES.cpp | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/GPU/D3D11/DrawEngineD3D11.cpp b/GPU/D3D11/DrawEngineD3D11.cpp index 6a0bcdb06e..15f2d18bdf 100644 --- a/GPU/D3D11/DrawEngineD3D11.cpp +++ b/GPU/D3D11/DrawEngineD3D11.cpp @@ -444,10 +444,9 @@ inline u32 ComputeMiniHashRange(const void *ptr, size_t sz) { if (sz > 100) { size_t step = sz / 4; - size_t len = std::min((int)step, 100); u32 hash = 0; for (size_t i = 0; i < sz; i += step) { - hash += DoReliableHash32(p + i, len, 0x3A44B9C4); + hash += DoReliableHash32(p + i, 100, 0x3A44B9C4); } return hash; } else { diff --git a/GPU/Directx9/DrawEngineDX9.cpp b/GPU/Directx9/DrawEngineDX9.cpp index 55f2cf9fd7..5c1510c60b 100644 --- a/GPU/Directx9/DrawEngineDX9.cpp +++ b/GPU/Directx9/DrawEngineDX9.cpp @@ -428,10 +428,9 @@ inline u32 ComputeMiniHashRange(const void *ptr, size_t sz) { if (sz > 100) { size_t step = sz / 4; - size_t len = std::min((int)step, 100); u32 hash = 0; for (size_t i = 0; i < sz; i += step) { - hash += DoReliableHash32(p + i, len, 0x3A44B9C4); + hash += DoReliableHash32(p + i, 100, 0x3A44B9C4); } return hash; } else { diff --git a/GPU/GLES/DrawEngineGLES.cpp b/GPU/GLES/DrawEngineGLES.cpp index 0eae334cc7..4034684bc7 100644 --- a/GPU/GLES/DrawEngineGLES.cpp +++ b/GPU/GLES/DrawEngineGLES.cpp @@ -445,9 +445,8 @@ inline u32 ComputeMiniHashRange(const void *ptr, size_t sz) { if (sz > 100) { size_t step = sz / 4; u32 hash = 0; - size_t len = std::min((int)step, 100); for (size_t i = 0; i < sz; i += step) { - hash += DoReliableHash32(p + i, len, 0x3A44B9C4); + hash += DoReliableHash32(p + i, 100, 0x3A44B9C4); } return hash; } else {