Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Revert "Vertexcache ComputeMiniHashRange: Doesn't make sense to hash …
…more data than the step size."

This reverts commit 0bbb61e.
  • Loading branch information
hrydgard committed Mar 19, 2017
1 parent 0bbb61e commit 032c340
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions GPU/D3D11/DrawEngineD3D11.cpp
Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions GPU/Directx9/DrawEngineDX9.cpp
Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions GPU/GLES/DrawEngineGLES.cpp
Expand Up @@ -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 {
Expand Down

0 comments on commit 032c340

Please sign in to comment.