mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
VertexLoaderX64: Avoid unchecked pointer cast.
This commit is contained in:
parent
21f3e97435
commit
5082a664c8
@ -32,12 +32,12 @@ static const u8* memory_base_ptr = (u8*)&g_main_cp_state.array_strides;
|
||||
|
||||
static OpArg MPIC(const void* ptr, X64Reg scale_reg, int scale = SCALE_1)
|
||||
{
|
||||
return MComplex(base_reg, scale_reg, scale, (s32)((u8*)ptr - memory_base_ptr));
|
||||
return MComplex(base_reg, scale_reg, scale, PtrOffset(ptr, memory_base_ptr));
|
||||
}
|
||||
|
||||
static OpArg MPIC(const void* ptr)
|
||||
{
|
||||
return MDisp(base_reg, (s32)((u8*)ptr - memory_base_ptr));
|
||||
return MDisp(base_reg, PtrOffset(ptr, memory_base_ptr));
|
||||
}
|
||||
|
||||
VertexLoaderX64::VertexLoaderX64(const TVtxDesc& vtx_desc, const VAT& vtx_att)
|
||||
|
Loading…
Reference in New Issue
Block a user