mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 18:29:23 +00:00
ast/function: Remove [set|add]_decorations()
Move them to the constructor Bug: tint:390 Change-Id: I30bb6a1de060b790bf5202194d020d4e3889a307 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/35008 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
9838768599
commit
234b7de460
@@ -46,11 +46,11 @@ class VertexPullingHelper {
|
||||
|
||||
// Create basic module with an entry point and vertex function
|
||||
void InitBasicModule() {
|
||||
auto* func = create<ast::Function>("main", ast::VariableList{},
|
||||
mod_->create<ast::type::Void>(),
|
||||
create<ast::BlockStatement>());
|
||||
func->add_decoration(
|
||||
create<ast::StageDecoration>(ast::PipelineStage::kVertex, Source{}));
|
||||
auto* func = create<ast::Function>(
|
||||
Source{}, "main", ast::VariableList{}, mod_->create<ast::type::Void>(),
|
||||
create<ast::BlockStatement>(),
|
||||
ast::FunctionDecorationList{create<ast::StageDecoration>(
|
||||
ast::PipelineStage::kVertex, Source{})});
|
||||
mod()->AddFunction(func);
|
||||
}
|
||||
|
||||
@@ -128,11 +128,12 @@ TEST_F(VertexPullingTest, Error_InvalidEntryPoint) {
|
||||
}
|
||||
|
||||
TEST_F(VertexPullingTest, Error_EntryPointWrongStage) {
|
||||
auto* func = create<ast::Function>("main", ast::VariableList{},
|
||||
mod()->create<ast::type::Void>(),
|
||||
create<ast::BlockStatement>());
|
||||
func->add_decoration(
|
||||
create<ast::StageDecoration>(ast::PipelineStage::kFragment, Source{}));
|
||||
auto* func = create<ast::Function>(
|
||||
Source{}, "main", ast::VariableList{}, mod()->create<ast::type::Void>(),
|
||||
create<ast::BlockStatement>(),
|
||||
ast::FunctionDecorationList{
|
||||
create<ast::StageDecoration>(ast::PipelineStage::kFragment, Source{}),
|
||||
});
|
||||
mod()->AddFunction(func);
|
||||
|
||||
InitTransform({});
|
||||
|
||||
Reference in New Issue
Block a user