mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-16 11:48:28 +12:00
Fix compilation on GCC and other Linux fixes (#80)
This commit is contained in:
parent
96dcc7c82e
commit
454b587e36
43 changed files with 339 additions and 292 deletions
|
@ -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?
|
||||
|
|
|
@ -743,7 +743,7 @@ private:
|
|||
//h ^= *memU64;
|
||||
//memU64++;
|
||||
|
||||
h = _rotr64(h, 7);
|
||||
h = std::rotr(h, 7);
|
||||
h += (*memU64 + (uint64)i);
|
||||
memU64++;
|
||||
}
|
||||
|
|
|
@ -518,7 +518,7 @@ void LatteOverlay_translateScreenPosition(ScreenPosition pos, const Vector2f& wi
|
|||
direction = -1;
|
||||
break;
|
||||
default:
|
||||
__assume(false);
|
||||
UNREACHABLE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -158,15 +158,15 @@ void LatteMRT::ApplyCurrentState()
|
|||
if (colorView)
|
||||
{
|
||||
key += ((uint64)colorView);
|
||||
key = _rotl64(key, 5);
|
||||
key = std::rotl(key, 5);
|
||||
fboLookupView = colorView;
|
||||
}
|
||||
key = _rotl64(key, 7);
|
||||
key = std::rotl(key, 7);
|
||||
}
|
||||
if (sLatteCurrentRendertargets.depthBuffer.view)
|
||||
{
|
||||
key += ((uint64)sLatteCurrentRendertargets.depthBuffer.view);
|
||||
key = _rotl64(key, 5);
|
||||
key = std::rotl(key, 5);
|
||||
key += (sLatteCurrentRendertargets.depthBuffer.hasStencil);
|
||||
if (fboLookupView == NULL)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
@ -263,7 +263,7 @@ void LatteShader_UpdatePSInputs(uint32* contextRegisters)
|
|||
cemu_assert_debug(psSemanticId != 0xFF);
|
||||
|
||||
key += (uint64)psInputControl;
|
||||
key = _rotl64(key, 7);
|
||||
key = std::rotl(key, 7);
|
||||
if (spi0_positionEnable && f == spi0_positionAddr)
|
||||
{
|
||||
_activePSImportTable.import[f].semanticId = LATTE_ANALYZER_IMPORT_INDEX_SPIPOSITION;
|
||||
|
@ -546,7 +546,7 @@ uint64 LatteSHRC_CalcVSAuxHash(LatteDecompilerShader* vertexShader, uint32* cont
|
|||
if(!vertexShader->streamoutBufferWriteMask2[i])
|
||||
continue;
|
||||
uint32 bufferStride = contextRegisters[mmVGT_STRMOUT_VTX_STRIDE_0 + i * 4];
|
||||
auxHash = _rotl64(auxHash, 7);
|
||||
auxHash = std::rotl(auxHash, 7);
|
||||
auxHash += (uint64)bufferStride;
|
||||
}
|
||||
}
|
||||
|
@ -559,7 +559,7 @@ uint64 LatteSHRC_CalcVSAuxHash(LatteDecompilerShader* vertexShader, uint32* cont
|
|||
if ((word4 & 0x300) == 0x100)
|
||||
{
|
||||
// integer format
|
||||
auxHashTex = _rotl64(auxHashTex, 7);
|
||||
auxHashTex = std::rotl(auxHashTex, 7);
|
||||
auxHashTex += 0x333;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue