mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-02 09:03:37 +00:00
Code refactor: rewrite HLE vertices loading.
Enable __VEC4_OPT for Windows release builds.
This commit is contained in:
parent
d197db5b90
commit
c75985b9d8
|
@ -224,7 +224,7 @@ copy /Y "$(ProjectDir)$(OutDir)$(TargetName).*" "$(Mupen64PluginsDir)"</Command>
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<PreprocessorDefinitions>NDEBUG;UNICODE;GL_USE_UNIFORMBLOCK;TXFILTER_LIB;WIN32_ASM;OS_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>__VEC4_OPT;NDEBUG;UNICODE;GL_USE_UNIFORMBLOCK;TXFILTER_LIB;WIN32_ASM;OS_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
|
@ -267,7 +267,7 @@ copy /Y "$(ProjectDir)$(OutDir)$(TargetName).*" "$(N64PluginsDir)"</Command>
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<PreprocessorDefinitions>NDEBUG;UNICODE;GL_USE_UNIFORMBLOCK;TXFILTER_LIB;MUPENPLUSAPI;WIN32;WIN32_ASM;OS_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>__VEC4_OPT;NDEBUG;UNICODE;GL_USE_UNIFORMBLOCK;TXFILTER_LIB;MUPENPLUSAPI;WIN32;WIN32_ASM;OS_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
|
|
|
@ -223,7 +223,7 @@ copy /Y "$(ProjectDir)$(OutDir)$(TargetName).*" "$(Mupen64PluginsDir)"</Command>
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<PreprocessorDefinitions>NDEBUG;UNICODE;GL_USE_UNIFORMBLOCK;TXFILTER_LIB;WIN32_ASM;OS_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>__VEC4_OPT;NDEBUG;UNICODE;GL_USE_UNIFORMBLOCK;TXFILTER_LIB;WIN32_ASM;OS_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
|
@ -264,7 +264,7 @@ copy /Y "$(ProjectDir)$(OutDir)$(TargetName).*" "$(N64PluginsDir)"</Command>
|
|||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<PreprocessorDefinitions>NDEBUG;UNICODE;GL_USE_UNIFORMBLOCK;TXFILTER_LIB;MUPENPLUSAPI;WIN32;WIN32_ASM;OS_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>__VEC4_OPT;NDEBUG;UNICODE;GL_USE_UNIFORMBLOCK;TXFILTER_LIB;MUPENPLUSAPI;WIN32;WIN32_ASM;OS_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
|
|
|
@ -135,6 +135,8 @@ public:
|
|||
|
||||
SPVertex & getVertex(u32 _v) { return triangles.vertices[_v]; }
|
||||
|
||||
SPVertex * getVertexPtr(u32 _v) { return triangles.vertices.data() + _v; }
|
||||
|
||||
void setDMAVerticesSize(u32 _size) { if (m_dmaVertices.size() < _size) m_dmaVertices.resize(_size); }
|
||||
|
||||
SPVertex * getDMAVerticesData() { return m_dmaVertices.data(); }
|
||||
|
|
|
@ -116,7 +116,7 @@ void gSPBillboardVertex4NEON(u32 v)
|
|||
);
|
||||
}
|
||||
|
||||
void gSPTransformVertex_NEON(float vtx[4], float mtx[4][4])
|
||||
void gSPTransformVector_NEON(float vtx[4], float mtx[4][4])
|
||||
{
|
||||
// Load vtx
|
||||
float32x4_t _vtx = vld1q_f32(vtx);
|
||||
|
@ -244,12 +244,11 @@ void DotProductMax4FullNeon( float v0[3], float v1[4][3], float _lights[4][3], f
|
|||
);
|
||||
}
|
||||
|
||||
void gSPLightVertex4_NEON(u32 v)
|
||||
void gSPLightVertex4_NEON(u32 v, SPVertex * spVtx)
|
||||
{
|
||||
GraphicsDrawer & drawer = dwnd().getDrawer();
|
||||
if (!config.generalEmulation.enableHWLighting) {
|
||||
for(int j = 0; j < 4; ++j) {
|
||||
SPVertex & vtx = drawer.getVertex(v+j);
|
||||
SPVertex & vtx = spVtx[v + j];
|
||||
vtx.r = gSP.lights.rgb[gSP.numLights][R];
|
||||
vtx.g = gSP.lights.rgb[gSP.numLights][G];
|
||||
vtx.b = gSP.lights.rgb[gSP.numLights][B];
|
||||
|
@ -280,7 +279,7 @@ void gSPLightVertex4_NEON(u32 v)
|
|||
}
|
||||
} else {
|
||||
for(int j = 0; j < 4; ++j) {
|
||||
SPVertex & vtx = drawer.getVertex(v+j);
|
||||
SPVertex & vtx = spVtx[v + j];
|
||||
vtx.HWLight = gSP.numLights;
|
||||
vtx.r = vtx.nx;
|
||||
vtx.g = vtx.ny;
|
||||
|
|
1734
src/gSP.cpp
1734
src/gSP.cpp
File diff suppressed because it is too large
Load Diff
14
src/gSP.h
14
src/gSP.h
|
@ -221,18 +221,10 @@ void gSP4Triangles(const s32 v00, const s32 v01, const s32 v02,
|
|||
const s32 v20, const s32 v21, const s32 v22,
|
||||
const s32 v30, const s32 v31, const s32 v32 );
|
||||
|
||||
#ifdef __VEC4_OPT
|
||||
extern void (*gSPTransformVertex4)(u32 v, float mtx[4][4]);
|
||||
extern void (*gSPTransformNormal4)(u32 v, float mtx[4][4]);
|
||||
extern void (*gSPLightVertex4)(u32 v);
|
||||
extern void (*gSPPointLightVertex4)(u32 v, float _vPos[4][3]);
|
||||
extern void (*gSPBillboardVertex4)(u32 v);
|
||||
#endif
|
||||
extern void (*gSPTransformVertex)(float vtx[4], float mtx[4][4]);
|
||||
void gSPLightVertex(SPVertex & _vtx);
|
||||
|
||||
extern void (*gSPTransformVector)(float vtx[4], float mtx[4][4]);
|
||||
extern void (*gSPInverseTransformVector)(float vtx[4], float mtx[4][4]);
|
||||
extern void (*gSPLightVertex)(SPVertex & _vtx);
|
||||
extern void (*gSPPointLightVertex)(SPVertex & _vtx, float * _vPos);
|
||||
extern void (*gSPBillboardVertex)(u32 v, u32 i);
|
||||
void gSPSetupFunctions();
|
||||
void gSPFlushTriangles();
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user