Skip to content

Instantly share code, notes, and snippets.

View Subv's full-sized avatar

Sebastian Valle Subv

  • Barranquilla, Colombia
View GitHub Profile
00007FF66739921C mov ecx,dword ptr [rsi+r14*4+8B57CE0h]
00007FF667399224 mov eax,dword ptr [rbx]
00007FF667399226 mov dword ptr [rbp-50h],eax
00007FF667399229 test cl,8
00007FF66739922C je Pica::VertexShader::ProcessShaderCode+0DE7h (07FF667399237h)
00007FF66739922E addss xmm0,xmm2
00007FF667399232 movss dword ptr [rbp-50h],xmm0
00007FF667399237 mov eax,dword ptr [rbx+4]
00007FF66739923A mov dword ptr [rbp-4Ch],eax
00007FF66739923D test cl,4
00007FF6C00D9BF1 mov rdx,qword ptr [Pica::g_state+0AECh (07FF6C8AF64ACh)]
00007FF6C00D9BF8 test ebx,ebx
00007FF6C00D9BFA jle Pica::VertexShader::RunShader+156h (07FF6C00D9C06h)
00007FF6C00D9BFC mov eax,edx
00007FF6C00D9BFE and eax,0Fh
00007FF6C00D9C01 mov qword ptr [rbp+rax*8+18h],rsi
00007FF6C00D9C06 cmp ebx,1
00007FF6C00D9C09 jle Pica::VertexShader::RunShader+16Dh (07FF6C00D9C1Dh)
00007FF6C00D9C0B mov ecx,edx
00007FF6C00D9C0D shr rcx,4
if (num_attributes > 0) state.input_register_table[attribute_register_map.attribute0_register] = &input.attr[0].x;
if (num_attributes > 1) state.input_register_table[attribute_register_map.attribute1_register] = &input.attr[1].x;
if (num_attributes > 2) state.input_register_table[attribute_register_map.attribute2_register] = &input.attr[2].x;
if (num_attributes > 3) state.input_register_table[attribute_register_map.attribute3_register] = &input.attr[3].x;
if (num_attributes > 4) state.input_register_table[attribute_register_map.attribute4_register] = &input.attr[4].x;
if (num_attributes > 5) state.input_register_table[attribute_register_map.attribute5_register] = &input.attr[5].x;
if (num_attributes > 6) state.input_register_table[attribute_register_map.attribute6_register] = &input.attr[6].x;
if (num_attributes > 7) state.input_register_table[attribute_register_map.attribute7_register] = &input.attr[7].x;
if (num_attributes > 8) state.input_register_table[attribute_register_ma
00007FF7ED00918E mov eax,r10d
00007FF7ED009191 shr eax,15h
00007FF7ED009194 and eax,1Fh
00007FF7ED009197 cmp eax,10h
00007FF7ED00919A jae Pica::VertexShader::ProcessShaderCode+0D30h (07FF7ED0091C0h)
00007FF7ED00919C cmp eax,8
00007FF7ED00919F jb Pica::VertexShader::ProcessShaderCode+0D1Eh (07FF7ED0091AEh)
00007FF7ED0091A1 cmp eax,10h
00007FF7ED0091A4 jae Pica::VertexShader::ProcessShaderCode+0D1Bh (07FF7ED0091ABh)
00007FF7ED0091A6 add eax,0FFFFFFE0h
00007FF63A549194 mov eax,r10d
00007FF63A549197 shr eax,15h
00007FF63A54919A and eax,1Fh
00007FF63A54919D cmp eax,10h
00007FF63A5491A0 jae Pica::VertexShader::ProcessShaderCode+0D14h (07FF63A5491B4h)
00007FF63A5491A2 mov ecx,eax
00007FF63A5491A4 lea rbx,[r15+88h]
00007FF63A5491AB shl rcx,4
00007FF63A5491AF add rbx,rcx
00007FF63A5491B2 jmp Pica::VertexShader::ProcessShaderCode+0D35h (07FF63A5491D5h)
@Subv
Subv / gist:ff2819d2334497ba9fd9
Created June 27, 2015 19:43
Old LookupSourceRegister
00007FF649307D60 mov r8d,dword ptr [rdx]
00007FF649307D63 mov r9,rcx
00007FF649307D66 cmp r8d,10h
00007FF649307D6A jae <lambda_50aa66b5c217ab9b9775925e6eed09bb>::operator()+10h (07FF649307D70h)
00007FF649307D6C xor edx,edx
00007FF649307D6E jmp <lambda_50aa66b5c217ab9b9775925e6eed09bb>::operator()+19h (07FF649307D79h)
00007FF649307D70 cmp r8d,20h
00007FF649307D74 sbb edx,edx
00007FF649307D76 add edx,3
00007FF649307D79 test edx,edx
@Subv
Subv / gist:50c86911bad2e97c8061
Created June 27, 2015 19:45
New LookupSourceRegister
00007FF7DE6C7DC0 mov eax,dword ptr [rdx]
00007FF7DE6C7DC2 mov r8,rcx
00007FF7DE6C7DC5 cmp eax,10h
00007FF7DE6C7DC8 jae <lambda_95eacbb76964a53557dd49acbb822145>::operator()+15h (07FF7DE6C7DD5h)
00007FF7DE6C7DCA mov edx,eax
00007FF7DE6C7DCC mov rax,qword ptr [rcx]
00007FF7DE6C7DCF mov rax,qword ptr [rax+rdx*8+8]
00007FF7DE6C7DD4 ret
00007FF7DE6C7DD5 cmp eax,20h
00007FF7DE6C7DD8 jae <lambda_95eacbb76964a53557dd49acbb822145>::operator()+30h (07FF7DE6C7DF0h)
diff --git a/src/video_core/vertex_shader.cpp b/src/video_core/vertex_shader.cpp
index 87006a8..50020b2 100644
--- a/src/video_core/vertex_shader.cpp
+++ b/src/video_core/vertex_shader.cpp
@@ -53,12 +53,12 @@ struct VertexShaderState {
};
// TODO: Is there a maximal size for this?
- std::stack<CallStackElement> call_stack;
+ std::vector<CallStackElement> call_stack;
00007FF684128A43 mov r11d,dword ptr [r14+r15*4+8B56CE0h]
00007FF684128A4B mov eax,r11d
00007FF684128A4E mov ebx,r11d
00007FF684128A51 shr rax,0Bh
00007FF684128A55 shr ebx,0Dh
00007FF684128A58 and eax,3
00007FF684128A5B and bl,1
00007FF684128A5E mov eax,dword ptr [r9+rax*4]
00007FF684128A62 mov dword ptr [src1],eax
00007FF684128A66 mov eax,r11d
@Subv
Subv / citra_patch1.diff
Last active August 29, 2015 14:23
VS optimization
diff --git a/src/video_core/vertex_shader.cpp b/src/video_core/vertex_shader.cpp
index 87006a8..e8d47ff 100644
--- a/src/video_core/vertex_shader.cpp
+++ b/src/video_core/vertex_shader.cpp
@@ -53,12 +53,12 @@ struct VertexShaderState {
};
// TODO: Is there a maximal size for this?
- std::stack<CallStackElement> call_stack;
+ std::vector<CallStackElement> call_stack;