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. 10
      togles/linuxwin/glmgr.cpp

8
engine/spatialpartition.cpp

@ -2447,10 +2447,10 @@ bool CVoxelTree::EnumerateElementsAlongRay_ExtrudedRay( SpatialPartitionListMask @@ -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];

2
public/tier0/platform.h

@ -1038,7 +1038,7 @@ inline T QWordSwapC( T dw ) @@ -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

3
public/togles/linuxwin/glentrypoints.h

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

2
tier1/interface.cpp

@ -279,7 +279,7 @@ CSysModule *Sys_LoadModule( const char *pModuleName, Sys_Flags flags /* = SYS_NO @@ -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;

1
togl/linuxwin/glmgr.cpp

@ -2454,6 +2454,7 @@ static uint gPersistentBufferSize[kGLMNumBufferTypes] = @@ -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.

6
togles/linuxwin/glentrypoints.cpp

@ -365,6 +365,12 @@ COpenGLEntryPoints::COpenGLEntryPoints() @@ -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 : "" );

10
togles/linuxwin/glmgr.cpp

@ -2359,10 +2359,16 @@ static uint gPersistentBufferSize[kGLMNumBufferTypes] = @@ -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.

Loading…
Cancel
Save