Browse Source

fixed some unitialized variables

pull/114/head
nillerusr 2 years ago
parent
commit
a16123e4be
  1. 8
      engine/spatialpartition.cpp
  2. 2
      public/tier0/platform.h
  3. 3
      public/togles/linuxwin/glentrypoints.h
  4. 2
      tier1/interface.cpp
  5. 1
      togl/linuxwin/glmgr.cpp
  6. 6
      togles/linuxwin/glentrypoints.cpp
  7. 8
      togles/linuxwin/glmgr.cpp

8
engine/spatialpartition.cpp

@ -2447,10 +2447,10 @@ bool CVoxelTree::EnumerateElementsAlongRay_ExtrudedRay( SpatialPartitionListMask
return true; return true;
// Setup. // Setup.
int nStep[3]; int nStep[3] = {0, 0, 0};
float tMax[3]; // amount of change in t along ray until we hit the next new voxel 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]; // amount of change in t along ray until we leave the last 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]; 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 ); m_pVoxelHash[0].LeafListExtrudedRaySetup( ray, vecInvDelta, vecMin, vecMax, voxelBounds[0][0], voxelBounds[0][1], nStep, tMin, tMax, tDelta );
int nLastVoxel1[3]; int nLastVoxel1[3];

2
public/tier0/platform.h

@ -1038,7 +1038,7 @@ inline T QWordSwapC( T dw )
// The typically used methods. // 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 #define VALVE_LITTLE_ENDIAN 1
#endif #endif

3
public/togles/linuxwin/glentrypoints.h

@ -277,6 +277,9 @@ enum GLDriverProvider_t
cGLDriverProviderIntel, cGLDriverProviderIntel,
cGLDriverProviderIntelOpenSource, cGLDriverProviderIntelOpenSource,
cGLDriverProviderApple, cGLDriverProviderApple,
cGLDriverProviderARM,
cGLDriverProviderQualcomm,
cGLDriverProviderImagination,
cGLTotalDriverProviders cGLTotalDriverProviders
}; };

2
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. // prior to the call to this routine.
char szCwd[1024]; char szCwd[1024];
#ifdef POSIX #ifdef POSIX
char szModuleName[1024]; char szModuleName[1024] = { 0 };
#endif #endif
HMODULE hDLL = NULL; HMODULE hDLL = NULL;

1
togl/linuxwin/glmgr.cpp

@ -2454,6 +2454,7 @@ static uint gPersistentBufferSize[kGLMNumBufferTypes] =
GLMContext::GLMContext( IDirect3DDevice9 *pDevice, GLMDisplayParams *params ) GLMContext::GLMContext( IDirect3DDevice9 *pDevice, GLMDisplayParams *params )
{ {
m_nNumDirtySamplers = 0;
// m_bUseSamplerObjects = true; // 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. // // 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.

6
togles/linuxwin/glentrypoints.cpp

@ -365,6 +365,12 @@ COpenGLEntryPoints::COpenGLEntryPoints()
m_nDriverProvider = cGLDriverProviderIntelOpenSource; m_nDriverProvider = cGLDriverProviderIntelOpenSource;
else if ( V_stristr( m_pGLDriverStrings[cGLVendorString], "apple" ) ) else if ( V_stristr( m_pGLDriverStrings[cGLVendorString], "apple" ) )
m_nDriverProvider = cGLDriverProviderApple; 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); pszString = ( const char * )glGetString(GL_RENDERER);
m_pGLDriverStrings[cGLRendererString] = strdup( pszString ? pszString : "" ); m_pGLDriverStrings[cGLRendererString] = strdup( pszString ? pszString : "" );

8
togles/linuxwin/glmgr.cpp

@ -2359,10 +2359,16 @@ static uint gPersistentBufferSize[kGLMNumBufferTypes] =
GLMContext::GLMContext( IDirect3DDevice9 *pDevice, GLMDisplayParams *params ) GLMContext::GLMContext( IDirect3DDevice9 *pDevice, GLMDisplayParams *params )
{ {
m_nNumDirtySamplers = 0;
if( gGL->m_nDriverProvider == cGLDriverProviderARM )
m_bUseSamplerObjects = true; m_bUseSamplerObjects = true;
if ( CommandLine()->CheckParm( "-gl_disablesamplerobjects" ) ) else
m_bUseSamplerObjects = false; 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. // 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 // In some cases the driver will be able to discard their own host copy and rely on GPU
// memory, reducing memory usage. // memory, reducing memory usage.

Loading…
Cancel
Save