Dumps |binary| to file |filename|. Useful for interactive debugging.
| 242 | |
| 243 | // Dumps |binary| to file |filename|. Useful for interactive debugging. |
| 244 | void 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. |