Add a shader binary to m_ShaderBinaries.
- Parameters
-
Read the shader binary code from the file.
Create shader hash for the shader.
Store the data for shader mapping when decoding GPU crash dumps. cf. FindShaderBinary()
Read the shader binary code from the file.
Create shader hash for the shader.
Store the data for shader mapping when decoding GPU crash dumps. cf. FindShaderBinary()
Definition at line 41 of file NsightAftermathShaderDatabase.cpp.
42 {
44
48 std::vector<uint8_t> data;
50 {
51 return;
52 }
53
57 const GFSDK_Aftermath_SpirvCode shader{ data.data(), uint32_t(data.size()) };
58 GFSDK_Aftermath_ShaderBinaryHash shaderHash;
60 GFSDK_Aftermath_Version_API ,
61 &shader ,
62 &shaderHash
63 ));
64
70 }
#define AFTERMATH_CHECK_ERROR(FC)
Helper macro for checking Nsight Aftermath results and throwing exception in case of a failure.
#define SPICES_PROFILE_ZONE
static bool ReadFile(const char *filename, std::vector< uint8_t > &data)
Read a file.
std::map< GFSDK_Aftermath_ShaderBinaryHash, std::vector< uint8_t > > m_ShaderBinaries
List of shader binaries by ShaderBinaryHash.