mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
ProgramBuilder: Migrate any remaining types to typ::*
Used as a stepping stone to emitting the ast::Types instead. Bug: tint:724 Change-Id: Ib2d6c150fe8aa7c1e2c502676922b14b1518a4be Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/48686 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
7241a504f0
commit
e204f27f86
@@ -1897,7 +1897,7 @@ sem::Pointer* ParserImpl::GetTypeForHandleVar(
|
||||
// Construct the Tint handle type.
|
||||
sem::Type* ast_store_type = nullptr;
|
||||
if (usage.IsSampler()) {
|
||||
ast_store_type = builder_.create<sem::Sampler>(
|
||||
ast_store_type = builder_.ty.sampler(
|
||||
usage.IsComparisonSampler() ? ast::SamplerKind::kComparisonSampler
|
||||
: ast::SamplerKind::kSampler);
|
||||
} else if (usage.IsTexture()) {
|
||||
|
||||
@@ -38,7 +38,7 @@ TEST_F(ParserImplTest, TypeDecl_ParsesType) {
|
||||
TEST_F(ParserImplTest, TypeDecl_ParsesStruct_Ident) {
|
||||
auto p = parser("type a = B");
|
||||
|
||||
auto* str = Structure(p->builder().Symbols().Register("B"), {});
|
||||
auto str = Structure(p->builder().Symbols().Register("B"), {});
|
||||
p->register_constructed("B", str);
|
||||
|
||||
auto t = p->type_alias();
|
||||
|
||||
@@ -746,7 +746,7 @@ TEST_F(ParserImplTest, TypeDecl_Sampler) {
|
||||
auto p = parser("sampler");
|
||||
|
||||
auto& builder = p->builder();
|
||||
auto* type = builder.create<sem::Sampler>(ast::SamplerKind::kSampler);
|
||||
auto type = builder.ty.sampler(ast::SamplerKind::kSampler);
|
||||
|
||||
auto t = p->type_decl();
|
||||
EXPECT_TRUE(t.matched);
|
||||
|
||||
@@ -115,7 +115,7 @@ TEST_F(ParserImplTest, VariableIdentDecl_ParsesWithAccessDeco_Read) {
|
||||
ast::DecorationList decos;
|
||||
decos.push_back(block_deco);
|
||||
|
||||
auto* s = Structure(Sym("S"), members, decos);
|
||||
auto s = Structure(Sym("S"), members, decos);
|
||||
|
||||
p->register_constructed("S", s);
|
||||
|
||||
@@ -139,7 +139,7 @@ TEST_F(ParserImplTest, VariableIdentDecl_ParsesWithAccessDeco_ReadWrite) {
|
||||
ast::DecorationList decos;
|
||||
decos.push_back(block_deco);
|
||||
|
||||
auto* s = Structure(Sym("S"), members, decos);
|
||||
auto s = Structure(Sym("S"), members, decos);
|
||||
|
||||
p->register_constructed("S", s);
|
||||
|
||||
@@ -163,7 +163,7 @@ TEST_F(ParserImplTest, VariableIdentDecl_MultipleAccessDecoFail) {
|
||||
ast::DecorationList decos;
|
||||
decos.push_back(block_deco);
|
||||
|
||||
auto* s = Structure(Sym("S"), members, decos);
|
||||
auto s = Structure(Sym("S"), members, decos);
|
||||
|
||||
p->register_constructed("S", s);
|
||||
|
||||
@@ -184,7 +184,7 @@ TEST_F(ParserImplTest, VariableIdentDecl_MultipleAccessDeco_MultiBlock_Fail) {
|
||||
ast::DecorationList decos;
|
||||
decos.push_back(block_deco);
|
||||
|
||||
auto* s = Structure(Sym("S"), members, decos);
|
||||
auto s = Structure(Sym("S"), members, decos);
|
||||
|
||||
p->register_constructed("S", s);
|
||||
|
||||
@@ -221,7 +221,7 @@ TEST_F(ParserImplTest, VariableIdentDecl_NonAccessDecoFail) {
|
||||
ast::DecorationList decos;
|
||||
decos.push_back(block_deco);
|
||||
|
||||
auto* s = Structure(Sym("S"), members, decos);
|
||||
auto s = Structure(Sym("S"), members, decos);
|
||||
|
||||
p->register_constructed("S", s);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user