From 06176633ecd13965a277a85c5e2b71edf2fe38ac Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Wed, 12 Aug 2020 17:49:09 +0000 Subject: [PATCH] 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 Commit-Queue: Ryan Harrison Reviewed-by: Ryan Harrison --- samples/main.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/samples/main.cc b/samples/main.cc index e6b4ab84ea..eecb85809e 100644 --- a/samples/main.cc +++ b/samples/main.cc @@ -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(writer.get()); if (!WriteFile(options.output_file, "w", w->result())) { return 1; } } -#endif // TINT_BUILD_WGSL_WRITER || TINT_BUILD_MSL_WRITER return 0; }