mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-03 03:35:59 +00:00
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
|
#endif // TINT_BUILD_SPV_WRITER
|
||||||
|
|
||||||
#if TINT_BUILD_WGSL_WRITER || TINT_BUILD_MSL_WRITER
|
if (options.format != Format::kSpvAsm && options.format != Format::kSpirv) {
|
||||||
if (options.format == Format::kWgsl || options.format == Format::kMsl) {
|
|
||||||
auto* w = static_cast<tint::writer::Text*>(writer.get());
|
auto* w = static_cast<tint::writer::Text*>(writer.get());
|
||||||
if (!WriteFile(options.output_file, "w", w->result())) {
|
if (!WriteFile(options.output_file, "w", w->result())) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // TINT_BUILD_WGSL_WRITER || TINT_BUILD_MSL_WRITER
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user