-------------------------------------------------------------------------------------- Checks to see if the object file exists for a given shader --------------------------------------------------------------------------------------
| 3077 | // Checks to see if the object file exists for a given shader |
| 3078 | //-------------------------------------------------------------------------------------- |
| 3079 | BOOL ShaderCache::CheckShaderFile( Shader* pShader ) |
| 3080 | { |
| 3081 | wchar_t wsShaderPathName[m_uPATHNAME_MAX_LENGTH]; |
| 3082 | |
| 3083 | CreateFullPathFromInputFilename( wsShaderPathName, pShader->m_wsSourceFile ); |
| 3084 | |
| 3085 | if (_waccess( wsShaderPathName, 00 ) != -1) |
| 3086 | { |
| 3087 | return TRUE; |
| 3088 | } |
| 3089 | else |
| 3090 | { |
| 3091 | wchar_t wsErrorText[m_uCOMMAND_LINE_MAX_LENGTH]; |
| 3092 | swprintf_s( wsErrorText, L"Error: %s (FILE NOT FOUND)\n", wsShaderPathName ); |
| 3093 | |
| 3094 | const bool kbAppendToError = (wcslen( m_wsLastShaderError ) < (3 * m_uCOMMAND_LINE_MAX_LENGTH)); |
| 3095 | swprintf_s( m_wsLastShaderError, L"%s%s", (m_bHasShaderErrorsToDisplay && kbAppendToError) ? m_wsLastShaderError : L"", wsErrorText ); |
| 3096 | m_bHasShaderErrorsToDisplay = true; |
| 3097 | m_shaderErrorRenderedCount = 0; |
| 3098 | } |
| 3099 | |
| 3100 | return FALSE; |
| 3101 | } |
| 3102 | |
| 3103 | //-------------------------------------------------------------------------------------- |
| 3104 | // Checks to see if the oject file exists for a given shader |
nothing calls this directly
no outgoing calls
no test coverage detected