```diff vkd3d_compute_dxbc_checksum(data, data_size, calculated_checksum); - if (memcmp(checksum, calculated_checksum, sizeof(checksum))) + if (memcmp(checksum, calculated_checksum, sizeof(checksum)) + && !(flags & VKD3D_SHADER_PARSE_DXBC_IGNORE_CHECKSUM)) ```
It probably doesn't matter too much, but it seems like a bit of a waste to do the memcmp() if we're going to ignore the checksum anyway. In principle that's true for the vkd3d_compute_dxbc_checksum() call as well.
```diff + case 'e': + case OPTION_EMIT: + action = action_push(options, ACTION_TYPE_EMIT); + if (!options->output_filename) + { + fprintf(stderr, "No output filename specified.\n"); + return false; + } ```
Is that a problem? We could just write to stdout, right? In fact, I'd argue for just outputting to stdout in the initial commit, and then adding --output support in a separate commit.
```diff + " -o, --output=<file> Re-serialize the DXBC shader to <file>. This is useful\n" + " in combination with --ignore-checksum to fix bad or\n" + " missing checksums.\n" ```
That doesn't quite match what the code does now. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/582#note_63732