Fix wrong D3DDevice_SetVertexShaderConstant_8 implementation
The assumption that one of the parameters has to be taken from EDX was correct, but the function was not implemented properly
This commit is contained in:
parent
3fdfa89812
commit
556a65f1dc
|
@ -4189,26 +4189,23 @@ xbox::hresult_xt WINAPI xbox::EMUPATCH(D3DDevice_CreateVertexShader)
|
||||||
}
|
}
|
||||||
|
|
||||||
// LTCG specific D3DDevice_SetVertexShaderConstant function...
|
// LTCG specific D3DDevice_SetVertexShaderConstant function...
|
||||||
// This uses a custom calling convention where parameter is passed in EDX
|
// This uses a custom calling convention where ConstantCount parameter is passed in EDX
|
||||||
// Test-case: Murakumo
|
// Test-case: Murakumo
|
||||||
xbox::void_xt __stdcall xbox::EMUPATCH(D3DDevice_SetVertexShaderConstant_8)
|
xbox::void_xt __fastcall xbox::EMUPATCH(D3DDevice_SetVertexShaderConstant_8)
|
||||||
(
|
(
|
||||||
|
void*,
|
||||||
|
dword_xt ConstantCount,
|
||||||
|
int_xt Register,
|
||||||
|
CONST PVOID pConstantData
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
static uint32_t returnAddr;
|
LOG_FUNC_BEGIN
|
||||||
|
LOG_FUNC_ARG(Register)
|
||||||
|
LOG_FUNC_ARG(pConstantData)
|
||||||
|
LOG_FUNC_ARG(ConstantCount)
|
||||||
|
LOG_FUNC_END;
|
||||||
|
|
||||||
#ifdef _DEBUG_TRACE
|
CxbxImpl_SetVertexShaderConstant(Register, pConstantData, ConstantCount);
|
||||||
__asm add esp, 4
|
|
||||||
#endif
|
|
||||||
|
|
||||||
__asm {
|
|
||||||
pop returnAddr
|
|
||||||
push edx
|
|
||||||
call EmuPatch_D3DDevice_SetVertexShaderConstant
|
|
||||||
mov eax, 0
|
|
||||||
push returnAddr
|
|
||||||
ret
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
|
|
|
@ -444,7 +444,14 @@ xbox::void_xt WINAPI EMUPATCH(D3DDevice_SetVertexShaderConstant)
|
||||||
dword_xt ConstantCount
|
dword_xt ConstantCount
|
||||||
);
|
);
|
||||||
|
|
||||||
xbox::void_xt __stdcall EMUPATCH(D3DDevice_SetVertexShaderConstant_8)();
|
xbox::void_xt __fastcall EMUPATCH(D3DDevice_SetVertexShaderConstant_8)
|
||||||
|
(
|
||||||
|
void*,
|
||||||
|
dword_xt ConstantCount,
|
||||||
|
int_xt Register,
|
||||||
|
CONST PVOID pConstantData
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
// * patch: D3DDevice_SetVertexShaderConstant1
|
// * patch: D3DDevice_SetVertexShaderConstant1
|
||||||
|
|
Loading…
Reference in New Issue