MCPcopy Create free account
hub / github.com/GPUOpen-Effects/GeometryFX / CheckObjectFile

Method CheckObjectFile

framework/d3d11/amd_sdk/src/ShaderCache.cpp:3106–3128  ·  view source on GitHub ↗

-------------------------------------------------------------------------------------- Checks to see if the oject file exists for a given shader --------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

3104// Checks to see if the oject file exists for a given shader
3105//--------------------------------------------------------------------------------------
3106BOOL ShaderCache::CheckObjectFile( Shader* pShader )
3107{
3108 FILE* pFile = NULL;
3109 wchar_t wsShaderPathName[m_uPATHNAME_MAX_LENGTH];
3110
3111 CreateFullPathFromOutputFilename( wsShaderPathName, pShader->m_wsObjectFile );
3112
3113 _wfopen_s( &pFile, wsShaderPathName, L"rt" );
3114
3115 if (pFile)
3116 {
3117 fseek( pFile, 0, SEEK_END );
3118 int iFileSize = ftell( pFile );
3119 fclose( pFile );
3120
3121 if (iFileSize > 0)
3122 {
3123 return TRUE;
3124 }
3125 }
3126
3127 return FALSE;
3128}
3129
3130
3131//--------------------------------------------------------------------------------------

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected