mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-09 09:39:13 +00:00
Added safe vertex shader UIDs for debugging purposes.
This commit is contained in:
parent
bcb8d11c1b
commit
231c13d6ce
2 changed files with 34 additions and 8 deletions
|
@ -69,6 +69,27 @@ void GetVertexShaderId(VERTEXSHADERUID *uid, u32 components)
|
|||
}
|
||||
}
|
||||
|
||||
void GetSafeVertexShaderId(VERTEXSHADERUIDSAFE *uid, u32 components)
|
||||
{
|
||||
// Just store all used registers here without caring whether we need all bits or less.
|
||||
u32* ptr = uid->values;
|
||||
*ptr++ = components;
|
||||
*ptr++ = xfregs.numTexGen.hex;
|
||||
*ptr++ = xfregs.numChan.hex;
|
||||
*ptr++ = xfregs.dualTexTrans.hex;
|
||||
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
*ptr++ = xfregs.color[i].hex;
|
||||
*ptr++ = xfregs.alpha[i].hex;
|
||||
}
|
||||
*ptr++ = g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting;
|
||||
for (unsigned int i = 0; i < 8; ++i) {
|
||||
*ptr++ = xfregs.texMtxInfo[i].hex;
|
||||
*ptr++ = xfregs.postMtxInfo[i].hex;
|
||||
}
|
||||
_assert_((ptr - uid->values) == uid->GetNumValues());
|
||||
}
|
||||
|
||||
static char text[16384];
|
||||
|
||||
#define WRITE p+=sprintf
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue