Change output of string based data from sample app.
This CL updates the sample app to use the text writer in the case we are neither SPIRV-Asm or SPIRV. This fixes up an issue where HLSL was missing from the original if and caused it to not emit anything. Bug: tint:7 Change-Id: Iee493e9cec6c62df7c57a2584e61f623d5151029 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/26721 Commit-Queue: dan sinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
parent
eca0eaa006
commit
06176633ec
|
@ -494,14 +494,12 @@ int main(int argc, const char** argv) {
|
|||
}
|
||||
#endif // TINT_BUILD_SPV_WRITER
|
||||
|
||||
#if TINT_BUILD_WGSL_WRITER || TINT_BUILD_MSL_WRITER
|
||||
if (options.format == Format::kWgsl || options.format == Format::kMsl) {
|
||||
if (options.format != Format::kSpvAsm && options.format != Format::kSpirv) {
|
||||
auto* w = static_cast<tint::writer::Text*>(writer.get());
|
||||
if (!WriteFile(options.output_file, "w", w->result())) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
#endif // TINT_BUILD_WGSL_WRITER || TINT_BUILD_MSL_WRITER
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue