/third_party/skia/third_party/externals/tint/src/reader/spirv/ |
D | parser_type_test.cc | 27 TypeManager ty; in TEST() local 28 EXPECT_EQ(ty.Void(), ty.Void()); in TEST() 29 EXPECT_EQ(ty.Bool(), ty.Bool()); in TEST() 30 EXPECT_EQ(ty.U32(), ty.U32()); in TEST() 31 EXPECT_EQ(ty.F32(), ty.F32()); in TEST() 32 EXPECT_EQ(ty.I32(), ty.I32()); in TEST() 33 EXPECT_EQ(ty.Pointer(ty.I32(), ast::StorageClass::kNone), in TEST() 34 ty.Pointer(ty.I32(), ast::StorageClass::kNone)); in TEST() 35 EXPECT_EQ(ty.Vector(ty.I32(), 3), ty.Vector(ty.I32(), 3)); in TEST() 36 EXPECT_EQ(ty.Matrix(ty.I32(), 3, 2), ty.Matrix(ty.I32(), 3, 2)); in TEST() [all …]
|
/third_party/ffmpeg/libavformat/ |
D | ty.c | 169 TYDemuxContext *ty = s->priv_data; in analyze_chunk() local 222 ty->tivo_series = TIVO_SERIES1; in analyze_chunk() 223 ty->pes_length = SERIES1_PES_LENGTH; in analyze_chunk() 226 ty->tivo_series = TIVO_SERIES2; in analyze_chunk() 227 ty->pes_length = SERIES2_PES_LENGTH; in analyze_chunk() 231 ty->audio_type = TIVO_AUDIO_AC3; in analyze_chunk() 232 ty->tivo_type = TIVO_TYPE_DTIVO; in analyze_chunk() 233 ty->pts_offset = AC3_PTS_OFFSET; in analyze_chunk() 234 ty->pes_length = AC3_PES_LENGTH; in analyze_chunk() 236 ty->audio_type = TIVO_AUDIO_MPEG; in analyze_chunk() [all …]
|
/third_party/skia/third_party/externals/tint/src/resolver/ |
D | atomics_validation_test.cc | 30 Global("a", ty.atomic(Source{{12, 34}}, ty.i32()), in TEST_F() 37 auto* s = Structure("s", {Member("a", ty.atomic(Source{{12, 34}}, ty.i32()))}, in TEST_F() 39 Global("g", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite, in TEST_F() 46 Global("a", ty.atomic(ty.f32(Source{{12, 34}})), in TEST_F() 54 Global("a", ty.atomic(Source{{12, 34}}, ty.i32()), in TEST_F() 64 Global("a", ty.atomic(Source{{12, 34}}, ty.i32()), in TEST_F() 75 Structure("s", {Member("a", ty.atomic(Source{{12, 34}}, ty.i32()))}); in TEST_F() 76 Global("g", ty.Of(s), ast::StorageClass::kPrivate); in TEST_F() 91 Structure("Inner", {Member("m", ty.atomic(Source{{12, 34}}, ty.i32()))}); in TEST_F() 92 auto* Outer = Structure("Outer", {Member("m", ty.Of(Inner))}); in TEST_F() [all …]
|
D | call_validation_test.cc | 28 Func("foo", {Param(Sym(), ty.i32()), Param(Sym(), ty.f32())}, ty.void_(), in TEST_F() 40 Func("foo", {Param(Sym(), ty.i32()), Param(Sym(), ty.f32())}, ty.void_(), in TEST_F() 52 Func("foo", {Param(Sym(), ty.i32()), Param(Sym(), ty.f32())}, ty.void_(), in TEST_F() 67 Func("func", {}, ty.f32(), {Return(Expr(1.0f))}, {}); in TEST_F() 69 Func("main", {}, ty.void_(), in TEST_F() 84 auto* param = Param("p", ty.pointer<i32>(ast::StorageClass::kFunction)); in TEST_F() 85 Func("foo", {param}, ty.void_(), {}); in TEST_F() 86 Func("main", {}, ty.void_(), in TEST_F() 88 Decl(Var("z", ty.i32(), Expr(1))), in TEST_F() 101 auto* param = Param("p", ty.pointer<i32>(ast::StorageClass::kFunction)); in TEST_F() [all …]
|
D | storage_class_layout_validation_test.cc | 38 {Member("a", ty.f32(), {MemberSize(5)}), in TEST_F() 39 Member(Source{{34, 56}}, "b", ty.f32(), {MemberAlign(1)})}, in TEST_F() 42 Global(Source{{78, 90}}, "a", ty.type_name("S"), ast::StorageClass::kStorage, in TEST_F() 69 {Member("a", ty.f32(), {MemberSize(5)}), in TEST_F() 70 Member(Source{{34, 56}}, "b", ty.f32(), {MemberAlign(4)})}, in TEST_F() 73 Global(Source{{78, 90}}, "a", ty.type_name("S"), ast::StorageClass::kStorage, in TEST_F() 95 Structure(Source{{12, 34}}, "Inner", {Member("scalar", ty.i32())}); in TEST_F() 99 Member("scalar", ty.f32()), in TEST_F() 100 Member(Source{{56, 78}}, "inner", ty.type_name("Inner")), in TEST_F() 104 Global(Source{{78, 90}}, "a", ty.type_name("Outer"), in TEST_F() [all …]
|
D | entry_point_validation_test.cc | 56 Func(Source{{12, 34}}, "main", {}, ty.f32(), {Return(1.0f)}, in TEST_F() 65 Func(Source{{12, 34}}, "main", {}, ty.vec4<f32>(), in TEST_F() 66 {Return(Construct(ty.vec4<f32>()))}, in TEST_F() 78 Func(Source{{12, 34}}, "main", {}, ty.vec4<f32>(), in TEST_F() 79 {Return(Construct(ty.vec4<f32>()))}, in TEST_F() 92 Func(Source{{12, 34}}, "main", {}, ty.vec4<f32>(), in TEST_F() 93 {Return(Construct(ty.vec4<f32>()))}, in TEST_F() 113 "Output", {Member("a", ty.f32(), {Location(0)}), in TEST_F() 114 Member("b", ty.f32(), {Builtin(ast::Builtin::kFragDepth)})}); in TEST_F() 115 Func(Source{{12, 34}}, "main", {}, ty.Of(output), in TEST_F() [all …]
|
D | function_validation_test.cc | 32 Func("func_a", {Param("common_name", ty.f32())}, ty.void_(), {}); in TEST_F() 33 Func("func_b", {Param("common_name", ty.f32())}, ty.void_(), {}); in TEST_F() 41 Global("common_name", ty.f32(), ast::StorageClass::kPrivate); in TEST_F() 42 Func("func", {Param("common_name", ty.f32())}, ty.void_(), {}); in TEST_F() 51 Func("func", {Param(Source{{12, 34}}, "common_name", ty.f32())}, ty.void_(), in TEST_F() 65 Func("func", {Param(Source{{12, 34}}, "common_name", ty.f32())}, ty.void_(), in TEST_F() 74 auto* var = Var("a", ty.i32(), Expr(2)); in TEST_F() 76 Func(Source{{12, 34}}, "func", ast::VariableList{}, ty.void_(), in TEST_F() 90 auto* var = Var("func", ty.i32(), Expr(0)); in TEST_F() 91 Func("func", ast::VariableList{}, ty.i32(), in TEST_F() [all …]
|
D | array_accessor_test.cc | 28 Global("my_var", ty.mat2x3<f32>(), ast::StorageClass::kPrivate); in TEST_F() 38 Global("my_var", ty.mat2x3<f32>(), ast::StorageClass::kPrivate); in TEST_F() 39 auto* idx = Var("idx", ty.i32(), Construct(ty.i32())); in TEST_F() 47 Global("my_var", ty.mat4x4<f32>(), ast::StorageClass::kPrivate); in TEST_F() 48 auto* idx = Var("idx", ty.u32(), Expr(3u)); in TEST_F() 49 auto* idy = Var("idy", ty.u32(), Expr(2u)); in TEST_F() 57 GlobalConst("my_const", ty.mat2x3<f32>(), Construct(ty.mat2x3<f32>())); in TEST_F() 58 auto* idx = Var("idx", ty.i32(), Construct(ty.i32())); in TEST_F() 68 GlobalConst("my_var", ty.mat4x4<f32>(), Construct(ty.mat4x4<f32>())); in TEST_F() 69 auto* idx = Var("idx", ty.u32(), Expr(3u)); in TEST_F() [all …]
|
D | assignment_validation_test.cc | 32 auto* s = Structure("S", {Member("m", ty.i32())}, in TEST_F() 34 Global(Source{{12, 34}}, "a", ty.Of(s), ast::StorageClass::kStorage, in TEST_F() 55 auto* var = Var("a", ty.i32(), ast::StorageClass::kNone, Expr(2)); in TEST_F() 76 auto* a = Var("a", ty.array(ty.f32(), 4)); in TEST_F() 77 auto* b = Var("b", ty.array(ty.f32(), "len")); in TEST_F() 96 auto* a = Var("a", ty.array(ty.f32(), 4)); in TEST_F() 97 auto* b = Var("b", ty.array(ty.f32(), "len")); in TEST_F() 114 auto* var = Var("a", ty.i32(), ast::StorageClass::kNone, Expr(2)); in TEST_F() 127 auto* var = Var("a", ty.i32(), ast::StorageClass::kNone, Expr(2)); in TEST_F() 144 auto* var = Var("a", ty.i32(), ast::StorageClass::kNone, Expr(2)); in TEST_F() [all …]
|
D | struct_pipeline_stage_use_test.cc | 31 auto* s = Structure("S", {Member("a", ty.f32(), {Location(0)})}); in TEST_F() 41 auto* s = Structure("S", {Member("a", ty.f32(), {Location(0)})}); in TEST_F() 43 Func("foo", {Param("param", ty.Of(s))}, ty.void_(), {}, {}); in TEST_F() 53 auto* s = Structure("S", {Member("a", ty.f32(), {Location(0)})}); in TEST_F() 55 Func("foo", {}, ty.Of(s), {Return(Construct(ty.Of(s), Expr(0.f)))}, {}); in TEST_F() 65 auto* s = Structure("S", {Member("a", ty.f32(), {Location(0)})}); in TEST_F() 67 Func("main", {Param("param", ty.Of(s))}, ty.vec4<f32>(), in TEST_F() 68 {Return(Construct(ty.vec4<f32>()))}, in TEST_F() 82 "S", {Member("a", ty.vec4<f32>(), {Builtin(ast::Builtin::kPosition)})}); in TEST_F() 84 Func("main", {}, ty.Of(s), {Return(Construct(ty.Of(s)))}, in TEST_F() [all …]
|
D | var_let_validation_test.cc | 30 WrapInFunction(Const(Source{{12, 34}}, "a", ty.i32(), nullptr)); in TEST_F() 39 GlobalConst(Source{{12, 34}}, "a", ty.i32(), nullptr); in TEST_F() 69 auto* i = Var("i", ty.i32(), ast::StorageClass::kNone); in TEST_F() 71 Var(Source{{56, 78}}, "a", ty.pointer<i32>(ast::StorageClass::kFunction), in TEST_F() 85 Global("t1", ty.sampled_texture(ast::TextureDimension::k2d, ty.f32()), in TEST_F() 97 WrapInFunction(Const(Source{{3, 3}}, "v", ty.i32(), Expr(2u))); in TEST_F() 108 Var(Source{{3, 3}}, "v", ty.i32(), ast::StorageClass::kNone, Expr(2u))); in TEST_F() 117 auto* a = Alias("I32", ty.i32()); in TEST_F() 118 WrapInFunction(Const(Source{{3, 3}}, "v", ty.Of(a), Expr(2u))); in TEST_F() 127 auto* a = Alias("I32", ty.i32()); in TEST_F() [all …]
|
/third_party/skia/third_party/externals/tint/src/writer/glsl/ |
D | generator_impl_function_test.cc | 32 Func("my_func", ast::VariableList{}, ty.void_(), in TEST_F() 52 Func("centroid", ast::VariableList{}, ty.void_(), in TEST_F() 68 Func("my_func", ast::VariableList{Param("a", ty.f32()), Param("b", ty.i32())}, in TEST_F() 69 ty.void_(), in TEST_F() 90 Func("func", ast::VariableList{}, ty.void_(), {/* no explicit return */}, in TEST_F() 116 Func("f", {Param("foo", ty.pointer<f32>(ast::StorageClass::kFunction))}, in TEST_F() 117 ty.f32(), {Return(Deref("foo"))}); in TEST_F() 133 auto* foo_in = Param("foo", ty.f32(), {Location(0)}); in TEST_F() 134 Func("frag_main", ast::VariableList{foo_in}, ty.f32(), {Return("foo")}, in TEST_F() 180 Param("coord", ty.vec4<f32>(), {Builtin(ast::Builtin::kPosition)}); in TEST_F() [all …]
|
D | generator_impl_member_accessor_test.cc | 28 const ast::Type* (*)(const ProgramBuilder::TypesBuilder& ty); 30 inline const ast::Type* ty_i32(const ProgramBuilder::TypesBuilder& ty) { in ty_i32() argument 31 return ty.i32(); in ty_i32() 33 inline const ast::Type* ty_u32(const ProgramBuilder::TypesBuilder& ty) { in ty_u32() argument 34 return ty.u32(); in ty_u32() 36 inline const ast::Type* ty_f32(const ProgramBuilder::TypesBuilder& ty) { in ty_f32() argument 37 return ty.f32(); in ty_f32() 40 inline const ast::Type* ty_vec2(const ProgramBuilder::TypesBuilder& ty) { in ty_vec2() argument 41 return ty.vec2<T>(); in ty_vec2() 44 inline const ast::Type* ty_vec3(const ProgramBuilder::TypesBuilder& ty) { in ty_vec3() argument [all …]
|
D | generator_impl_sanitizer_test.cc | 29 auto* s = Structure("my_struct", {Member(0, "a", ty.array<f32>(4))}, in TEST_F() 31 Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead, in TEST_F() 37 Func("a_func", ast::VariableList{}, ty.void_(), in TEST_F() 39 Decl(Var("len", ty.u32(), ast::StorageClass::kNone, in TEST_F() 78 Member(0, "z", ty.f32()), in TEST_F() 79 Member(4, "a", ty.array<f32>(4)), in TEST_F() 82 Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead, in TEST_F() 88 Func("a_func", ast::VariableList{}, ty.void_(), in TEST_F() 90 Decl(Var("len", ty.u32(), ast::StorageClass::kNone, in TEST_F() 129 auto* s = Structure("my_struct", {Member(0, "a", ty.array<f32>(4))}, in TEST_F() [all …]
|
/third_party/skia/third_party/externals/tint/src/writer/hlsl/ |
D | generator_impl_function_test.cc | 32 Func("my_func", ast::VariableList{}, ty.void_(), in TEST_F() 49 Func("GeometryShader", ast::VariableList{}, ty.void_(), in TEST_F() 65 Func("my_func", ast::VariableList{Param("a", ty.f32()), Param("b", ty.i32())}, in TEST_F() 66 ty.void_(), in TEST_F() 84 Func("main", ast::VariableList{}, ty.void_(), {/* no explicit return */}, in TEST_F() 102 Func("f", {Param("foo", ty.pointer<f32>(ast::StorageClass::kFunction))}, in TEST_F() 103 ty.f32(), {Return(Deref("foo"))}); in TEST_F() 119 auto* foo_in = Param("foo", ty.f32(), {Location(0)}); in TEST_F() 120 Func("frag_main", ast::VariableList{foo_in}, ty.f32(), {Return("foo")}, in TEST_F() 152 Param("coord", ty.vec4<f32>(), {Builtin(ast::Builtin::kPosition)}); in TEST_F() [all …]
|
D | generator_impl_member_accessor_test.cc | 28 const ast::Type* (*)(const ProgramBuilder::TypesBuilder& ty); 30 inline const ast::Type* ty_i32(const ProgramBuilder::TypesBuilder& ty) { in ty_i32() argument 31 return ty.i32(); in ty_i32() 33 inline const ast::Type* ty_u32(const ProgramBuilder::TypesBuilder& ty) { in ty_u32() argument 34 return ty.u32(); in ty_u32() 36 inline const ast::Type* ty_f32(const ProgramBuilder::TypesBuilder& ty) { in ty_f32() argument 37 return ty.f32(); in ty_f32() 40 inline const ast::Type* ty_vec2(const ProgramBuilder::TypesBuilder& ty) { in ty_vec2() argument 41 return ty.vec2<T>(); in ty_vec2() 44 inline const ast::Type* ty_vec3(const ProgramBuilder::TypesBuilder& ty) { in ty_vec3() argument [all …]
|
D | generator_impl_assign_test.cc | 25 Func("fn", {}, ty.void_(), in TEST_F() 27 Decl(Var("lhs", ty.i32())), in TEST_F() 28 Decl(Var("rhs", ty.i32())), in TEST_F() 45 Func("fn", {}, ty.void_(), in TEST_F() 47 Decl(Var("lhs", ty.vec3<f32>())), in TEST_F() 48 Decl(Var("rhs", ty.f32())), in TEST_F() 49 Decl(Const("index", ty.u32(), Expr(0u))), in TEST_F() 67 Func("fn", {}, ty.void_(), in TEST_F() 69 Decl(Var("lhs", ty.vec3<f32>())), in TEST_F() 70 Decl(Var("rhs", ty.f32())), in TEST_F() [all …]
|
D | generator_impl_sanitizer_test.cc | 29 auto* s = Structure("my_struct", {Member(0, "a", ty.array<f32>(4))}, in TEST_F() 31 Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead, in TEST_F() 37 Func("a_func", ast::VariableList{}, ty.void_(), in TEST_F() 39 Decl(Var("len", ty.u32(), ast::StorageClass::kNone, in TEST_F() 67 Member(0, "z", ty.f32()), in TEST_F() 68 Member(4, "a", ty.array<f32>(4)), in TEST_F() 71 Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead, in TEST_F() 77 Func("a_func", ast::VariableList{}, ty.void_(), in TEST_F() 79 Decl(Var("len", ty.u32(), ast::StorageClass::kNone, in TEST_F() 106 auto* s = Structure("my_struct", {Member(0, "a", ty.array<f32>(4))}, in TEST_F() [all …]
|
/third_party/rust/crates/syn/codegen/src/ |
D | snapshot.rs | 10 fn rust_type(ty: &Type) -> TokenStream { in rust_type() 11 match ty { in rust_type() 12 Type::Syn(ty) => { in rust_type() 13 let ident = Ident::new(ty, Span::call_site()); in rust_type() 16 Type::Std(ty) => { in rust_type() 17 let ident = Ident::new(ty, Span::call_site()); in rust_type() 20 Type::Ext(ty) => { in rust_type() 21 let ident = Ident::new(ty, Span::call_site()); in rust_type() 24 Type::Token(ty) | Type::Group(ty) => { in rust_type() 25 let ident = Ident::new(ty, Span::call_site()); in rust_type() [all …]
|
/third_party/skia/third_party/externals/tint/src/writer/msl/ |
D | generator_impl_function_test.cc | 28 Func("my_func", ast::VariableList{}, ty.void_(), in TEST_F() 51 params.push_back(Param("a", ty.f32())); in TEST_F() 52 params.push_back(Param("b", ty.i32())); in TEST_F() 54 Func("my_func", params, ty.void_(), in TEST_F() 76 Func("main", ast::VariableList{}, ty.void_(), in TEST_F() 97 auto* foo_in = Param("foo", ty.f32(), {Location(0)}); in TEST_F() 98 Func("frag_main", ast::VariableList{foo_in}, ty.f32(), {Return("foo")}, in TEST_F() 133 Param("coord", ty.vec4<f32>(), {Builtin(ast::Builtin::kPosition)}); in TEST_F() 134 Func("frag_main", ast::VariableList{coord_in}, ty.f32(), in TEST_F() 180 Member("col1", ty.f32(), {Location(1)}), in TEST_F() [all …]
|
D | generator_impl_type_test.cc | 66 auto* arr = ty.array<bool, 4>(); in TEST_F() 77 auto* a = ty.array<bool, 4>(); in TEST_F() 78 auto* b = ty.array(a, 5); in TEST_F() 89 auto* a = ty.array<bool, 4>(); in TEST_F() 90 auto* b = ty.array(a, 5); in TEST_F() 91 auto* c = ty.array(b, 6); in TEST_F() 102 auto* arr = ty.array<bool, 4>(); in TEST_F() 113 auto* arr = ty.array<bool, 1>(); in TEST_F() 124 auto* s = Structure("s", {Member("arr", ty.array<f32, 4>(64))}, in TEST_F() 126 auto* ubo = Global("ubo", ty.Of(s), ast::StorageClass::kUniform, in TEST_F() [all …]
|
/third_party/rust/crates/serde/serde_derive/src/internals/ |
D | receiver.rs | 44 ty: Box::new(Type::Path(self.self_ty(span))), in self_to_qself() 75 fn visit_type_mut(&mut self, ty: &mut Type) { in visit_type_mut() 76 let span = if let Type::Path(node) = ty { in visit_type_mut() 84 self.visit_type_mut_impl(ty); in visit_type_mut() 87 *ty = self.self_ty(span).into(); in visit_type_mut() 91 fn visit_type_path_mut(&mut self, ty: &mut TypePath) { in visit_type_path_mut() 92 if ty.qself.is_none() { in visit_type_path_mut() 93 self.self_to_qself(&mut ty.qself, &mut ty.path); in visit_type_path_mut() 95 self.visit_type_path_mut_impl(ty); in visit_type_path_mut() 108 fn visit_type_mut_impl(&mut self, ty: &mut Type) { in visit_type_mut_impl() [all …]
|
/third_party/rust/crates/syn/tests/ |
D | test_path.rs | 57 let mut ty: TypePath = parse_quote!(<Self as A>::Q); in print_incomplete_qpath() localVariable 58 snapshot!(ty.to_token_stream(), @r###" in print_incomplete_qpath() 61 assert!(ty.path.segments.pop().is_some()); in print_incomplete_qpath() 62 snapshot!(ty.to_token_stream(), @r###" in print_incomplete_qpath() 65 assert!(ty.path.segments.pop().is_some()); in print_incomplete_qpath() 66 snapshot!(ty.to_token_stream(), @r###" in print_incomplete_qpath() 69 assert!(ty.path.segments.pop().is_none()); in print_incomplete_qpath() 72 let mut ty: TypePath = parse_quote!(<Self>::A::B); in print_incomplete_qpath() localVariable 73 snapshot!(ty.to_token_stream(), @r###" in print_incomplete_qpath() 76 assert!(ty.path.segments.pop().is_some()); in print_incomplete_qpath() [all …]
|
/third_party/rust/crates/clap/clap_derive/src/utils/ |
D | ty.rs | 23 pub fn from_syn_ty(ty: &syn::Type) -> Sp<Self> { in from_syn_ty() 25 let t = |kind| Sp::new(kind, ty.span()); in from_syn_ty() 27 if is_unit_ty(ty) { in from_syn_ty() 29 } else if let Some(vt) = get_vec_ty(ty, Vec, VecVec) { in from_syn_ty() 31 } else if let Some(subty) = subty_if_name(ty, "Option") { in from_syn_ty() 59 let ty = Ty::from_syn_ty(field_ty); in inner_type() localVariable 60 match *ty { in inner_type() 73 pub fn sub_type(ty: &syn::Type) -> Option<&syn::Type> { in sub_type() 74 subty_if(ty, |_| true) in sub_type() 77 fn only_last_segment(mut ty: &syn::Type) -> Option<&PathSegment> { in only_last_segment() [all …]
|
/third_party/rust/crates/cxx/syntax/ |
D | check.rs | 45 for ty in cx.types { in do_typecheck() 46 match ty { in do_typecheck() 49 Type::RustVec(ty) => check_type_rust_vec(cx, ty), in do_typecheck() 54 Type::Ref(ty) => check_type_ref(cx, ty), in do_typecheck() 55 Type::Ptr(ty) => check_type_ptr(cx, ty), in do_typecheck() 57 Type::Fn(ty) => check_type_fn(cx, ty), in do_typecheck() 58 Type::SliceRef(ty) => check_type_slice_ref(cx, ty), in do_typecheck() 113 fn check_type_rust_vec(cx: &mut Check, ty: &Ty1) { in check_type_rust_vec() 114 match &ty.inner { in check_type_rust_vec() 121 cx.error(ty, "Rust Vec containing C++ type is not supported yet"); in check_type_rust_vec() [all …]
|