Fix compilation on GCC and other Linux fixes (#80)

This commit is contained in:
Tom Lally 2022-08-28 14:29:15 +01:00 committed by GitHub
parent 96dcc7c82e
commit 454b587e36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 339 additions and 292 deletions

View file

@ -80,31 +80,31 @@ void LatteShader_calculateFSKey(LatteFetchShader* fetchShader)
{
LatteParsedFetchShaderAttribute_t* attrib = group.attrib + f;
key += (uint64)attrib->endianSwap;
key = _rotl64(key, 3);
key = std::rotl(key, 3);
key += (uint64)attrib->nfa;
key = _rotl64(key, 3);
key = std::rotl(key, 3);
key += (uint64)(attrib->isSigned?1:0);
key = _rotl64(key, 1);
key = std::rotl(key, 1);
key += (uint64)attrib->format;
key = _rotl64(key, 7);
key = std::rotl(key, 7);
key += (uint64)attrib->fetchType;
key = _rotl64(key, 8);
key = std::rotl(key, 8);
key += (uint64)attrib->ds[0];
key = _rotl64(key, 2);
key = std::rotl(key, 2);
key += (uint64)attrib->ds[1];
key = _rotl64(key, 2);
key = std::rotl(key, 2);
key += (uint64)attrib->ds[2];
key = _rotl64(key, 2);
key = std::rotl(key, 2);
key += (uint64)attrib->ds[3];
key = _rotl64(key, 2);
key = std::rotl(key, 2);
key += (uint64)(attrib->aluDivisor+1);
key = _rotl64(key, 2);
key = std::rotl(key, 2);
key += (uint64)attrib->attributeBufferIndex;
key = _rotl64(key, 8);
key = std::rotl(key, 8);
key += (uint64)attrib->semanticId;
key = _rotl64(key, 8);
key = std::rotl(key, 8);
key += (uint64)(attrib->offset & 3);
key = _rotl64(key, 2);
key = std::rotl(key, 2);
}
}
// todo - also hash invalid buffer groups?