SpiecsEngine
 
Loading...
Searching...
No Matches
Spices::ShaderDataBase Class Reference

Implements a very simple shader database to help demonstrate how to use the Nsight Aftermath GPU crash dump decoder API. More...

#include <NsightAftermathShaderDatabase.h>

Public Member Functions

 ShaderDataBase ()
 Constructor Function.
 
virtual ~ShaderDataBase ()=default
 Destructor Function.
 
bool FindShaderBinary (const GFSDK_Aftermath_ShaderBinaryHash &shaderHash, std::vector< uint8_t > &shader) const
 Find a shader bytecode binary by shader hash.
 
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 AddShaderSource (std::vector< uint8_t > spirv)
 Add a shader source to m_ShaderBinaries.
 
void AddShaderBinaryWithDebugInfo (const char *strippedShaderFilePath, const char *shaderFilePath)
 Add a shader binary with debug info to m_ShaderBinariesWithDebugInfo.
 
void AddShaderSourceWithDebugInfo (std::vector< uint8_t > strippedSpirv, std::vector< uint8_t > spirv)
 Add a shader Source with debug info to m_ShaderBinariesWithDebugInfo.
 

Static Private Member Functions

static bool ReadFile (const char *filename, std::vector< uint8_t > &data)
 Read a file.
 

Private Attributes

std::map< GFSDK_Aftermath_ShaderBinaryHash, std::vector< uint8_t > > m_ShaderBinaries
 List of shader binaries by ShaderBinaryHash.
 
std::map< GFSDK_Aftermath_ShaderDebugName, std::vector< uint8_t > > m_ShaderBinariesWithDebugInfo
 List of available shader binaries with source debug information by ShaderDebugName.
 

Detailed Description

Implements a very simple shader database to help demonstrate how to use the Nsight Aftermath GPU crash dump decoder API.

In a real world scenario this would be part of an offline analysis tool. This is for demonstration purposes only!

Definition at line 25 of file NsightAftermathShaderDatabase.h.


The documentation for this class was generated from the following files: