mirror of
https://github.com/celisej567/source-engine.git
synced 2026-01-05 22:09:59 +03:00
fix windows build scripts, add windows opus support
This commit is contained in:
@@ -1149,14 +1149,14 @@ inline void CVertexBuilder::FastAdvanceNVertices( int n )
|
||||
|
||||
|
||||
|
||||
#ifndef COMPILER_MSVC64
|
||||
// #ifndef COMPILER_MSVC64
|
||||
// Implement for 64-bit Windows if needed.
|
||||
//-----------------------------------------------------------------------------
|
||||
// Fast Vertex! No need to call advance vertex, and no random access allowed
|
||||
//-----------------------------------------------------------------------------
|
||||
inline void CVertexBuilder::FastVertex( const ModelVertexDX7_t &vertex )
|
||||
{
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
#if defined(__arm__) || defined(__aarch64__) || defined(PLATFORM_WINDOWS_PC64)
|
||||
FastVertexSSE( vertex );
|
||||
#else
|
||||
Assert( m_CompressionType == VERTEX_COMPRESSION_NONE ); // FIXME: support compressed verts if needed
|
||||
@@ -1224,7 +1224,7 @@ inline void CVertexBuilder::FastVertexSSE( const ModelVertexDX7_t &vertex )
|
||||
Assert( m_CompressionType == VERTEX_COMPRESSION_NONE ); // FIXME: support compressed verts if needed
|
||||
Assert( m_nCurrentVertex < m_nMaxVertexCount );
|
||||
|
||||
#if defined( _WIN32 ) && !defined( _X360 )
|
||||
#if defined( _WIN32 ) && !defined( _X360 ) && !defined( PLATFORM_64BITS )
|
||||
const void *pRead = &vertex;
|
||||
void *pCurrPos = m_pCurrPosition;
|
||||
__asm
|
||||
@@ -1240,7 +1240,7 @@ inline void CVertexBuilder::FastVertexSSE( const ModelVertexDX7_t &vertex )
|
||||
movntps [edi + 16], xmm1
|
||||
movntps [edi + 32], xmm2
|
||||
}
|
||||
#elif defined(GNUC)
|
||||
#elif defined(GNUC) || defined(PLATFORM_WINDOWS_PC64)
|
||||
const char *pRead = (char *)&vertex;
|
||||
char *pCurrPos = (char *)m_pCurrPosition;
|
||||
__m128 m1 = _mm_load_ps( (float *)pRead );
|
||||
@@ -1271,7 +1271,7 @@ inline void CVertexBuilder::Fast4VerticesSSE(
|
||||
Assert( m_CompressionType == VERTEX_COMPRESSION_NONE ); // FIXME: support compressed verts if needed
|
||||
Assert( m_nCurrentVertex < m_nMaxVertexCount-3 );
|
||||
|
||||
#if defined( _WIN32 ) && !defined( _X360 )
|
||||
#if defined( _WIN32 ) && !defined( _X360 ) && !defined( PLATFORM_64BITS )
|
||||
void *pCurrPos = m_pCurrPosition;
|
||||
__asm
|
||||
{
|
||||
@@ -1313,6 +1313,38 @@ inline void CVertexBuilder::Fast4VerticesSSE(
|
||||
movntps [edi + 80+96], xmm5
|
||||
|
||||
}
|
||||
#elif defined(__arm__) || defined(PLATFORM_WINDOWS_PC64)
|
||||
const void *pReadA = &vtx_a;
|
||||
const void *pReadB = &vtx_b;
|
||||
const void *pReadC = &vtx_c;
|
||||
const void *pReadD = &vtx_d;
|
||||
|
||||
void *pCurrPos = m_pCurrPosition;
|
||||
|
||||
__m128 m1 = _mm_load_ps( (float *)pReadA );
|
||||
__m128 m2 = _mm_load_ps( (float *)((intp)pReadA + 16) );
|
||||
__m128 m3 = _mm_load_ps( (float *)((intp)pReadA + 32) );
|
||||
__m128 m4 = _mm_load_ps( (float *)pReadB );
|
||||
__m128 m5 = _mm_load_ps( (float *)((intp)pReadB + 16) );
|
||||
__m128 m6 = _mm_load_ps( (float *)((intp)pReadB + 32) );
|
||||
_mm_stream_ps( (float *)pCurrPos, m1 );
|
||||
_mm_stream_ps( (float *)((intp)pCurrPos + 16), m2 );
|
||||
_mm_stream_ps( (float *)((intp)pCurrPos + 32), m3 );
|
||||
_mm_stream_ps( (float *)((intp)pCurrPos + 48), m4 );
|
||||
_mm_stream_ps( (float *)((intp)pCurrPos + 64), m5 );
|
||||
_mm_stream_ps( (float *)((intp)pCurrPos + 80), m6 );
|
||||
m1 = _mm_load_ps( (float *)pReadC );
|
||||
m2 = _mm_load_ps( (float *)((intp)pReadC + 16) );
|
||||
m3 = _mm_load_ps( (float *)((intp)pReadC + 32) );
|
||||
m4 = _mm_load_ps( (float *)pReadD );
|
||||
m5 = _mm_load_ps( (float *)((intp)pReadD + 16) );
|
||||
m6 = _mm_load_ps( (float *)((intp)pReadD + 32) );
|
||||
_mm_stream_ps( (float *)((intp)pCurrPos + 0+96), m1 );
|
||||
_mm_stream_ps( (float *)((intp)pCurrPos + 16+96), m2 );
|
||||
_mm_stream_ps( (float *)((intp)pCurrPos + 32+96), m3 );
|
||||
_mm_stream_ps( (float *)((intp)pCurrPos + 48+96), m4 );
|
||||
_mm_stream_ps( (float *)((intp)pCurrPos + 64+96), m5 );
|
||||
_mm_stream_ps( (float *)((intp)pCurrPos + 80+96), m6 );
|
||||
#else
|
||||
Error( "Implement CMeshBuilder::Fast4VerticesSSE\n");
|
||||
#endif
|
||||
@@ -1326,7 +1358,7 @@ inline void CVertexBuilder::Fast4VerticesSSE(
|
||||
|
||||
inline void CVertexBuilder::FastVertex( const ModelVertexDX8_t &vertex )
|
||||
{
|
||||
#if defined(__arm__) || defined(__aarch64__)
|
||||
#if defined(__arm__) || defined(__aarch64__) || defined(PLATFORM_WINDOWS_PC64)
|
||||
FastVertexSSE( vertex );
|
||||
#else
|
||||
Assert( m_CompressionType == VERTEX_COMPRESSION_NONE ); // FIXME: support compressed verts if needed
|
||||
@@ -1402,7 +1434,7 @@ inline void CVertexBuilder::FastVertexSSE( const ModelVertexDX8_t &vertex )
|
||||
Assert( m_CompressionType == VERTEX_COMPRESSION_NONE ); // FIXME: support compressed verts if needed
|
||||
Assert( m_nCurrentVertex < m_nMaxVertexCount );
|
||||
|
||||
#if defined( _WIN32 ) && !defined( _X360 )
|
||||
#if defined( _WIN32 ) && !defined( _X360 ) && !defined( PLATFORM_64BITS )
|
||||
const void *pRead = &vertex;
|
||||
void *pCurrPos = m_pCurrPosition;
|
||||
__asm
|
||||
@@ -1420,7 +1452,7 @@ inline void CVertexBuilder::FastVertexSSE( const ModelVertexDX8_t &vertex )
|
||||
movntps [edi + 32], xmm2
|
||||
movntps [edi + 48], xmm3
|
||||
}
|
||||
#elif defined(GNUC)
|
||||
#elif defined(GNUC) || defined(PLATFORM_WINDOWS_PC64)
|
||||
const void *pRead = &vertex;
|
||||
void *pCurrPos = m_pCurrPosition;
|
||||
|
||||
@@ -1455,7 +1487,7 @@ inline void CVertexBuilder::FastVertexSSE( const ModelVertexDX8_t &vertex )
|
||||
m_bWrittenUserData = false;
|
||||
#endif
|
||||
}
|
||||
#endif // COMPILER_MSVC64
|
||||
// #endif // COMPILER_MSVC64
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user