diff --git a/src/tint/reader/wgsl/parser_impl.cc b/src/tint/reader/wgsl/parser_impl.cc index bf26f8e7d6..840e16d207 100644 --- a/src/tint/reader/wgsl/parser_impl.cc +++ b/src/tint/reader/wgsl/parser_impl.cc @@ -690,20 +690,20 @@ Maybe ParserImpl::variable_decl() { return VarDeclInfo{decl->source, decl->name, vq.storage_class, vq.access, decl->type}; } -// texture_samplers -// : sampler -// | depth_texture -// | sampled_texture LESS_THAN type_decl GREATER_THAN -// | multisampled_texture LESS_THAN type_decl GREATER_THAN -// | storage_texture LESS_THAN texel_format -// COMMA access GREATER_THAN -Maybe ParserImpl::texture_samplers() { - auto type = sampler(); +// texture_and_sampler_types +// : sampler_type +// | depth_texture_type +// | sampled_texture_type LESS_THAN type_decl GREATER_THAN +// | multisampled_texture_type LESS_THAN type_decl GREATER_THAN +// | storage_texture_type LESS_THAN texel_format +// COMMA access_mode GREATER_THAN +Maybe ParserImpl::texture_and_sampler_types() { + auto type = sampler_type(); if (type.matched) { return type; } - type = depth_texture(); + type = depth_texture_type(); if (type.matched) { return type; } @@ -715,7 +715,7 @@ Maybe ParserImpl::texture_samplers() { auto source_range = make_source_range(); - auto dim = sampled_texture(); + auto dim = sampled_texture_type(); if (dim.matched) { const char* use = "sampled texture type"; @@ -727,7 +727,7 @@ Maybe ParserImpl::texture_samplers() { return builder_.ty.sampled_texture(source_range, dim.value, subtype.value); } - auto ms_dim = multisampled_texture(); + auto ms_dim = multisampled_texture_type(); if (ms_dim.matched) { const char* use = "multisampled texture type"; @@ -739,7 +739,7 @@ Maybe ParserImpl::texture_samplers() { return builder_.ty.multisampled_texture(source_range, ms_dim.value, subtype.value); } - auto storage = storage_texture(); + auto storage = storage_texture_type(); if (storage.matched) { const char* use = "storage texture type"; using StorageTextureInfo = std::pair; @@ -753,7 +753,7 @@ Maybe ParserImpl::texture_samplers() { return Failure::kErrored; } - auto access = expect_access("access control"); + auto access = expect_access_mode("access control"); if (access.errored) { return Failure::kErrored; } @@ -772,10 +772,10 @@ Maybe ParserImpl::texture_samplers() { return Failure::kNoMatch; } -// sampler +// sampler_type // : SAMPLER // | SAMPLER_COMPARISON -Maybe ParserImpl::sampler() { +Maybe ParserImpl::sampler_type() { Source source; if (match(Token::Type::kSampler, &source)) { return builder_.ty.sampler(source, ast::SamplerKind::kSampler); @@ -788,14 +788,14 @@ Maybe ParserImpl::sampler() { return Failure::kNoMatch; } -// sampled_texture +// sampled_texture_type // : TEXTURE_SAMPLED_1D // | TEXTURE_SAMPLED_2D // | TEXTURE_SAMPLED_2D_ARRAY // | TEXTURE_SAMPLED_3D // | TEXTURE_SAMPLED_CUBE // | TEXTURE_SAMPLED_CUBE_ARRAY -Maybe ParserImpl::sampled_texture() { +Maybe ParserImpl::sampled_texture_type() { if (match(Token::Type::kTextureSampled1d)) { return ast::TextureDimension::k1d; } @@ -834,9 +834,9 @@ Maybe ParserImpl::external_texture() { return Failure::kNoMatch; } -// multisampled_texture +// multisampled_texture_type // : TEXTURE_MULTISAMPLED_2D -Maybe ParserImpl::multisampled_texture() { +Maybe ParserImpl::multisampled_texture_type() { if (match(Token::Type::kTextureMultisampled2d)) { return ast::TextureDimension::k2d; } @@ -844,12 +844,12 @@ Maybe ParserImpl::multisampled_texture() { return Failure::kNoMatch; } -// storage_texture +// storage_texture_type // : TEXTURE_STORAGE_1D // | TEXTURE_STORAGE_2D // | TEXTURE_STORAGE_2D_ARRAY // | TEXTURE_STORAGE_3D -Maybe ParserImpl::storage_texture() { +Maybe ParserImpl::storage_texture_type() { if (match(Token::Type::kTextureStorage1d)) { return ast::TextureDimension::k1d; } @@ -866,13 +866,13 @@ Maybe ParserImpl::storage_texture() { return Failure::kNoMatch; } -// depth_texture +// depth_texture_type // : TEXTURE_DEPTH_2D // | TEXTURE_DEPTH_2D_ARRAY // | TEXTURE_DEPTH_CUBE // | TEXTURE_DEPTH_CUBE_ARRAY // | TEXTURE_DEPTH_MULTISAMPLED_2D -Maybe ParserImpl::depth_texture() { +Maybe ParserImpl::depth_texture_type() { Source source; if (match(Token::Type::kTextureDepth2d, &source)) { return builder_.ty.depth_texture(source, ast::TextureDimension::k2d); @@ -962,7 +962,7 @@ Expect ParserImpl::expect_variable_ident_decl(std:: // : 'read' // | 'write' // | 'read_write' -Expect ParserImpl::expect_access(std::string_view use) { +Expect ParserImpl::expect_access_mode(std::string_view use) { auto ident = expect_ident(use); if (ident.errored) { return Failure::kErrored; @@ -996,7 +996,7 @@ Maybe ParserImpl::variable_qualifier() { return Failure::kErrored; } if (match(Token::Type::kComma)) { - auto ac = expect_access(use); + auto ac = expect_access_mode(use); if (ac.errored) { return Failure::kErrored; } @@ -1064,7 +1064,7 @@ Maybe ParserImpl::type_alias_decl() { // | MAT4x2 LESS_THAN type_decl GREATER_THAN // | MAT4x3 LESS_THAN type_decl GREATER_THAN // | MAT4x4 LESS_THAN type_decl GREATER_THAN -// | texture_samplers +// | texture_and_sampler_types Maybe ParserImpl::type_decl() { auto& t = peek(); Source source; @@ -1114,7 +1114,7 @@ Maybe ParserImpl::type_decl() { return expect_type_decl_matrix(t); } - auto texture_or_sampler = texture_samplers(); + auto texture_or_sampler = texture_and_sampler_types(); if (texture_or_sampler.errored) { return Failure::kErrored; } @@ -1159,7 +1159,7 @@ Expect ParserImpl::expect_type_decl_pointer(const Token& t) { } if (match(Token::Type::kComma)) { - auto ac = expect_access("access control"); + auto ac = expect_access_mode("access control"); if (ac.errored) { return Failure::kErrored; } @@ -1603,18 +1603,18 @@ Expect ParserImpl::expect_interpolation_type_name() { } // builtin_value_name -// : 'vertex_index' -// | 'instance_index' -// | 'position' -// | 'front_facing' -// | 'frag_depth' -// | 'local_invocation_id' -// | 'local_invocation_index' -// | 'global_invocation_id' -// | 'workgroup_id' -// | 'num_workgroups' -// | 'sample_index' -// | 'sample_mask' +// : frag_depth +// | front_facing +// | global_invocation_id +// | instance_index +// | local_invocation_id +// | local_invocation_index +// | num_workgroups +// | position +// | sample_index +// | sample_mask +// | vertex_index +// | workgroup_id Expect ParserImpl::expect_builtin() { auto ident = expect_ident("builtin"); if (ident.errored) { @@ -3186,8 +3186,8 @@ Maybe ParserImpl::assignment_statement() { // | FLOAT_LITERAL // | bool_literal // -// bool_literal: -// | TRUE +// bool_literal +// : TRUE // | FALSE Maybe ParserImpl::const_literal() { auto& t = peek(); diff --git a/src/tint/reader/wgsl/parser_impl.h b/src/tint/reader/wgsl/parser_impl.h index 14f86d5ab6..4e6b0fb226 100644 --- a/src/tint/reader/wgsl/parser_impl.h +++ b/src/tint/reader/wgsl/parser_impl.h @@ -453,26 +453,26 @@ class ParserImpl { /// by the declaration, then this vector is cleared before returning. /// @returns the parsed function, nullptr otherwise Maybe function_decl(AttributeList& attrs); - /// Parses a `texture_samplers` grammar element + /// Parses a `texture_and_sampler_types` grammar element /// @returns the parsed Type or nullptr if none matched. - Maybe texture_samplers(); - /// Parses a `sampler` grammar element + Maybe texture_and_sampler_types(); + /// Parses a `sampler_type` grammar element /// @returns the parsed Type or nullptr if none matched. - Maybe sampler(); - /// Parses a `multisampled_texture` grammar element + Maybe sampler_type(); + /// Parses a `multisampled_texture_type` grammar element /// @returns returns the multisample texture dimension or kNone if none /// matched. - Maybe multisampled_texture(); - /// Parses a `sampled_texture` grammar element + Maybe multisampled_texture_type(); + /// Parses a `sampled_texture_type` grammar element /// @returns returns the sample texture dimension or kNone if none matched. - Maybe sampled_texture(); - /// Parses a `storage_texture` grammar element + Maybe sampled_texture_type(); + /// Parses a `storage_texture_type` grammar element /// @returns returns the storage texture dimension. /// Returns kNone if none matched. - Maybe storage_texture(); - /// Parses a `depth_texture` grammar element + Maybe storage_texture_type(); + /// Parses a `depth_texture_type` grammar element /// @returns the parsed Type or nullptr if none matched. - Maybe depth_texture(); + Maybe depth_texture_type(); /// Parses a 'texture_external_type' grammar element /// @returns the parsed Type or nullptr if none matched Maybe external_texture(); @@ -500,7 +500,7 @@ class ParserImpl { /// match a valid access control. /// @param use a description of what was being parsed if an error was raised /// @returns the parsed access control. - Expect expect_access(std::string_view use); + Expect expect_access_mode(std::string_view use); /// Parses an interpolation sample name identifier, erroring if the next token does not match a /// valid sample name. /// @returns the parsed sample name. diff --git a/src/tint/reader/wgsl/parser_impl_depth_texture_test.cc b/src/tint/reader/wgsl/parser_impl_depth_texture_test.cc index 6c70bd3a66..78c4b8dfec 100644 --- a/src/tint/reader/wgsl/parser_impl_depth_texture_test.cc +++ b/src/tint/reader/wgsl/parser_impl_depth_texture_test.cc @@ -20,7 +20,7 @@ namespace { TEST_F(ParserImplTest, DepthTextureType_Invalid) { auto p = parser("1234"); - auto t = p->depth_texture(); + auto t = p->depth_texture_type(); EXPECT_FALSE(t.matched); EXPECT_FALSE(t.errored); EXPECT_FALSE(p->has_error()); @@ -28,7 +28,7 @@ TEST_F(ParserImplTest, DepthTextureType_Invalid) { TEST_F(ParserImplTest, DepthTextureType_2d) { auto p = parser("texture_depth_2d"); - auto t = p->depth_texture(); + auto t = p->depth_texture_type(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); ASSERT_NE(t.value, nullptr); @@ -41,7 +41,7 @@ TEST_F(ParserImplTest, DepthTextureType_2d) { TEST_F(ParserImplTest, DepthTextureType_2dArray) { auto p = parser("texture_depth_2d_array"); - auto t = p->depth_texture(); + auto t = p->depth_texture_type(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); ASSERT_NE(t.value, nullptr); @@ -54,7 +54,7 @@ TEST_F(ParserImplTest, DepthTextureType_2dArray) { TEST_F(ParserImplTest, DepthTextureType_Cube) { auto p = parser("texture_depth_cube"); - auto t = p->depth_texture(); + auto t = p->depth_texture_type(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); ASSERT_NE(t.value, nullptr); @@ -67,7 +67,7 @@ TEST_F(ParserImplTest, DepthTextureType_Cube) { TEST_F(ParserImplTest, DepthTextureType_CubeArray) { auto p = parser("texture_depth_cube_array"); - auto t = p->depth_texture(); + auto t = p->depth_texture_type(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); ASSERT_NE(t.value, nullptr); @@ -80,7 +80,7 @@ TEST_F(ParserImplTest, DepthTextureType_CubeArray) { TEST_F(ParserImplTest, DepthTextureType_Multisampled2d) { auto p = parser("texture_depth_multisampled_2d"); - auto t = p->depth_texture(); + auto t = p->depth_texture_type(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); ASSERT_NE(t.value, nullptr); diff --git a/src/tint/reader/wgsl/parser_impl_sampled_texture_test.cc b/src/tint/reader/wgsl/parser_impl_sampled_texture_test.cc index cf9f0898a8..6aa1aab097 100644 --- a/src/tint/reader/wgsl/parser_impl_sampled_texture_test.cc +++ b/src/tint/reader/wgsl/parser_impl_sampled_texture_test.cc @@ -19,7 +19,7 @@ namespace { TEST_F(ParserImplTest, SampledTextureType_Invalid) { auto p = parser("1234"); - auto t = p->sampled_texture(); + auto t = p->sampled_texture_type(); EXPECT_FALSE(t.matched); EXPECT_FALSE(t.errored); EXPECT_FALSE(p->has_error()); @@ -27,7 +27,7 @@ TEST_F(ParserImplTest, SampledTextureType_Invalid) { TEST_F(ParserImplTest, SampledTextureType_1d) { auto p = parser("texture_1d"); - auto t = p->sampled_texture(); + auto t = p->sampled_texture_type(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); EXPECT_EQ(t.value, ast::TextureDimension::k1d); @@ -36,7 +36,7 @@ TEST_F(ParserImplTest, SampledTextureType_1d) { TEST_F(ParserImplTest, SampledTextureType_2d) { auto p = parser("texture_2d"); - auto t = p->sampled_texture(); + auto t = p->sampled_texture_type(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); EXPECT_EQ(t.value, ast::TextureDimension::k2d); @@ -45,7 +45,7 @@ TEST_F(ParserImplTest, SampledTextureType_2d) { TEST_F(ParserImplTest, SampledTextureType_2dArray) { auto p = parser("texture_2d_array"); - auto t = p->sampled_texture(); + auto t = p->sampled_texture_type(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); EXPECT_EQ(t.value, ast::TextureDimension::k2dArray); @@ -54,7 +54,7 @@ TEST_F(ParserImplTest, SampledTextureType_2dArray) { TEST_F(ParserImplTest, SampledTextureType_3d) { auto p = parser("texture_3d"); - auto t = p->sampled_texture(); + auto t = p->sampled_texture_type(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); EXPECT_EQ(t.value, ast::TextureDimension::k3d); @@ -63,7 +63,7 @@ TEST_F(ParserImplTest, SampledTextureType_3d) { TEST_F(ParserImplTest, SampledTextureType_Cube) { auto p = parser("texture_cube"); - auto t = p->sampled_texture(); + auto t = p->sampled_texture_type(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); EXPECT_EQ(t.value, ast::TextureDimension::kCube); @@ -72,7 +72,7 @@ TEST_F(ParserImplTest, SampledTextureType_Cube) { TEST_F(ParserImplTest, SampledTextureType_kCubeArray) { auto p = parser("texture_cube_array"); - auto t = p->sampled_texture(); + auto t = p->sampled_texture_type(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); EXPECT_EQ(t.value, ast::TextureDimension::kCubeArray); diff --git a/src/tint/reader/wgsl/parser_impl_sampler_test.cc b/src/tint/reader/wgsl/parser_impl_sampler_test.cc index 7f1e5645b8..bd3c2d39aa 100644 --- a/src/tint/reader/wgsl/parser_impl_sampler_test.cc +++ b/src/tint/reader/wgsl/parser_impl_sampler_test.cc @@ -19,7 +19,7 @@ namespace { TEST_F(ParserImplTest, SamplerType_Invalid) { auto p = parser("1234"); - auto t = p->sampler(); + auto t = p->sampler_type(); EXPECT_FALSE(t.matched); EXPECT_FALSE(t.errored); EXPECT_EQ(t.value, nullptr); @@ -28,7 +28,7 @@ TEST_F(ParserImplTest, SamplerType_Invalid) { TEST_F(ParserImplTest, SamplerType_Sampler) { auto p = parser("sampler"); - auto t = p->sampler(); + auto t = p->sampler_type(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); ASSERT_NE(t.value, nullptr); @@ -40,7 +40,7 @@ TEST_F(ParserImplTest, SamplerType_Sampler) { TEST_F(ParserImplTest, SamplerType_ComparisonSampler) { auto p = parser("sampler_comparison"); - auto t = p->sampler(); + auto t = p->sampler_type(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); ASSERT_NE(t.value, nullptr); diff --git a/src/tint/reader/wgsl/parser_impl_storage_texture_test.cc b/src/tint/reader/wgsl/parser_impl_storage_texture_test.cc index 6297a1ef27..528f3a4e7c 100644 --- a/src/tint/reader/wgsl/parser_impl_storage_texture_test.cc +++ b/src/tint/reader/wgsl/parser_impl_storage_texture_test.cc @@ -19,7 +19,7 @@ namespace { TEST_F(ParserImplTest, StorageTextureType_Invalid) { auto p = parser("abc"); - auto t = p->storage_texture(); + auto t = p->storage_texture_type(); EXPECT_FALSE(t.matched); EXPECT_FALSE(t.errored); EXPECT_FALSE(p->has_error()); @@ -27,7 +27,7 @@ TEST_F(ParserImplTest, StorageTextureType_Invalid) { TEST_F(ParserImplTest, StorageTextureType_1d) { auto p = parser("texture_storage_1d"); - auto t = p->storage_texture(); + auto t = p->storage_texture_type(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); EXPECT_EQ(t.value, ast::TextureDimension::k1d); @@ -36,7 +36,7 @@ TEST_F(ParserImplTest, StorageTextureType_1d) { TEST_F(ParserImplTest, StorageTextureType_2d) { auto p = parser("texture_storage_2d"); - auto t = p->storage_texture(); + auto t = p->storage_texture_type(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); EXPECT_EQ(t.value, ast::TextureDimension::k2d); @@ -45,7 +45,7 @@ TEST_F(ParserImplTest, StorageTextureType_2d) { TEST_F(ParserImplTest, StorageTextureType_2dArray) { auto p = parser("texture_storage_2d_array"); - auto t = p->storage_texture(); + auto t = p->storage_texture_type(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); EXPECT_EQ(t.value, ast::TextureDimension::k2dArray); @@ -54,7 +54,7 @@ TEST_F(ParserImplTest, StorageTextureType_2dArray) { TEST_F(ParserImplTest, StorageTextureType_3d) { auto p = parser("texture_storage_3d"); - auto t = p->storage_texture(); + auto t = p->storage_texture_type(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); EXPECT_EQ(t.value, ast::TextureDimension::k3d); diff --git a/src/tint/reader/wgsl/parser_impl_texture_sampler_test.cc b/src/tint/reader/wgsl/parser_impl_texture_sampler_test.cc index 162b41c15b..1143c5215a 100644 --- a/src/tint/reader/wgsl/parser_impl_texture_sampler_test.cc +++ b/src/tint/reader/wgsl/parser_impl_texture_sampler_test.cc @@ -22,7 +22,7 @@ namespace { TEST_F(ParserImplTest, TextureSamplerTypes_Invalid) { auto p = parser("1234"); - auto t = p->texture_samplers(); + auto t = p->texture_and_sampler_types(); EXPECT_EQ(t.value, nullptr); EXPECT_FALSE(t.matched); EXPECT_FALSE(t.errored); @@ -31,7 +31,7 @@ TEST_F(ParserImplTest, TextureSamplerTypes_Invalid) { TEST_F(ParserImplTest, TextureSamplerTypes_Sampler) { auto p = parser("sampler"); - auto t = p->texture_samplers(); + auto t = p->texture_and_sampler_types(); ASSERT_FALSE(p->has_error()) << p->error(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); @@ -43,7 +43,7 @@ TEST_F(ParserImplTest, TextureSamplerTypes_Sampler) { TEST_F(ParserImplTest, TextureSamplerTypes_SamplerComparison) { auto p = parser("sampler_comparison"); - auto t = p->texture_samplers(); + auto t = p->texture_and_sampler_types(); ASSERT_FALSE(p->has_error()) << p->error(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); @@ -55,7 +55,7 @@ TEST_F(ParserImplTest, TextureSamplerTypes_SamplerComparison) { TEST_F(ParserImplTest, TextureSamplerTypes_DepthTexture) { auto p = parser("texture_depth_2d"); - auto t = p->texture_samplers(); + auto t = p->texture_and_sampler_types(); ASSERT_FALSE(p->has_error()) << p->error(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); @@ -68,7 +68,7 @@ TEST_F(ParserImplTest, TextureSamplerTypes_DepthTexture) { TEST_F(ParserImplTest, TextureSamplerTypes_SampledTexture_F32) { auto p = parser("texture_1d"); - auto t = p->texture_samplers(); + auto t = p->texture_and_sampler_types(); ASSERT_FALSE(p->has_error()) << p->error(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); @@ -82,7 +82,7 @@ TEST_F(ParserImplTest, TextureSamplerTypes_SampledTexture_F32) { TEST_F(ParserImplTest, TextureSamplerTypes_SampledTexture_I32) { auto p = parser("texture_2d"); - auto t = p->texture_samplers(); + auto t = p->texture_and_sampler_types(); ASSERT_FALSE(p->has_error()) << p->error(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); @@ -96,7 +96,7 @@ TEST_F(ParserImplTest, TextureSamplerTypes_SampledTexture_I32) { TEST_F(ParserImplTest, TextureSamplerTypes_SampledTexture_U32) { auto p = parser("texture_3d"); - auto t = p->texture_samplers(); + auto t = p->texture_and_sampler_types(); ASSERT_FALSE(p->has_error()) << p->error(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); @@ -110,7 +110,7 @@ TEST_F(ParserImplTest, TextureSamplerTypes_SampledTexture_U32) { TEST_F(ParserImplTest, TextureSamplerTypes_SampledTexture_MissingType) { auto p = parser("texture_1d<>"); - auto t = p->texture_samplers(); + auto t = p->texture_and_sampler_types(); ASSERT_TRUE(p->has_error()); EXPECT_EQ(t.value, nullptr); EXPECT_FALSE(t.matched); @@ -120,7 +120,7 @@ TEST_F(ParserImplTest, TextureSamplerTypes_SampledTexture_MissingType) { TEST_F(ParserImplTest, TextureSamplerTypes_SampledTexture_MissingLessThan) { auto p = parser("texture_1d"); - auto t = p->texture_samplers(); + auto t = p->texture_and_sampler_types(); ASSERT_TRUE(p->has_error()); EXPECT_EQ(t.value, nullptr); EXPECT_FALSE(t.matched); @@ -130,7 +130,7 @@ TEST_F(ParserImplTest, TextureSamplerTypes_SampledTexture_MissingLessThan) { TEST_F(ParserImplTest, TextureSamplerTypes_SampledTexture_MissingGreaterThan) { auto p = parser("texture_1dtexture_samplers(); + auto t = p->texture_and_sampler_types(); ASSERT_TRUE(p->has_error()); EXPECT_EQ(t.value, nullptr); EXPECT_FALSE(t.matched); @@ -140,7 +140,7 @@ TEST_F(ParserImplTest, TextureSamplerTypes_SampledTexture_MissingGreaterThan) { TEST_F(ParserImplTest, TextureSamplerTypes_MultisampledTexture_I32) { auto p = parser("texture_multisampled_2d"); - auto t = p->texture_samplers(); + auto t = p->texture_and_sampler_types(); ASSERT_FALSE(p->has_error()) << p->error(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); @@ -154,7 +154,7 @@ TEST_F(ParserImplTest, TextureSamplerTypes_MultisampledTexture_I32) { TEST_F(ParserImplTest, TextureSamplerTypes_MultisampledTexture_MissingType) { auto p = parser("texture_multisampled_2d<>"); - auto t = p->texture_samplers(); + auto t = p->texture_and_sampler_types(); ASSERT_TRUE(p->has_error()); EXPECT_EQ(t.value, nullptr); EXPECT_FALSE(t.matched); @@ -164,7 +164,7 @@ TEST_F(ParserImplTest, TextureSamplerTypes_MultisampledTexture_MissingType) { TEST_F(ParserImplTest, TextureSamplerTypes_MultisampledTexture_MissingLessThan) { auto p = parser("texture_multisampled_2d"); - auto t = p->texture_samplers(); + auto t = p->texture_and_sampler_types(); EXPECT_EQ(t.value, nullptr); EXPECT_FALSE(t.matched); EXPECT_TRUE(t.errored); @@ -173,7 +173,7 @@ TEST_F(ParserImplTest, TextureSamplerTypes_MultisampledTexture_MissingLessThan) TEST_F(ParserImplTest, TextureSamplerTypes_MultisampledTexture_MissingGreaterThan) { auto p = parser("texture_multisampled_2dtexture_samplers(); + auto t = p->texture_and_sampler_types(); EXPECT_EQ(t.value, nullptr); EXPECT_FALSE(t.matched); EXPECT_TRUE(t.errored); @@ -182,7 +182,7 @@ TEST_F(ParserImplTest, TextureSamplerTypes_MultisampledTexture_MissingGreaterTha TEST_F(ParserImplTest, TextureSamplerTypes_StorageTexture_Readonly1dRg32Float) { auto p = parser("texture_storage_1d"); - auto t = p->texture_samplers(); + auto t = p->texture_and_sampler_types(); ASSERT_FALSE(p->has_error()) << p->error(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); @@ -198,7 +198,7 @@ TEST_F(ParserImplTest, TextureSamplerTypes_StorageTexture_Readonly1dRg32Float) { TEST_F(ParserImplTest, TextureSamplerTypes_StorageTexture_Writeonly2dR32Uint) { auto p = parser("texture_storage_2d"); - auto t = p->texture_samplers(); + auto t = p->texture_and_sampler_types(); ASSERT_FALSE(p->has_error()) << p->error(); EXPECT_TRUE(t.matched); EXPECT_FALSE(t.errored); @@ -214,7 +214,7 @@ TEST_F(ParserImplTest, TextureSamplerTypes_StorageTexture_Writeonly2dR32Uint) { TEST_F(ParserImplTest, TextureSamplerTypes_StorageTexture_InvalidType) { auto p = parser("texture_storage_1d"); - auto t = p->texture_samplers(); + auto t = p->texture_and_sampler_types(); EXPECT_EQ(t.value, nullptr); EXPECT_FALSE(t.matched); EXPECT_TRUE(t.errored); @@ -223,7 +223,7 @@ TEST_F(ParserImplTest, TextureSamplerTypes_StorageTexture_InvalidType) { TEST_F(ParserImplTest, TextureSamplerTypes_StorageTexture_InvalidAccess) { auto p = parser("texture_storage_1d"); - auto t = p->texture_samplers(); + auto t = p->texture_and_sampler_types(); EXPECT_EQ(t.value, nullptr); EXPECT_FALSE(t.matched); EXPECT_TRUE(t.errored); @@ -232,7 +232,7 @@ TEST_F(ParserImplTest, TextureSamplerTypes_StorageTexture_InvalidAccess) { TEST_F(ParserImplTest, TextureSamplerTypes_StorageTexture_MissingType) { auto p = parser("texture_storage_1d<>"); - auto t = p->texture_samplers(); + auto t = p->texture_and_sampler_types(); EXPECT_EQ(t.value, nullptr); EXPECT_FALSE(t.matched); EXPECT_TRUE(t.errored); @@ -241,7 +241,7 @@ TEST_F(ParserImplTest, TextureSamplerTypes_StorageTexture_MissingType) { TEST_F(ParserImplTest, TextureSamplerTypes_StorageTexture_MissingLessThan) { auto p = parser("texture_storage_1d"); - auto t = p->texture_samplers(); + auto t = p->texture_and_sampler_types(); EXPECT_EQ(t.value, nullptr); EXPECT_FALSE(t.matched); EXPECT_TRUE(t.errored); @@ -250,7 +250,7 @@ TEST_F(ParserImplTest, TextureSamplerTypes_StorageTexture_MissingLessThan) { TEST_F(ParserImplTest, TextureSamplerTypes_StorageTexture_MissingGreaterThan) { auto p = parser("texture_storage_1dtexture_samplers(); + auto t = p->texture_and_sampler_types(); EXPECT_EQ(t.value, nullptr); EXPECT_FALSE(t.matched); EXPECT_TRUE(t.errored);