MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / DumpShader

Function DumpShader

tools/reduce/reduce.cpp:244–250  ·  view source on GitHub ↗

Dumps |binary| to file |filename|. Useful for interactive debugging.

Source from the content-addressed store, hash-verified

242
243// Dumps |binary| to file |filename|. Useful for interactive debugging.
244void DumpShader(const std::vector<uint32_t>& binary, const char* filename) {
245 auto write_file_succeeded =
246 WriteFile(filename, "wb", &binary[0], binary.size());
247 if (!write_file_succeeded) {
248 std::cerr << "Failed to dump shader" << std::endl;
249 }
250}
251
252// Dumps the SPIRV-V module in |context| to file |filename|. Useful for
253// interactive debugging.

Callers

nothing calls this directly

Calls 4

WriteFileFunction · 0.85
sizeMethod · 0.45
ToBinaryMethod · 0.45
moduleMethod · 0.45

Tested by

no test coverage detected