Last active
September 25, 2017 16:14
-
-
Save Subv/e9a252920a05319af4a7ef06bddf97a9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
00007FF66C69BD00 mov qword ptr [rsp+8],rbx | |
00007FF66C69BD05 push rdi | |
00007FF66C69BD06 sub rsp,20h | |
00007FF66C69BD0A mov rbx,rcx | |
00007FF66C69BD0D movsxd rdi,r8d | |
00007FF66C69BD10 mov ecx,r9d | |
00007FF66C69BD13 call Memory::GetPhysicalPointer (07FF66C5A5250h) | |
00007FF66C69BD18 lea r8d,[rdi*4] | |
00007FF66C69BD20 mov rdx,rax | |
00007FF66C69BD23 mov rcx,rbx | |
00007FF66C69BD26 call memcpy (07FF66C77C2E8h) | |
00007FF66C69BD2B mov eax,edi | |
00007FF66C69BD2D lea rcx,[defaults (07FF66C810FF8h)] | |
00007FF66C69BD34 mov r8d,4 | |
00007FF66C69BD3A sub r8d,edi | |
00007FF66C69BD3D shl r8,2 | |
00007FF66C69BD41 lea rdx,[rcx+rax*4] | |
00007FF66C69BD49 mov rbx,qword ptr [rsp+30h] | |
00007FF66C69BD4E add rsp,20h | |
00007FF66C69BD52 pop rdi | |
00007FF66C69BD53 jmp memcpy (07FF66C77C2E8h) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
00007FF68A3FBE70 mov qword ptr [rsp+8],rbx | |
00007FF68A3FBE75 push rdi | |
00007FF68A3FBE76 sub rsp,30h | |
00007FF68A3FBE7A mov rdi,rcx | |
00007FF68A3FBE7D mov ebx,r8d | |
00007FF68A3FBE80 mov ecx,r9d | |
00007FF68A3FBE83 call Memory::GetPhysicalPointer (07FF68A3055D0h) | |
00007FF68A3FBE88 lea r8d,[rbx*4] | |
00007FF68A3FBE90 mov rdx,rax | |
00007FF68A3FBE93 mov rcx,rdi | |
00007FF68A3FBE96 call memcpy (07FF68A4DC3B8h) | |
00007FF68A3FBE9B cmp ebx,4 | |
00007FF68A3FBE9E jae Pica::LoadBufferAttr<signed char>+167h (07FF68A3FBFD7h) | |
00007FF68A3FBEA4 mov eax,4 | |
00007FF68A3FBEA9 sub eax,ebx | |
00007FF68A3FBEAB cmp eax,4 | |
00007FF68A3FBEAE jb Pica::LoadBufferAttr<signed char>+127h (07FF68A3FBF97h) | |
00007FF68A3FBEB4 cmp ebx,3 | |
00007FF68A3FBEB7 jne Pica::LoadBufferAttr<signed char>+53h (07FF68A3FBEC3h) | |
00007FF68A3FBEB9 mov dword ptr [rsp+20h],3F800000h | |
00007FF68A3FBEC1 jmp Pica::LoadBufferAttr<signed char>+5Bh (07FF68A3FBECBh) | |
00007FF68A3FBEC3 mov dword ptr [rsp+50h],0 | |
00007FF68A3FBECB cmp ebx,3 | |
00007FF68A3FBECE lea rax,[rsp+20h] | |
00007FF68A3FBED3 lea rcx,[rsp+50h] | |
00007FF68A3FBED8 cmove rcx,rax | |
00007FF68A3FBEDC movsxd rax,ebx | |
00007FF68A3FBEDF movss xmm0,dword ptr [rcx] | |
00007FF68A3FBEE3 movss dword ptr [rdi+rax*4],xmm0 | |
00007FF68A3FBEE8 cmp ebx,2 | |
00007FF68A3FBEEB jne Pica::LoadBufferAttr<signed char>+87h (07FF68A3FBEF7h) | |
00007FF68A3FBEED mov dword ptr [rsp+20h],3F800000h | |
00007FF68A3FBEF5 jmp Pica::LoadBufferAttr<signed char>+8Fh (07FF68A3FBEFFh) | |
00007FF68A3FBEF7 mov dword ptr [rsp+50h],0 | |
00007FF68A3FBEFF cmp ebx,2 | |
00007FF68A3FBF02 lea rax,[rsp+20h] | |
00007FF68A3FBF07 lea rdx,[rsp+50h] | |
00007FF68A3FBF0C cmove rdx,rax | |
00007FF68A3FBF10 lea eax,[rbx+1] | |
00007FF68A3FBF13 movsxd rcx,eax | |
00007FF68A3FBF16 movss xmm0,dword ptr [rdx] | |
00007FF68A3FBF1A movss dword ptr [rdi+rcx*4],xmm0 | |
00007FF68A3FBF1F cmp ebx,1 | |
00007FF68A3FBF22 jne Pica::LoadBufferAttr<signed char>+0BEh (07FF68A3FBF2Eh) | |
00007FF68A3FBF24 mov dword ptr [rsp+20h],3F800000h | |
00007FF68A3FBF2C jmp Pica::LoadBufferAttr<signed char>+0C6h (07FF68A3FBF36h) | |
00007FF68A3FBF2E mov dword ptr [rsp+50h],0 | |
00007FF68A3FBF36 cmp ebx,1 | |
00007FF68A3FBF39 lea rax,[rsp+20h] | |
00007FF68A3FBF3E lea rdx,[rsp+50h] | |
00007FF68A3FBF43 cmove rdx,rax | |
00007FF68A3FBF47 lea eax,[rbx+2] | |
00007FF68A3FBF4A movsxd rcx,eax | |
00007FF68A3FBF4D movss xmm0,dword ptr [rdx] | |
00007FF68A3FBF51 movss dword ptr [rdi+rcx*4],xmm0 | |
00007FF68A3FBF56 test ebx,ebx | |
00007FF68A3FBF58 jne Pica::LoadBufferAttr<signed char>+0F4h (07FF68A3FBF64h) | |
00007FF68A3FBF5A mov dword ptr [rsp+20h],3F800000h | |
00007FF68A3FBF62 jmp Pica::LoadBufferAttr<signed char>+0FCh (07FF68A3FBF6Ch) | |
00007FF68A3FBF64 mov dword ptr [rsp+50h],0 | |
00007FF68A3FBF6C test ebx,ebx | |
00007FF68A3FBF6E lea rax,[rsp+20h] | |
00007FF68A3FBF73 lea rdx,[rsp+50h] | |
00007FF68A3FBF78 cmove rdx,rax | |
00007FF68A3FBF7C lea eax,[rbx+3] | |
00007FF68A3FBF7F movsxd rcx,eax | |
00007FF68A3FBF82 add ebx,4 | |
00007FF68A3FBF85 movss xmm0,dword ptr [rdx] | |
00007FF68A3FBF89 movss dword ptr [rdi+rcx*4],xmm0 | |
00007FF68A3FBF8E cmp ebx,1 | |
00007FF68A3FBF91 jb Pica::LoadBufferAttr<signed char>+44h (07FF68A3FBEB4h) | |
00007FF68A3FBF97 cmp ebx,4 | |
00007FF68A3FBF9A jae Pica::LoadBufferAttr<signed char>+167h (07FF68A3FBFD7h) | |
00007FF68A3FBF9C cmp ebx,3 | |
00007FF68A3FBF9F jne Pica::LoadBufferAttr<signed char>+13Bh (07FF68A3FBFABh) | |
00007FF68A3FBFA1 mov dword ptr [rsp+20h],3F800000h | |
00007FF68A3FBFA9 jmp Pica::LoadBufferAttr<signed char>+143h (07FF68A3FBFB3h) | |
00007FF68A3FBFAB mov dword ptr [rsp+50h],0 | |
00007FF68A3FBFB3 cmp ebx,3 | |
00007FF68A3FBFB6 lea rax,[rsp+20h] | |
00007FF68A3FBFBB lea rcx,[rsp+50h] | |
00007FF68A3FBFC0 cmove rcx,rax | |
00007FF68A3FBFC4 movsxd rax,ebx | |
00007FF68A3FBFC7 inc ebx | |
00007FF68A3FBFC9 movss xmm0,dword ptr [rcx] | |
00007FF68A3FBFCD movss dword ptr [rdi+rax*4],xmm0 | |
00007FF68A3FBFD2 cmp ebx,4 | |
00007FF68A3FBFD5 jb Pica::LoadBufferAttr<signed char>+12Ch (07FF68A3FBF9Ch) | |
00007FF68A3FBFD7 mov rbx,qword ptr [rsp+40h] | |
00007FF68A3FBFDC add rsp,30h | |
00007FF68A3FBFE0 pop rdi | |
00007FF68A3FBFE1 ret |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
00007FF74E7EC300 mov qword ptr [rsp+8],rbx | |
00007FF74E7EC305 push rdi | |
00007FF74E7EC306 sub rsp,20h | |
00007FF74E7EC30A mov rdi,rcx | |
00007FF74E7EC30D movsxd rbx,r8d | |
00007FF74E7EC310 mov ecx,r9d | |
00007FF74E7EC313 call Memory::GetPhysicalPointer (07FF74E6F5860h) | |
00007FF74E7EC318 lea r8d,[rbx*4] | |
00007FF74E7EC320 mov rdx,rax | |
00007FF74E7EC323 mov rcx,rdi | |
00007FF74E7EC326 call memcpy (07FF74E8CC4C8h) | |
00007FF74E7EC32B mov rax,qword ptr gs:[58h] | |
00007FF74E7EC334 mov edx,dword ptr [_tls_index (07FF75720C388h)] | |
00007FF74E7EC33A mov ecx,120h | |
00007FF74E7EC33F mov rdx,qword ptr [rax+rdx*8] | |
00007FF74E7EC343 mov eax,dword ptr [rcx+rdx] | |
00007FF74E7EC346 cmp dword ptr [defaults+10h (07FF75720A438h)],eax | |
00007FF74E7EC34C jg Pica::LoadBufferAttr<float>+7Bh (07FF74E7EC37Bh) | |
00007FF74E7EC34E mov eax,ebx | |
00007FF74E7EC350 lea rcx,[defaults (07FF75720A428h)] | |
00007FF74E7EC357 mov r8d,4 | |
00007FF74E7EC35D sub r8d,ebx | |
00007FF74E7EC360 shl r8,2 | |
00007FF74E7EC364 lea rdx,[rcx+rax*4] | |
00007FF74E7EC368 lea rcx,[rdi+rbx*4] | |
00007FF74E7EC36C mov rbx,qword ptr [rsp+30h] | |
00007FF74E7EC371 add rsp,20h | |
00007FF74E7EC375 pop rdi | |
00007FF74E7EC376 jmp memcpy (07FF74E8CC4C8h) | |
00007FF74E7EC37B lea rcx,[defaults+10h (07FF75720A438h)] | |
00007FF74E7EC382 call _Init_thread_header (07FF74E8CB9F4h) | |
00007FF74E7EC387 cmp dword ptr [defaults+10h (07FF75720A438h)],0FFFFFFFFh | |
00007FF74E7EC38E jne Pica::LoadBufferAttr<float>+4Eh (07FF74E7EC34Eh) | |
00007FF74E7EC390 movaps xmm0,xmmword ptr [__xmm@3f800000000000000000000000000000 (07FF74E961FD0h)] | |
00007FF74E7EC397 lea rcx,[defaults+10h (07FF75720A438h)] | |
00007FF74E7EC39E movups xmmword ptr [defaults (07FF75720A428h)],xmm0 | |
00007FF74E7EC3A5 call _Init_thread_footer (07FF74E8CB994h) | |
00007FF74E7EC3AA jmp Pica::LoadBufferAttr<float>+4Eh (07FF74E7EC34Eh) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<typename T = float> | |
static void LoadBufferAttr(Math::Vec4<float24>& attr, int index, u32 elements, PAddr address) { | |
const T* srcdata = | |
reinterpret_cast<const T*>(Memory::GetPhysicalPointer(address)); | |
/*for (unsigned int comp = 0; comp < elements; ++comp) { | |
attr[comp] = float24::FromFloat32(srcdata[comp]); | |
}*/ | |
memcpy(&attr, srcdata, 4 * elements); | |
// Default attribute values set if array elements have < 4 components. This | |
// is *not* carried over from the default attribute settings even if they're | |
// enabled for this attribute. | |
static const std::array<float24, 4> defaults = {float24::Zero(), float24::Zero(), float24::Zero(), float24::FromFloat32(1.0f)}; | |
memcpy(&attr[elements], &defaults[elements], (4 - elements) * sizeof(float24)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<typename T = float> | |
static void LoadBufferAttr(Math::Vec4<float24>& attr, int index, u32 elements, PAddr address) { | |
const T* srcdata = | |
reinterpret_cast<const T*>(Memory::GetPhysicalPointer(address)); | |
/*for (unsigned int comp = 0; comp < elements; ++comp) { | |
attr[comp] = float24::FromFloat32(srcdata[comp]); | |
}*/ | |
memcpy(&attr, srcdata, 4 * elements); | |
// Default attribute values set if array elements have < 4 components. This | |
// is *not* carried over from the default attribute settings even if they're | |
// enabled for this attribute. | |
for (unsigned int comp = elements; comp < 4; ++comp) { | |
attr[comp] = | |
comp == 3 ? float24::FromFloat32(1.0f) : float24::FromFloat32(0.0f); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment