mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Revert "Vertexcache ComputeMiniHashRange: Doesn't make sense to hash more data than the step size."
This reverts commit 0bbb61e5d2
.
This commit is contained in:
parent
0bbb61e5d2
commit
032c340f50
3 changed files with 3 additions and 6 deletions
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue