mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Video backends: mass-replace "xfregs" with "xfmem".
This commit is contained in:
@ -49,7 +49,7 @@ void XFRegWritten(int transferSize, u32 baseAddress, u32 *pData)
|
||||
break;
|
||||
|
||||
case XFMEM_SETNUMCHAN:
|
||||
if (xfregs.numChan.numColorChans != (newValue & 3))
|
||||
if (xfmem.numChan.numColorChans != (newValue & 3))
|
||||
VertexManager::Flush();
|
||||
break;
|
||||
|
||||
@ -57,7 +57,7 @@ void XFRegWritten(int transferSize, u32 baseAddress, u32 *pData)
|
||||
case XFMEM_SETCHAN1_AMBCOLOR:
|
||||
{
|
||||
u8 chan = address - XFMEM_SETCHAN0_AMBCOLOR;
|
||||
if (xfregs.ambColor[chan] != newValue)
|
||||
if (xfmem.ambColor[chan] != newValue)
|
||||
{
|
||||
VertexManager::Flush();
|
||||
VertexShaderManager::SetMaterialColorChanged(chan, newValue);
|
||||
@ -70,7 +70,7 @@ void XFRegWritten(int transferSize, u32 baseAddress, u32 *pData)
|
||||
case XFMEM_SETCHAN1_MATCOLOR:
|
||||
{
|
||||
u8 chan = address - XFMEM_SETCHAN0_MATCOLOR;
|
||||
if (xfregs.matColor[chan] != newValue)
|
||||
if (xfmem.matColor[chan] != newValue)
|
||||
{
|
||||
VertexManager::Flush();
|
||||
VertexShaderManager::SetMaterialColorChanged(chan + 2, newValue);
|
||||
@ -83,12 +83,12 @@ void XFRegWritten(int transferSize, u32 baseAddress, u32 *pData)
|
||||
case XFMEM_SETCHAN1_COLOR:
|
||||
case XFMEM_SETCHAN0_ALPHA: // Channel Alpha
|
||||
case XFMEM_SETCHAN1_ALPHA:
|
||||
if (((u32*)&xfregs)[address] != (newValue & 0x7fff))
|
||||
if (((u32*)&xfmem)[address] != (newValue & 0x7fff))
|
||||
VertexManager::Flush();
|
||||
break;
|
||||
|
||||
case XFMEM_DUALTEX:
|
||||
if (xfregs.dualTexTrans.enabled != (newValue & 1))
|
||||
if (xfmem.dualTexTrans.enabled != (newValue & 1))
|
||||
VertexManager::Flush();
|
||||
break;
|
||||
|
||||
@ -129,7 +129,7 @@ void XFRegWritten(int transferSize, u32 baseAddress, u32 *pData)
|
||||
break;
|
||||
|
||||
case XFMEM_SETNUMTEXGENS: // GXSetNumTexGens
|
||||
if (xfregs.numTexGen.numTexGens != (newValue & 15))
|
||||
if (xfmem.numTexGen.numTexGens != (newValue & 15))
|
||||
VertexManager::Flush();
|
||||
break;
|
||||
|
||||
@ -164,7 +164,7 @@ void XFRegWritten(int transferSize, u32 baseAddress, u32 *pData)
|
||||
// --------------
|
||||
|
||||
// Maybe these are for Normals?
|
||||
case 0x1048: //xfregs.texcoords[0].nrmmtxinfo.hex = data; break; ??
|
||||
case 0x1048: //xfmem.texcoords[0].nrmmtxinfo.hex = data; break; ??
|
||||
case 0x1049:
|
||||
case 0x104a:
|
||||
case 0x104b:
|
||||
@ -228,7 +228,7 @@ void LoadXFReg(u32 transferSize, u32 baseAddress, u32 *pData)
|
||||
}
|
||||
|
||||
XFMemWritten(xfMemTransferSize, xfMemBase);
|
||||
memcpy_gc((u32*)(&xfregs) + xfMemBase, pData, xfMemTransferSize * 4);
|
||||
memcpy_gc((u32*)(&xfmem) + xfMemBase, pData, xfMemTransferSize * 4);
|
||||
|
||||
pData += xfMemTransferSize;
|
||||
}
|
||||
@ -237,7 +237,7 @@ void LoadXFReg(u32 transferSize, u32 baseAddress, u32 *pData)
|
||||
if (transferSize > 0)
|
||||
{
|
||||
XFRegWritten(transferSize, baseAddress, pData);
|
||||
memcpy_gc((u32*)(&xfregs) + baseAddress, pData, transferSize * 4);
|
||||
memcpy_gc((u32*)(&xfmem) + baseAddress, pData, transferSize * 4);
|
||||
}
|
||||
}
|
||||
|
||||
@ -249,7 +249,7 @@ void LoadIndexedXF(u32 val, int refarray)
|
||||
int size = ((val >> 12) & 0xF) + 1;
|
||||
//load stuff from array to address in xf mem
|
||||
|
||||
u32* currData = (u32*)(&xfregs) + address;
|
||||
u32* currData = (u32*)(&xfmem) + address;
|
||||
u32* newData = (u32*)Memory::GetPointer(arraybases[refarray] + arraystrides[refarray] * index);
|
||||
bool changed = false;
|
||||
for (int i = 0; i < size; ++i)
|
||||
|
Reference in New Issue
Block a user