[tint][core] Add `texel_buffer` language feature as a builtin type Bug: 382544164 Change-Id: If0f3b71f0febc3e2c6416e784513f3a258ccbb7c Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/250314 Reviewed-by: dan sinclair <dsinclair@chromium.org> Commit-Queue: Diego Rodrigues <diejorarr@gmail.com> Reviewed-by: James Price <jrprice@google.com>
diff --git a/src/tint/cmd/bench/enums_core_bench.cc b/src/tint/cmd/bench/enums_core_bench.cc index e9e0c59..ae0364a 100644 --- a/src/tint/cmd/bench/enums_core_bench.cc +++ b/src/tint/cmd/bench/enums_core_bench.cc
@@ -736,244 +736,251 @@ "subUoup_matrBBx_riBBht", "subgJJoup_mat110x_right", "subgroup_matrix_rfgttt", - "tttxtre_X", - "teLturew1d", - "textur1_1d", + "texelbufftt", + "texel_buLwer", + "texel_bu1fer", + "texel_buffer", + "tewwel_buffer", + "teelbuffer", + "texel_bffer", + "textNNre_1d", + "tex__uleRUU1d", + "texHure_1d", "texture_1d", - "tewwture_1d", - "texte_ee", - "txture_1d", - "textNNre_2d", - "tex__uleRUU2d", - "texHure_2d", - "texture_2d", - "teCCturr_2d", + "teCCturr_1d", + "textre_1d", + "textupd_1d", "textre_2d", - "textupd_2d", - "exture_2d_array", - "txtNr_Ld_array", - "extre_2dray", + "textLN_d", + "tet_d", + "texture_2d", + "teqqtuxRR_GGd", + "texturS_GGd", + "88tucce_2d", + "texture_2d_arra", + "texture_2dpparty", + "te55tureFF02d_aqqray", "texture_2d_array", - "tRRxturxx_2d_aqqray", - "textSGre_2d_array", - "text88rcc2d_arra", - "texture_3", - "textte_ppd", - "qqFF0xture553d", + "texure_2d_array", + "texture_2d_ary", + "texure_2dOarray", + "textuHHe_3", + "66extureSS3O", + "tTTturddY_3d", "texture_3d", - "txture_3d", - "textur3d", - "texOre_3d", - "teHHture_cTb", - "66extSSre_cubO", - "texddYure_cuTT", + "textursg3d", + "texture_3GG", + "tIxtllOQQ_3d", + "txture_cube", + "texture_crrbe", + "teyytue_cub7", "texture_cube", - "texureggsube", - "texGGure_cube", - "texllurQQIcube", - "texturecube_array", - "texture_cube_arrray", - "textureyyube_ar7ay", + "tBBxWur22_cube", + "yyexture_cubV", + "texturec4", + "texture_cudde_array", + "textu2e_cVVbz_rray", + "texture_cubeyyarray", "texture_cube_array", - "tBBxtur22_cube_arWay", - "textuVe_cubeyyarray", - "texture_ubeara4", - "texture_depth_ddd", - "text2re_depVVhzd", - "teyyture_depth_2d", + "texture_cAb___array", + "texture_cube_arhhay", + "teture_cube_arvvy", + "txture_dept_2d", + "texNNure_gesth_ood", + "emmtre_ZZepth_2d", "texture_depth_2d", - "texture_dApth__2d", - "texture_dhhpth_2d", - "teture_detvv_2d", - "textur_deph_2d_array", - "textureNNdepth_gdsoorray", - "textur_deptZZ2mm_array", + "texture_dkt_2d", + "teRtue_ffepth_2d", + "terrztuWdepth_2d", + "texture_dept_2d_Rrray", + "texture_dS88ptM_2d_array", + "bbexurR_depth_2d_PPrray", "texture_depth_2d_array", - "textur3kdeth_2d_rray", - "texture_ReptfA_2_array", - "zzexture_depth_d_rrWay", - "texture_epRRh_cbe", - "textMr88_depth_cubSS", - "txturRPPdeptbb_cube", + "texturexxWWeth_2d_array", + "texture_dAAvth_2d_array", + "textujje_de44th_2d_Xrray", + "textufe_depth_cube", + "textureAAUepth_cOOe", + "tuxtre_ssepth_cue", "texture_depth_cube", - "textWWre_deptxxcube", - "textvvrAAdepth_cube", - "texjjur44_dXpth_cube", - "textufe_depth_cube_array", - "texture_dOOpthUcube_AAray", - "texuure_depssh_cub_arry", + "bbexture_sFFpth_cube", + "texture_nnepth_cubYY", + "teture_depth_cubss", + "textre_dzzpthqcube_array", + "texuQedepth_cube_aNNray", + "textukke_eptpp_cubearray", "texture_depth_cube_array", - "texFFsre_depth_cbbbe_array", - "texture_depth_cubYY_arrann", - "texture_depth_ubss_array", - "tqxturezzdepth_mulisampled_2d", - "textuQQe_deptN_mutisapled_2d", - "texture_pppt_multisamplekk_2d", + "texturL_depth_cusse_arraJ", + "texture5ffepth_cubeJa77TTay", + "textur00_dpxh_cube_array", + "exture_depth_Aulti1ampled_2d", + "texturedepth_multisampled_2d", + "textQQre_depth_multisamled_2d", "texture_depth_multisampled_2d", - "t8xture_dJpth_multisaLpled_ssd", - "t5xTTJre_depffh_77ultisampled_2d", - "text00re_dxph_multisampled_2d", - "textureAexter1a", - "texture_extrnal", - "texturQQ_externl", + "iiexture_depthwultiampled_2d", + "texture_depth_mwwltisampled_2d", + "teYYturh_deptJJ_multisampled_2d", + "texture_RRxkEnal", + "texture_exteknauu", + "textrRtexternal", "texture_external", - "teiitreextewnal", - "texture_exterwwal", - "texJYYhre_external", - "textuREe_mkt7sampled_2d", - "textureuumulkisampled_2d", - "textuRemultisatpled_2d", + "IIeNtre_external", + "texture_exIernal", + "Eiixture_externl", + "texture_multsssample_2d", + "txture_mCCltXsa55pled_2d", + "9exture_multisampled_2d", "texture_multisampled_2d", - "texture_mltNsampleII_2d", - "textuIIe_multisapled_2d", - "texture_multisaiiEled_2", - "texturestoragess1d", - "texuCCe_st55Xage_1d", - "te9ture_storage_1d", - "texture_storage_1d", - "texur_storage_1X", - "txIIurestorage_1d", - "texture_storagz_1d", - "tAAxtur22_zztorae_2d", - "texture_storag_2d", + "exture_mltisampled_Xd", + "tetIIre_mltisampled_2d", + "texzure_multisampled_2d", + "tAAxtur22_zztorae_1d", + "texture_storag_1d", "texturbb_strageFd", + "texture_storage_1d", + "teVture_stMMrage_1d", + "textuwe_storacmzz_1d", + "textuQQOO_storag1d", + "texbure_storage_2d", + "nne5kture_torage_2C", + "textue_KKtorarreyy2d", "texture_storage_2d", - "teVture_stMMrage_2d", - "textuwe_storacmzz_2d", - "textuQQOO_storag2d", - "texture_storage_2d_arbay", - "teCturnn_skkora5e_2d_aray", - "teKtrrre_storage_2d_arryyy", + "tTxtue_ttorageAA2d", + "QQexture_sorage_2d", + "texture_t8rage_d", + "texture_storag_2d_aaray", + "exteccre_storage_bd_array", + "txture_storage_dLLaPPray", "texture_storage_2d_array", - "textureTstorageAA2dtaray", - "texure_storage_ZQQ_array", - "teture_storge82d_array", - "teture_stoaage_3d", - "eeextbr_stccrage_3d", - "texLLure_Porage_3d", + "texWWUr_storag_2d_array", + "texzzure_stoage_2d_array", + "textNre_stoage_2__rray", + "texture_storagea3d", + "texre_stoBage_3d", + "zzexture_torge_3d", "texture_storage_3d", - "tetuWW_sUorage_3d", - "texture_stzzrage_3", - "text__re_soNa_3d", - "a32", - "B", - "z2", + "textureUaatorbge_HHd", + "te4ture_sOorg_3d", + "texGGme_storage_3d", + "u3", + "8Gzz2", + "u3", "u32", - "uHbaa", - "4", - "GGm", - "8", - "N88G", - "8", + "uAAx", + "ubb32", + "u3jj", + "cqJx", + "", + "A", "u8", - "uAA", - "ubbu", - "jj8", - "Jccxc2", - "Fg", - "veA", + "cc8", + "BU", + "BAA", + "vxc2", + "Ue8", + "vUICB8", "vec2", - "ccec2", - "BcUU", - "BecAA", - "vex2f", - "veU8", - "vUCc8Bf", + "vec__", + "ecUU", + "vec", + "vrruc27", + "ve2kk", + "vel2f", "vec2f", - "vec2__", - "UUec2", - "ve2", - "ec2", - "vkk", - "EEJJe2h", - "vec2h", - "vec2oo", - "zeAXh", - "vTc88", + "vecf", + "YYc3f", + "44ec2f", + "Rc2h", + "88ePPr2h", "ec2J", + "vec2h", "cVt", - "veci", - "vec2i", + "vech", "ec2", "331i", "uuci", - "4e02u", - "v3ru", + "4e02i", + "vec2i", + "v3ri", "veYY2g", - "vec2u", - "ve2u", + "ve2i", "rCCcu", "lecu", - "vZZc3", - "t9qcMM", - "vec", - "vec3", - "veY7g", + "vec2ZZ", + "vec2u", + "tqm9MMu", + "veUu", + "vgc77n", "dddd", "aaecE", - "vecIIf", - "RReZ3ll", - "vecNNkrr", - "vec3f", - "vec", + "vIIc3", + "vec3", + "ZllRR3", + "kNNecrr", + "e3", "vc3f", "veca", "HHec3G", - "cc3h", - "vB22nllh", - "vec3h", + "vec3f", + "cc3f", + "vB22nllf", "vec35", "eR3h", "gec3h", - "ve3i", - "vecpi", - "vecK99i", - "vec3i", - "22Rci", + "ve3h", + "vec3h", + "vecph", + "vecK99h", + "22Rch", "vecnn", "veeENi", - "fHHec3u", - "ss226u", - "em0u", - "vec3u", + "fHHec3i", + "vec3i", + "ss226i", + "em0i", "vecNp", "ve63", "oZWWV3u", - "HHc", - "vcA", - "cT", - "vec4", - "veWW2", - "vWc4", + "vHHu", + "vec3u", + "vAcu", + "vTu", + "2ec3u", + "vec4W", "8eZ", - "FeR4", - "vebb4", - "ggce", - "vec4f", - "UeSh", + "FRc", + "vec4", + "bbc4", + "gce", + "ech", "vZqNN", "v9f", - "ccHMMh", + "ccHMMf", + "vec4f", "v4x", "veXX", - "vec4h", - "4h", + "4f", "veh", "vecgg4h", - "rfe4i", - "ve4i", + "rfe4h", + "vec4h", + "ve4h", "vggc4D", - "vec4i", "v994Q", "eeei", "veci", "vc4II", - "vequ", - "Ooc77u", - "vec4u", + "vec4i", + "veqi", + "Ooc77i", "vrrDD", "vecju", "11ciiFu", + "jBcRRu", + "vec4u", + "vdAc_7u", + "4jj", + "xxkeo", }; for (auto _ : state) { for (auto* str : kStrings) { @@ -986,118 +993,118 @@ BENCHMARK(BuiltinTypeParser); void BuiltinValueParser(::benchmark::State& state) { const char* kStrings[] = { - "clip_BjstRRnces", - "AAlip_7ist__ncds", - "ljjp_disancs", - "clip_distances", - "cipoisxxkances", "clipWdistances", "clIp_disNQQnc1s", - "fraI_deth", - "fjag_dept", - "7ragep22h", - "frag_depth", - "fKggcdEEllth", + "clip_Iistance", + "clip_distances", + "clip_distjnce", + "li22_dstanc7s", + "clilc_diKtaEgces", "frag_dept", "5rag_dth", - "r66t_f88cing", - "foat_fcing", - "frot_facEng", - "front_facing", - "frontqacQg", + "rag66e88th", + "frag_depth", + "ag_depth", + "frag_dEth", + "fagheQqh", "front_fa_ig", "fNot_arng", - "global_inocation_id", - "global_invocation_eeBBd", - "nngb11l_invocatin_id", - "global_invocation_id", - "globaq_invocatinn_id", + "front_facng", + "front_facing", + "frTTeet_faBBing", + "11gont_acnnn", + "fqont_facinn", "global_invmmBaccion_iX", "gttbal_i77vocation_id", - "itstane_idx", - "istanceKindex", - "instanFFjn_inex", - "instance_index", - "stancEE_ndex", + "globalinvoatio_id", + "global_invocation_id", + "global_iKvocatin_id", + "globnl_injjcation_FFd", + "glb8l_invoaEEio_id", "inLDtvnc_index", "ih55stanco_Sndex", - "lcal_inuuZcation_id", - "local_in557caPPion_id", - "local_invocatonSikk", - "local_invocation_id", - "local_inEEocaSioF_id", + "instane_iZuuex", + "instance_index", + "instancePPi7de55", + "instSnce_ndkkx", + "iFStanceEEindex", "lcal_invyycbbtin_id", "ocal_iJvoationRid", - "o1al_invocation_inTex", - "local_inXoatioTindeX", - "local_invocat00on_idex", - "local_invocation_index", - "locaP_77nvocation_index", + "locaT_1nvoction_id", + "local_invocation_id", + "lcal_invocaXiTn_d", + "l00ca_invocation_id", + "local_invoc77tion_Pd", "locl_inpocation_Zndex", "PPocaw_invocatin_idbbx", - "num_ssbbH8kgrojjps", - "num_workgrouhs", - "numworkxxrop", - "num_workgroups", - "nurQwBrkgroeps", + "8ocass_inHbbocation_indejj", + "local_invocation_index", + "local_inhocation_index", + "lcal_invocaxxio_indx", + "lcal_invocationrrinQeB", "num_workJJroups", "nu_wurkgrwuv", - "psxxttion", - "povi99ion", - "tion", - "position", - "poffnntion", + "nutt_workgrupxx", + "num_workgroups", + "num_workvr99ups", + "num_rroups", + "numnnfforkgroups", "posi5ion", "uJUition", - "sample_ndex", - "sFmplt_index", - "sa1ple_index", - "sample_index", - "samAAle_iDDdex", + "positio", + "position", + "positton", + "po1ition", + "pDDsitioAA", "OPple_2nde", "sampl_index", - "sample77mask", - "samAA1Ue_mask", - "AAaXple_mafk", - "sample_mask", - "sampVvevmas", + "sampl77_index", + "sample_index", + "sUUmpl1_ndAAmm", + "sample_fndeAA", + "savple_VVdvx", "sppmple_mask", "sample_TTask", - "jjub0kroup_id", - "subgroup_i", - "ubgroyyp_id", - "subgroup_id", - "sYYgroup_izz", + "jjam0kle_mask", + "sample_mask", + "sample_mas", + "ampleyymask", + "sYYple_maszz", "subgiioup_iW", "UUu7grop_i6", - "subgrop_UUnvocationpi", - "subgrouh_nvocaiTTn_id", - "subg5oup_invocaion_id", - "subgroup_invocation_id", - "sugro1_nvocation_id", + "subgroUUpi", + "subgroup_id", + "hubgroTTpd", + "subgoup_id", + "su1gro_d", "subgroup_invocmmtIon44id", "subgRoYpinvoDDatiYYn_id", - "subjjroup_size", - "subgroup_sie", - "subgroupQQsdz", - "subgroup_size", - "subgr55up_sHe", + "subgroup_invocatiojj_id", + "subgroup_invocation_id", + "subgroup_invocatio_id", + "subgroup_invodQQion_id", + "subgHoup_i55vocationid", "sukgroxFF_size", "srroup_size", - "vertexKKi_Nex", - "vertex_aTdex", - "vertexvvindex", - "vertex_index", - "ertexjjindex", + "NubgKK_up_size", + "subgroup_size", + "suagroupxsize", + "subgroup_sivve", + "subgrjjup_siz", "vrtOOx_indenn", "OeOOex_indegg", - "wworkQQrup_id", - "workgroupJd", - "workgrouD_id", - "workgroup_id", - "workgouOO_id", + "wwertQQxindex", + "vertex_index", + "vertex_inJx", + "vertex_iDdex", + "verte_iOOdex", "workgoup_id", "wokgrou0_id", + "workgouqli", + "workgroup_id", + "workgroupuid", + "wor33group_id", + "orkgroNNp_id", }; for (auto _ : state) { for (auto* str : kStrings) { @@ -1110,11 +1117,11 @@ BENCHMARK(BuiltinValueParser); void InterpolationSamplingParser(::benchmark::State& state) { const char* kStrings[] = { - "cqle", "cenuer", "cen33er", "center", "cNNter", "ntMr", "cenR22b", - "ceiitoid", "cetroid", "ceCriou", "centroid", "JHHnrid", "cntrggyh", "cWWtroiB", - "itEcceEE", "eieehyy", "U44ter", "either", "eithe", "eitheN", "MMithess", - "fiDsC", "YTgrst", "firjjt", "first", "frDD", "fEEM99t", "Nrst", - "55ample", "Qample", "nnmple", "sample", "samWFe", "sa66plw", "svFple", + "ntMr", "cenR22b", "ciintr", "center", "ceter", "uCoer", "cenHH", + "cntrggyh", "cWWtroiB", "cEccEECoid", "centroid", "yyeenroid", "cU44roid", "centroi", + "eitheN", "MMithess", "DithCr", "either", "gTiYher", "eithjjr", "eDDhe", + "fEEM99t", "Nrst", "fir55t", "first", "fQrst", "nirst", "WWirF", + "sa66plw", "svFple", "amWWe", "sample", "smpe", "5pK", "sam4le", }; for (auto _ : state) { for (auto* str : kStrings) { @@ -1127,11 +1134,10 @@ BENCHMARK(InterpolationSamplingParser); void InterpolationTypeParser(::benchmark::State& state) { const char* kStrings[] = { - "fWt", "at", "5", "flat", "f4at", - "gnnP", "USS", "2inVar", "lpnear", "liXV9992", - "linear", "nna", "sar", "8BBna", "perspeyCCAive", - "pervveitBe", "ers44QQAtive", "perspective", "perpecTiZ44e", "perspecXive", - "dderpective", + "gnnP", "USS", "fl2V", "flat", "fpat", "92laXV", + "a", "sar", "8BBna", "AyACCear", "linear", "lieBv", + "A4QQnar", "ZZneaT4", "perspecXive", "dderpective", "perddpeie", "perspective", + "pdkpecii1e", "perGGvtive", "espjjctive", }; for (auto _ : state) { for (auto* str : kStrings) { @@ -1144,86 +1150,66 @@ BENCHMARK(InterpolationTypeParser); void TexelFormatParser(::benchmark::State& state) { const char* kStrings[] = { - "bga8uddr", "gra8udir1", "vgaGGunor", - "bgra8unorm", "jjgraunrm", "bgra8wnorm", - "bgXa8nnorm", "r1jEflot", "1zflot", - "r162loWWt", "r16float", "r6float", - "r1Vloat", "l16f4znat", "__1Yst", - "rMk6sint", "D1zzsint", "r16sint", - "r16dnq", "r16sit", "r1MMsinl", - "r16nt", "r16n9", "rn6uVVt", - "r16uint", "K6uit", "CC6uiBB", - "r1oint", "EE3f88occww", "r2fbboat", - "r326loat", "r32float", "K3ggoa", - "r32fE1at", "r32floa", "rpH2int", - "raa2sinqq", "r32sn", "r32sint", - "rxxxxXsi_", "r32SSzznt", "r32int", - "32ont", "r32nt", "rK2ut", - "r32uint", "rczuint", "3gg88ant", - "r3jjsint", "1AAiint", "r8sin66V", - "rsi", "r8sint", "mhGtint", - "rjiyynt", "QQ_8sivt", "rLnorm", - "r8nWccm", "r8snFm", "r8snorm", - "rzzsyyor", "8snoo", "r8snI_c", - "rddint", "l8uMt", "r8Oint", - "r8uint", "rmTTK6nt", "8RRi", - "8400", "rnnoqq", "r8BBnorm", - "rWB22aorm", "r8unorm", "rjjunorm", - "66torHH", "r8JJnm", "rtt1Sb10uflooot", - "r__11brulSSat", "rg1WWb10ufloat", "rg11b10ufloat", - "rg11b10uflokt", "r1A10uflotbbt", "rg11b_0ufl1a", - "g16flffN", "rg6iiloVk", "rU16float", - "rg16float", "Ig16fnat", "rg144floLL8t", - "rgZZ6float", "rg16sMMnt", "rg16int", - "MMg166ASSt", "rg16sint", "TTx16sggGG", - "rg1Isint", "rg16silt", "rgOO6ui", - "516uina", "rg__6uzzR", "rg16uint", - "Pg16uLLnt", "r16uihht", "rg16unt", - "rj32oat", "rgB2f0a", "rLLgxxlat", - "rg32float", "rg3MMfloIIt", "rXg2FFoat", - "gp2zzssoat", "rrg32ZZFnt", "rg2si00jt", - "rgr2pwwnt", "rg32sint", "g3QQZnt", - "g3__nint", "rg3sint", "rg3uint", - "rg2inC", "r33GGuint", "rg32uint", - "iigll2u2nt", "rg32uvvncc", "rP32vinj", - "Ngisip", "rg8s2t", "rg8qJnD", - "rg8sint", "g8siQm", "r8sinJ", - "r8sinWW", "rQQ8wnwgrm", "rg8snorz", - "rgWWnorzz", "rg8snorm", "rg8om", - "rK99sqqUUr", "RRgEEsnrm", "rg8ut", - "rg8tint", "rgMMqt", "rg8uint", - "KKT8uiBaat", "ll8uiII5", "rgBBoowt", - "rg8__PPorm", "rRR8unorm", "rgSnm", - "rg8unorm", "roQm", "gunHH8rm", - "rg8YYnDrm", "rgb10a2uOnt", "JgbIIZa2ui8t", - "rgb1oa2Yint", "rgb10a2uint", "rgb100X2int", - "KcgbS02nnint", "rg8810a2u33GR", "r33b1XXa2unorqq", - "r4b102unozz", "rgWt10a2uWhorm", "rgb10a2unorm", - "xgb10aurorm", "eegC1Qa2unom", "rgb10r2unYm", - "rgbmxS6float", "rgb16float", "rgb1yyfloat", - "rgba16float", "r8a18floa", "reba16float", - "rgbkk1fhhoat", "rgBB16siOOt", "gba99sint", - "gba16sgDnt", "rgba16sint", "rgba11niat", - "qIS16si6t", "rgba16snYY", "rbaL0uYYVVt", - "m6Ibss162int", "rbajj6uint", "rgba16uint", - "rgp7a1it", "rgNa16ui6t", "rgbagg6uinss", - "rgba32flat", "qgbaJ2floaOO", "rg00a32floaMM", - "rgba32float", "rMMba32flommt", "rgba2floHqt", - "r88ba32fGat", "rgbww32siRR", "qgba32sint", - "rUa2int", "rgba32sint", "MQgbaB2snt", - "rgba332sint", "rg33a3Osint", "ga32uiwt", - "rMbaAbuikkt", "rgba32uit", "rgba32uint", - "gd32uit", "rgba3IuXXnw55", "rgb32uint", - "rga8sit", "rgda8JJn", "rg_a81it", - "rgba8sint", "rba8LLt", "99gaGGsnt", - "rgaxxUsin", "rgba8sor9", "rgba8svorm", - "rgb228snoLLm", "rgba8snorm", "rgba81frb", - "rgba8sngAA", "rbaUCom", "rnbw8uizzt", - "rgba8niwVVMM", "rga8uXNNt", "rgba8uint", - "r77Wba8inee", "rv33PRa8uint", "rgbjj822int", - "cgAA8unorm", "NgbakkuRRor", "rgba8unorQQ", - "rgba8unorm", "rgbuuunorm", "rbaunuurm", - "gbaZnorm", + "bgra8wnorm", "bgXa8nnorm", "Egraju9orm", "bgra8unorm", + "bgra8unz", "bgra8uWW2rm", "bgra8norm", "r1Vloat", + "l16f4znat", "r1__oaY", "r16float", "r1MHlkkat", + "r16flDzaI", "r16dqoa", "r16sit", "r1MMsinl", + "r16nt", "r16sint", "r16n9", "rn6sVVt", + "K6sit", "CC6uiBB", "r1oint", "881uiEEwcc", + "r16uint", "rbb6uin", "r166int", "ggint", + "r32fE1at", "r32floa", "rHpfloat", "r32float", + "qqaa2flGat", "r2loat", "xxxx2_loat", "r32SSzznt", + "r32int", "32ont", "r32sint", "r32nt", + "rK2st", "rczsint", "3gg88ant", "r3jjsint", + "riA2uin1", "r32uint", "rlVVu66nt", "2uic", + "r32GGnht", "rjiyynt", "QQ_8sivt", "rsiLL", + "r8sint", "r8sWcc", "F8ivt", "r8zyynt", + "8snoo", "r8snI_c", "rddsorm", "r8snorm", + "lMsno2", "r8Onorm", "rKK6mnoTT", "8RRi", + "8400", "qq8nt", "r8uint", "rBBuint", + "BBaW2int", "r8uijjt", "66torHH", "r8JJnm", + "rttoonoSm", "r8unorm", "ur_SSrm", "rWWunorm", + "r8unork", "r1A10uflotbbt", "rg11b_0ufl1a", "rgff1b10ufNt", + "rg11b10ufloat", "rg1110uiiloVt", "rw11b10Ufloat", "rg11b0ufFoIt", + "rg144floLL8t", "rgZZ6float", "rMM16float", "rg16float", + "rg1float", "rSSM66Aloat", "rxg6floaGGT", "rg1Isint", + "rg16silt", "rgOO6si", "rg16sint", "516sina", + "rg__6szzR", "Pg16sLLnt", "r16uihht", "rg16unt", + "g6uijt", "rg16uint", "rg0iBB", "rgLL6xxn", + "rMMII6uint", "rXg2FFoat", "gp2zzssoat", "rgrF2flZZat", + "rg32float", "rg002ljrat", "rww32prrat", "QQZ3foat", + "g3__nint", "rg3sint", "rg3sint", "rg32sint", + "rg2inC", "r33GGsint", "iigll2u2nt", "rg32uvvncc", + "rP32vinj", "Nguupni", "rg32uint", "r23uint", + "qJg3uiDt", "rg2miQt", "r8sinJ", "r8sinWW", + "wgggwiQQt", "rg8sint", "rg8zint", "rzzWsint", + "r8si", "rK99sqqUUr", "RRgEEsnrm", "r8norm", + "rg8snorm", "rg8snttm", "rg8MMor", "raaKKTBBorm", + "ll8uiII5", "rgBBoowt", "PP__8uint", "rg8uint", + "RRg8uint", "rg8S", "Qit", "gunHH8rm", + "rg8YYnDrm", "rg8Onorm", "rg8unorm", "Jg8IInorZ", + "ogYunorm", "r0Xunorm", "KcgbS02nnint", "rg8810a2u33GR", + "rgq3310aXXuint", "rgb10a2uint", "rgz14a2unt", "rgb10a2WtKWhh", + "xb10aruint", "eegC1Qa2unom", "rgb10r2unYm", "rgb1xxm2uSorm", + "rgb10a2unorm", "rgb10arnorm", "rg10a2uyyoFm", "g10a28n8rm", + "reba16float", "rgbkk1fhhoat", "rgb1OOfBBoat", "rgba16float", + "rgba6flo99", "Dgbaggfloat", "agba16f1nna", "qIS16si6t", + "rgba16snYY", "rbaL0sYYVVt", "rgba16sint", "m6Ibss162int", + "rbajj6sint", "rgp7a1it", "rgNa16ui6t", "rgbagg6uinss", + "rgba16uit", "rgba16uint", "Jgba16uiOOt", "rgba16uiM00t", + "rmmba16uiMMt", "rgba2floHqt", "r88ba32fGat", "rgb3wwRRpoat", + "rgba32float", "rgba3qfloat", "rb32flaU", "gBa32floaM5", + "rgba332sint", "rg33a3Osint", "ga32siwt", "rgba32sint", + "rMbaAbsikkt", "rgba32sit", "gd32sit", "rgba3IuXXnw55", + "rgb32uint", "ra32uint", "rgba32uint", "rgbJ32din", + "_g132uint", "ga32uLLn", "99gaGGsnt", "rgaxxUsin", + "rgbasi9t", "rgba8sint", "rgba8vint", "rgba82LLint", + "f1ba8bit", "rgba8sngAA", "rbaUCom", "zzgba8snwnm", + "rgba8snorm", "nwwba8snoMMVV", "Xgba8sNNom", "rgba8W77eerm", + "rv33PRa8uint", "rgbjj822int", "AAgca8int", "rgba8uint", + "kRRgba8uNn", "rgbaQQuint", "ruuba8uin", "rbaunuurm", + "gbaZnorm", "rgHa8unrm", "rgba8unorm", "rgdSSS8unorm", + "rgba8unTTrm", "rmb8uctrm", }; for (auto _ : state) { for (auto* str : kStrings) {
diff --git a/src/tint/lang/core/core.def b/src/tint/lang/core/core.def index d1ae3d8..46d6922 100644 --- a/src/tint/lang/core/core.def +++ b/src/tint/lang/core/core.def
@@ -178,6 +178,8 @@ subgroup_matrix_result // sized_binding_array binding_array + // texel_buffers + texel_buffer // Internal types. __atomic_compare_exchange_result_i32
diff --git a/src/tint/lang/core/enums.cc b/src/tint/lang/core/enums.cc index 6174509..0b66c71 100644 --- a/src/tint/lang/core/enums.cc +++ b/src/tint/lang/core/enums.cc
@@ -612,6 +612,9 @@ if (str == "subgroup_matrix_right") { return BuiltinType::kSubgroupMatrixRight; } + if (str == "texel_buffer") { + return BuiltinType::kTexelBuffer; + } if (str == "texture_1d") { return BuiltinType::kTexture1D; } @@ -856,6 +859,8 @@ return "subgroup_matrix_result"; case BuiltinType::kSubgroupMatrixRight: return "subgroup_matrix_right"; + case BuiltinType::kTexelBuffer: + return "texel_buffer"; case BuiltinType::kTexture1D: return "texture_1d"; case BuiltinType::kTexture2D:
diff --git a/src/tint/lang/core/enums.h b/src/tint/lang/core/enums.h index 9c68faa..eb0cb7c 100644 --- a/src/tint/lang/core/enums.h +++ b/src/tint/lang/core/enums.h
@@ -355,6 +355,7 @@ kSubgroupMatrixLeft, kSubgroupMatrixResult, kSubgroupMatrixRight, + kTexelBuffer, kTexture1D, kTexture2D, kTexture2DArray, @@ -478,6 +479,7 @@ "subgroup_matrix_left", "subgroup_matrix_result", "subgroup_matrix_right", + "texel_buffer", "texture_1d", "texture_2d", "texture_2d_array",
diff --git a/src/tint/lang/core/enums_test.cc b/src/tint/lang/core/enums_test.cc index 98b75d5..4afb2ac 100644 --- a/src/tint/lang/core/enums_test.cc +++ b/src/tint/lang/core/enums_test.cc
@@ -523,6 +523,7 @@ {"subgroup_matrix_left", BuiltinType::kSubgroupMatrixLeft}, {"subgroup_matrix_result", BuiltinType::kSubgroupMatrixResult}, {"subgroup_matrix_right", BuiltinType::kSubgroupMatrixRight}, + {"texel_buffer", BuiltinType::kTexelBuffer}, {"texture_1d", BuiltinType::kTexture1D}, {"texture_2d", BuiltinType::kTexture2D}, {"texture_2d_array", BuiltinType::kTexture2DArray}, @@ -764,108 +765,111 @@ {"subgrouKK_mtrix_right", BuiltinType::kUndefined}, {"subgGoup_atrix_rgh", BuiltinType::kUndefined}, {"sabgrop_matrix_right", BuiltinType::kUndefined}, - {"txtuNOO1d", BuiltinType::kUndefined}, - {"ttGre_1", BuiltinType::kUndefined}, - {"textur5_1d", BuiltinType::kUndefined}, - {"99jffture_2d", BuiltinType::kUndefined}, - {"texRurevY2XX", BuiltinType::kUndefined}, - {"exurc_2d", BuiltinType::kUndefined}, - {"txu5e_288XXarray", BuiltinType::kUndefined}, - {"texure_2_array", BuiltinType::kUndefined}, - {"texture_2d_arppcy", BuiltinType::kUndefined}, - {"texvure_3d", BuiltinType::kUndefined}, - {"tEExtSSe_Jd", BuiltinType::kUndefined}, - {"texture3", BuiltinType::kUndefined}, - {"tex_ure_u", BuiltinType::kUndefined}, - {"tewture__ube", BuiltinType::kUndefined}, - {"textured99cube", BuiltinType::kUndefined}, - {"exture_u99e_PPrray", BuiltinType::kUndefined}, - {"tetureKKcube_array", BuiltinType::kUndefined}, - {"teMture_oubDD_array", BuiltinType::kUndefined}, - {"eiBture_ept_2d", BuiltinType::kUndefined}, - {"txturedepthq2d", BuiltinType::kUndefined}, - {"00extureLdeph_2d", BuiltinType::kUndefined}, - {"texnuvve_d66pth_2d_array", BuiltinType::kUndefined}, - {"texture_denh_2d_arrarr", BuiltinType::kUndefined}, - {"texture_eeeph_2_arxxay", BuiltinType::kUndefined}, - {"tONNture_depth_CCube", BuiltinType::kUndefined}, - {"txture_depth_cube", BuiltinType::kUndefined}, - {"t4xtureadepth_cube", BuiltinType::kUndefined}, - {"texturNN_depth_cuNNe_arry", BuiltinType::kUndefined}, - {"texture_depth_cbe_array", BuiltinType::kUndefined}, - {"tuxturedeph_cube_array", BuiltinType::kUndefined}, - {"teAture_depth_multisaSpEEedYYd", BuiltinType::kUndefined}, - {"t0xture_depth_multisampled_2d", BuiltinType::kUndefined}, - {"texture_depth_multisaampled_2d", BuiltinType::kUndefined}, - {"texturmm_externa", BuiltinType::kUndefined}, - {"texture_exteral", BuiltinType::kUndefined}, - {"teEuUUe_exernal", BuiltinType::kUndefined}, - {"texteDDKKultisampled_2d", BuiltinType::kUndefined}, - {"0exture__multitampled_2d", BuiltinType::kUndefined}, - {"txture_multisaAled_2d", BuiltinType::kUndefined}, - {"texture_storageM1", BuiltinType::kUndefined}, - {"texture_BBtorage_1d", BuiltinType::kUndefined}, - {"textur99sobbagenn1d", BuiltinType::kUndefined}, - {"texture_sEEoAAage12", BuiltinType::kUndefined}, - {"teTture66stora5e_2d", BuiltinType::kUndefined}, - {"textuHe_storage_2d", BuiltinType::kUndefined}, - {"textreHHstoragexx2d_aray", BuiltinType::kUndefined}, - {"texturyy_sznrage_2d_0rray", BuiltinType::kUndefined}, - {"texture_strage_2d_array", BuiltinType::kUndefined}, - {"texurH_ktorage_3d", BuiltinType::kUndefined}, - {"exture_ctorage_3d", BuiltinType::kUndefined}, - {"ooexrrre_sorage_3d", BuiltinType::kUndefined}, - {"JJ", BuiltinType::kUndefined}, - {"0CC", BuiltinType::kUndefined}, - {"99xA", BuiltinType::kUndefined}, - {"c8", BuiltinType::kUndefined}, - {"S8", BuiltinType::kUndefined}, - {"uB", BuiltinType::kUndefined}, - {"ec2", BuiltinType::kUndefined}, - {"vcme", BuiltinType::kUndefined}, - {"voPPQQ", BuiltinType::kUndefined}, - {"B", BuiltinType::kUndefined}, - {"NKK2f", BuiltinType::kUndefined}, - {"vrr2", BuiltinType::kUndefined}, - {"ve2pr", BuiltinType::kUndefined}, - {"PPecyh", BuiltinType::kUndefined}, - {"vccZh", BuiltinType::kUndefined}, - {"ec2", BuiltinType::kUndefined}, - {"v00c2i", BuiltinType::kUndefined}, + {"OOexN_buffr", BuiltinType::kUndefined}, + {"txtl_bfGr", BuiltinType::kUndefined}, + {"texel_5uffer", BuiltinType::kUndefined}, + {"99jffture_1d", BuiltinType::kUndefined}, + {"texRurevY1XX", BuiltinType::kUndefined}, + {"exurc_1d", BuiltinType::kUndefined}, + {"texXX5e88d", BuiltinType::kUndefined}, + {"textur_2", BuiltinType::kUndefined}, + {"textupp_ccd", BuiltinType::kUndefined}, + {"tvxture_2d_array", BuiltinType::kUndefined}, + {"tSSxtue_2EE_Jrray", BuiltinType::kUndefined}, + {"texture_2daray", BuiltinType::kUndefined}, + {"aex_red", BuiltinType::kUndefined}, + {"textwwre_d", BuiltinType::kUndefined}, + {"texddur99_3d", BuiltinType::kUndefined}, + {"extPPre99ube", BuiltinType::kUndefined}, + {"teture_KKube", BuiltinType::kUndefined}, + {"teture_ooubDD", BuiltinType::kUndefined}, + {"eBtiie_cubearray", BuiltinType::kUndefined}, + {"texure_cube_aqay", BuiltinType::kUndefined}, + {"texturecbe_arr0LLy", BuiltinType::kUndefined}, + {"texture_dep66hvv2d", BuiltinType::kUndefined}, + {"nrrture_depth_2d", BuiltinType::kUndefined}, + {"teeetureepthxx2d", BuiltinType::kUndefined}, + {"texture_dONNtCC_2d_array", BuiltinType::kUndefined}, + {"texture_depth_2d_rray", BuiltinType::kUndefined}, + {"texture_d4pth_2a_array", BuiltinType::kUndefined}, + {"NNexNNure_deth_cube", BuiltinType::kUndefined}, + {"texure_depth_cube", BuiltinType::kUndefined}, + {"texture_dpthcuue", BuiltinType::kUndefined}, + {"tSxtuAe_deYYth_cubEE_arry", BuiltinType::kUndefined}, + {"texture_depth_cube_0rray", BuiltinType::kUndefined}, + {"texaaure_depth_cube_array", BuiltinType::kUndefined}, + {"teture_depth_mmultismpleqq_2d", BuiltinType::kUndefined}, + {"textre_depth_multisampled_2d", BuiltinType::kUndefined}, + {"texture_dEpth_UUltisampld_2d", BuiltinType::kUndefined}, + {"txure_exKKeDDnal", BuiltinType::kUndefined}, + {"0exture_exte__nat", BuiltinType::kUndefined}, + {"tpturl_etArnal", BuiltinType::kUndefined}, + {"textuMe_multisampled_2", BuiltinType::kUndefined}, + {"texture_multisampledBB2d", BuiltinType::kUndefined}, + {"textnne_m99lbbisamled_2d", BuiltinType::kUndefined}, + {"texture_sEEoAAage11", BuiltinType::kUndefined}, + {"teTture66stora5e_1d", BuiltinType::kUndefined}, + {"textuHe_storage_1d", BuiltinType::kUndefined}, + {"texture_sxoraHHe2d", BuiltinType::kUndefined}, + {"zexture_storyy0e_2n", BuiltinType::kUndefined}, + {"texture_storage_d", BuiltinType::kUndefined}, + {"texture_storage_2dHkray", BuiltinType::kUndefined}, + {"texture_storage_2darcay", BuiltinType::kUndefined}, + {"ooexrrure_sorge_2d_array", BuiltinType::kUndefined}, + {"textre_stoJJge_3d", BuiltinType::kUndefined}, + {"tCCxtu0e_storage_d", BuiltinType::kUndefined}, + {"texturAAsxor99gF_3d", BuiltinType::kUndefined}, + {"uc2", BuiltinType::kUndefined}, + {"S32", BuiltinType::kUndefined}, + {"oBs", BuiltinType::kUndefined}, + {"8", BuiltinType::kUndefined}, + {"me", BuiltinType::kUndefined}, + {"gQPP", BuiltinType::kUndefined}, + {"9", BuiltinType::kUndefined}, + {"xxec2", BuiltinType::kUndefined}, + {"NKsc2", BuiltinType::kUndefined}, + {"vcrp9", BuiltinType::kUndefined}, + {"7yZZVVf", BuiltinType::kUndefined}, + {"vec1pf", BuiltinType::kUndefined}, + {"v00c2h", BuiltinType::kUndefined}, {"ecJBPss", BuiltinType::kUndefined}, - {"fcffJJu", BuiltinType::kUndefined}, - {"XXI2u", BuiltinType::kUndefined}, + {"fcffJJh", BuiltinType::kUndefined}, + {"XXI2i", BuiltinType::kUndefined}, {"", BuiltinType::kUndefined}, - {"vc3", BuiltinType::kUndefined}, - {"vKc3", BuiltinType::kUndefined}, - {"me44", BuiltinType::kUndefined}, - {"veo3f", BuiltinType::kUndefined}, - {"jhHHc3f", BuiltinType::kUndefined}, - {"UU33Ewwf", BuiltinType::kUndefined}, - {"ve3u", BuiltinType::kUndefined}, - {"rddcch", BuiltinType::kUndefined}, - {"2Pttch", BuiltinType::kUndefined}, - {"vwwcsi", BuiltinType::kUndefined}, - {"11ennci", BuiltinType::kUndefined}, - {"ve3i", BuiltinType::kUndefined}, - {"vecu", BuiltinType::kUndefined}, - {"ecaSSIu", BuiltinType::kUndefined}, - {"vED3u", BuiltinType::kUndefined}, - {"cceR4", BuiltinType::kUndefined}, - {"v4", BuiltinType::kUndefined}, - {"vaac", BuiltinType::kUndefined}, - {"LSc4f", BuiltinType::kUndefined}, - {"ecmm", BuiltinType::kUndefined}, - {"4ecV", BuiltinType::kUndefined}, - {"vc__", BuiltinType::kUndefined}, + {"ve2i", BuiltinType::kUndefined}, + {"uKKcu", BuiltinType::kUndefined}, + {"m4d2u", BuiltinType::kUndefined}, + {"veo2u", BuiltinType::kUndefined}, + {"vhjHNN", BuiltinType::kUndefined}, + {"vEw3Uc3", BuiltinType::kUndefined}, + {"vuc", BuiltinType::kUndefined}, + {"rddccf", BuiltinType::kUndefined}, + {"2Pttcf", BuiltinType::kUndefined}, + {"vwwcsf", BuiltinType::kUndefined}, + {"11ennch", BuiltinType::kUndefined}, + {"ve3h", BuiltinType::kUndefined}, + {"vech", BuiltinType::kUndefined}, + {"ecaSSIi", BuiltinType::kUndefined}, + {"vED3i", BuiltinType::kUndefined}, + {"veIccR", BuiltinType::kUndefined}, + {"ec9", BuiltinType::kUndefined}, + {"aec3u", BuiltinType::kUndefined}, + {"LSc3u", BuiltinType::kUndefined}, + {"mmc", BuiltinType::kUndefined}, + {"4eV", BuiltinType::kUndefined}, + {"ec_", BuiltinType::kUndefined}, {"vQ4", BuiltinType::kUndefined}, {"veERdd", BuiltinType::kUndefined}, {"vec9", BuiltinType::kUndefined}, {"e04", BuiltinType::kUndefined}, - {"vzi", BuiltinType::kUndefined}, - {"vecccu", BuiltinType::kUndefined}, - {"v_Qcu", BuiltinType::kUndefined}, + {"vzh", BuiltinType::kUndefined}, + {"veccch", BuiltinType::kUndefined}, + {"v_Qci", BuiltinType::kUndefined}, {"vect", BuiltinType::kUndefined}, + {"zz3ecECpp", BuiltinType::kUndefined}, + {"veddhhu", BuiltinType::kUndefined}, + {"e7766u", BuiltinType::kUndefined}, + {"vec4P", BuiltinType::kUndefined}, }; using BuiltinTypeParseTest = testing::TestWithParam<BuiltinTypeCase>; @@ -928,54 +932,54 @@ }; static constexpr BuiltinValueCase kInvalidBuiltinValueCases[] = { - {"clEpCCdist33zzppes", BuiltinValue::kUndefined}, - {"cliphhdistaddces", BuiltinValue::kUndefined}, - {"lip_d77s66ances", BuiltinValue::kUndefined}, - {"frag_deptP", BuiltinValue::kUndefined}, - {"fraw_depth", BuiltinValue::kUndefined}, - {"fragupth", BuiltinValue::kUndefined}, - {"fron6_fXXcing", BuiltinValue::kUndefined}, - {"ront_fRRig", BuiltinValue::kUndefined}, - {"fron_fciVV", BuiltinValue::kUndefined}, - {"gloHHGGl_invocation_id", BuiltinValue::kUndefined}, - {"Mlobal_invocationFFid", BuiltinValue::kUndefined}, - {"global_invoction_id", BuiltinValue::kUndefined}, - {"instan3_ggdex", BuiltinValue::kUndefined}, - {"PnKKt1n_e_index", BuiltinValue::kUndefined}, - {"iEstance_idex", BuiltinValue::kUndefined}, - {"loca_invcatiMn_id", BuiltinValue::kUndefined}, - {"loGGal_invcSSti77n_iX", BuiltinValue::kUndefined}, - {"FFocal_invottation_d", BuiltinValue::kUndefined}, - {"local_onUUocsstionZZindex", BuiltinValue::kUndefined}, - {"localinvocation_index", BuiltinValue::kUndefined}, - {"local_invocationlindex", BuiltinValue::kUndefined}, - {"num_workhroups", BuiltinValue::kUndefined}, - {"Kum_wokgrouTTs", BuiltinValue::kUndefined}, - {"num_werkgrowws", BuiltinValue::kUndefined}, - {"jjKsitivv", BuiltinValue::kUndefined}, - {"posYYto", BuiltinValue::kUndefined}, - {"EEsiIIon", BuiltinValue::kUndefined}, - {"sample_indeQQ", BuiltinValue::kUndefined}, - {"sampPe_iel", BuiltinValue::kUndefined}, - {"saffHle_index", BuiltinValue::kUndefined}, - {"sanple_mask", BuiltinValue::kUndefined}, - {"sgmpleFas66", BuiltinValue::kUndefined}, - {"samp8e_mshsk", BuiltinValue::kUndefined}, - {"subgroupFlli", BuiltinValue::kUndefined}, - {"jj2bg00up_i", BuiltinValue::kUndefined}, - {"suggroup_id", BuiltinValue::kUndefined}, - {"subgroupeinvocation_i", BuiltinValue::kUndefined}, - {"subgroup_ffnvocatin_id", BuiltinValue::kUndefined}, - {"subup_invocation_id", BuiltinValue::kUndefined}, - {"subgroup_sze", BuiltinValue::kUndefined}, - {"subgrop_sizqq", BuiltinValue::kUndefined}, - {"subgAAo_sze", BuiltinValue::kUndefined}, - {"vertex_ndex", BuiltinValue::kUndefined}, - {"verte_injjex", BuiltinValue::kUndefined}, - {"vertZZx_index", BuiltinValue::kUndefined}, - {"Oor2grUPIIp_id", BuiltinValue::kUndefined}, - {"woZZkgroup_id", BuiltinValue::kUndefined}, - {"workgnnoup_id", BuiltinValue::kUndefined}, + {"cliw_distances", BuiltinValue::kUndefined}, + {"clp_disunces", BuiltinValue::kUndefined}, + {"6lip_distanXXes", BuiltinValue::kUndefined}, + {"rag_RRpt", BuiltinValue::kUndefined}, + {"fVgde1th", BuiltinValue::kUndefined}, + {"fragGGdepHHh", BuiltinValue::kUndefined}, + {"MFFon7_facing", BuiltinValue::kUndefined}, + {"fron_facing", BuiltinValue::kUndefined}, + {"3roTgg_fcin", BuiltinValue::kUndefined}, + {"globQl_i_vK1cation_Pd", BuiltinValue::kUndefined}, + {"Elobal_invocaton_id", BuiltinValue::kUndefined}, + {"lobal_invocatin_iM", BuiltinValue::kUndefined}, + {"77nsSSane_XndeGG", BuiltinValue::kUndefined}, + {"inFFtaKcettndex", BuiltinValue::kUndefined}, + {"onstssUnce_indZZx", BuiltinValue::kUndefined}, + {"local_invocaion_id", BuiltinValue::kUndefined}, + {"local_invocltion_id", BuiltinValue::kUndefined}, + {"lhcal_invocation_id", BuiltinValue::kUndefined}, + {"locTTKknvocation_index", BuiltinValue::kUndefined}, + {"local_ievowwationindex", BuiltinValue::kUndefined}, + {"local_invocavioKjjindex", BuiltinValue::kUndefined}, + {"num_worgrupYY", BuiltinValue::kUndefined}, + {"nm_EEorkgroupI", BuiltinValue::kUndefined}, + {"num_worQQgroups", BuiltinValue::kUndefined}, + {"poPilo", BuiltinValue::kUndefined}, + {"postioffH", BuiltinValue::kUndefined}, + {"pnsition", BuiltinValue::kUndefined}, + {"Fampg_i66dex", BuiltinValue::kUndefined}, + {"hample_iss8ex", BuiltinValue::kUndefined}, + {"samleFFilldex", BuiltinValue::kUndefined}, + {"jj2mp00_mas", BuiltinValue::kUndefined}, + {"sagple_mask", BuiltinValue::kUndefined}, + {"sample_mas", BuiltinValue::kUndefined}, + {"subgrop_ffd", BuiltinValue::kUndefined}, + {"subgu_id", BuiltinValue::kUndefined}, + {"subgroup_i", BuiltinValue::kUndefined}, + {"subgroqqp_nvocation_id", BuiltinValue::kUndefined}, + {"subgroup_nocatioAAid", BuiltinValue::kUndefined}, + {"subgrup_invocation_vd", BuiltinValue::kUndefined}, + {"subgjjoup_ize", BuiltinValue::kUndefined}, + {"subgrouZZ_size", BuiltinValue::kUndefined}, + {"subgroupUsizII2", BuiltinValue::kUndefined}, + {"veZZtex_index", BuiltinValue::kUndefined}, + {"vertenn_index", BuiltinValue::kUndefined}, + {"vertHx_iZkkd22x", BuiltinValue::kUndefined}, + {"workgrop_id", BuiltinValue::kUndefined}, + {"workRoupid", BuiltinValue::kUndefined}, + {"workg99ouqq_id", BuiltinValue::kUndefined}, }; using BuiltinValueParseTest = testing::TestWithParam<BuiltinValueCase>; @@ -1040,60 +1044,60 @@ }; static constexpr AttributeCase kInvalidAttributeCases[] = { - {"HlkkZg22", Attribute::kUndefined}, - {"alig", Attribute::kUndefined}, - {"igR", Attribute::kUndefined}, - {"bindiqq9g", Attribute::kUndefined}, - {"bind77ng", Attribute::kUndefined}, - {"bini3", Attribute::kUndefined}, - {"bluuccd_sr", Attribute::kUndefined}, - {"lend_RRrc", Attribute::kUndefined}, - {"bllnd_sJJc", Attribute::kUndefined}, - {"MMuiI", Attribute::kUndefined}, - {"7T6ilxi", Attribute::kUndefined}, - {"builtQQJ", Attribute::kUndefined}, - {"Aulo", Attribute::kUndefined}, - {"coo", Attribute::kUndefined}, - {"yoq3", Attribute::kUndefined}, - {"coxxpute", Attribute::kUndefined}, - {"Nrrpe", Attribute::kUndefined}, - {"o99pute", Attribute::kUndefined}, - {"diagnostc", Attribute::kUndefined}, - {"iaHnlstic", Attribute::kUndefined}, - {"i_gnotic", Attribute::kUndefined}, - {"fagment", Attribute::kUndefined}, - {"fragmjt", Attribute::kUndefined}, - {"fragEEmttnt", Attribute::kUndefined}, - {"gro", Attribute::kUndefined}, - {"rourr", Attribute::kUndefined}, - {"xoup", Attribute::kUndefined}, - {"Q", Attribute::kUndefined}, - {"ppss", Attribute::kUndefined}, - {"Wuu", Attribute::kUndefined}, - {"itputTT00ttachmet_index", Attribute::kUndefined}, - {"inut_atvvchment_inex", Attribute::kUndefined}, - {"Qnput_attachment_index", Attribute::kUndefined}, - {"in3RrpoCae", Attribute::kUndefined}, - {"inerCat", Attribute::kUndefined}, - {"ntrpPPrppate", Attribute::kUndefined}, - {"xx8DDuvaiant", Attribute::kUndefined}, - {"lldqqvarYYant", Attribute::kUndefined}, + {"alig77", Attribute::kUndefined}, + {"a3n", Attribute::kUndefined}, + {"aligcu", Attribute::kUndefined}, + {"b1nRRng", Attribute::kUndefined}, + {"bindllJg", Attribute::kUndefined}, + {"MMinI", Attribute::kUndefined}, + {"ble7d6Txc", Attribute::kUndefined}, + {"blenJ_QQrc", Attribute::kUndefined}, + {"buuend_A", Attribute::kUndefined}, + {"builn", Attribute::kUndefined}, + {"bl33qn", Attribute::kUndefined}, + {"buxxltin", Attribute::kUndefined}, + {"lrr", Attribute::kUndefined}, + {"c99lr", Attribute::kUndefined}, + {"colr", Attribute::kUndefined}, + {"olHute", Attribute::kUndefined}, + {"_oute", Attribute::kUndefined}, + {"compte", Attribute::kUndefined}, + {"djgnostic", Attribute::kUndefined}, + {"mmEEagttostic", Attribute::kUndefined}, + {"iagnosti", Attribute::kUndefined}, + {"frrrment", Attribute::kUndefined}, + {"fagmext", Attribute::kUndefined}, + {"frzzent", Attribute::kUndefined}, + {"groue", Attribute::kUndefined}, + {"uouZp", Attribute::kUndefined}, + {"00uo7TT", Attribute::kUndefined}, + {"F", Attribute::kUndefined}, + {"UJ", Attribute::kUndefined}, + {"i", Attribute::kUndefined}, + {"input_attachment_OOndex", Attribute::kUndefined}, + {"inputattaMMment_index", Attribute::kUndefined}, + {"input_Cttachment_index", Attribute::kUndefined}, + {"iPPterpolQQte", Attribute::kUndefined}, + {"inDDxxuuola88e", Attribute::kUndefined}, + {"inmeqqpddlYYlle", Attribute::kUndefined}, {"iFF__arian", Attribute::kUndefined}, - {"rocaGNNion", Attribute::kUndefined}, - {"Mocltion", Attribute::kUndefined}, + {"rrnvNNGrian", Attribute::kUndefined}, + {"Mnvarialt", Attribute::kUndefined}, {"caton", Attribute::kUndefined}, - {"qxst_ule", Attribute::kUndefined}, - {"must_ue", Attribute::kUndefined}, + {"qxcatiln", Attribute::kUndefined}, + {"locatin", Attribute::kUndefined}, {"ma44t_ue", Attribute::kUndefined}, - {"WWiGe", Attribute::kUndefined}, - {"sjjz", Attribute::kUndefined}, + {"WWuGt_use", Attribute::kUndefined}, + {"mujjt_us", Attribute::kUndefined}, {"sjjze", Attribute::kUndefined}, - {"vrtjx", Attribute::kUndefined}, - {"vetex", Attribute::kUndefined}, + {"sje", Attribute::kUndefined}, + {"sie", Attribute::kUndefined}, {"vert99x", Attribute::kUndefined}, - {"worVVgyoup_size", Attribute::kUndefined}, - {"workZZxoup_sze", Attribute::kUndefined}, + {"verVVex", Attribute::kUndefined}, + {"ZZxrtx", Attribute::kUndefined}, {"w33kgvvoup_size", Attribute::kUndefined}, + {"workgsoup9size", Attribute::kUndefined}, + {"worgrFup_size", Attribute::kUndefined}, }; using AttributeParseTest = testing::TestWithParam<AttributeCase>;
diff --git a/src/tint/lang/wgsl/ast/builder.h b/src/tint/lang/wgsl/ast/builder.h index 384b350..06ee086 100644 --- a/src/tint/lang/wgsl/ast/builder.h +++ b/src/tint/lang/wgsl/ast/builder.h
@@ -37,6 +37,7 @@ #include "src/tint/lang/core/interpolation.h" #include "src/tint/lang/core/number.h" #include "src/tint/lang/core/type/sampler_kind.h" +#include "src/tint/lang/core/type/texel_buffer.h" #include "src/tint/lang/core/type/texture_dimension.h" #include "src/tint/lang/wgsl/ast/alias.h" #include "src/tint/lang/wgsl/ast/assignment_statement.h" @@ -1298,6 +1299,11 @@ /// @returns the external texture ast::Type external_texture() const { return (*this)("texture_external"); } + /// @returns the texel buffer + ast::Type texel_buffer(core::TexelFormat format, core::Access access) const { + return (*this)("texel_buffer", format, access); + } + /// @param subtype the texture subtype. /// @returns the input attachment ast::Type input_attachment(ast::Type subtype) const {
diff --git a/src/tint/lang/wgsl/resolver/BUILD.bazel b/src/tint/lang/wgsl/resolver/BUILD.bazel index 8899f2d..9375054 100644 --- a/src/tint/lang/wgsl/resolver/BUILD.bazel +++ b/src/tint/lang/wgsl/resolver/BUILD.bazel
@@ -152,6 +152,7 @@ "struct_pipeline_stage_use_test.cc", "subgroup_matrix_test.cc", "subgroups_extension_test.cc", + "texel_buffer_test.cc", "type_validation_test.cc", "unresolved_identifier_test.cc", "validation_test.cc",
diff --git a/src/tint/lang/wgsl/resolver/BUILD.cmake b/src/tint/lang/wgsl/resolver/BUILD.cmake index 863543b..bbef83c 100644 --- a/src/tint/lang/wgsl/resolver/BUILD.cmake +++ b/src/tint/lang/wgsl/resolver/BUILD.cmake
@@ -153,6 +153,7 @@ lang/wgsl/resolver/struct_pipeline_stage_use_test.cc lang/wgsl/resolver/subgroup_matrix_test.cc lang/wgsl/resolver/subgroups_extension_test.cc + lang/wgsl/resolver/texel_buffer_test.cc lang/wgsl/resolver/type_validation_test.cc lang/wgsl/resolver/unresolved_identifier_test.cc lang/wgsl/resolver/validation_test.cc
diff --git a/src/tint/lang/wgsl/resolver/BUILD.gn b/src/tint/lang/wgsl/resolver/BUILD.gn index 592731e..4c61360 100644 --- a/src/tint/lang/wgsl/resolver/BUILD.gn +++ b/src/tint/lang/wgsl/resolver/BUILD.gn
@@ -153,6 +153,7 @@ "struct_pipeline_stage_use_test.cc", "subgroup_matrix_test.cc", "subgroups_extension_test.cc", + "texel_buffer_test.cc", "type_validation_test.cc", "unresolved_identifier_test.cc", "validation_test.cc",
diff --git a/src/tint/lang/wgsl/resolver/resolver.cc b/src/tint/lang/wgsl/resolver/resolver.cc index b6ed906..f76d25a 100644 --- a/src/tint/lang/wgsl/resolver/resolver.cc +++ b/src/tint/lang/wgsl/resolver/resolver.cc
@@ -2678,6 +2678,8 @@ return StorageTexture(ident, core::type::TextureDimension::k2dArray); case core::BuiltinType::kTextureStorage3D: return StorageTexture(ident, core::type::TextureDimension::k3d); + case core::BuiltinType::kTexelBuffer: + return TexelBuffer(ident); case core::BuiltinType::kInputAttachment: return InputAttachment(ident); case core::BuiltinType::kAtomicCompareExchangeResultI32: @@ -3089,6 +3091,31 @@ return validator_.SubgroupMatrix(out, ident->source) ? out : nullptr; } +const core::type::TexelBuffer* Resolver::TexelBuffer(const ast::Identifier* ident) { + auto* tmpl_ident = TemplatedIdentifier(ident, 2); + if (DAWN_UNLIKELY(!tmpl_ident)) { + return nullptr; + } + + auto format = sem_.GetTexelFormat(tmpl_ident->arguments[0]); + if (DAWN_UNLIKELY(format == core::TexelFormat::kUndefined)) { + return nullptr; + } + + auto access = sem_.GetAccess(tmpl_ident->arguments[1]); + if (DAWN_UNLIKELY(access == core::Access::kUndefined)) { + return nullptr; + } + + auto* out = b.Types().texel_buffer(format, access); + + if (DAWN_UNLIKELY(!validator_.TexelBuffer(out, ident->source))) { + return nullptr; + } + + return out; +} + const ast::TemplatedIdentifier* Resolver::TemplatedIdentifier(const ast::Identifier* ident, size_t min_args, size_t max_args /* = use min 0 */) {
diff --git a/src/tint/lang/wgsl/resolver/resolver.h b/src/tint/lang/wgsl/resolver/resolver.h index 6e65f66..6e09356 100644 --- a/src/tint/lang/wgsl/resolver/resolver.h +++ b/src/tint/lang/wgsl/resolver/resolver.h
@@ -226,6 +226,10 @@ const core::type::StorageTexture* StorageTexture(const ast::Identifier* ident, core::type::TextureDimension dim); + /// @returns a texel buffer resolved from the templated identifier @p ident. + /// @param ident the identifier to resolve + const core::type::TexelBuffer* TexelBuffer(const ast::Identifier* ident); + /// @returns an input attachment resolved from the templated identifier @p ident const core::type::InputAttachment* InputAttachment(const ast::Identifier* ident);
diff --git a/src/tint/lang/wgsl/resolver/texel_buffer_test.cc b/src/tint/lang/wgsl/resolver/texel_buffer_test.cc new file mode 100644 index 0000000..23173a6 --- /dev/null +++ b/src/tint/lang/wgsl/resolver/texel_buffer_test.cc
@@ -0,0 +1,219 @@ +// Copyright 2025 The Dawn & Tint Authors +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// 3. Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "src/tint/lang/wgsl/resolver/resolver.h" +#include "src/tint/lang/wgsl/resolver/resolver_helper_test.h" + +namespace tint::resolver { +namespace { + +using namespace tint::core::fluent_types; // NOLINT +using namespace tint::core::number_suffixes; // NOLINT + +using ResolverTexelBufferTest = ResolverTest; + +struct FormatParams { + core::TexelFormat format; + bool is_valid; +}; + +#define VALID_FORMAT_CASE(FMT) \ + FormatParams { \ + core::TexelFormat::FMT, true \ + } + +static constexpr FormatParams kFormatCases[] = { + VALID_FORMAT_CASE(kBgra8Unorm), VALID_FORMAT_CASE(kR32Float), VALID_FORMAT_CASE(kR32Sint), + VALID_FORMAT_CASE(kR32Uint), VALID_FORMAT_CASE(kR8Unorm), VALID_FORMAT_CASE(kRg32Float), + VALID_FORMAT_CASE(kRg32Sint), VALID_FORMAT_CASE(kRg32Uint), VALID_FORMAT_CASE(kRgba16Float), + VALID_FORMAT_CASE(kRgba16Sint), VALID_FORMAT_CASE(kRgba16Uint), VALID_FORMAT_CASE(kRgba32Float), + VALID_FORMAT_CASE(kRgba32Sint), VALID_FORMAT_CASE(kRgba32Uint), VALID_FORMAT_CASE(kRgba8Sint), + VALID_FORMAT_CASE(kRgba8Snorm), VALID_FORMAT_CASE(kRgba8Uint), VALID_FORMAT_CASE(kRgba8Unorm), +}; +#undef VALID_FORMAT_CASE + +using TexelBufferFormatTest = ResolverTestWithParam<FormatParams>; + +// Tests that the texel_buffer format is valid or invalid based on the +// format parameter. +TEST_P(TexelBufferFormatTest, Usage) { + auto& params = GetParam(); + Require(wgsl::LanguageFeature::kTexelBuffers); + + auto tb = ty(Source{{12, 34}}, "texel_buffer", tint::ToString(params.format), + tint::ToString(core::Access::kRead)); + GlobalVar("a", tb, Group(0_a), Binding(0_a)); + + if (params.is_valid) { + EXPECT_TRUE(r()->Resolve()) << r()->error(); + } else { + EXPECT_FALSE(r()->Resolve()); + EXPECT_EQ(r()->error(), + "12:34 error: image format must be one of the texel formats " + "specified for texel buffers in https://gpuweb.github.io/" + "gpuweb/wgsl/#texel-formats"); + } +} +INSTANTIATE_TEST_SUITE_P(ResolverTexelBufferTest, + TexelBufferFormatTest, + testing::ValuesIn(kFormatCases)); + +// Requires 2 template arguments: format and access +TEST_F(ResolverTexelBufferTest, MissingAccess) { + Require(wgsl::LanguageFeature::kTexelBuffers); + auto tb = ty(Source{{12, 34}}, "texel_buffer", "rgba32float"); + GlobalVar("a", tb, Group(0_a), Binding(0_a)); + + EXPECT_FALSE(r()->Resolve()); + EXPECT_EQ(r()->error(), R"(12:34 error: 'texel_buffer' requires 2 template arguments)"); +} + +// Access must be read or read_write +TEST_F(ResolverTexelBufferTest, InvalidAccess) { + Require(wgsl::LanguageFeature::kTexelBuffers); + auto tb = + ty(Source{{12, 34}}, "texel_buffer", "rgba32float", Expr(Source{{12, 34}}, "read_only")); + GlobalVar("a", tb, Group(0_a), Binding(0_a)); + + EXPECT_FALSE(r()->Resolve()); + EXPECT_EQ(r()->error(), + R"(12:34 error: unresolved access 'read_only' +12:34 note: Possible values: 'read', 'read_write', 'write')"); +} + +// Access must be read or read_write, not write +TEST_F(ResolverTexelBufferTest, WriteOnlyAccess) { + Require(wgsl::LanguageFeature::kTexelBuffers); + auto tb = ty(Source{{12, 34}}, "texel_buffer", "rgba32float", "write"); + GlobalVar("a", tb, Group(0_a), Binding(0_a)); + + EXPECT_FALSE(r()->Resolve()); + EXPECT_EQ(r()->error(), R"(12:34 error: texel_buffer access must be read or read_write)"); +} + +// Requires the texel_buffer language feature to be enabled +TEST_F(ResolverTexelBufferTest, FeatureRequired) { + auto tb = ty(Source{{12, 34}}, "texel_buffer", "rgba32float", "read"); + GlobalVar("a", tb, Group(0_a), Binding(0_a)); + + Resolver resolver{this, wgsl::AllowedFeatures{}}; + EXPECT_FALSE(resolver.Resolve()); + EXPECT_EQ(resolver.error(), + "12:34 error: use of 'texel_buffer' requires the texel_buffer language " + "feature, which is not allowed in the current environment"); +} + +enum class SubtypeKind { + kF16, + kI8, + kU8, +}; + +struct SubtypeParams { + SubtypeKind kind; +}; + +static constexpr SubtypeParams kInvalidSubtypeCases[] = { + {SubtypeKind::kF16}, + {SubtypeKind::kI8}, + {SubtypeKind::kU8}, +}; + +using TexelBufferSubtypeTest = ResolverTestWithParam<SubtypeParams>; + +// Storage subtype must be f32, i32 or u32 +TEST_P(TexelBufferSubtypeTest, InvalidSubtype) { + auto& params = GetParam(); + Require(wgsl::LanguageFeature::kTexelBuffers); + + const core::type::Type* subtype = nullptr; + switch (params.kind) { + case SubtypeKind::kF16: + subtype = create<core::type::F16>(); + break; + case SubtypeKind::kI8: + subtype = create<core::type::I8>(); + break; + case SubtypeKind::kU8: + subtype = create<core::type::U8>(); + break; + } + + auto* tb_ty = create<core::type::TexelBuffer>(core::TexelFormat::kRgba32Float, + core::Access::kRead, subtype); + + EXPECT_FALSE(v()->TexelBuffer(tb_ty, Source{{12, 34}})); + EXPECT_EQ(r()->error(), + "12:34 error: texel_buffer<format, access>: storage subtype must " + "be f32, i32 or u32"); +} + +INSTANTIATE_TEST_SUITE_P(ResolverTexelBufferTest, + TexelBufferSubtypeTest, + testing::ValuesIn(kInvalidSubtypeCases)); + +// texel_buffer used as struct member +TEST_F(ResolverTexelBufferTest, StructMember) { + Require(wgsl::LanguageFeature::kTexelBuffers); + + auto* s = Structure( + "S", Vector{ + Member("buf", ty(Source{{12, 34}}, "texel_buffer", "rgba32float", "read")), + }); + + GlobalVar("g", ty.Of(s), core::AddressSpace::kStorage, core::Access::kRead, Binding(0_a), + Group(0_a)); + + EXPECT_FALSE(r()->Resolve()); + EXPECT_EQ(r()->error(), + "error: texel_buffer<rgba32float, read> cannot be used as the " + "type of a structure member"); +} + +// texel_buffer used as function parameter +TEST_F(ResolverTexelBufferTest, FunctionParameter) { + Require(wgsl::LanguageFeature::kTexelBuffers); + + Func("f", Vector{Param("p", ty(Source{{12, 34}}, "texel_buffer", "rgba32float", "read_write"))}, + ty.void_(), Empty); + + EXPECT_TRUE(r()->Resolve()) << r()->error(); +} + +// Global variable missing binding or group attributes +TEST_F(ResolverTexelBufferTest, MissingBinding) { + Require(wgsl::LanguageFeature::kTexelBuffers); + GlobalVar(Source{{12, 34}}, "G", ty("texel_buffer", "rgba32float", "read")); + + EXPECT_FALSE(r()->Resolve()); + EXPECT_EQ(r()->error(), + "12:34 error: resource variables require '@group' and " + "'@binding' attributes"); +} + +} // namespace +} // namespace tint::resolver
diff --git a/src/tint/lang/wgsl/resolver/validator.cc b/src/tint/lang/wgsl/resolver/validator.cc index bf9e4cd..dd395ec 100644 --- a/src/tint/lang/wgsl/resolver/validator.cc +++ b/src/tint/lang/wgsl/resolver/validator.cc
@@ -502,6 +502,38 @@ return true; } +bool Validator::TexelBuffer(const core::type::TexelBuffer* t, const Source& source) const { + if (!allowed_features_.features.count(wgsl::LanguageFeature::kTexelBuffers)) { + AddError(source) << "use of " << style::Type("texel_buffer") + << " requires the texel_buffer language feature, which is not allowed " + "in the current environment"; + return false; + } + + if (!IsValidStorageTextureTexelFormat(t->TexelFormat())) { + AddError(source) << "texel_buffer format must be one of the texel formats specified for " + "texel buffers in https://gpuweb.github.io/gpuweb/wgsl/#texel-formats"; + return false; + } + + if (!t->Type()->IsAnyOf<core::type::F32, core::type::I32, core::type::U32>()) { + AddError(source) << "texel_buffer<format, access>: storage subtype must be f32, i32 or u32"; + return false; + } + + if (t->Dim() != core::type::TextureDimension::k1d) { + AddError(source) << "texel_buffer must be a 1d texture"; + return false; + } + + if (t->Access() != core::Access::kRead && t->Access() != core::Access::kReadWrite) { + AddError(source) << "texel_buffer access must be read or read_write"; + return false; + } + + return true; +} + bool Validator::Materialize(const core::type::Type* to, const core::type::Type* from, const Source& source) const {
diff --git a/src/tint/lang/wgsl/resolver/validator.h b/src/tint/lang/wgsl/resolver/validator.h index 6dfa0ac..3a76e85 100644 --- a/src/tint/lang/wgsl/resolver/validator.h +++ b/src/tint/lang/wgsl/resolver/validator.h
@@ -430,6 +430,12 @@ /// @returns true on success, false otherwise bool StorageTexture(const core::type::StorageTexture* t, const Source& source) const; + /// Validates a texel buffer + /// @param t the texel buffer to validate + /// @param source the source of the texel buffer + /// @returns true on success, false otherwise + bool TexelBuffer(const core::type::TexelBuffer* t, const Source& source) const; + /// Validates a sampled texture /// @param t the texture to validate /// @param source the source of the texture