mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-05 22:41:18 +12:00
Replaced _rotr with std::rotr
This commit is contained in:
parent
3b5eb49469
commit
6408cfdd4b
5 changed files with 7 additions and 11 deletions
|
@ -743,7 +743,7 @@ private:
|
|||
//h ^= *memU64;
|
||||
//memU64++;
|
||||
|
||||
h = _rotr64(h, 7);
|
||||
h = std::rotr(h, 7);
|
||||
h += (*memU64 + (uint64)i);
|
||||
memU64++;
|
||||
}
|
||||
|
|
|
@ -225,8 +225,8 @@ void LatteShader_UpdatePSInputs(uint32* contextRegisters)
|
|||
// parameter gen
|
||||
if (spi0_paramGen != 0)
|
||||
{
|
||||
key += _rotr64(spi0_paramGen, 7);
|
||||
key += _rotr64(spi0_paramGenAddr, 3);
|
||||
key += std::rotr<uint64>(spi0_paramGen, 7);
|
||||
key += std::rotr<uint64>(spi0_paramGenAddr, 3);
|
||||
_activePSImportTable.paramGen = spi0_paramGen;
|
||||
_activePSImportTable.paramGenGPR = spi0_paramGenAddr;
|
||||
}
|
||||
|
|
|
@ -551,7 +551,7 @@ uint64 VulkanRenderer::GetDescriptorSetStateHash(LatteDecompilerShader* shader)
|
|||
hash = _rotl64(hash, 7);
|
||||
// hash view id + swizzle mask
|
||||
hash += (uint64)texture->GetUniqueId();
|
||||
hash = _rotr64(hash, 21);
|
||||
hash = std::rotr(hash, 21);
|
||||
hash += (uint64)(word4 & 0x0FFF0000);
|
||||
}
|
||||
|
||||
|
|
|
@ -108,12 +108,12 @@ uint64 VulkanRenderer::copySurface_getPipelineStateHash(VkCopySurfaceState_t& st
|
|||
uint64 h = 0;
|
||||
|
||||
h += (uintptr_t)state.destinationTexture->GetFormat();
|
||||
h = _rotr64(h, 7);
|
||||
h = std::rotr(h, 7);
|
||||
|
||||
h += state.sourceTexture->isDepth ? 0x1111ull : 0;
|
||||
h = _rotr64(h, 7);
|
||||
h = std::rotr(h, 7);
|
||||
h += state.destinationTexture->isDepth ? 0x1112ull : 0;
|
||||
h = _rotr64(h, 7);
|
||||
h = std::rotr(h, 7);
|
||||
|
||||
return h;
|
||||
}
|
||||
|
|
|
@ -182,10 +182,6 @@ inline uint64 _rotl64(uint64 x, sint8 r)
|
|||
return (x << r) | (x >> (64 - r));
|
||||
}
|
||||
|
||||
inline uint64 _rotr64(uint64 x, sint8 r)
|
||||
{
|
||||
return (x >> r) | (x << (64 - r));
|
||||
}
|
||||
|
||||
inline uint64 _umul128(uint64 multiplier, uint64 multiplicand, uint64 *highProduct) {
|
||||
unsigned __int128 x = (unsigned __int128)multiplier * (unsigned __int128)multiplicand;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue