daily update on 20230911 by nitload youmu, uncertain bug of gl api loading

This commit is contained in:
Nitload
2023-09-11 23:34:34 +08:00
parent c6f4b3dd53
commit 5d701bce0c
172 changed files with 15161 additions and 9614 deletions
+1 -1
View File
@@ -22,7 +22,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "glad/glad.h"
#include "include/glad/glad.h"
static void* get_proc(const char *namez);
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+4 -24
View File
@@ -5,34 +5,15 @@
#include "GLenv/include/glad/glad.h"
#include "GLenv/include/GLFW/glfw3.h"
#include "framework.h"
#include <stdio.h>
#include "StgSharpGraphic.h"
extern glIOpackage pack;
SSGC_API glIOpackage loadGLApi(void)
{
pack.createWindow = glfwCreateWindow;
pack.makeContextCurrent = glfwMakeContextCurrent;
pack.swapInterval = glfwSwapInterval;
pack.clearColor = glClearColor;
pack.windowShouldClose = glfwWindowShouldClose;
pack.swapBuffer = glfwSwapBuffers;
//these are for callback
pack.SetFramebufferSizeCallback = glfwSetFramebufferSizeCallback;
return pack;
}
SSGC_API void initGL(void)
SSGC_API void initGL(int majorVersion, int minorVersion)
{
glfwInit();
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, majorVersion);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, minorVersion);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
#ifdef __APPLE__
@@ -45,4 +26,3 @@ SSGC_API int initGLAD(void)
{
return gladLoadGLLoader((GLADloadproc)glfwGetProcAddress);
}
+16 -45
View File
@@ -9,48 +9,29 @@
#define SSGC_API __declspec(dllimport)
#endif
#include "framework.h"
#include "GLenv/include/glad/glad.h"
#include "GLenv/include/GLFW/glfw3.h"
#include <immintrin.h>
#pragma region debug
SSGC_API void getApiReporter(uint64_t reporterAddress);
#pragma endregion
#pragma region Internal
extern __m128* defaultVecPtr;
#define ALIGN(simdVec) _mm_loadu_ps((float*)&simdVec)
typedef struct glIOPack
{
//these are gl functions used to create a new window
GLFWwindow* (*createWindow)(
int width,
int height,
const char* title,
GLFWmonitor* monitor,
GLFWwindow* share);
void(*makeContextCurrent)(GLFWwindow* window);
void(*swapInterval)(int interval);
void(*clearColor)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
int(*windowShouldClose)(GLFWwindow* window);
void(*swapBuffer)(GLFWwindow* window);
//these are gl functions used to set a callback
GLFWframebuffersizefun(*SetFramebufferSizeCallback)
(GLFWwindow* window, GLFWframebuffersizefun callback);
}glIOpackage;
typedef struct sse_matmap
{
__m128* c0ptr;
__m128* c1ptr;
__m128* c2ptr;
__m128* c3ptr;
}sse_matmap;
glIOpackage pack;
SSGC_API _inline float __cdecl mulps_sum_internal(__m128 left, __m128 right);
SSGC_API _inline float __cdecl mulps_total_internal(__m128 vec);
@@ -61,22 +42,14 @@ SSGC_API _inline float __cdecl mulps_total_internal(__m128 vec);
SSGC_API glIOpackage loadGLApi(void);
SSGC_API void initGL(void);
SSGC_API int initGLAD(void);
SSGC_API void _cdecl initGL(int majorVersion, int minorVersion);
SSGC_API int _cdecl initGLAD(void);
//linear related function
SSGC_API __m128* __cdecl load(float x, float y, float z, float w);
SSGC_API __m128* __cdecl load_cpy(__m128* ptr);
SSGC_API __m128* __cdecl addps(__m128* ptr1, __m128* ptr2);
SSGC_API __m128* __cdecl subps(__m128* ptr1, __m128* ptr2);
SSGC_API __m128* __cdecl mulps_const(__m128* ptr, float value);
SSGC_API __m128* __cdecl mulps(__m128* ptr1, __m128* ptr2);
SSGC_API _inline float __cdecl mulps_sum(__m128* ptr1, __m128* ptr2);
SSGC_API __m128* __cdecl divps_const(__m128* ptr, float value);
SSGC_API __m128* __cdecl divps(__m128* ptr1, __m128* ptr2);
SSGC_API float __cdecl sqrtss_const(float a);
SSGC_API __m128* __cdecl set_m128ptr_default();
@@ -84,8 +57,6 @@ SSGC_API __m128* __cdecl set_m128ptr_default();
SSGC_API void __cdecl deinitM128(__m128* ptr);
#pragma region mat define
@@ -87,8 +87,8 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<TargetName>StgSharpGraphic</TargetName>
<IncludePath>D:\Programmer\GLenv\include;$(IncludePath)</IncludePath>
<LibraryPath>D:\Programmer\GLenv;$(LibraryPath)</LibraryPath>
<IncludePath>$(IncludePath)</IncludePath>
<LibraryPath>$(LibraryPath)</LibraryPath>
<ExternalIncludePath>$(ExternalIncludePath)</ExternalIncludePath>
<OutDir>$(SolutionDir)</OutDir>
</PropertyGroup>
@@ -135,7 +135,7 @@
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<IntrinsicFunctions>true</IntrinsicFunctions>
<CompileAs>Default</CompileAs>
<Optimization>MaxSpeed</Optimization>
<Optimization>Disabled</Optimization>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
</ClCompile>
<Link>
@@ -155,7 +155,7 @@
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<Optimization>MaxSpeed</Optimization>
<AssemblerOutput>All</AssemblerOutput>
<LanguageStandard_C>Default</LanguageStandard_C>
<LanguageStandard_C>stdc17</LanguageStandard_C>
<LanguageStandard>stdcpp20</LanguageStandard>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<CompileAs>CompileAsC</CompileAs>
@@ -173,7 +173,7 @@
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>glfw3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<EntryPointSymbol>
</EntryPointSymbol>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -181,10 +181,13 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="framework.h" />
<ClInclude Include="GLenv\include\glad\glad.h" />
<ClInclude Include="GLenv\include\GLFW\glfw3.h" />
<ClInclude Include="StgSharpGraphic.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\..\..\..\..\Programmer\GLenv\glad.c" />
<ClCompile Include="debuger.c" />
<ClCompile Include="dllmain.c" />
<ClCompile Include="linear.c" />
<ClCompile Include="mat2.c" />
@@ -192,14 +195,14 @@
<ClCompile Include="mat4.c" />
<ClCompile Include="StgSharpGraphic.c" />
</ItemGroup>
<ItemGroup>
<None Include="cpp.hint" />
</ItemGroup>
<ItemGroup>
<Library Include="GLenv\glfw3.lib" />
<Library Include="GLenv\glfw3dll.lib" />
<Library Include="GLenv\glfw3_mt.lib" />
</ItemGroup>
<ItemGroup>
<None Include="cpp.hint" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
@@ -21,6 +21,12 @@
<ClInclude Include="StgSharpGraphic.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="GLenv\include\GLFW\glfw3.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="GLenv\include\glad\glad.h">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="StgSharpGraphic.c">
@@ -44,6 +50,12 @@
<ClCompile Include="mat3.c">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="debuger.c">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="cpp.hint" />
</ItemGroup>
<ItemGroup>
<Library Include="GLenv\glfw3.lib">
@@ -56,7 +68,4 @@
<Filter>资源文件</Filter>
</Library>
</ItemGroup>
<ItemGroup>
<None Include="cpp.hint" />
</ItemGroup>
</Project>
+12
View File
@@ -0,0 +1,12 @@
#include "GLenv/include/glad/glad.h"
#include "GLenv/include/GLFW/glfw3.h"
#include "StgSharpGraphic.h"
#include "SSGinternal.h"
#include <stdio.h>
extern ReportApiAddress report;
SSGC_API void getApiReporter(uint64_t reporterAddress)
{
report = (ReportApiAddress)reporterAddress;
}
+9
View File
@@ -4,6 +4,15 @@
#pragma once
#ifdef _WIN32
#define _GLFW_BUILD_DLL
#elif defined()
#endif // _WIN32
#define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的内容
// Windows 头文件
#include <windows.h>
-187
View File
@@ -17,182 +17,6 @@
Basic functions as a copy of SIMD intrisic function
*/
SSGC_API __m128* __cdecl load(float x, float y, float z, float w)
{
float array[4] = {x,y,z,w};
__m128* ptr = _aligned_malloc(sizeof(__m128),16);
if (NULL != ptr)
{
*ptr = _mm_loadu_ps(&array);
return ptr;
}
else
{
return -1;
}
}
SSGC_API __m128* __cdecl load_cpy(__m128* ptr)
{
__m128* ret = _aligned_malloc(sizeof(__m128*),16);
if (NULL != ret)
{
*ret = *ptr;
}
return ret;
}
SSGC_API __m128* __cdecl addps(__m128* ptr1, __m128* ptr2)
{
__m128* ret = _aligned_malloc(sizeof(__m128*),16);
if (NULL != ret)
{
*ret = _mm_add_ps(*ptr1, *ptr2);
return ret;
}
else
{
return (__m128*) - 1;
}
}
SSGC_API __m128* __cdecl subps(__m128* ptr1, __m128* ptr2)
{
__m128* ret = _aligned_malloc(sizeof(__m128*), 16);
if (NULL != ret)
{
*ret = _mm_sub_ps(*ptr1, *ptr2);
return ret;
}
else
{
return -1;
}
}
SSGC_API __m128* __cdecl mulps_const(__m128* ptr, float value)
{
float c[4] = { value, value, value, value };
__m128* ret = _aligned_malloc(sizeof(__m128),16);
__m128 valueVec = _mm_loadu_ps(&c);
if (NULL != ret)
{
*ret = _mm_mul_ps(*ptr,valueVec);
return ret;
}
else
{
return -1;
}
}
SSGC_API __m128* __cdecl mulps(__m128* ptr1, __m128* ptr2)
{
__m128* ret = _aligned_malloc(sizeof(__m128), 16);
if (NULL != ret)
{
*ret = _mm_mul_ps(*ptr1, *ptr2);
return ret;
}
else
{
return -1;
}
}
SSGC_API _inline float __cdecl mulps_sum(__m128* ptr1, __m128* ptr2)
{
__m128 ret = _mm_mul_ps(*ptr1,*ptr2);
ret = _mm_hadd_ps(ret,ret);
ret = _mm_hadd_ps(ret,ret);
return *(float*)&ret;
}
_inline float __cdecl mulps_sum_internal(__m128 left, __m128 right)
{
__m128 ret = _mm_mul_ps(left, right);
ret = _mm_hadd_ps(ret, ret);
ret = _mm_hadd_ps(ret, ret);
return *(float*)&ret;
}
_inline float __cdecl mulps_total_internal(__m128 vec)
{
}
SSGC_API __m128* __cdecl divps_const(__m128* ptr, float value)
{
float c[4] = { value, value, value, value };
__m128* ret = _aligned_malloc(sizeof(__m128), 16);
__m128 valueVec = _mm_loadu_ps(&c);
if (NULL != ret)
{
*ret = _mm_div_ps(*ptr, valueVec);
return ret;
}
else
{
return -1;
}
}
SSGC_API __m128* __cdecl divps(__m128* ptr1, __m128* ptr2)
{
__m128* ret = _aligned_malloc(sizeof(__m128), 16);
if (NULL != ret)
{
*ret = _mm_div_ps(*ptr1, *ptr2);
return ret;
}
else
{
return -1;
}
}
SSGC_API float __cdecl sqrtss_const(float a)
{
__m128 ret = _mm_sqrt_ss(*(__m128*) & a);
return ret.m128_f32[0];
}
/*
Some complex functions for matrix calculations.
*/
SSGC_API __m256i* __cdecl load_matmap(uint64_t c0, uint64_t c1, uint64_t c2, uint64_t c3)
{
__m256i* retPtr = _aligned_malloc(sizeof(__m256i), sizeof(__m256i));
uint64_t ptr[4] = {c0,c1,c2,c3 };
if (NULL != retPtr)
{
*retPtr = _mm256_loadu_epi64(&ptr);
}
return retPtr;
}
SSGC_API __m128* __cdecl set_m128ptr_default()
@@ -204,17 +28,6 @@ SSGC_API __m128* __cdecl set_m128ptr_default()
/*
Functions to clean up colum and matrix resources
*/
SSGC_API void __cdecl deinitM128(__m128* ptr)
{
_aligned_free(ptr);
}
@@ -1,28 +1,33 @@
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.36.32537.0
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.37.32822.0
include listing.inc
INCLUDELIB OLDNAMES
EXTRN glfwWindowShouldClose:PROC
EXTRN glfwGetProcAddress:PROC
EXTRN glfwMakeContextCurrent:PROC
EXTRN glfwWindowHint:PROC
EXTRN glfwCreateWindow:PROC
EXTRN glfwInit:PROC
EXTRN glfwSwapInterval:PROC
EXTRN glfwSetFramebufferSizeCallback:PROC
EXTRN glfwSwapBuffers:PROC
PUBLIC initGLAD
PUBLIC initGL
PUBLIC loadGLApi
; COMDAT pdata
pdata SEGMENT
$pdata$initGL DD imagerel $LN4@initGL
DD imagerel $LN4@initGL+58
DD imagerel $LN4@initGL+68
DD imagerel $unwind$initGL
pdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$initGL DQ 00000420400010401r ; 3.58617e-310
$unwind$initGL DQ 00006340a00040a01r ; 8.62672e-309
DD 07006320aH
; Function compile flags: /Ogtpy
; File D:\NitloadIndustry\Ñо¿ÏîÄ¿\1-Flagship\TH2020\ProjectFile\Ô´´úÂë\StgShqrpGraphic\StgSharpGraphic.c
; COMDAT initGLAD
_TEXT SEGMENT
initGLAD PROC ; COMDAT
; 27 : return gladLoadGLLoader((GLADloadproc)glfwGetProcAddress);
00000 e9 00 00 00 00 jmp gladLoadGLLoader
initGLAD ENDP
_TEXT ENDS
END
@@ -1,4 +1,5 @@
D:\Programmer\GLenv\glad.c;D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgShqrpGraphic\x64\Release\glad.obj
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgShqrpGraphic\debuger.c;D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgShqrpGraphic\x64\Release\debuger.obj
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgShqrpGraphic\dllmain.c;D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgShqrpGraphic\x64\Release\dllmain.obj
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgShqrpGraphic\linear.c;D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgShqrpGraphic\x64\Release\linear.obj
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgShqrpGraphic\mat2.c;D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgShqrpGraphic\x64\Release\mat2.obj
@@ -1,2 +1,2 @@
PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.36.32532:TargetPlatformVersion=10.0.22000.0:
PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.37.32822:TargetPlatformVersion=10.0.22621.0:
Release|x64|D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\|
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.37.32822.0
include listing.inc
INCLUDELIB OLDNAMES
COMM report:QWORD
_DATA ENDS
PUBLIC getApiReporter
END
Binary file not shown.
@@ -1,4 +1,4 @@
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.36.32537.0
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.37.32822.0
include listing.inc
@@ -6,7 +6,6 @@ INCLUDELIB OLDNAMES
PUBLIC defaultVecPtr
EXTRN __imp__aligned_malloc:PROC
COMM pack:BYTE:038H
defaultVecPtr DQ 01H DUP (?)
_BSS ENDS
PUBLIC DllMain
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
@@ -1,119 +1,8 @@
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.36.32537.0
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.37.32822.0
include listing.inc
INCLUDELIB OLDNAMES
EXTRN __imp__aligned_free:PROC
PUBLIC deinitM128
PUBLIC set_m128ptr_default
PUBLIC load_matmap
PUBLIC sqrtss_const
PUBLIC divps
PUBLIC divps_const
PUBLIC mulps_total_internal
PUBLIC mulps_sum_internal
PUBLIC mulps_sum
PUBLIC mulps
PUBLIC mulps_const
PUBLIC subps
PUBLIC addps
PUBLIC load_cpy
PUBLIC load
; COMDAT pdata
pdata SEGMENT
$pdata$load_matmap DD imagerel $LN7@load_matma
DD imagerel $LN7@load_matma+134
DD imagerel $unwind$load_matmap
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$divps DD imagerel $LN7@divps
DD imagerel $LN7@divps+72
DD imagerel $unwind$divps
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$divps_const DD imagerel $LN7@divps_cons
DD imagerel $LN7@divps_cons+68
DD imagerel $unwind$divps_const
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$mulps DD imagerel $LN7@mulps
DD imagerel $LN7@mulps+72
DD imagerel $unwind$mulps
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$mulps_const DD imagerel $LN7@mulps_cons
DD imagerel $LN7@mulps_cons+65
DD imagerel $unwind$mulps_const
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$subps DD imagerel $LN7@subps
DD imagerel $LN7@subps+73
DD imagerel $unwind$subps
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$addps DD imagerel $LN7@addps
DD imagerel $LN7@addps+73
DD imagerel $unwind$addps
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$load_cpy DD imagerel $LN7@load_cpy
DD imagerel $LN7@load_cpy+40
DD imagerel $unwind$load_cpy
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$load DD imagerel $LN6@load
DD imagerel $LN6@load+71
DD imagerel $unwind$load
; COMDAT xdata
xdata SEGMENT
$unwind$load DQ 00000620400010401r ; 5.32451e-310
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$load_cpy DQ 03002320600020601r ; 1.96423e-77
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$addps DQ 00006340a00040a01r ; 8.62672e-309
DD 07006320aH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$subps DQ 00006340a00040a01r ; 8.62672e-309
DD 07006320aH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$mulps_const DQ 03005520900020901r ; 2.30159e-77
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$mulps DQ 00006340a00040a01r ; 8.62672e-309
DD 07006320aH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$divps_const DQ 03005520900020901r ; 2.30159e-77
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$divps DQ 00006340a00040a01r ; 8.62672e-309
DD 07006320aH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$load_matmap DQ 0000e741500082419r ; 2.01e-308
DQ 0000c3415000d6415r ; 1.6971e-308
DD 0e0119215H
DD imagerel __GSHandlerCheck
DD 040H
END
Binary file not shown.
@@ -1,9 +1,10 @@
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.36.32537.0
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.37.32822.0
include listing.inc
INCLUDELIB OLDNAMES
EXTRN __imp__aligned_free:PROC
PUBLIC deinit_mat2
PUBLIC transpose2to4
PUBLIC transpose2to3
Binary file not shown.
+1 -76
View File
@@ -1,4 +1,4 @@
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.36.32537.0
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.37.32822.0
include listing.inc
@@ -18,79 +18,4 @@ $pdata$transpose3to3 DD imagerel $LN4@transpose3
xdata SEGMENT
$unwind$transpose3to3 DQ 00000681700031701r ; 5.65448e-310
DD 02204H
; Function compile flags: /Ogtpy
; File D:\NitloadIndustry\Ñо¿ÏîÄ¿\1-Flagship\TH2020\ProjectFile\Ô´´úÂë\StgShqrpGraphic\mat3.c
; COMDAT det_mat3
_TEXT SEGMENT
mat$ = 8
det_mat3 PROC ; COMDAT
; 70 : return det_mat3_internal(
00000 0f 10 59 10 movups xmm3, XMMWORD PTR [rcx+16]
00004 0f 10 51 20 movups xmm2, XMMWORD PTR [rcx+32]
; 43 : __m128 addc1 = _mm_shuffle_ps(c1, c1, _MM_SHUFFLE(3, 0, 2, 1));
00008 0f 28 e3 movaps xmm4, xmm3
0000b 0f c6 e3 c9 shufps xmm4, xmm3, 201 ; 000000c9H
; 44 : __m128 addc2 = _mm_shuffle_ps(c2, c2, _MM_SHUFFLE(3, 1, 0, 2));
0000f 0f 28 c2 movaps xmm0, xmm2
; 45 :
; 46 : //let sub row aligned
; 47 : __m128 subc1 = _mm_shuffle_ps(c1, c1, _MM_SHUFFLE(3, 1, 0, 2));
; 48 : __m128 subc2 = _mm_shuffle_ps(c2, c2, _MM_SHUFFLE(3, 0, 2, 1));
; 49 :
; 50 : //multple all add row
; 51 : __m128 cache = _mm_mul_ps(c0,addc1);
00012 0f 59 21 mulps xmm4, XMMWORD PTR [rcx]
00015 0f c6 c2 d2 shufps xmm0, xmm2, 210 ; 000000d2H
00019 0f c6 db d2 shufps xmm3, xmm3, 210 ; 000000d2H
; 52 : cache = _mm_mul_ps(cache,addc2);
; 53 :
; 54 : //multiple all sub row
; 55 : __m128 sub = _mm_mul_ps(c0, subc1);
0001d 0f 59 19 mulps xmm3, XMMWORD PTR [rcx]
00020 0f 59 e0 mulps xmm4, xmm0
00023 0f c6 d2 c9 shufps xmm2, xmm2, 201 ; 000000c9H
; 56 : sub = _mm_mul_ps(sub, subc2);
00027 0f 59 da mulps xmm3, xmm2
; 57 :
; 58 : //main-corner sub sub-corner
; 59 : cache = _mm_sub_ps(cache,sub);
0002a 0f 5c e3 subps xmm4, xmm3
; 60 :
; 61 : __m128 ret = _mm_hadd_ps(cache,cache); //element 1 add element 2
0002d 0f 28 c4 movaps xmm0, xmm4
00030 f2 0f 7c c4 haddps xmm0, xmm4
; 62 : ret = _mm_add_ps(ret, cache); //(e1 add e2) add element 3
00034 0f 58 c4 addps xmm0, xmm4
; 70 : return det_mat3_internal(
00037 0f c6 c0 aa shufps xmm0, xmm0, 170 ; 000000aaH
; 71 : mat->colum[0],
; 72 : mat->colum[1],
; 73 : mat->colum[2]
; 74 : );
; 75 : }
0003b c3 ret 0
det_mat3 ENDP
_TEXT ENDS
END
Binary file not shown.
@@ -1,4 +1,4 @@
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.36.32537.0
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.37.32822.0
include listing.inc
Binary file not shown.
Binary file not shown.