mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-15 08:06:19 +00:00
Add tint::Program as a wrapper of tint::ast::Module.
`tint::Program` will become the new public API object for a parsed shader program. For now, have Program be a simple wrapper around ast::Module so we can migrate Dawn's use of the public tint API. Add new Program variants of public APIs for places that returned or took a Module. Remove Reset() methods from Generators, they aren't used, and make the migration harder. Change-Id: Ic5bee46ceb109ea591ba7fec33685220b244a1ae Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/38540 Reviewed-by: dan sinclair <dsinclair@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
aee7acaaea
commit
d59cedb5a5
@@ -21,6 +21,7 @@
|
||||
#include "src/ast/module.h"
|
||||
#include "src/diagnostic/diagnostic.h"
|
||||
#include "src/diagnostic/formatter.h"
|
||||
#include "src/program.h"
|
||||
|
||||
namespace tint {
|
||||
namespace reader {
|
||||
@@ -49,6 +50,9 @@ class Reader {
|
||||
/// @returns the module. The module in the parser will be reset after this.
|
||||
virtual ast::Module module() = 0;
|
||||
|
||||
/// @returns the program. The module in the parser will be reset after this.
|
||||
Program program() { return Program{module()}; }
|
||||
|
||||
protected:
|
||||
/// Constructor
|
||||
Reader();
|
||||
|
||||
Reference in New Issue
Block a user