-------------------------------------------------------------------------------------- Checks to see if the oject file exists for a given shader --------------------------------------------------------------------------------------
| 3104 | // Checks to see if the oject file exists for a given shader |
| 3105 | //-------------------------------------------------------------------------------------- |
| 3106 | BOOL 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 | //-------------------------------------------------------------------------------------- |
nothing calls this directly
no outgoing calls
no test coverage detected