2
3
4
5
6
19
20
21
22
23
24
30
31
35
36
40
41
42
43
45 const GFSDK_Aftermath_ShaderBinaryHash& shaderHash ,
46 std::vector<uint8_t>& shader
50
51
52
53
55 const GFSDK_Aftermath_ShaderDebugName& shaderDebugName ,
56 std::vector<uint8_t>& shader
60
61
62
66
67
68
72
73
74
75
79
80
81
82
88
89
90
91
92
93 static bool ReadFile(
const char* filename, std::vector<uint8_t>& data);
96
97
101
102
#define AFTERMATH_CHECK_ERROR(FC)
Helper macro for checking Nsight Aftermath results and throwing exception in case of a failure.
#define SPICES_PROFILE_ZONE
virtual ~ShaderDataBase()=default
Destructor Function.
void AddShaderSource(std::vector< uint8_t > spirv)
Add a shader source to m_ShaderBinaries.
ShaderDataBase()
Constructor Function.
static bool ReadFile(const char *filename, std::vector< uint8_t > &data)
Read a file.
bool FindShaderBinaryWithDebugData(const GFSDK_Aftermath_ShaderDebugName &shaderDebugName, std::vector< uint8_t > &shader) const
Find a source shader debug info by shader debug name generated by the DXC compiler.
void AddShaderBinary(const char *shaderFilePath)
Add a shader binary to m_ShaderBinaries.
void AddShaderBinaryWithDebugInfo(const char *strippedShaderFilePath, const char *shaderFilePath)
Add a shader binary with debug info to m_ShaderBinariesWithDebugInfo.
bool FindShaderBinary(const GFSDK_Aftermath_ShaderBinaryHash &shaderHash, std::vector< uint8_t > &shader) const
Find a shader bytecode binary by shader hash.
void AddShaderSourceWithDebugInfo(std::vector< uint8_t > strippedSpirv, std::vector< uint8_t > spirv)
Add a shader Source with debug info to m_ShaderBinariesWithDebugInfo.
Implements a very simple shader database to help demonstrate how to use the Nsight Aftermath GPU cras...