Correction of v0.xyzw assignment.

This commit is contained in:
jackchentwkh 2022-06-25 17:02:13 +08:00
parent 186b5fa8ee
commit c981ff23b1
1 changed files with 8 additions and 7 deletions

View File

@ -8685,14 +8685,15 @@ xbox::void_xt WINAPI xbox::EMUPATCH(D3DDevice_RunVertexStateShader)
PGRAPHState* pg = &(dev->pgraph);
float vertex_state_shader_v0[4];
for (int slot = 0; slot < 4; slot++)
{
if (pData != nullptr)
vertex_state_shader_v0[slot] = pData[slot];
else
if (pData != nullptr)
//if pData != nullptr, then it contents v0.xyzw, we shall copy the binary content directly.
memcpy(vertex_state_shader_v0,pData, sizeof(vertex_state_shader_v0));
else
//for pData == nullptr, this data is not supposed to be used. but we assign v0.xyzw 0.0f in each component just in case.
for (int slot = 0; slot < 4; slot++)
{
vertex_state_shader_v0[slot] = 0.0f;
}
}
int shader_slot = Address;
Nv2aVshProgram program;