diff --git a/engine/spatialpartition.cpp b/engine/spatialpartition.cpp index 29689d03..0f96aaea 100644 --- a/engine/spatialpartition.cpp +++ b/engine/spatialpartition.cpp @@ -2447,10 +2447,10 @@ bool CVoxelTree::EnumerateElementsAlongRay_ExtrudedRay( SpatialPartitionListMask return true; // Setup. - int nStep[3]; - float tMax[3]; // amount of change in t along ray until we hit the next new voxel - float tMin[3]; // amount of change in t along ray until we leave the last voxel - float tDelta[3]; + int nStep[3] = {0, 0, 0}; + float tMax[3] = {0.f, 0.f, 0.f}; // amount of change in t along ray until we hit the next new voxel + float tMin[3] = {0.f, 0.f, 0.f}; // amount of change in t along ray until we leave the last voxel + float tDelta[3] = {0.f, 0.f, 0.f}; m_pVoxelHash[0].LeafListExtrudedRaySetup( ray, vecInvDelta, vecMin, vecMax, voxelBounds[0][0], voxelBounds[0][1], nStep, tMin, tMax, tDelta ); int nLastVoxel1[3]; diff --git a/public/tier0/platform.h b/public/tier0/platform.h index 30b2ec0f..83b48b98 100644 --- a/public/tier0/platform.h +++ b/public/tier0/platform.h @@ -1038,7 +1038,7 @@ inline T QWordSwapC( T dw ) // The typically used methods. //------------------------------------- -#if (defined(__i386__) || (defined(__arm__) && defined(ANDROID))) && !defined(VALVE_LITTLE_ENDIAN) +#if (defined(__i386__) || defined(__amd64__) || (defined(__arm__) && defined(ANDROID))) && !defined(VALVE_LITTLE_ENDIAN) #define VALVE_LITTLE_ENDIAN 1 #endif diff --git a/public/togles/linuxwin/glentrypoints.h b/public/togles/linuxwin/glentrypoints.h index 310932bc..33c23f0a 100644 --- a/public/togles/linuxwin/glentrypoints.h +++ b/public/togles/linuxwin/glentrypoints.h @@ -277,6 +277,9 @@ enum GLDriverProvider_t cGLDriverProviderIntel, cGLDriverProviderIntelOpenSource, cGLDriverProviderApple, + cGLDriverProviderARM, + cGLDriverProviderQualcomm, + cGLDriverProviderImagination, cGLTotalDriverProviders }; diff --git a/tier1/interface.cpp b/tier1/interface.cpp index a4507fd4..aa701096 100644 --- a/tier1/interface.cpp +++ b/tier1/interface.cpp @@ -279,7 +279,7 @@ CSysModule *Sys_LoadModule( const char *pModuleName, Sys_Flags flags /* = SYS_NO // prior to the call to this routine. char szCwd[1024]; #ifdef POSIX - char szModuleName[1024]; + char szModuleName[1024] = { 0 }; #endif HMODULE hDLL = NULL; diff --git a/togl/linuxwin/glmgr.cpp b/togl/linuxwin/glmgr.cpp index 7e7d0dc4..cfe84114 100644 --- a/togl/linuxwin/glmgr.cpp +++ b/togl/linuxwin/glmgr.cpp @@ -2454,6 +2454,7 @@ static uint gPersistentBufferSize[kGLMNumBufferTypes] = GLMContext::GLMContext( IDirect3DDevice9 *pDevice, GLMDisplayParams *params ) { + m_nNumDirtySamplers = 0; // m_bUseSamplerObjects = true; // // // On most AMD drivers (like the current latest, 12.10 Windows), the PCF depth comparison mode doesn't work on sampler objects, so just punt them. diff --git a/togles/linuxwin/glentrypoints.cpp b/togles/linuxwin/glentrypoints.cpp index 2d48c251..f341fd1d 100644 --- a/togles/linuxwin/glentrypoints.cpp +++ b/togles/linuxwin/glentrypoints.cpp @@ -365,6 +365,12 @@ COpenGLEntryPoints::COpenGLEntryPoints() m_nDriverProvider = cGLDriverProviderIntelOpenSource; else if ( V_stristr( m_pGLDriverStrings[cGLVendorString], "apple" ) ) m_nDriverProvider = cGLDriverProviderApple; + else if ( V_stristr( m_pGLDriverStrings[cGLVendorString], "qualcomm" ) ) + m_nDriverProvider = cGLDriverProviderQualcomm; + else if ( V_stristr( m_pGLDriverStrings[cGLVendorString], "arm" ) ) + m_nDriverProvider = cGLDriverProviderARM; + else if ( V_stristr( m_pGLDriverStrings[cGLVendorString], "imagination technologies" ) ) + m_nDriverProvider = cGLDriverProviderImagination; pszString = ( const char * )glGetString(GL_RENDERER); m_pGLDriverStrings[cGLRendererString] = strdup( pszString ? pszString : "" ); diff --git a/togles/linuxwin/glmgr.cpp b/togles/linuxwin/glmgr.cpp index 83bcf2e3..e7c9338f 100644 --- a/togles/linuxwin/glmgr.cpp +++ b/togles/linuxwin/glmgr.cpp @@ -2359,10 +2359,16 @@ static uint gPersistentBufferSize[kGLMNumBufferTypes] = GLMContext::GLMContext( IDirect3DDevice9 *pDevice, GLMDisplayParams *params ) { - m_bUseSamplerObjects = true; - if ( CommandLine()->CheckParm( "-gl_disablesamplerobjects" ) ) + m_nNumDirtySamplers = 0; + + if( gGL->m_nDriverProvider == cGLDriverProviderARM ) + m_bUseSamplerObjects = true; + else m_bUseSamplerObjects = false; + if ( CommandLine()->CheckParm( "-gl_enablesamplerobjects" ) ) + m_bUseSamplerObjects = true; + // Try to get some more free memory by relying on driver host copies instead of ours. // In some cases the driver will be able to discard their own host copy and rely on GPU // memory, reducing memory usage.