Dumps |binary| to file |filename|. Useful for interactive debugging.
| 640 | |
| 641 | // Dumps |binary| to file |filename|. Useful for interactive debugging. |
| 642 | void DumpShader(const std::vector<uint32_t>& binary, const char* filename) { |
| 643 | auto write_file_succeeded = |
| 644 | WriteFile(filename, "wb", &binary[0], binary.size()); |
| 645 | if (!write_file_succeeded) { |
| 646 | std::cerr << "Failed to dump shader" << std::endl; |
| 647 | } |
| 648 | } |
| 649 | |
| 650 | // Dumps the SPIRV-V module in |context| to file |filename|. Useful for |
| 651 | // interactive debugging. |