arm64 : fix intptr_t size

This commit is contained in:
hymei
2022-06-05 01:12:32 +03:00
committed by nillerusr
parent 2690e6c85a
commit 4e4039d756
143 changed files with 1015 additions and 674 deletions
+1 -1
View File
@@ -14,7 +14,7 @@
#include "tier1/interface.h"
#include "bitmap/imageformat.h"
typedef unsigned int ColorCorrectionHandle_t;
typedef uintp ColorCorrectionHandle_t;
struct ShaderColorCorrectionInfo_t;
#define COLORCORRECTION_INTERFACE_VERSION "COLORCORRECTION_VERSION_1"
+12 -12
View File
@@ -1156,7 +1156,7 @@ inline void CVertexBuilder::FastAdvanceNVertices( int n )
//-----------------------------------------------------------------------------
inline void CVertexBuilder::FastVertex( const ModelVertexDX7_t &vertex )
{
#ifdef __arm__
#if defined(__arm__) || defined(__arm64__)
FastVertexSSE( vertex );
#else
Assert( m_CompressionType == VERTEX_COMPRESSION_NONE ); // FIXME: support compressed verts if needed
@@ -1244,11 +1244,11 @@ inline void CVertexBuilder::FastVertexSSE( const ModelVertexDX7_t &vertex )
const char *pRead = (char *)&vertex;
char *pCurrPos = (char *)m_pCurrPosition;
__m128 m1 = _mm_load_ps( (float *)pRead );
__m128 m2 = _mm_load_ps( (float *)((int)pRead + 16) );
__m128 m3 = _mm_load_ps( (float *)((int)pRead + 32) );
__m128 m2 = _mm_load_ps( (float *)((intp)pRead + 16) );
__m128 m3 = _mm_load_ps( (float *)((intp)pRead + 32) );
_mm_stream_ps( (float *)pCurrPos, m1 );
_mm_stream_ps( (float *)((int)pCurrPos + 16), m2 );
_mm_stream_ps( (float *)((int)pCurrPos + 32), m3 );
_mm_stream_ps( (float *)((intp)pCurrPos + 16), m2 );
_mm_stream_ps( (float *)((intp)pCurrPos + 32), m3 );
#else
Error( "Implement CMeshBuilder::FastVertexSSE(dx7)" );
#endif
@@ -1326,7 +1326,7 @@ inline void CVertexBuilder::Fast4VerticesSSE(
inline void CVertexBuilder::FastVertex( const ModelVertexDX8_t &vertex )
{
#ifdef __arm__
#if defined(__arm__) || defined(__arm64__)
FastVertexSSE( vertex );
#else
Assert( m_CompressionType == VERTEX_COMPRESSION_NONE ); // FIXME: support compressed verts if needed
@@ -1436,13 +1436,13 @@ inline void CVertexBuilder::FastVertexSSE( const ModelVertexDX8_t &vertex )
:: "r" (pRead), "r" (pCurrPos) : "memory"); */
__m128 m1 = _mm_load_ps( (float *)pRead );
__m128 m2 = _mm_load_ps( (float *)((int)pRead + 16) );
__m128 m3 = _mm_load_ps( (float *)((int)pRead + 32) );
__m128 m4 = _mm_load_ps( (float *)((int)pRead + 48) );
__m128 m2 = _mm_load_ps( (float *)((intp)pRead + 16) );
__m128 m3 = _mm_load_ps( (float *)((intp)pRead + 32) );
__m128 m4 = _mm_load_ps( (float *)((intp)pRead + 48) );
_mm_stream_ps( (float *)pCurrPos, m1 );
_mm_stream_ps( (float *)((int)pCurrPos + 16), m2 );
_mm_stream_ps( (float *)((int)pCurrPos + 32), m3 );
_mm_stream_ps( (float *)((int)pCurrPos + 48), m4 );
_mm_stream_ps( (float *)((intp)pCurrPos + 16), m2 );
_mm_stream_ps( (float *)((intp)pCurrPos + 32), m3 );
_mm_stream_ps( (float *)((intp)pCurrPos + 48), m4 );
#else
Error( "Implement CMeshBuilder::FastVertexSSE((dx8)" );
#endif