Add a shader binary with debug info to m_ShaderBinariesWithDebugInfo.
- Parameters
-
| [in] | strippedShaderFilePath | . |
| [in] | shaderFilePath | . |
Read the shader debug data from the file.
Generate shader debug name.
Store the data for shader instruction address mapping when decoding GPU crash dumps. cf. FindShaderBinaryWithDebugData()
Read the shader debug data from the file.
Generate shader debug name.
Store the data for shader instruction address mapping when decoding GPU crash dumps. cf. FindShaderBinaryWithDebugData()
Definition at line 94 of file NsightAftermathShaderDatabase.cpp.
95 {
97
101 std::vector<uint8_t> data;
102 if (!
ReadFile(shaderFilePath, data))
103 {
104 return;
105 }
106 std::vector<uint8_t> strippedData;
107 if (!
ReadFile(strippedShaderFilePath, strippedData))
108 {
109 return;
110 }
111
115 GFSDK_Aftermath_ShaderDebugName debugName;
116 const GFSDK_Aftermath_SpirvCode shader{ data.data(), static_cast<uint32_t>(data.size()) };
117 const GFSDK_Aftermath_SpirvCode strippedShader{ strippedData.data(), static_cast<uint32_t>(strippedData.size()) };
119 GFSDK_Aftermath_Version_API ,
120 &shader ,
121 &strippedShader ,
122 &debugName
123 ));
124
130 }
#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_ShaderDebugName, std::vector< uint8_t > > m_ShaderBinariesWithDebugInfo
List of available shader binaries with source debug information by ShaderDebugName.