diff --git a/src/reader/spirv/parser_impl.h b/src/reader/spirv/parser_impl.h index 27255c71fa..5e5e5ddc1a 100644 --- a/src/reader/spirv/parser_impl.h +++ b/src/reader/spirv/parser_impl.h @@ -102,6 +102,14 @@ class ParserImpl : Reader { /// @returns the accumulated error string const std::string error() { return errors_.str(); } + /// Changes pipeline IO to be HLSL-style: as entry point parameters and + /// return. + /// TODO(crbug.com/tint/508): Once all this support has landed, switch + /// over to that, and remove the old support. + void SetHLSLStylePipelineIO() { hlsl_style_pipeline_io_ = true; } + /// @returns true if HLSL-style IO should be used. + bool UseHLSLStylePipelineIO() const { return hlsl_style_pipeline_io_; } + /// Builds an internal representation of the SPIR-V binary, /// and parses it into a Tint AST module. Diagnostics are emitted /// to the error stream. @@ -672,6 +680,10 @@ class ParserImpl : Reader { /// See also BuiltInPositionInfo which is a separate mechanism for a more /// complex case of replacing an entire structure. BuiltInsMap special_builtins_; + + /// This is temporary while this module is converted to use the new style + /// of pipeline IO. + bool hlsl_style_pipeline_io_ = false; }; } // namespace spirv