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

Method CreateHashDigest

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

-------------------------------------------------------------------------------------- Creates Human-readable Hash Digest html file with hyperlinks links and plain filenames --------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1969// Creates Human-readable Hash Digest html file with hyperlinks links and plain filenames
1970//--------------------------------------------------------------------------------------
1971bool ShaderCache::CreateHashDigest( const std::list<Shader*>& i_ShaderList )
1972{
1973 FILE* pFile = NULL;
1974 wchar_t wsPathName[m_uPATHNAME_MAX_LENGTH];
1975 CreateFullPathFromOutputFilename( wsPathName, L"HashDigest.html" );
1976
1977 _wfopen_s( &pFile, wsPathName, L"w+,ccs=UTF-8" );
1978
1979 if (!pFile)
1980 {
1981 return false;
1982 }
1983
1984 HTMLWriter html( pFile, L"AMD ShaderCache Hash Digest", 0 ); // Refresh the page every 15 seconds
1985
1986 int tabID = 0;
1987 html.StartTabTable();
1988 for (std::list<Shader*>::const_iterator it = i_ShaderList.begin(); it != i_ShaderList.end(); it++)
1989 {
1990 Shader* pShader = *it;
1991 html.AddTab( ++tabID, pShader->m_wsRawFileName );
1992 }
1993 html.EndTabTableHeader();
1994
1995 tabID = 0;
1996 for (std::list<Shader*>::const_iterator it = i_ShaderList.begin(); it != i_ShaderList.end(); it++)
1997 {
1998 Shader* pShader = *it;
1999 wchar_t wsShaderInfoHTML[16384];
2000 swprintf_s( wsShaderInfoHTML, L"Raw Filename: %s<br>\n"
2001 L"Entry Point: %s<br>\n"
2002 L"Hashed Filename: %s<br>\n"
2003 L"ASM Target: %s<br>\n"
2004#if AMD_SDK_INTERNAL_BUILD
2005 L"ISA Target: %s<br>\n"
2006#endif
2007 L"<br>\n"
2008 L"Source HLSL File: <a href=\"%s\">%s</a><br>\n"
2009 L"Preprocess File: <a href=\"%s\">%s</a><br>\n"
2010 L"Assembly File: <a href=\"%s\">%s</a><br>\n"
2011 L"Object File: <a href=\"%s\">%s</a><br>\n"
2012 L"Error File: <a href=\"%s\">%s</a><br>\n"
2013 L"Hash File: <a href=\"%s\">%s</a><br>\n"
2014#if AMD_SDK_INTERNAL_BUILD
2015 L"ISA File: <a href=\"%s\">%s</a><br>\n"
2016 L"ISA Dir: <a href=\"Shaders\\ScDev\\%s\\%s\">Shaders\\ScDev\\%s\\%s</a><br>\n"
2017#endif
2018 L"<br>\n"
2019 L"Compile Status: %s<br>\n"
2020 L"Compile Timing: %i<br>\n"
2021 L"Processing?: %s<br>\n"
2022 L"Up-to-date?: %s<br>\n"
2023#if AMD_SDK_INTERNAL_BUILD
2024 L"ISA Generated: %s<br>\n"
2025 L"<br>\n"
2026 L"GPR Pressure: <br>\n"
2027 L"Current VGPR: %i SGPR: %i<br>\n"
2028 L"Previous VGPR: %i SGPR: %i<br>\n"

Callers

nothing calls this directly

Calls 8

StartTabTableMethod · 0.80
AddTabMethod · 0.80
EndTabTableHeaderMethod · 0.80
AddTabBodyMethod · 0.80
EndTabTableMethod · 0.80
writeHTMLMethod · 0.80
AddFileTableRowMethod · 0.80
FinishHTMLMethod · 0.80

Tested by

no test coverage detected