[glsl][ir] Handle sampler-less depth textures.
When a depth texture is used without a sampler it's treated as a sampled
texture of type `f32`. This CL updates the code to correctly handle this
edge case.
Bug: 42251044
Change-Id: I67fc5a3f0979dbd3ed4ab365ecbfafe5ccc2f5e9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/209574
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
diff --git a/src/tint/lang/glsl/glsl.def b/src/tint/lang/glsl/glsl.def
index ecc6664..75c8c20 100644
--- a/src/tint/lang/glsl/glsl.def
+++ b/src/tint/lang/glsl/glsl.def
@@ -356,6 +356,8 @@
location: vec2<i32>,
sample_index: i32) -> vec4<T>
implicit(T: fiu32) fn texelFetch(texture: texture_3d<T>, location: vec3<i32>, level: i32) -> vec4<T>
+// This ends up emitting as a 2DMS
+fn texelFetch(texture: texture_depth_multisampled_2d, location: vec2<i32>, sample_index: i32) -> vec4<f32>
implicit(F: f32_texel_format, A: readable) fn imageLoad(texture: texture_storage_1d<F, A>,
coords: i32) -> vec4<f32>
diff --git a/src/tint/lang/glsl/intrinsic/data.cc b/src/tint/lang/glsl/intrinsic/data.cc
index d2468f2..5fc4728 100644
--- a/src/tint/lang/glsl/intrinsic/data.cc
+++ b/src/tint/lang/glsl/intrinsic/data.cc
@@ -1943,22 +1943,22 @@
{
/* [167] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(62),
+ /* matcher_indices */ MatcherIndicesIndex(146),
},
{
/* [168] */
- /* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(10),
+ /* usage */ core::ParameterUsage::kLocation,
+ /* matcher_indices */ MatcherIndicesIndex(115),
},
{
/* [169] */
- /* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(103),
+ /* usage */ core::ParameterUsage::kSampleIndex,
+ /* matcher_indices */ MatcherIndicesIndex(10),
},
{
/* [170] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(65),
+ /* matcher_indices */ MatcherIndicesIndex(62),
},
{
/* [171] */
@@ -1968,12 +1968,12 @@
{
/* [172] */
/* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(133),
+ /* matcher_indices */ MatcherIndicesIndex(103),
},
{
/* [173] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(68),
+ /* matcher_indices */ MatcherIndicesIndex(65),
},
{
/* [174] */
@@ -1983,27 +1983,27 @@
{
/* [175] */
/* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(135),
+ /* matcher_indices */ MatcherIndicesIndex(133),
},
{
/* [176] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(71),
+ /* matcher_indices */ MatcherIndicesIndex(68),
},
{
/* [177] */
/* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(115),
+ /* matcher_indices */ MatcherIndicesIndex(10),
},
{
/* [178] */
/* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(103),
+ /* matcher_indices */ MatcherIndicesIndex(135),
},
{
/* [179] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(74),
+ /* matcher_indices */ MatcherIndicesIndex(71),
},
{
/* [180] */
@@ -2013,12 +2013,12 @@
{
/* [181] */
/* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(133),
+ /* matcher_indices */ MatcherIndicesIndex(103),
},
{
/* [182] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(77),
+ /* matcher_indices */ MatcherIndicesIndex(74),
},
{
/* [183] */
@@ -2028,27 +2028,27 @@
{
/* [184] */
/* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(135),
+ /* matcher_indices */ MatcherIndicesIndex(133),
},
{
/* [185] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(80),
+ /* matcher_indices */ MatcherIndicesIndex(77),
},
{
/* [186] */
/* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(117),
+ /* matcher_indices */ MatcherIndicesIndex(115),
},
{
/* [187] */
/* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(103),
+ /* matcher_indices */ MatcherIndicesIndex(135),
},
{
/* [188] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(83),
+ /* matcher_indices */ MatcherIndicesIndex(80),
},
{
/* [189] */
@@ -2058,12 +2058,12 @@
{
/* [190] */
/* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(133),
+ /* matcher_indices */ MatcherIndicesIndex(103),
},
{
/* [191] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(86),
+ /* matcher_indices */ MatcherIndicesIndex(83),
},
{
/* [192] */
@@ -2073,12 +2073,12 @@
{
/* [193] */
/* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(135),
+ /* matcher_indices */ MatcherIndicesIndex(133),
},
{
/* [194] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(89),
+ /* matcher_indices */ MatcherIndicesIndex(86),
},
{
/* [195] */
@@ -2088,12 +2088,12 @@
{
/* [196] */
/* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(103),
+ /* matcher_indices */ MatcherIndicesIndex(135),
},
{
/* [197] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(92),
+ /* matcher_indices */ MatcherIndicesIndex(89),
},
{
/* [198] */
@@ -2103,12 +2103,12 @@
{
/* [199] */
/* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(133),
+ /* matcher_indices */ MatcherIndicesIndex(103),
},
{
/* [200] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(95),
+ /* matcher_indices */ MatcherIndicesIndex(92),
},
{
/* [201] */
@@ -2118,243 +2118,253 @@
{
/* [202] */
/* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(135),
+ /* matcher_indices */ MatcherIndicesIndex(133),
},
{
/* [203] */
- /* usage */ core::ParameterUsage::kNone,
- /* matcher_indices */ MatcherIndicesIndex(22),
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(95),
},
{
/* [204] */
- /* usage */ core::ParameterUsage::kNone,
- /* matcher_indices */ MatcherIndicesIndex(3),
+ /* usage */ core::ParameterUsage::kCoords,
+ /* matcher_indices */ MatcherIndicesIndex(117),
},
{
/* [205] */
- /* usage */ core::ParameterUsage::kNone,
- /* matcher_indices */ MatcherIndicesIndex(44),
+ /* usage */ core::ParameterUsage::kValue,
+ /* matcher_indices */ MatcherIndicesIndex(135),
},
{
/* [206] */
/* usage */ core::ParameterUsage::kNone,
- /* matcher_indices */ MatcherIndicesIndex(44),
+ /* matcher_indices */ MatcherIndicesIndex(22),
},
{
/* [207] */
- /* usage */ core::ParameterUsage::kValue,
+ /* usage */ core::ParameterUsage::kNone,
/* matcher_indices */ MatcherIndicesIndex(3),
},
{
/* [208] */
- /* usage */ core::ParameterUsage::kResult,
- /* matcher_indices */ MatcherIndicesIndex(27),
+ /* usage */ core::ParameterUsage::kNone,
+ /* matcher_indices */ MatcherIndicesIndex(44),
},
{
/* [209] */
- /* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(2),
+ /* usage */ core::ParameterUsage::kNone,
+ /* matcher_indices */ MatcherIndicesIndex(44),
},
{
/* [210] */
- /* usage */ core::ParameterUsage::kResult,
- /* matcher_indices */ MatcherIndicesIndex(0),
- },
- {
- /* [211] */
/* usage */ core::ParameterUsage::kValue,
/* matcher_indices */ MatcherIndicesIndex(3),
},
{
- /* [212] */
- /* usage */ core::ParameterUsage::kExp,
- /* matcher_indices */ MatcherIndicesIndex(31),
+ /* [211] */
+ /* usage */ core::ParameterUsage::kResult,
+ /* matcher_indices */ MatcherIndicesIndex(27),
},
{
- /* [213] */
+ /* [212] */
/* usage */ core::ParameterUsage::kValue,
/* matcher_indices */ MatcherIndicesIndex(2),
},
{
+ /* [213] */
+ /* usage */ core::ParameterUsage::kResult,
+ /* matcher_indices */ MatcherIndicesIndex(0),
+ },
+ {
/* [214] */
+ /* usage */ core::ParameterUsage::kValue,
+ /* matcher_indices */ MatcherIndicesIndex(3),
+ },
+ {
+ /* [215] */
+ /* usage */ core::ParameterUsage::kExp,
+ /* matcher_indices */ MatcherIndicesIndex(31),
+ },
+ {
+ /* [216] */
+ /* usage */ core::ParameterUsage::kValue,
+ /* matcher_indices */ MatcherIndicesIndex(2),
+ },
+ {
+ /* [217] */
/* usage */ core::ParameterUsage::kExp,
/* matcher_indices */ MatcherIndicesIndex(6),
},
{
- /* [215] */
+ /* [218] */
/* usage */ core::ParameterUsage::kTexture,
/* matcher_indices */ MatcherIndicesIndex(121),
},
{
- /* [216] */
+ /* [219] */
/* usage */ core::ParameterUsage::kLevel,
/* matcher_indices */ MatcherIndicesIndex(10),
},
{
- /* [217] */
+ /* [220] */
/* usage */ core::ParameterUsage::kTexture,
/* matcher_indices */ MatcherIndicesIndex(123),
},
{
- /* [218] */
+ /* [221] */
/* usage */ core::ParameterUsage::kLevel,
/* matcher_indices */ MatcherIndicesIndex(10),
},
{
- /* [219] */
+ /* [222] */
/* usage */ core::ParameterUsage::kTexture,
/* matcher_indices */ MatcherIndicesIndex(129),
},
{
- /* [220] */
+ /* [223] */
/* usage */ core::ParameterUsage::kLevel,
/* matcher_indices */ MatcherIndicesIndex(10),
},
{
- /* [221] */
+ /* [224] */
/* usage */ core::ParameterUsage::kTexture,
/* matcher_indices */ MatcherIndicesIndex(125),
},
{
- /* [222] */
+ /* [225] */
/* usage */ core::ParameterUsage::kLevel,
/* matcher_indices */ MatcherIndicesIndex(10),
},
{
- /* [223] */
+ /* [226] */
/* usage */ core::ParameterUsage::kTexture,
/* matcher_indices */ MatcherIndicesIndex(127),
},
{
- /* [224] */
+ /* [227] */
/* usage */ core::ParameterUsage::kLevel,
/* matcher_indices */ MatcherIndicesIndex(10),
},
{
- /* [225] */
+ /* [228] */
/* usage */ core::ParameterUsage::kTexture,
/* matcher_indices */ MatcherIndicesIndex(141),
},
{
- /* [226] */
+ /* [229] */
/* usage */ core::ParameterUsage::kLevel,
/* matcher_indices */ MatcherIndicesIndex(10),
},
{
- /* [227] */
+ /* [230] */
/* usage */ core::ParameterUsage::kTexture,
/* matcher_indices */ MatcherIndicesIndex(142),
},
{
- /* [228] */
+ /* [231] */
/* usage */ core::ParameterUsage::kLevel,
/* matcher_indices */ MatcherIndicesIndex(10),
},
{
- /* [229] */
+ /* [232] */
/* usage */ core::ParameterUsage::kTexture,
/* matcher_indices */ MatcherIndicesIndex(143),
},
{
- /* [230] */
+ /* [233] */
/* usage */ core::ParameterUsage::kLevel,
/* matcher_indices */ MatcherIndicesIndex(10),
},
{
- /* [231] */
+ /* [234] */
/* usage */ core::ParameterUsage::kTexture,
/* matcher_indices */ MatcherIndicesIndex(144),
},
{
- /* [232] */
+ /* [235] */
/* usage */ core::ParameterUsage::kLevel,
/* matcher_indices */ MatcherIndicesIndex(10),
},
{
- /* [233] */
+ /* [236] */
/* usage */ core::ParameterUsage::kTexture,
/* matcher_indices */ MatcherIndicesIndex(50),
},
{
- /* [234] */
+ /* [237] */
/* usage */ core::ParameterUsage::kCoords,
/* matcher_indices */ MatcherIndicesIndex(10),
},
{
- /* [235] */
+ /* [238] */
/* usage */ core::ParameterUsage::kTexture,
/* matcher_indices */ MatcherIndicesIndex(53),
},
{
- /* [236] */
+ /* [239] */
/* usage */ core::ParameterUsage::kCoords,
/* matcher_indices */ MatcherIndicesIndex(115),
},
{
- /* [237] */
+ /* [240] */
/* usage */ core::ParameterUsage::kTexture,
/* matcher_indices */ MatcherIndicesIndex(56),
},
{
- /* [238] */
+ /* [241] */
/* usage */ core::ParameterUsage::kCoords,
/* matcher_indices */ MatcherIndicesIndex(117),
},
{
- /* [239] */
+ /* [242] */
/* usage */ core::ParameterUsage::kTexture,
/* matcher_indices */ MatcherIndicesIndex(59),
},
{
- /* [240] */
+ /* [243] */
/* usage */ core::ParameterUsage::kCoords,
/* matcher_indices */ MatcherIndicesIndex(117),
},
{
- /* [241] */
+ /* [244] */
/* usage */ core::ParameterUsage::kNone,
/* matcher_indices */ MatcherIndicesIndex(12),
},
{
- /* [242] */
+ /* [245] */
/* usage */ core::ParameterUsage::kValue,
/* matcher_indices */ MatcherIndicesIndex(37),
},
{
- /* [243] */
+ /* [246] */
/* usage */ core::ParameterUsage::kValue,
/* matcher_indices */ MatcherIndicesIndex(35),
},
{
- /* [244] */
+ /* [247] */
/* usage */ core::ParameterUsage::kValue,
/* matcher_indices */ MatcherIndicesIndex(10),
},
{
- /* [245] */
+ /* [248] */
/* usage */ core::ParameterUsage::kValue,
/* matcher_indices */ MatcherIndicesIndex(8),
},
{
- /* [246] */
+ /* [249] */
/* usage */ core::ParameterUsage::kValue,
/* matcher_indices */ MatcherIndicesIndex(1),
},
{
- /* [247] */
+ /* [250] */
/* usage */ core::ParameterUsage::kValue,
/* matcher_indices */ MatcherIndicesIndex(38),
},
{
- /* [248] */
+ /* [251] */
/* usage */ core::ParameterUsage::kValue,
/* matcher_indices */ MatcherIndicesIndex(101),
},
- {
- /* [249] */
- /* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(146),
- },
};
static_assert(ParameterIndex::CanIndex(kParameters),
@@ -2680,7 +2690,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(13),
- /* parameters */ ParameterIndex(233),
+ /* parameters */ ParameterIndex(236),
/* return_matcher_indices */ MatcherIndicesIndex(103),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2691,7 +2701,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(13),
- /* parameters */ ParameterIndex(235),
+ /* parameters */ ParameterIndex(238),
/* return_matcher_indices */ MatcherIndicesIndex(103),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2702,7 +2712,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(13),
- /* parameters */ ParameterIndex(237),
+ /* parameters */ ParameterIndex(240),
/* return_matcher_indices */ MatcherIndicesIndex(103),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2713,7 +2723,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(13),
- /* parameters */ ParameterIndex(239),
+ /* parameters */ ParameterIndex(242),
/* return_matcher_indices */ MatcherIndicesIndex(103),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2724,7 +2734,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(15),
- /* parameters */ ParameterIndex(233),
+ /* parameters */ ParameterIndex(236),
/* return_matcher_indices */ MatcherIndicesIndex(133),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2735,7 +2745,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(15),
- /* parameters */ ParameterIndex(235),
+ /* parameters */ ParameterIndex(238),
/* return_matcher_indices */ MatcherIndicesIndex(133),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2746,7 +2756,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(15),
- /* parameters */ ParameterIndex(237),
+ /* parameters */ ParameterIndex(240),
/* return_matcher_indices */ MatcherIndicesIndex(133),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2757,7 +2767,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(15),
- /* parameters */ ParameterIndex(239),
+ /* parameters */ ParameterIndex(242),
/* return_matcher_indices */ MatcherIndicesIndex(133),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2768,7 +2778,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(17),
- /* parameters */ ParameterIndex(233),
+ /* parameters */ ParameterIndex(236),
/* return_matcher_indices */ MatcherIndicesIndex(135),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2779,7 +2789,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(17),
- /* parameters */ ParameterIndex(235),
+ /* parameters */ ParameterIndex(238),
/* return_matcher_indices */ MatcherIndicesIndex(135),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2790,7 +2800,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(17),
- /* parameters */ ParameterIndex(237),
+ /* parameters */ ParameterIndex(240),
/* return_matcher_indices */ MatcherIndicesIndex(135),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2801,7 +2811,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(17),
- /* parameters */ ParameterIndex(239),
+ /* parameters */ ParameterIndex(242),
/* return_matcher_indices */ MatcherIndicesIndex(135),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2812,7 +2822,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(167),
+ /* parameters */ ParameterIndex(170),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2823,7 +2833,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(170),
+ /* parameters */ ParameterIndex(173),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2834,7 +2844,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(173),
+ /* parameters */ ParameterIndex(176),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2845,7 +2855,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(176),
+ /* parameters */ ParameterIndex(179),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2856,7 +2866,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(179),
+ /* parameters */ ParameterIndex(182),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2867,7 +2877,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(182),
+ /* parameters */ ParameterIndex(185),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2878,7 +2888,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(185),
+ /* parameters */ ParameterIndex(188),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2889,7 +2899,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(188),
+ /* parameters */ ParameterIndex(191),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2900,7 +2910,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(191),
+ /* parameters */ ParameterIndex(194),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2911,7 +2921,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(194),
+ /* parameters */ ParameterIndex(197),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2922,7 +2932,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(197),
+ /* parameters */ ParameterIndex(200),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2933,7 +2943,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(200),
+ /* parameters */ ParameterIndex(203),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2944,7 +2954,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(23),
- /* parameters */ ParameterIndex(215),
+ /* parameters */ ParameterIndex(218),
/* return_matcher_indices */ MatcherIndicesIndex(115),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2955,7 +2965,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(23),
- /* parameters */ ParameterIndex(217),
+ /* parameters */ ParameterIndex(220),
/* return_matcher_indices */ MatcherIndicesIndex(117),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2966,7 +2976,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(23),
- /* parameters */ ParameterIndex(219),
+ /* parameters */ ParameterIndex(222),
/* return_matcher_indices */ MatcherIndicesIndex(117),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2977,7 +2987,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(23),
- /* parameters */ ParameterIndex(221),
+ /* parameters */ ParameterIndex(224),
/* return_matcher_indices */ MatcherIndicesIndex(115),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2988,7 +2998,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(23),
- /* parameters */ ParameterIndex(223),
+ /* parameters */ ParameterIndex(226),
/* return_matcher_indices */ MatcherIndicesIndex(117),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2999,7 +3009,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(225),
+ /* parameters */ ParameterIndex(228),
/* return_matcher_indices */ MatcherIndicesIndex(115),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -3010,7 +3020,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(227),
+ /* parameters */ ParameterIndex(230),
/* return_matcher_indices */ MatcherIndicesIndex(117),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -3021,7 +3031,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(229),
+ /* parameters */ ParameterIndex(232),
/* return_matcher_indices */ MatcherIndicesIndex(115),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -3032,7 +3042,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(231),
+ /* parameters */ ParameterIndex(234),
/* return_matcher_indices */ MatcherIndicesIndex(117),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -3054,7 +3064,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(249),
+ /* parameters */ ParameterIndex(167),
/* return_matcher_indices */ MatcherIndicesIndex(115),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -3413,138 +3423,6 @@
{
/* [81] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* num_parameters */ 4,
- /* num_explicit_templates */ 0,
- /* num_templates */ 0,
- /* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(49),
- /* return_matcher_indices */ MatcherIndicesIndex(103),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
- /* [82] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* num_parameters */ 4,
- /* num_explicit_templates */ 0,
- /* num_templates */ 0,
- /* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(53),
- /* return_matcher_indices */ MatcherIndicesIndex(103),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
- /* [83] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* num_parameters */ 4,
- /* num_explicit_templates */ 0,
- /* num_templates */ 0,
- /* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(57),
- /* return_matcher_indices */ MatcherIndicesIndex(103),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
- /* [84] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* num_parameters */ 4,
- /* num_explicit_templates */ 0,
- /* num_templates */ 0,
- /* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(61),
- /* return_matcher_indices */ MatcherIndicesIndex(37),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
- /* [85] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
- /* num_parameters */ 4,
- /* num_explicit_templates */ 0,
- /* num_templates */ 1,
- /* templates */ TemplateIndex(23),
- /* parameters */ ParameterIndex(77),
- /* return_matcher_indices */ MatcherIndicesIndex(119),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
- /* [86] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
- /* num_parameters */ 4,
- /* num_explicit_templates */ 0,
- /* num_templates */ 1,
- /* templates */ TemplateIndex(23),
- /* parameters */ ParameterIndex(81),
- /* return_matcher_indices */ MatcherIndicesIndex(119),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
- /* [87] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
- /* num_parameters */ 4,
- /* num_explicit_templates */ 0,
- /* num_templates */ 0,
- /* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(85),
- /* return_matcher_indices */ MatcherIndicesIndex(103),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
- /* [88] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
- /* num_parameters */ 4,
- /* num_explicit_templates */ 0,
- /* num_templates */ 0,
- /* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(89),
- /* return_matcher_indices */ MatcherIndicesIndex(103),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
- /* [89] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
- /* num_parameters */ 1,
- /* num_explicit_templates */ 0,
- /* num_templates */ 2,
- /* templates */ TemplateIndex(11),
- /* parameters */ ParameterIndex(233),
- /* return_matcher_indices */ MatcherIndicesIndex(10),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
- /* [90] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
- /* num_parameters */ 1,
- /* num_explicit_templates */ 0,
- /* num_templates */ 2,
- /* templates */ TemplateIndex(11),
- /* parameters */ ParameterIndex(235),
- /* return_matcher_indices */ MatcherIndicesIndex(115),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
- /* [91] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
- /* num_parameters */ 1,
- /* num_explicit_templates */ 0,
- /* num_templates */ 2,
- /* templates */ TemplateIndex(11),
- /* parameters */ ParameterIndex(237),
- /* return_matcher_indices */ MatcherIndicesIndex(117),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
- /* [92] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
- /* num_parameters */ 1,
- /* num_explicit_templates */ 0,
- /* num_templates */ 2,
- /* templates */ TemplateIndex(11),
- /* parameters */ ParameterIndex(239),
- /* return_matcher_indices */ MatcherIndicesIndex(117),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
- /* [93] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
/* num_templates */ 1,
@@ -3554,7 +3432,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [94] */
+ /* [82] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
@@ -3565,7 +3443,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [95] */
+ /* [83] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
@@ -3576,7 +3454,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [96] */
+ /* [84] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
@@ -3587,7 +3465,150 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
+ /* [85] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* num_parameters */ 3,
+ /* num_explicit_templates */ 0,
+ /* num_templates */ 0,
+ /* templates */ TemplateIndex(/* invalid */),
+ /* parameters */ ParameterIndex(167),
+ /* return_matcher_indices */ MatcherIndicesIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [86] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* num_parameters */ 4,
+ /* num_explicit_templates */ 0,
+ /* num_templates */ 0,
+ /* templates */ TemplateIndex(/* invalid */),
+ /* parameters */ ParameterIndex(49),
+ /* return_matcher_indices */ MatcherIndicesIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [87] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* num_parameters */ 4,
+ /* num_explicit_templates */ 0,
+ /* num_templates */ 0,
+ /* templates */ TemplateIndex(/* invalid */),
+ /* parameters */ ParameterIndex(53),
+ /* return_matcher_indices */ MatcherIndicesIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [88] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* num_parameters */ 4,
+ /* num_explicit_templates */ 0,
+ /* num_templates */ 0,
+ /* templates */ TemplateIndex(/* invalid */),
+ /* parameters */ ParameterIndex(57),
+ /* return_matcher_indices */ MatcherIndicesIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [89] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* num_parameters */ 4,
+ /* num_explicit_templates */ 0,
+ /* num_templates */ 0,
+ /* templates */ TemplateIndex(/* invalid */),
+ /* parameters */ ParameterIndex(61),
+ /* return_matcher_indices */ MatcherIndicesIndex(37),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [90] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* num_parameters */ 4,
+ /* num_explicit_templates */ 0,
+ /* num_templates */ 1,
+ /* templates */ TemplateIndex(23),
+ /* parameters */ ParameterIndex(77),
+ /* return_matcher_indices */ MatcherIndicesIndex(119),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [91] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* num_parameters */ 4,
+ /* num_explicit_templates */ 0,
+ /* num_templates */ 1,
+ /* templates */ TemplateIndex(23),
+ /* parameters */ ParameterIndex(81),
+ /* return_matcher_indices */ MatcherIndicesIndex(119),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [92] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* num_parameters */ 4,
+ /* num_explicit_templates */ 0,
+ /* num_templates */ 0,
+ /* templates */ TemplateIndex(/* invalid */),
+ /* parameters */ ParameterIndex(85),
+ /* return_matcher_indices */ MatcherIndicesIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [93] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* num_parameters */ 4,
+ /* num_explicit_templates */ 0,
+ /* num_templates */ 0,
+ /* templates */ TemplateIndex(/* invalid */),
+ /* parameters */ ParameterIndex(89),
+ /* return_matcher_indices */ MatcherIndicesIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [94] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* num_parameters */ 1,
+ /* num_explicit_templates */ 0,
+ /* num_templates */ 2,
+ /* templates */ TemplateIndex(11),
+ /* parameters */ ParameterIndex(236),
+ /* return_matcher_indices */ MatcherIndicesIndex(10),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [95] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* num_parameters */ 1,
+ /* num_explicit_templates */ 0,
+ /* num_templates */ 2,
+ /* templates */ TemplateIndex(11),
+ /* parameters */ ParameterIndex(238),
+ /* return_matcher_indices */ MatcherIndicesIndex(115),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [96] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* num_parameters */ 1,
+ /* num_explicit_templates */ 0,
+ /* num_templates */ 2,
+ /* templates */ TemplateIndex(11),
+ /* parameters */ ParameterIndex(240),
+ /* return_matcher_indices */ MatcherIndicesIndex(117),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
/* [97] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* num_parameters */ 1,
+ /* num_explicit_templates */ 0,
+ /* num_templates */ 2,
+ /* templates */ TemplateIndex(11),
+ /* parameters */ ParameterIndex(242),
+ /* return_matcher_indices */ MatcherIndicesIndex(117),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [98] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
@@ -3598,7 +3619,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [98] */
+ /* [99] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
@@ -3609,7 +3630,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [99] */
+ /* [100] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 4,
/* num_explicit_templates */ 0,
@@ -3620,36 +3641,25 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [100] */
+ /* [101] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(242),
+ /* parameters */ ParameterIndex(245),
/* return_matcher_indices */ MatcherIndicesIndex(10),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [101] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* num_parameters */ 1,
- /* num_explicit_templates */ 0,
- /* num_templates */ 1,
- /* templates */ TemplateIndex(5),
- /* parameters */ ParameterIndex(243),
- /* return_matcher_indices */ MatcherIndicesIndex(8),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
/* [102] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
- /* num_templates */ 0,
- /* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(242),
- /* return_matcher_indices */ MatcherIndicesIndex(1),
+ /* num_templates */ 1,
+ /* templates */ TemplateIndex(5),
+ /* parameters */ ParameterIndex(246),
+ /* return_matcher_indices */ MatcherIndicesIndex(8),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
@@ -3657,10 +3667,10 @@
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
- /* num_templates */ 1,
- /* templates */ TemplateIndex(5),
- /* parameters */ ParameterIndex(243),
- /* return_matcher_indices */ MatcherIndicesIndex(38),
+ /* num_templates */ 0,
+ /* templates */ TemplateIndex(/* invalid */),
+ /* parameters */ ParameterIndex(245),
+ /* return_matcher_indices */ MatcherIndicesIndex(1),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
@@ -3668,10 +3678,10 @@
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
- /* num_templates */ 0,
- /* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(244),
- /* return_matcher_indices */ MatcherIndicesIndex(37),
+ /* num_templates */ 1,
+ /* templates */ TemplateIndex(5),
+ /* parameters */ ParameterIndex(246),
+ /* return_matcher_indices */ MatcherIndicesIndex(38),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
@@ -3679,10 +3689,10 @@
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
- /* num_templates */ 1,
- /* templates */ TemplateIndex(5),
- /* parameters */ ParameterIndex(245),
- /* return_matcher_indices */ MatcherIndicesIndex(35),
+ /* num_templates */ 0,
+ /* templates */ TemplateIndex(/* invalid */),
+ /* parameters */ ParameterIndex(247),
+ /* return_matcher_indices */ MatcherIndicesIndex(37),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
@@ -3690,10 +3700,10 @@
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
- /* num_templates */ 0,
- /* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(246),
- /* return_matcher_indices */ MatcherIndicesIndex(37),
+ /* num_templates */ 1,
+ /* templates */ TemplateIndex(5),
+ /* parameters */ ParameterIndex(248),
+ /* return_matcher_indices */ MatcherIndicesIndex(35),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
@@ -3701,10 +3711,10 @@
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
- /* num_templates */ 1,
- /* templates */ TemplateIndex(5),
- /* parameters */ ParameterIndex(247),
- /* return_matcher_indices */ MatcherIndicesIndex(35),
+ /* num_templates */ 0,
+ /* templates */ TemplateIndex(/* invalid */),
+ /* parameters */ ParameterIndex(249),
+ /* return_matcher_indices */ MatcherIndicesIndex(37),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
@@ -3713,13 +3723,24 @@
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
/* num_templates */ 1,
+ /* templates */ TemplateIndex(5),
+ /* parameters */ ParameterIndex(250),
+ /* return_matcher_indices */ MatcherIndicesIndex(35),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [109] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* num_parameters */ 1,
+ /* num_explicit_templates */ 0,
+ /* num_templates */ 1,
/* templates */ TemplateIndex(2),
/* parameters */ ParameterIndex(95),
/* return_matcher_indices */ MatcherIndicesIndex(10),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [109] */
+ /* [110] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
@@ -3730,7 +3751,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [110] */
+ /* [111] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
@@ -3741,7 +3762,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [111] */
+ /* [112] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
@@ -3752,7 +3773,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [112] */
+ /* [113] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 4,
/* num_explicit_templates */ 0,
@@ -3763,7 +3784,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [113] */
+ /* [114] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 4,
/* num_explicit_templates */ 0,
@@ -3774,7 +3795,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [114] */
+ /* [115] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
@@ -3785,18 +3806,18 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [115] */
+ /* [116] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(7),
- /* parameters */ ParameterIndex(205),
+ /* parameters */ ParameterIndex(208),
/* return_matcher_indices */ MatcherIndicesIndex(44),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [116] */
+ /* [117] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
@@ -3807,7 +3828,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [117] */
+ /* [118] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
@@ -3818,62 +3839,62 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [118] */
+ /* [119] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 2,
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(9),
- /* parameters */ ParameterIndex(207),
+ /* parameters */ ParameterIndex(210),
/* return_matcher_indices */ MatcherIndicesIndex(3),
/* const_eval_fn */ ConstEvalFunctionIndex(0),
},
{
- /* [119] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
- /* num_parameters */ 2,
- /* num_explicit_templates */ 0,
- /* num_templates */ 2,
- /* templates */ TemplateIndex(8),
- /* parameters */ ParameterIndex(209),
- /* return_matcher_indices */ MatcherIndicesIndex(2),
- /* const_eval_fn */ ConstEvalFunctionIndex(0),
- },
- {
/* [120] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 2,
/* num_explicit_templates */ 0,
- /* num_templates */ 1,
- /* templates */ TemplateIndex(9),
- /* parameters */ ParameterIndex(211),
- /* return_matcher_indices */ MatcherIndicesIndex(3),
- /* const_eval_fn */ ConstEvalFunctionIndex(1),
+ /* num_templates */ 2,
+ /* templates */ TemplateIndex(8),
+ /* parameters */ ParameterIndex(212),
+ /* return_matcher_indices */ MatcherIndicesIndex(2),
+ /* const_eval_fn */ ConstEvalFunctionIndex(0),
},
{
/* [121] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 2,
/* num_explicit_templates */ 0,
- /* num_templates */ 2,
- /* templates */ TemplateIndex(8),
- /* parameters */ ParameterIndex(213),
- /* return_matcher_indices */ MatcherIndicesIndex(2),
+ /* num_templates */ 1,
+ /* templates */ TemplateIndex(9),
+ /* parameters */ ParameterIndex(214),
+ /* return_matcher_indices */ MatcherIndicesIndex(3),
/* const_eval_fn */ ConstEvalFunctionIndex(1),
},
{
/* [122] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* num_parameters */ 2,
+ /* num_explicit_templates */ 0,
+ /* num_templates */ 2,
+ /* templates */ TemplateIndex(8),
+ /* parameters */ ParameterIndex(216),
+ /* return_matcher_indices */ MatcherIndicesIndex(2),
+ /* const_eval_fn */ ConstEvalFunctionIndex(1),
+ },
+ {
+ /* [123] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse, OverloadFlag::kMemberFunction),
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(0),
- /* parameters */ ParameterIndex(241),
+ /* parameters */ ParameterIndex(244),
/* return_matcher_indices */ MatcherIndicesIndex(10),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [123] */
+ /* [124] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 0,
/* num_explicit_templates */ 0,
@@ -3884,7 +3905,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [124] */
+ /* [125] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
@@ -3895,36 +3916,25 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [125] */
+ /* [126] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 2,
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(2),
- /* parameters */ ParameterIndex(203),
+ /* parameters */ ParameterIndex(206),
/* return_matcher_indices */ MatcherIndicesIndex(3),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [126] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* num_parameters */ 1,
- /* num_explicit_templates */ 0,
- /* num_templates */ 0,
- /* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(248),
- /* return_matcher_indices */ MatcherIndicesIndex(1),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
/* [127] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(246),
- /* return_matcher_indices */ MatcherIndicesIndex(101),
+ /* parameters */ ParameterIndex(251),
+ /* return_matcher_indices */ MatcherIndicesIndex(1),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
@@ -3932,6 +3942,17 @@
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
+ /* num_templates */ 0,
+ /* templates */ TemplateIndex(/* invalid */),
+ /* parameters */ ParameterIndex(249),
+ /* return_matcher_indices */ MatcherIndicesIndex(101),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [129] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* num_parameters */ 1,
+ /* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(5),
/* parameters */ ParameterIndex(106),
@@ -3939,18 +3960,18 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [129] */
+ /* [130] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 2,
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(9),
- /* parameters */ ParameterIndex(205),
+ /* parameters */ ParameterIndex(208),
/* return_matcher_indices */ MatcherIndicesIndex(3),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [130] */
+ /* [131] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 4,
/* num_explicit_templates */ 0,
@@ -3961,24 +3982,24 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [131] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* num_parameters */ 2,
- /* num_explicit_templates */ 0,
- /* num_templates */ 2,
- /* templates */ TemplateIndex(19),
- /* parameters */ ParameterIndex(205),
- /* return_matcher_indices */ MatcherIndicesIndex(98),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
/* [132] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 2,
/* num_explicit_templates */ 0,
/* num_templates */ 2,
+ /* templates */ TemplateIndex(19),
+ /* parameters */ ParameterIndex(208),
+ /* return_matcher_indices */ MatcherIndicesIndex(98),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [133] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* num_parameters */ 2,
+ /* num_explicit_templates */ 0,
+ /* num_templates */ 2,
/* templates */ TemplateIndex(21),
- /* parameters */ ParameterIndex(205),
+ /* parameters */ ParameterIndex(208),
/* return_matcher_indices */ MatcherIndicesIndex(98),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -3992,144 +4013,144 @@
/* [0] */
/* fn length[T, A : access](ptr<storage, array<T>, A>) -> i32 */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(122),
+ /* overloads */ OverloadIndex(123),
},
{
/* [1] */
/* fn barrier() */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(123),
+ /* overloads */ OverloadIndex(124),
},
{
/* [2] */
/* fn memoryBarrierBuffer() */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(123),
+ /* overloads */ OverloadIndex(124),
},
{
/* [3] */
/* fn memoryBarrierImage() */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(123),
+ /* overloads */ OverloadIndex(124),
},
{
/* [4] */
/* fn atomicCompSwap[T : iu32](ptr<workgroup_or_storage, atomic<T>, read_write>, compare_value: T, value: T) -> T */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(124),
+ /* overloads */ OverloadIndex(125),
},
{
/* [5] */
/* fn atomicSub[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T) -> T */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(125),
+ /* overloads */ OverloadIndex(126),
},
{
/* [6] */
/* fn floatBitsToInt(value: f32) -> i32 */
/* fn floatBitsToInt[N : num](value: vec<N, f32>) -> vec<N, i32> */
/* num overloads */ 2,
- /* overloads */ OverloadIndex(100),
+ /* overloads */ OverloadIndex(101),
},
{
/* [7] */
/* fn floatBitsToUint(value: f32) -> u32 */
/* fn floatBitsToUint[N : num](value: vec<N, f32>) -> vec<N, u32> */
/* num overloads */ 2,
- /* overloads */ OverloadIndex(102),
+ /* overloads */ OverloadIndex(103),
},
{
/* [8] */
/* fn intBitsToFloat(value: i32) -> f32 */
/* fn intBitsToFloat[N : num](value: vec<N, i32>) -> vec<N, f32> */
/* num overloads */ 2,
- /* overloads */ OverloadIndex(104),
+ /* overloads */ OverloadIndex(105),
},
{
/* [9] */
/* fn uintBitsToFloat(value: u32) -> f32 */
/* fn uintBitsToFloat[N : num](value: vec<N, u32>) -> vec<N, f32> */
/* num overloads */ 2,
- /* overloads */ OverloadIndex(106),
+ /* overloads */ OverloadIndex(107),
},
{
/* [10] */
/* fn bitCount[T : iu32](value: T) -> i32 */
/* fn bitCount[T : iu32, N : num](value: vec<N, T>) -> vec<N, i32> */
/* num overloads */ 2,
- /* overloads */ OverloadIndex(108),
+ /* overloads */ OverloadIndex(109),
},
{
/* [11] */
/* fn bitfieldExtract[T : iu32](value: T, offset: i32, bits: i32) -> T */
/* fn bitfieldExtract[T : iu32, N : num](value: vec<N, T>, offset: i32, bits: i32) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ OverloadIndex(110),
+ /* overloads */ OverloadIndex(111),
},
{
/* [12] */
/* fn bitfieldInsert[T : iu32](base: T, insert: T, offset: i32, bits: i32) -> T */
/* fn bitfieldInsert[T : iu32, N : num](base: vec<N, T>, insert: vec<N, T>, offset: i32, bits: i32) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ OverloadIndex(112),
+ /* overloads */ OverloadIndex(113),
},
{
/* [13] */
/* fn packFloat2x16(value: vec2<f16>) -> u32 */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(126),
+ /* overloads */ OverloadIndex(127),
},
{
/* [14] */
/* fn unpackFloat2x16(value: u32) -> vec2<f16> */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(127),
+ /* overloads */ OverloadIndex(128),
},
{
/* [15] */
/* fn abs[T : fi32_f16](T) -> T */
/* fn abs[T : fi32_f16, N : num](vec<N, T>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ OverloadIndex(114),
+ /* overloads */ OverloadIndex(115),
},
{
/* [16] */
/* fn any[N : num](vec<N, bool>) -> bool */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(128),
+ /* overloads */ OverloadIndex(129),
},
{
/* [17] */
/* fn all[N : num](vec<N, bool>) -> bool */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(128),
+ /* overloads */ OverloadIndex(129),
},
{
/* [18] */
/* fn dot[T : f32_f16, N : num](vec<N, T>, vec<N, T>) -> T */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(129),
+ /* overloads */ OverloadIndex(130),
},
{
/* [19] */
/* fn mix[T : scalar](T, T, bool) -> T */
/* fn mix[N : num, T : scalar](vec<N, T>, vec<N, T>, vec<N, bool>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ OverloadIndex(116),
+ /* overloads */ OverloadIndex(117),
},
{
/* [20] */
/* fn modf[T : f32_f16](value: T, result: ptr<function, T, read_write>) -> T */
/* fn modf[N : num, T : f32_f16](value: vec<N, T>, result: ptr<function, vec<N, T>, read_write>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ OverloadIndex(118),
+ /* overloads */ OverloadIndex(119),
},
{
/* [21] */
/* fn frexp[T : f32_f16](value: T, exp: ptr<function, i32, read_write>) -> T */
/* fn frexp[N : num, T : f32_f16](value: vec<N, T>, exp: ptr<function, vec<N, i32>, read_write>) -> vec<N, T> */
/* num overloads */ 2,
- /* overloads */ OverloadIndex(120),
+ /* overloads */ OverloadIndex(121),
},
{
/* [22] */
@@ -4180,7 +4201,7 @@
/* fn extTextureLod(texture: texture_depth_cube, coords: vec4<f32>, level: f32) -> f32 */
/* fn extTextureLod(texture: texture_depth_cube_array, coords: vec4<f32>, compare_value: f32, level: f32) -> f32 */
/* num overloads */ 3,
- /* overloads */ OverloadIndex(97),
+ /* overloads */ OverloadIndex(98),
},
{
/* [26] */
@@ -4189,13 +4210,13 @@
/* fn textureLodOffset(texture: texture_3d<f32>, coords: vec3<f32>, level: f32, offset: vec3<i32>) -> vec4<f32> */
/* fn textureLodOffset(texture: texture_depth_2d, coords: vec3<f32>, level: f32, offset: vec2<i32>) -> f32 */
/* num overloads */ 4,
- /* overloads */ OverloadIndex(81),
+ /* overloads */ OverloadIndex(86),
},
{
/* [27] */
/* fn extTextureLodOffset(texture: texture_depth_2d_array, coords: vec4<f32>, level: f32, offset: vec2<i32>) -> f32 */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(130),
+ /* overloads */ OverloadIndex(131),
},
{
/* [28] */
@@ -4237,7 +4258,7 @@
/* fn textureGatherOffset(texture: texture_depth_2d, coords: vec2<f32>, refz: f32, offset: vec2<i32>) -> vec4<f32> */
/* fn textureGatherOffset(texture: texture_depth_2d_array, coords: vec3<f32>, refz: f32, offset: vec2<i32>) -> vec4<f32> */
/* num overloads */ 4,
- /* overloads */ OverloadIndex(85),
+ /* overloads */ OverloadIndex(90),
},
{
/* [32] */
@@ -4262,7 +4283,7 @@
/* fn imageSize[F : texel_format, A : access](texture: texture_storage_2d_array<F, A>) -> vec3<i32> */
/* fn imageSize[F : texel_format, A : access](texture: texture_storage_3d<F, A>) -> vec3<i32> */
/* num overloads */ 4,
- /* overloads */ OverloadIndex(89),
+ /* overloads */ OverloadIndex(94),
},
{
/* [34] */
@@ -4270,8 +4291,9 @@
/* fn texelFetch[T : fiu32](texture: texture_2d_array<T>, location: vec3<i32>, level: i32) -> vec4<T> */
/* fn texelFetch[T : fiu32](texture: texture_multisampled_2d<T>, location: vec2<i32>, sample_index: i32) -> vec4<T> */
/* fn texelFetch[T : fiu32](texture: texture_3d<T>, location: vec3<i32>, level: i32) -> vec4<T> */
- /* num overloads */ 4,
- /* overloads */ OverloadIndex(93),
+ /* fn texelFetch(texture: texture_depth_multisampled_2d, location: vec2<i32>, sample_index: i32) -> vec4<f32> */
+ /* num overloads */ 5,
+ /* overloads */ OverloadIndex(81),
},
{
/* [35] */
@@ -4311,37 +4333,37 @@
/* [37] */
/* fn lessThan[T : fiu32_f16, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(131),
+ /* overloads */ OverloadIndex(132),
},
{
/* [38] */
/* fn lessThanEqual[T : fiu32_f16, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(131),
+ /* overloads */ OverloadIndex(132),
},
{
/* [39] */
/* fn greaterThan[T : fiu32_f16, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(131),
+ /* overloads */ OverloadIndex(132),
},
{
/* [40] */
/* fn greaterThanEqual[T : fiu32_f16, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(131),
+ /* overloads */ OverloadIndex(132),
},
{
/* [41] */
/* fn equal[T : fiu32_f16_bool, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(132),
+ /* overloads */ OverloadIndex(133),
},
{
/* [42] */
/* fn notEqual[T : fiu32_f16_bool, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(132),
+ /* overloads */ OverloadIndex(133),
},
};
diff --git a/src/tint/lang/glsl/writer/builtin_test.cc b/src/tint/lang/glsl/writer/builtin_test.cc
index f0b8030..46228b1 100644
--- a/src/tint/lang/glsl/writer/builtin_test.cc
+++ b/src/tint/lang/glsl/writer/builtin_test.cc
@@ -1082,7 +1082,7 @@
EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float;
precision highp int;
-uniform highp sampler2DArrayShadow v;
+uniform highp sampler2DArray v;
void main() {
uint x = uint(textureSize(v, 0).z);
}
@@ -1137,7 +1137,7 @@
precision highp float;
precision highp int;
-uniform highp samplerCubeArrayShadow v;
+uniform highp samplerCubeArray v;
void main() {
uint x = uint(textureSize(v, 0).z);
}
diff --git a/src/tint/lang/glsl/writer/raise/texture_polyfill.cc b/src/tint/lang/glsl/writer/raise/texture_polyfill.cc
index d3d8044..a7e9a51 100644
--- a/src/tint/lang/glsl/writer/raise/texture_polyfill.cc
+++ b/src/tint/lang/glsl/writer/raise/texture_polyfill.cc
@@ -168,7 +168,9 @@
}
}
- core::ir::Var* GetReplacement(core::ir::Var* tex, core::ir::Var* sampler) {
+ core::ir::Var* GetReplacement(core::ir::Var* tex,
+ core::ir::Var* sampler,
+ const core::type::Pointer* tex_ty) {
// Don't change storage textures
if (tex->Result(0)->Type()->UnwrapPtr()->Is<core::type::StorageTexture>()) {
return tex;
@@ -186,7 +188,7 @@
// hadn't seen yet. Create it and insert into the map for future use.
binding::CombinedTextureSamplerPair key{tex->BindingPoint().value(),
cfg.placeholder_sampler_bind_point};
- auto* replacement = MakeVar(key, tex, nullptr);
+ auto* replacement = MakeVar(key, tex, nullptr, tex_ty);
texture_to_replacement_.Add(tex, replacement);
return replacement;
}
@@ -265,7 +267,8 @@
core::ir::Var* MakeVar(binding::CombinedTextureSamplerPair& key,
core::ir::Var* tex,
- core::ir::Var* sampler) {
+ core::ir::Var* sampler,
+ const core::type::Pointer* tex_ty) {
std::string name;
auto it = (cfg.sampler_texture_to_name.find(key));
if (it != cfg.sampler_texture_to_name.end()) {
@@ -291,8 +294,7 @@
core::ir::Var* var = nullptr;
// We may already be inside an insert block, so make a new insert block instead of
// appending directly to the root block.
- b.Append(ir.root_block,
- [&] { var = b.Var(name, tex->Result(0)->Type()->As<core::type::Pointer>()); });
+ b.Append(ir.root_block, [&] { var = b.Var(name, tex_ty); });
return var;
}
@@ -320,9 +322,16 @@
BindingPoint samp_bp = sampler->BindingPoint().value();
binding::CombinedTextureSamplerPair key{tex_bp, samp_bp};
- auto* replacement = texture_sampler_to_replacement_.GetOrAdd(
- key, [&] { return MakeVar(key, tex, sampler); });
- texture_to_replacement_.Add(tex, replacement);
+ auto* replacement = texture_sampler_to_replacement_.GetOrAdd(key, [&] {
+ return MakeVar(key, tex, sampler,
+ tex->Result(0)->Type()->As<core::type::Pointer>());
+ });
+
+ // Don't add depth textures here because the unsampled depth texture will need to be
+ // created as a sampled texture, instead of a depth texture.
+ if (!tex->Result(0)->Type()->UnwrapPtr()->Is<core::type::DepthTexture>()) {
+ texture_to_replacement_.Add(tex, replacement);
+ }
}
}
@@ -442,10 +451,26 @@
auto* t = VarForValue(tex);
auto* s = VarForValue(sampler);
- auto* replacement = GetReplacement(t, s);
+ auto* tex_ty = t->Result(0)->Type()->As<core::type::Pointer>();
+ TINT_ASSERT(tex_ty);
+
+ // A depth texture gets turned into a SampledTexture of type `f32` when there is no
+ // sampler.
+ if (!sampler) {
+ if (tex_ty->StoreType()->Is<core::type::DepthTexture>()) {
+ tex_ty =
+ ty.ptr(tex_ty->AddressSpace(),
+ ty.Get<core::type::SampledTexture>(
+ tex_ty->UnwrapPtr()->As<core::type::Texture>()->Dim(), ty.f32()),
+ tex_ty->Access());
+ }
+ }
+
+ auto* replacement = GetReplacement(t, s, tex_ty);
TINT_ASSERT(replacement);
- // In the storage case, we'll return the original texture. Nothing else to do in that case.
+ // In the storage case, we'll return the original texture. Nothing else to do in that
+ // case.
if (replacement == t) {
return tex;
}
@@ -549,7 +574,12 @@
b.InsertBefore(call, [&] {
uint32_t idx = 0;
auto args = call->Args();
- auto* tex = GetNewTexture(args[idx++]);
+
+ auto* source_tex = args[idx++];
+ bool source_was_depth =
+ source_tex->Type()
+ ->IsAnyOf<core::type::DepthTexture, core::type::DepthMultisampledTexture>();
+ auto* tex = GetNewTexture(source_tex);
// No loading from a depth texture in GLSL, so we should never have gotten here.
TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>());
@@ -601,8 +631,21 @@
TINT_UNREACHABLE();
}
- b.CallWithResult<glsl::ir::BuiltinCall>(call->DetachResult(), func,
- std::move(call_args));
+ // If we had a depth texture source, then that means we've swapped the depth type for a
+ // sampled 2d texture. Sampled 2d returns a `vec4<f32>` from the texel fetch but the
+ // depth texture is expecting an `f32`. So, swap the types to the call and swizzle out
+ // the `x` component if needed.
+ const core::type::Type* fetch_ty = call->Result(0)->Type();
+ if (source_was_depth) {
+ fetch_ty = ty.vec4<f32>();
+ }
+ core::ir::Instruction* new_call =
+ b.Call<glsl::ir::BuiltinCall>(fetch_ty, func, std::move(call_args));
+
+ if (source_was_depth) {
+ new_call = b.Swizzle(ty.f32(), new_call, {0});
+ }
+ call->Result(0)->ReplaceAllUsesWith(new_call->Result(0));
});
call->Destroy();
}
diff --git a/src/tint/lang/glsl/writer/raise/texture_polyfill_test.cc b/src/tint/lang/glsl/writer/raise/texture_polyfill_test.cc
index 7826525..fd1a73c 100644
--- a/src/tint/lang/glsl/writer/raise/texture_polyfill_test.cc
+++ b/src/tint/lang/glsl/writer/raise/texture_polyfill_test.cc
@@ -444,12 +444,12 @@
auto* expect = R"(
$B1: { # root
- %v:ptr<handle, texture_depth_2d_array, read_write> = var
+ %v:ptr<handle, texture_2d_array<f32>, read_write> = var
}
%foo = @fragment func():void {
$B2: {
- %3:texture_depth_2d_array = load %v
+ %3:texture_2d_array<f32> = load %v
%4:vec3<i32> = glsl.textureSize %3, 0i
%5:i32 = swizzle %4, z
%6:u32 = bitcast %5
@@ -551,12 +551,12 @@
auto* expect = R"(
$B1: { # root
- %v:ptr<handle, texture_depth_cube_array, read_write> = var
+ %v:ptr<handle, texture_cube_array<f32>, read_write> = var
}
%foo = @fragment func():void {
$B2: {
- %3:texture_depth_cube_array = load %v
+ %3:texture_cube_array<f32> = load %v
%4:vec3<i32> = glsl.textureSize %3, 0i
%5:i32 = swizzle %4, z
%6:u32 = bitcast %5
diff --git a/test/tint/bug/tint/827.wgsl.expected.ir.glsl b/test/tint/bug/tint/827.wgsl.expected.ir.glsl
index ed9078e..5daf228 100644
--- a/test/tint/bug/tint/827.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/827.wgsl.expected.ir.glsl
@@ -1,11 +1,16 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 1, std430)
+buffer Result_1_ssbo {
+ float values[];
+} result;
+uniform highp sampler2D tex;
+void tint_symbol_inner(uvec3 GlobalInvocationId) {
+ int v = int(GlobalInvocationId[0u]);
+ ivec2 v_1 = ivec2(ivec2(v, int(GlobalInvocationId[1u])));
+ result.values[((GlobalInvocationId[1u] * 128u) + GlobalInvocationId[0u])] = texelFetch(tex, v_1, int(0)).x;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ tint_symbol_inner(gl_GlobalInvocationID);
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0ff9a4.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureDimensions/0ff9a4.wgsl.expected.ir.glsl
index cd1540d..489b0d4 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/0ff9a4.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureDimensions/0ff9a4.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp samplerCubeArrayShadow arg_0;
+uniform highp samplerCubeArray arg_0;
uvec2 textureDimensions_0ff9a4() {
uvec2 res = uvec2(textureSize(arg_0, 1).xy);
return res;
@@ -20,7 +20,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp samplerCubeArrayShadow arg_0;
+uniform highp samplerCubeArray arg_0;
uvec2 textureDimensions_0ff9a4() {
uvec2 res = uvec2(textureSize(arg_0, 1).xy);
return res;
@@ -37,7 +37,7 @@
uvec2 prevent_dce;
};
-uniform highp samplerCubeArrayShadow arg_0;
+uniform highp samplerCubeArray arg_0;
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 textureDimensions_0ff9a4() {
uvec2 res = uvec2(textureSize(arg_0, 1).xy);
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3b38f6.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureDimensions/3b38f6.wgsl.expected.ir.glsl
index 1d43689..0ce603f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3b38f6.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3b38f6.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp sampler2DShadow arg_0;
+uniform highp sampler2D arg_0;
uvec2 textureDimensions_3b38f6() {
uvec2 res = uvec2(textureSize(arg_0, 0));
return res;
@@ -20,7 +20,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp sampler2DShadow arg_0;
+uniform highp sampler2D arg_0;
uvec2 textureDimensions_3b38f6() {
uvec2 res = uvec2(textureSize(arg_0, 0));
return res;
@@ -37,7 +37,7 @@
uvec2 prevent_dce;
};
-uniform highp sampler2DShadow arg_0;
+uniform highp sampler2D arg_0;
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 textureDimensions_3b38f6() {
uvec2 res = uvec2(textureSize(arg_0, 0));
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6f1b5d.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureDimensions/6f1b5d.wgsl.expected.ir.glsl
index 1e639f2..2073a90 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/6f1b5d.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureDimensions/6f1b5d.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp sampler2DShadow arg_0;
+uniform highp sampler2D arg_0;
uvec2 textureDimensions_6f1b5d() {
uvec2 res = uvec2(textureSize(arg_0, 1));
return res;
@@ -20,7 +20,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp sampler2DShadow arg_0;
+uniform highp sampler2D arg_0;
uvec2 textureDimensions_6f1b5d() {
uvec2 res = uvec2(textureSize(arg_0, 1));
return res;
@@ -37,7 +37,7 @@
uvec2 prevent_dce;
};
-uniform highp sampler2DShadow arg_0;
+uniform highp sampler2D arg_0;
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 textureDimensions_6f1b5d() {
uvec2 res = uvec2(textureSize(arg_0, 1));
diff --git a/test/tint/builtins/gen/literal/textureDimensions/79d168.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureDimensions/79d168.wgsl.expected.ir.glsl
index 9435e53..95058de 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/79d168.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureDimensions/79d168.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp samplerCubeShadow arg_0;
+uniform highp samplerCube arg_0;
uvec2 textureDimensions_79d168() {
uvec2 res = uvec2(textureSize(arg_0, 1));
return res;
@@ -20,7 +20,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp samplerCubeShadow arg_0;
+uniform highp samplerCube arg_0;
uvec2 textureDimensions_79d168() {
uvec2 res = uvec2(textureSize(arg_0, 1));
return res;
@@ -37,7 +37,7 @@
uvec2 prevent_dce;
};
-uniform highp samplerCubeShadow arg_0;
+uniform highp samplerCube arg_0;
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 textureDimensions_79d168() {
uvec2 res = uvec2(textureSize(arg_0, 1));
diff --git a/test/tint/builtins/gen/literal/textureDimensions/991ea9.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureDimensions/991ea9.wgsl.expected.ir.glsl
index 6e7e534..edfb669 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/991ea9.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureDimensions/991ea9.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp sampler2DShadow arg_0;
+uniform highp sampler2D arg_0;
uvec2 textureDimensions_991ea9() {
uvec2 res = uvec2(textureSize(arg_0, int(1u)));
return res;
@@ -20,7 +20,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp sampler2DShadow arg_0;
+uniform highp sampler2D arg_0;
uvec2 textureDimensions_991ea9() {
uvec2 res = uvec2(textureSize(arg_0, int(1u)));
return res;
@@ -37,7 +37,7 @@
uvec2 prevent_dce;
};
-uniform highp sampler2DShadow arg_0;
+uniform highp sampler2D arg_0;
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 textureDimensions_991ea9() {
uvec2 res = uvec2(textureSize(arg_0, int(1u)));
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9fcc3b.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureDimensions/9fcc3b.wgsl.expected.ir.glsl
index 9c87f72..72ee432 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9fcc3b.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9fcc3b.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp samplerCubeArrayShadow arg_0;
+uniform highp samplerCubeArray arg_0;
uvec2 textureDimensions_9fcc3b() {
uvec2 res = uvec2(textureSize(arg_0, 0).xy);
return res;
@@ -20,7 +20,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp samplerCubeArrayShadow arg_0;
+uniform highp samplerCubeArray arg_0;
uvec2 textureDimensions_9fcc3b() {
uvec2 res = uvec2(textureSize(arg_0, 0).xy);
return res;
@@ -37,7 +37,7 @@
uvec2 prevent_dce;
};
-uniform highp samplerCubeArrayShadow arg_0;
+uniform highp samplerCubeArray arg_0;
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 textureDimensions_9fcc3b() {
uvec2 res = uvec2(textureSize(arg_0, 0).xy);
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a4cd56.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureDimensions/a4cd56.wgsl.expected.ir.glsl
index 52090d7e..646a81d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a4cd56.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a4cd56.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp sampler2DArrayShadow arg_0;
+uniform highp sampler2DArray arg_0;
uvec2 textureDimensions_a4cd56() {
uvec2 res = uvec2(textureSize(arg_0, 0).xy);
return res;
@@ -20,7 +20,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp sampler2DArrayShadow arg_0;
+uniform highp sampler2DArray arg_0;
uvec2 textureDimensions_a4cd56() {
uvec2 res = uvec2(textureSize(arg_0, 0).xy);
return res;
@@ -37,7 +37,7 @@
uvec2 prevent_dce;
};
-uniform highp sampler2DArrayShadow arg_0;
+uniform highp sampler2DArray arg_0;
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 textureDimensions_a4cd56() {
uvec2 res = uvec2(textureSize(arg_0, 0).xy);
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bd94c8.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureDimensions/bd94c8.wgsl.expected.ir.glsl
index bc00cb5..2180b2e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/bd94c8.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureDimensions/bd94c8.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp samplerCubeArrayShadow arg_0;
+uniform highp samplerCubeArray arg_0;
uvec2 textureDimensions_bd94c8() {
uvec2 res = uvec2(textureSize(arg_0, int(1u)).xy);
return res;
@@ -20,7 +20,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp samplerCubeArrayShadow arg_0;
+uniform highp samplerCubeArray arg_0;
uvec2 textureDimensions_bd94c8() {
uvec2 res = uvec2(textureSize(arg_0, int(1u)).xy);
return res;
@@ -37,7 +37,7 @@
uvec2 prevent_dce;
};
-uniform highp samplerCubeArrayShadow arg_0;
+uniform highp samplerCubeArray arg_0;
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 textureDimensions_bd94c8() {
uvec2 res = uvec2(textureSize(arg_0, int(1u)).xy);
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c5a36e.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureDimensions/c5a36e.wgsl.expected.ir.glsl
index 26c919d..d3fb18a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/c5a36e.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureDimensions/c5a36e.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp samplerCubeShadow arg_0;
+uniform highp samplerCube arg_0;
uvec2 textureDimensions_c5a36e() {
uvec2 res = uvec2(textureSize(arg_0, 0));
return res;
@@ -20,7 +20,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp samplerCubeShadow arg_0;
+uniform highp samplerCube arg_0;
uvec2 textureDimensions_c5a36e() {
uvec2 res = uvec2(textureSize(arg_0, 0));
return res;
@@ -37,7 +37,7 @@
uvec2 prevent_dce;
};
-uniform highp samplerCubeShadow arg_0;
+uniform highp samplerCube arg_0;
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 textureDimensions_c5a36e() {
uvec2 res = uvec2(textureSize(arg_0, 0));
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d3accd.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureDimensions/d3accd.wgsl.expected.ir.glsl
index f97a180..d91ab37 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/d3accd.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureDimensions/d3accd.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp samplerCubeShadow arg_0;
+uniform highp samplerCube arg_0;
uvec2 textureDimensions_d3accd() {
uvec2 res = uvec2(textureSize(arg_0, int(1u)));
return res;
@@ -20,7 +20,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp samplerCubeShadow arg_0;
+uniform highp samplerCube arg_0;
uvec2 textureDimensions_d3accd() {
uvec2 res = uvec2(textureSize(arg_0, int(1u)));
return res;
@@ -37,7 +37,7 @@
uvec2 prevent_dce;
};
-uniform highp samplerCubeShadow arg_0;
+uniform highp samplerCube arg_0;
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 textureDimensions_d3accd() {
uvec2 res = uvec2(textureSize(arg_0, int(1u)));
diff --git a/test/tint/builtins/gen/literal/textureDimensions/dfdc32.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureDimensions/dfdc32.wgsl.expected.ir.glsl
index 4821eb2..a3fb260 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/dfdc32.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureDimensions/dfdc32.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp sampler2DArrayShadow arg_0;
+uniform highp sampler2DArray arg_0;
uvec2 textureDimensions_dfdc32() {
uvec2 res = uvec2(textureSize(arg_0, 1).xy);
return res;
@@ -20,7 +20,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp sampler2DArrayShadow arg_0;
+uniform highp sampler2DArray arg_0;
uvec2 textureDimensions_dfdc32() {
uvec2 res = uvec2(textureSize(arg_0, 1).xy);
return res;
@@ -37,7 +37,7 @@
uvec2 prevent_dce;
};
-uniform highp sampler2DArrayShadow arg_0;
+uniform highp sampler2DArray arg_0;
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 textureDimensions_dfdc32() {
uvec2 res = uvec2(textureSize(arg_0, 1).xy);
diff --git a/test/tint/builtins/gen/literal/textureDimensions/eafe19.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureDimensions/eafe19.wgsl.expected.ir.glsl
index d08297d..fbc56c8 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/eafe19.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureDimensions/eafe19.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp sampler2DArrayShadow arg_0;
+uniform highp sampler2DArray arg_0;
uvec2 textureDimensions_eafe19() {
uvec2 res = uvec2(textureSize(arg_0, int(1u)).xy);
return res;
@@ -20,7 +20,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp sampler2DArrayShadow arg_0;
+uniform highp sampler2DArray arg_0;
uvec2 textureDimensions_eafe19() {
uvec2 res = uvec2(textureSize(arg_0, int(1u)).xy);
return res;
@@ -37,7 +37,7 @@
uvec2 prevent_dce;
};
-uniform highp sampler2DArrayShadow arg_0;
+uniform highp sampler2DArray arg_0;
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 textureDimensions_eafe19() {
uvec2 res = uvec2(textureSize(arg_0, int(1u)).xy);
diff --git a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.ir.glsl
index ed9078e..69b6945 100644
--- a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.ir.glsl
@@ -1,11 +1,65 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_04b911() {
+ ivec2 v_1 = ivec2(uvec2(1u));
+ ivec3 v_2 = ivec3(v_1, int(1));
+ float res = texelFetch(arg_0, v_2, int(1u)).x;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_04b911();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_04b911() {
+ ivec2 v_1 = ivec2(uvec2(1u));
+ ivec3 v_2 = ivec3(v_1, int(1));
+ float res = texelFetch(arg_0, v_2, int(1u)).x;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_04b911();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ float prevent_dce;
+};
+
+uniform highp sampler2DArray arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_04b911() {
+ ivec2 v = ivec2(uvec2(1u));
+ ivec3 v_1 = ivec3(v, int(1));
+ float res = texelFetch(arg_0, v_1, int(1u)).x;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_04b911();
+ return tint_symbol;
+}
+void main() {
+ VertexOutput v_2 = vertex_main_inner();
+ gl_Position = v_2.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_2.prevent_dce;
+ gl_PointSize = 1.0f;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.ir.glsl
index ed9078e..d005543 100644
--- a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.ir.glsl
@@ -1,11 +1,62 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2D arg_0;
+float textureLoad_19cf87() {
+ ivec2 v_1 = ivec2(ivec2(1));
+ float res = texelFetch(arg_0, v_1, int(1)).x;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_19cf87();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2D arg_0;
+float textureLoad_19cf87() {
+ ivec2 v_1 = ivec2(ivec2(1));
+ float res = texelFetch(arg_0, v_1, int(1)).x;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_19cf87();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ float prevent_dce;
+};
+
+uniform highp sampler2D arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_19cf87() {
+ ivec2 v = ivec2(ivec2(1));
+ float res = texelFetch(arg_0, v, int(1)).x;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_19cf87();
+ return tint_symbol;
+}
+void main() {
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_1.prevent_dce;
+ gl_PointSize = 1.0f;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.ir.glsl
index 1c7fb27..5a16c13 100644
--- a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.ir.glsl
@@ -1,222 +1,62 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-
-@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_4db25c() -> f32 {
- var res : f32 = textureLoad(arg_0, vec2<u32>(1u), 1u);
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DMS arg_0;
+float textureLoad_4db25c() {
+ ivec2 v_1 = ivec2(uvec2(1u));
+ float res = texelFetch(arg_0, v_1, int(1u)).x;
return res;
}
-
-struct VertexOutput {
- @builtin(position)
- pos : vec4<f32>,
- @location(0) @interpolate(flat)
- prevent_dce : f32,
+void main() {
+ v.tint_symbol = textureLoad_4db25c();
}
+#version 310 es
-@fragment
-fn fragment_main() {
- prevent_dce = textureLoad_4db25c();
-}
-
-Failed to generate: :15:14 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %7:f32 = glsl.texelFetch %4, %5, %6
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-tint_symbol_1 = struct @align(4), @block {
- tint_symbol:f32 @offset(0)
-}
-
-$B1: { # root
- %1:ptr<storage, tint_symbol_1, read_write> = var @binding_point(0, 0)
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_4db25c = func():f32 {
- $B2: {
- %4:texture_depth_multisampled_2d = load %arg_0
- %5:vec2<i32> = convert vec2<u32>(1u)
- %6:i32 = convert 1u
- %7:f32 = glsl.texelFetch %4, %5, %6
- %res:ptr<function, f32, read_write> = var, %7
- %9:f32 = load %res
- ret %9
- }
-}
-%fragment_main = @fragment func():void {
- $B3: {
- %11:f32 = call %textureLoad_4db25c
- %12:ptr<storage, f32, read_write> = access %1, 0u
- store %12, %11
- ret
- }
-}
-
-
-@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_4db25c() -> f32 {
- var res : f32 = textureLoad(arg_0, vec2<u32>(1u), 1u);
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DMS arg_0;
+float textureLoad_4db25c() {
+ ivec2 v_1 = ivec2(uvec2(1u));
+ float res = texelFetch(arg_0, v_1, int(1u)).x;
return res;
}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_4db25c();
+}
+#version 310 es
+
struct VertexOutput {
- @builtin(position)
- pos : vec4<f32>,
- @location(0) @interpolate(flat)
- prevent_dce : f32,
-}
+ vec4 pos;
+ float prevent_dce;
+};
-@compute @workgroup_size(1)
-fn compute_main() {
- prevent_dce = textureLoad_4db25c();
-}
-
-Failed to generate: :15:14 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %7:f32 = glsl.texelFetch %4, %5, %6
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-tint_symbol_1 = struct @align(4), @block {
- tint_symbol:f32 @offset(0)
-}
-
-$B1: { # root
- %1:ptr<storage, tint_symbol_1, read_write> = var @binding_point(0, 0)
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_4db25c = func():f32 {
- $B2: {
- %4:texture_depth_multisampled_2d = load %arg_0
- %5:vec2<i32> = convert vec2<u32>(1u)
- %6:i32 = convert 1u
- %7:f32 = glsl.texelFetch %4, %5, %6
- %res:ptr<function, f32, read_write> = var, %7
- %9:f32 = load %res
- ret %9
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %11:f32 = call %textureLoad_4db25c
- %12:ptr<storage, f32, read_write> = access %1, 0u
- store %12, %11
- ret
- }
-}
-
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_4db25c() -> f32 {
- var res : f32 = textureLoad(arg_0, vec2<u32>(1u), 1u);
+uniform highp sampler2DMS arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_4db25c() {
+ ivec2 v = ivec2(uvec2(1u));
+ float res = texelFetch(arg_0, v, int(1u)).x;
return res;
}
-
-struct VertexOutput {
- @builtin(position)
- pos : vec4<f32>,
- @location(0) @interpolate(flat)
- prevent_dce : f32,
-}
-
-@vertex
-fn vertex_main() -> VertexOutput {
- var tint_symbol : VertexOutput;
- tint_symbol.pos = vec4<f32>();
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
tint_symbol.prevent_dce = textureLoad_4db25c();
return tint_symbol;
}
-
-Failed to generate: :15:14 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %6:f32 = glsl.texelFetch %3, %4, %5
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-VertexOutput = struct @align(16) {
- pos:vec4<f32> @offset(0), @builtin(position)
- prevent_dce:f32 @offset(16), @location(0), @interpolate(flat)
+void main() {
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_1.prevent_dce;
+ gl_PointSize = 1.0f;
}
-
-$B1: { # root
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_4db25c = func():f32 {
- $B2: {
- %3:texture_depth_multisampled_2d = load %arg_0
- %4:vec2<i32> = convert vec2<u32>(1u)
- %5:i32 = convert 1u
- %6:f32 = glsl.texelFetch %3, %4, %5
- %res:ptr<function, f32, read_write> = var, %6
- %8:f32 = load %res
- ret %8
- }
-}
-%vertex_main = @vertex func():VertexOutput {
- $B3: {
- %tint_symbol:ptr<function, VertexOutput, read_write> = var
- %11:ptr<function, vec4<f32>, read_write> = access %tint_symbol, 0u
- store %11, vec4<f32>(0.0f)
- %12:ptr<function, f32, read_write> = access %tint_symbol, 1u
- %13:f32 = call %textureLoad_4db25c
- store %12, %13
- %14:VertexOutput = load %tint_symbol
- ret %14
- }
-}
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.ir.glsl
index c147e0f..fe29be4 100644
--- a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.ir.glsl
@@ -1,222 +1,62 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-
-@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_6273b1() -> f32 {
- var res : f32 = textureLoad(arg_0, vec2<i32>(1i), 1i);
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DMS arg_0;
+float textureLoad_6273b1() {
+ ivec2 v_1 = ivec2(ivec2(1));
+ float res = texelFetch(arg_0, v_1, int(1)).x;
return res;
}
-
-struct VertexOutput {
- @builtin(position)
- pos : vec4<f32>,
- @location(0) @interpolate(flat)
- prevent_dce : f32,
+void main() {
+ v.tint_symbol = textureLoad_6273b1();
}
+#version 310 es
-@fragment
-fn fragment_main() {
- prevent_dce = textureLoad_6273b1();
-}
-
-Failed to generate: :15:14 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %7:f32 = glsl.texelFetch %4, %5, %6
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-tint_symbol_1 = struct @align(4), @block {
- tint_symbol:f32 @offset(0)
-}
-
-$B1: { # root
- %1:ptr<storage, tint_symbol_1, read_write> = var @binding_point(0, 0)
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_6273b1 = func():f32 {
- $B2: {
- %4:texture_depth_multisampled_2d = load %arg_0
- %5:vec2<i32> = convert vec2<i32>(1i)
- %6:i32 = convert 1i
- %7:f32 = glsl.texelFetch %4, %5, %6
- %res:ptr<function, f32, read_write> = var, %7
- %9:f32 = load %res
- ret %9
- }
-}
-%fragment_main = @fragment func():void {
- $B3: {
- %11:f32 = call %textureLoad_6273b1
- %12:ptr<storage, f32, read_write> = access %1, 0u
- store %12, %11
- ret
- }
-}
-
-
-@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_6273b1() -> f32 {
- var res : f32 = textureLoad(arg_0, vec2<i32>(1i), 1i);
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DMS arg_0;
+float textureLoad_6273b1() {
+ ivec2 v_1 = ivec2(ivec2(1));
+ float res = texelFetch(arg_0, v_1, int(1)).x;
return res;
}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_6273b1();
+}
+#version 310 es
+
struct VertexOutput {
- @builtin(position)
- pos : vec4<f32>,
- @location(0) @interpolate(flat)
- prevent_dce : f32,
-}
+ vec4 pos;
+ float prevent_dce;
+};
-@compute @workgroup_size(1)
-fn compute_main() {
- prevent_dce = textureLoad_6273b1();
-}
-
-Failed to generate: :15:14 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %7:f32 = glsl.texelFetch %4, %5, %6
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-tint_symbol_1 = struct @align(4), @block {
- tint_symbol:f32 @offset(0)
-}
-
-$B1: { # root
- %1:ptr<storage, tint_symbol_1, read_write> = var @binding_point(0, 0)
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_6273b1 = func():f32 {
- $B2: {
- %4:texture_depth_multisampled_2d = load %arg_0
- %5:vec2<i32> = convert vec2<i32>(1i)
- %6:i32 = convert 1i
- %7:f32 = glsl.texelFetch %4, %5, %6
- %res:ptr<function, f32, read_write> = var, %7
- %9:f32 = load %res
- ret %9
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %11:f32 = call %textureLoad_6273b1
- %12:ptr<storage, f32, read_write> = access %1, 0u
- store %12, %11
- ret
- }
-}
-
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_6273b1() -> f32 {
- var res : f32 = textureLoad(arg_0, vec2<i32>(1i), 1i);
+uniform highp sampler2DMS arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_6273b1() {
+ ivec2 v = ivec2(ivec2(1));
+ float res = texelFetch(arg_0, v, int(1)).x;
return res;
}
-
-struct VertexOutput {
- @builtin(position)
- pos : vec4<f32>,
- @location(0) @interpolate(flat)
- prevent_dce : f32,
-}
-
-@vertex
-fn vertex_main() -> VertexOutput {
- var tint_symbol : VertexOutput;
- tint_symbol.pos = vec4<f32>();
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
tint_symbol.prevent_dce = textureLoad_6273b1();
return tint_symbol;
}
-
-Failed to generate: :15:14 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %6:f32 = glsl.texelFetch %3, %4, %5
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-VertexOutput = struct @align(16) {
- pos:vec4<f32> @offset(0), @builtin(position)
- prevent_dce:f32 @offset(16), @location(0), @interpolate(flat)
+void main() {
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_1.prevent_dce;
+ gl_PointSize = 1.0f;
}
-
-$B1: { # root
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_6273b1 = func():f32 {
- $B2: {
- %3:texture_depth_multisampled_2d = load %arg_0
- %4:vec2<i32> = convert vec2<i32>(1i)
- %5:i32 = convert 1i
- %6:f32 = glsl.texelFetch %3, %4, %5
- %res:ptr<function, f32, read_write> = var, %6
- %8:f32 = load %res
- ret %8
- }
-}
-%vertex_main = @vertex func():VertexOutput {
- $B3: {
- %tint_symbol:ptr<function, VertexOutput, read_write> = var
- %11:ptr<function, vec4<f32>, read_write> = access %tint_symbol, 0u
- store %11, vec4<f32>(0.0f)
- %12:ptr<function, f32, read_write> = access %tint_symbol, 1u
- %13:f32 = call %textureLoad_6273b1
- store %12, %13
- %14:VertexOutput = load %tint_symbol
- ret %14
- }
-}
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.ir.glsl
index ed9078e..ef38433 100644
--- a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.ir.glsl
@@ -1,11 +1,65 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_66be47() {
+ ivec2 v_1 = ivec2(ivec2(1));
+ ivec3 v_2 = ivec3(v_1, int(1u));
+ float res = texelFetch(arg_0, v_2, int(1u)).x;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_66be47();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_66be47() {
+ ivec2 v_1 = ivec2(ivec2(1));
+ ivec3 v_2 = ivec3(v_1, int(1u));
+ float res = texelFetch(arg_0, v_2, int(1u)).x;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_66be47();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ float prevent_dce;
+};
+
+uniform highp sampler2DArray arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_66be47() {
+ ivec2 v = ivec2(ivec2(1));
+ ivec3 v_1 = ivec3(v, int(1u));
+ float res = texelFetch(arg_0, v_1, int(1u)).x;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_66be47();
+ return tint_symbol;
+}
+void main() {
+ VertexOutput v_2 = vertex_main_inner();
+ gl_Position = v_2.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_2.prevent_dce;
+ gl_PointSize = 1.0f;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.ir.glsl
index 15bfe7f7..15a7957 100644
--- a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.ir.glsl
@@ -1,222 +1,62 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-
-@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_6925bc() -> f32 {
- var res : f32 = textureLoad(arg_0, vec2<i32>(1i), 1u);
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DMS arg_0;
+float textureLoad_6925bc() {
+ ivec2 v_1 = ivec2(ivec2(1));
+ float res = texelFetch(arg_0, v_1, int(1u)).x;
return res;
}
-
-struct VertexOutput {
- @builtin(position)
- pos : vec4<f32>,
- @location(0) @interpolate(flat)
- prevent_dce : f32,
+void main() {
+ v.tint_symbol = textureLoad_6925bc();
}
+#version 310 es
-@fragment
-fn fragment_main() {
- prevent_dce = textureLoad_6925bc();
-}
-
-Failed to generate: :15:14 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %7:f32 = glsl.texelFetch %4, %5, %6
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-tint_symbol_1 = struct @align(4), @block {
- tint_symbol:f32 @offset(0)
-}
-
-$B1: { # root
- %1:ptr<storage, tint_symbol_1, read_write> = var @binding_point(0, 0)
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_6925bc = func():f32 {
- $B2: {
- %4:texture_depth_multisampled_2d = load %arg_0
- %5:vec2<i32> = convert vec2<i32>(1i)
- %6:i32 = convert 1u
- %7:f32 = glsl.texelFetch %4, %5, %6
- %res:ptr<function, f32, read_write> = var, %7
- %9:f32 = load %res
- ret %9
- }
-}
-%fragment_main = @fragment func():void {
- $B3: {
- %11:f32 = call %textureLoad_6925bc
- %12:ptr<storage, f32, read_write> = access %1, 0u
- store %12, %11
- ret
- }
-}
-
-
-@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_6925bc() -> f32 {
- var res : f32 = textureLoad(arg_0, vec2<i32>(1i), 1u);
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DMS arg_0;
+float textureLoad_6925bc() {
+ ivec2 v_1 = ivec2(ivec2(1));
+ float res = texelFetch(arg_0, v_1, int(1u)).x;
return res;
}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_6925bc();
+}
+#version 310 es
+
struct VertexOutput {
- @builtin(position)
- pos : vec4<f32>,
- @location(0) @interpolate(flat)
- prevent_dce : f32,
-}
+ vec4 pos;
+ float prevent_dce;
+};
-@compute @workgroup_size(1)
-fn compute_main() {
- prevent_dce = textureLoad_6925bc();
-}
-
-Failed to generate: :15:14 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %7:f32 = glsl.texelFetch %4, %5, %6
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-tint_symbol_1 = struct @align(4), @block {
- tint_symbol:f32 @offset(0)
-}
-
-$B1: { # root
- %1:ptr<storage, tint_symbol_1, read_write> = var @binding_point(0, 0)
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_6925bc = func():f32 {
- $B2: {
- %4:texture_depth_multisampled_2d = load %arg_0
- %5:vec2<i32> = convert vec2<i32>(1i)
- %6:i32 = convert 1u
- %7:f32 = glsl.texelFetch %4, %5, %6
- %res:ptr<function, f32, read_write> = var, %7
- %9:f32 = load %res
- ret %9
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %11:f32 = call %textureLoad_6925bc
- %12:ptr<storage, f32, read_write> = access %1, 0u
- store %12, %11
- ret
- }
-}
-
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_6925bc() -> f32 {
- var res : f32 = textureLoad(arg_0, vec2<i32>(1i), 1u);
+uniform highp sampler2DMS arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_6925bc() {
+ ivec2 v = ivec2(ivec2(1));
+ float res = texelFetch(arg_0, v, int(1u)).x;
return res;
}
-
-struct VertexOutput {
- @builtin(position)
- pos : vec4<f32>,
- @location(0) @interpolate(flat)
- prevent_dce : f32,
-}
-
-@vertex
-fn vertex_main() -> VertexOutput {
- var tint_symbol : VertexOutput;
- tint_symbol.pos = vec4<f32>();
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
tint_symbol.prevent_dce = textureLoad_6925bc();
return tint_symbol;
}
-
-Failed to generate: :15:14 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %6:f32 = glsl.texelFetch %3, %4, %5
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-VertexOutput = struct @align(16) {
- pos:vec4<f32> @offset(0), @builtin(position)
- prevent_dce:f32 @offset(16), @location(0), @interpolate(flat)
+void main() {
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_1.prevent_dce;
+ gl_PointSize = 1.0f;
}
-
-$B1: { # root
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_6925bc = func():f32 {
- $B2: {
- %3:texture_depth_multisampled_2d = load %arg_0
- %4:vec2<i32> = convert vec2<i32>(1i)
- %5:i32 = convert 1u
- %6:f32 = glsl.texelFetch %3, %4, %5
- %res:ptr<function, f32, read_write> = var, %6
- %8:f32 = load %res
- ret %8
- }
-}
-%vertex_main = @vertex func():VertexOutput {
- $B3: {
- %tint_symbol:ptr<function, VertexOutput, read_write> = var
- %11:ptr<function, vec4<f32>, read_write> = access %tint_symbol, 0u
- store %11, vec4<f32>(0.0f)
- %12:ptr<function, f32, read_write> = access %tint_symbol, 1u
- %13:f32 = call %textureLoad_6925bc
- store %12, %13
- %14:VertexOutput = load %tint_symbol
- ret %14
- }
-}
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.ir.glsl
index ed9078e..0f72002 100644
--- a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.ir.glsl
@@ -1,11 +1,65 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_7b63e0() {
+ ivec2 v_1 = ivec2(uvec2(1u));
+ ivec3 v_2 = ivec3(v_1, int(1u));
+ float res = texelFetch(arg_0, v_2, int(1u)).x;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_7b63e0();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_7b63e0() {
+ ivec2 v_1 = ivec2(uvec2(1u));
+ ivec3 v_2 = ivec3(v_1, int(1u));
+ float res = texelFetch(arg_0, v_2, int(1u)).x;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_7b63e0();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ float prevent_dce;
+};
+
+uniform highp sampler2DArray arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_7b63e0() {
+ ivec2 v = ivec2(uvec2(1u));
+ ivec3 v_1 = ivec3(v, int(1u));
+ float res = texelFetch(arg_0, v_1, int(1u)).x;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_7b63e0();
+ return tint_symbol;
+}
+void main() {
+ VertexOutput v_2 = vertex_main_inner();
+ gl_Position = v_2.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_2.prevent_dce;
+ gl_PointSize = 1.0f;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.ir.glsl
index ed9078e..73bc682 100644
--- a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.ir.glsl
@@ -1,11 +1,62 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2D arg_0;
+float textureLoad_7fd822() {
+ ivec2 v_1 = ivec2(uvec2(1u));
+ float res = texelFetch(arg_0, v_1, int(1)).x;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_7fd822();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2D arg_0;
+float textureLoad_7fd822() {
+ ivec2 v_1 = ivec2(uvec2(1u));
+ float res = texelFetch(arg_0, v_1, int(1)).x;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_7fd822();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ float prevent_dce;
+};
+
+uniform highp sampler2D arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_7fd822() {
+ ivec2 v = ivec2(uvec2(1u));
+ float res = texelFetch(arg_0, v, int(1)).x;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_7fd822();
+ return tint_symbol;
+}
+void main() {
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_1.prevent_dce;
+ gl_PointSize = 1.0f;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.ir.glsl
index ed9078e..caaa73f 100644
--- a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.ir.glsl
@@ -1,11 +1,62 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2D arg_0;
+float textureLoad_8ccbe3() {
+ ivec2 v_1 = ivec2(ivec2(1));
+ float res = texelFetch(arg_0, v_1, int(1u)).x;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_8ccbe3();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2D arg_0;
+float textureLoad_8ccbe3() {
+ ivec2 v_1 = ivec2(ivec2(1));
+ float res = texelFetch(arg_0, v_1, int(1u)).x;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_8ccbe3();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ float prevent_dce;
+};
+
+uniform highp sampler2D arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_8ccbe3() {
+ ivec2 v = ivec2(ivec2(1));
+ float res = texelFetch(arg_0, v, int(1u)).x;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_8ccbe3();
+ return tint_symbol;
+}
+void main() {
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_1.prevent_dce;
+ gl_PointSize = 1.0f;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.ir.glsl
index ed9078e..fa0786a 100644
--- a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.ir.glsl
@@ -1,11 +1,65 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_9b2667() {
+ ivec2 v_1 = ivec2(ivec2(1));
+ ivec3 v_2 = ivec3(v_1, int(1));
+ float res = texelFetch(arg_0, v_2, int(1)).x;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_9b2667();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_9b2667() {
+ ivec2 v_1 = ivec2(ivec2(1));
+ ivec3 v_2 = ivec3(v_1, int(1));
+ float res = texelFetch(arg_0, v_2, int(1)).x;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_9b2667();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ float prevent_dce;
+};
+
+uniform highp sampler2DArray arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_9b2667() {
+ ivec2 v = ivec2(ivec2(1));
+ ivec3 v_1 = ivec3(v, int(1));
+ float res = texelFetch(arg_0, v_1, int(1)).x;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_9b2667();
+ return tint_symbol;
+}
+void main() {
+ VertexOutput v_2 = vertex_main_inner();
+ gl_Position = v_2.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_2.prevent_dce;
+ gl_PointSize = 1.0f;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.ir.glsl
index ed9078e..69e1a62 100644
--- a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.ir.glsl
@@ -1,11 +1,62 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2D arg_0;
+float textureLoad_9ed19e() {
+ ivec2 v_1 = ivec2(uvec2(1u));
+ float res = texelFetch(arg_0, v_1, int(1u)).x;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_9ed19e();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2D arg_0;
+float textureLoad_9ed19e() {
+ ivec2 v_1 = ivec2(uvec2(1u));
+ float res = texelFetch(arg_0, v_1, int(1u)).x;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_9ed19e();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ float prevent_dce;
+};
+
+uniform highp sampler2D arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_9ed19e() {
+ ivec2 v = ivec2(uvec2(1u));
+ float res = texelFetch(arg_0, v, int(1u)).x;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_9ed19e();
+ return tint_symbol;
+}
+void main() {
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_1.prevent_dce;
+ gl_PointSize = 1.0f;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.ir.glsl
index ed9078e..9e39b6d 100644
--- a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.ir.glsl
@@ -1,11 +1,65 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_b6ba5d() {
+ ivec2 v_1 = ivec2(uvec2(1u));
+ ivec3 v_2 = ivec3(v_1, int(1));
+ float res = texelFetch(arg_0, v_2, int(1)).x;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_b6ba5d();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_b6ba5d() {
+ ivec2 v_1 = ivec2(uvec2(1u));
+ ivec3 v_2 = ivec3(v_1, int(1));
+ float res = texelFetch(arg_0, v_2, int(1)).x;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_b6ba5d();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ float prevent_dce;
+};
+
+uniform highp sampler2DArray arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_b6ba5d() {
+ ivec2 v = ivec2(uvec2(1u));
+ ivec3 v_1 = ivec3(v, int(1));
+ float res = texelFetch(arg_0, v_1, int(1)).x;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_b6ba5d();
+ return tint_symbol;
+}
+void main() {
+ VertexOutput v_2 = vertex_main_inner();
+ gl_Position = v_2.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_2.prevent_dce;
+ gl_PointSize = 1.0f;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.ir.glsl
index ed9078e..f9e5498 100644
--- a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.ir.glsl
@@ -1,11 +1,65 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_c16e00() {
+ ivec2 v_1 = ivec2(ivec2(1));
+ ivec3 v_2 = ivec3(v_1, int(1u));
+ float res = texelFetch(arg_0, v_2, int(1)).x;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_c16e00();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_c16e00() {
+ ivec2 v_1 = ivec2(ivec2(1));
+ ivec3 v_2 = ivec3(v_1, int(1u));
+ float res = texelFetch(arg_0, v_2, int(1)).x;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_c16e00();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ float prevent_dce;
+};
+
+uniform highp sampler2DArray arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_c16e00() {
+ ivec2 v = ivec2(ivec2(1));
+ ivec3 v_1 = ivec3(v, int(1u));
+ float res = texelFetch(arg_0, v_1, int(1)).x;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_c16e00();
+ return tint_symbol;
+}
+void main() {
+ VertexOutput v_2 = vertex_main_inner();
+ gl_Position = v_2.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_2.prevent_dce;
+ gl_PointSize = 1.0f;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.ir.glsl
index ed9078e..736e4e0 100644
--- a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.ir.glsl
@@ -1,11 +1,65 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_cb57c2() {
+ ivec2 v_1 = ivec2(uvec2(1u));
+ ivec3 v_2 = ivec3(v_1, int(1u));
+ float res = texelFetch(arg_0, v_2, int(1)).x;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_cb57c2();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_cb57c2() {
+ ivec2 v_1 = ivec2(uvec2(1u));
+ ivec3 v_2 = ivec3(v_1, int(1u));
+ float res = texelFetch(arg_0, v_2, int(1)).x;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_cb57c2();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ float prevent_dce;
+};
+
+uniform highp sampler2DArray arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_cb57c2() {
+ ivec2 v = ivec2(uvec2(1u));
+ ivec3 v_1 = ivec3(v, int(1u));
+ float res = texelFetch(arg_0, v_1, int(1)).x;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_cb57c2();
+ return tint_symbol;
+}
+void main() {
+ VertexOutput v_2 = vertex_main_inner();
+ gl_Position = v_2.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_2.prevent_dce;
+ gl_PointSize = 1.0f;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.ir.glsl
index bf3fe8f..f98b180 100644
--- a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.ir.glsl
@@ -1,222 +1,62 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-
-@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_fcd23d() -> f32 {
- var res : f32 = textureLoad(arg_0, vec2<u32>(1u), 1i);
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DMS arg_0;
+float textureLoad_fcd23d() {
+ ivec2 v_1 = ivec2(uvec2(1u));
+ float res = texelFetch(arg_0, v_1, int(1)).x;
return res;
}
-
-struct VertexOutput {
- @builtin(position)
- pos : vec4<f32>,
- @location(0) @interpolate(flat)
- prevent_dce : f32,
+void main() {
+ v.tint_symbol = textureLoad_fcd23d();
}
+#version 310 es
-@fragment
-fn fragment_main() {
- prevent_dce = textureLoad_fcd23d();
-}
-
-Failed to generate: :15:14 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %7:f32 = glsl.texelFetch %4, %5, %6
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-tint_symbol_1 = struct @align(4), @block {
- tint_symbol:f32 @offset(0)
-}
-
-$B1: { # root
- %1:ptr<storage, tint_symbol_1, read_write> = var @binding_point(0, 0)
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_fcd23d = func():f32 {
- $B2: {
- %4:texture_depth_multisampled_2d = load %arg_0
- %5:vec2<i32> = convert vec2<u32>(1u)
- %6:i32 = convert 1i
- %7:f32 = glsl.texelFetch %4, %5, %6
- %res:ptr<function, f32, read_write> = var, %7
- %9:f32 = load %res
- ret %9
- }
-}
-%fragment_main = @fragment func():void {
- $B3: {
- %11:f32 = call %textureLoad_fcd23d
- %12:ptr<storage, f32, read_write> = access %1, 0u
- store %12, %11
- ret
- }
-}
-
-
-@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_fcd23d() -> f32 {
- var res : f32 = textureLoad(arg_0, vec2<u32>(1u), 1i);
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DMS arg_0;
+float textureLoad_fcd23d() {
+ ivec2 v_1 = ivec2(uvec2(1u));
+ float res = texelFetch(arg_0, v_1, int(1)).x;
return res;
}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_fcd23d();
+}
+#version 310 es
+
struct VertexOutput {
- @builtin(position)
- pos : vec4<f32>,
- @location(0) @interpolate(flat)
- prevent_dce : f32,
-}
+ vec4 pos;
+ float prevent_dce;
+};
-@compute @workgroup_size(1)
-fn compute_main() {
- prevent_dce = textureLoad_fcd23d();
-}
-
-Failed to generate: :15:14 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %7:f32 = glsl.texelFetch %4, %5, %6
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-tint_symbol_1 = struct @align(4), @block {
- tint_symbol:f32 @offset(0)
-}
-
-$B1: { # root
- %1:ptr<storage, tint_symbol_1, read_write> = var @binding_point(0, 0)
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_fcd23d = func():f32 {
- $B2: {
- %4:texture_depth_multisampled_2d = load %arg_0
- %5:vec2<i32> = convert vec2<u32>(1u)
- %6:i32 = convert 1i
- %7:f32 = glsl.texelFetch %4, %5, %6
- %res:ptr<function, f32, read_write> = var, %7
- %9:f32 = load %res
- ret %9
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %11:f32 = call %textureLoad_fcd23d
- %12:ptr<storage, f32, read_write> = access %1, 0u
- store %12, %11
- ret
- }
-}
-
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_fcd23d() -> f32 {
- var res : f32 = textureLoad(arg_0, vec2<u32>(1u), 1i);
+uniform highp sampler2DMS arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_fcd23d() {
+ ivec2 v = ivec2(uvec2(1u));
+ float res = texelFetch(arg_0, v, int(1)).x;
return res;
}
-
-struct VertexOutput {
- @builtin(position)
- pos : vec4<f32>,
- @location(0) @interpolate(flat)
- prevent_dce : f32,
-}
-
-@vertex
-fn vertex_main() -> VertexOutput {
- var tint_symbol : VertexOutput;
- tint_symbol.pos = vec4<f32>();
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
tint_symbol.prevent_dce = textureLoad_fcd23d();
return tint_symbol;
}
-
-Failed to generate: :15:14 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %6:f32 = glsl.texelFetch %3, %4, %5
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-VertexOutput = struct @align(16) {
- pos:vec4<f32> @offset(0), @builtin(position)
- prevent_dce:f32 @offset(16), @location(0), @interpolate(flat)
+void main() {
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_1.prevent_dce;
+ gl_PointSize = 1.0f;
}
-
-$B1: { # root
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_fcd23d = func():f32 {
- $B2: {
- %3:texture_depth_multisampled_2d = load %arg_0
- %4:vec2<i32> = convert vec2<u32>(1u)
- %5:i32 = convert 1i
- %6:f32 = glsl.texelFetch %3, %4, %5
- %res:ptr<function, f32, read_write> = var, %6
- %8:f32 = load %res
- ret %8
- }
-}
-%vertex_main = @vertex func():VertexOutput {
- $B3: {
- %tint_symbol:ptr<function, VertexOutput, read_write> = var
- %11:ptr<function, vec4<f32>, read_write> = access %tint_symbol, 0u
- store %11, vec4<f32>(0.0f)
- %12:ptr<function, f32, read_write> = access %tint_symbol, 1u
- %13:f32 = call %textureLoad_fcd23d
- store %12, %13
- %14:VertexOutput = load %tint_symbol
- ret %14
- }
-}
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.ir.glsl
index ed9078e..1739aca 100644
--- a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.ir.glsl
@@ -1,11 +1,65 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_ff1119() {
+ ivec2 v_1 = ivec2(ivec2(1));
+ ivec3 v_2 = ivec3(v_1, int(1));
+ float res = texelFetch(arg_0, v_2, int(1u)).x;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_ff1119();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_ff1119() {
+ ivec2 v_1 = ivec2(ivec2(1));
+ ivec3 v_2 = ivec3(v_1, int(1));
+ float res = texelFetch(arg_0, v_2, int(1u)).x;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_ff1119();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ float prevent_dce;
+};
+
+uniform highp sampler2DArray arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_ff1119() {
+ ivec2 v = ivec2(ivec2(1));
+ ivec3 v_1 = ivec3(v, int(1));
+ float res = texelFetch(arg_0, v_1, int(1u)).x;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_ff1119();
+ return tint_symbol;
+}
+void main() {
+ VertexOutput v_2 = vertex_main_inner();
+ gl_Position = v_2.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_2.prevent_dce;
+ gl_PointSize = 1.0f;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/48ef47.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureNumLayers/48ef47.wgsl.expected.ir.glsl
index 2972baf..5514fbf 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/48ef47.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/48ef47.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uint tint_symbol;
} v;
-uniform highp samplerCubeArrayShadow arg_0;
+uniform highp samplerCubeArray arg_0;
uint textureNumLayers_48ef47() {
uint res = uint(textureSize(arg_0, 0).z);
return res;
@@ -20,7 +20,7 @@
buffer tint_symbol_1_1_ssbo {
uint tint_symbol;
} v;
-uniform highp samplerCubeArrayShadow arg_0;
+uniform highp samplerCubeArray arg_0;
uint textureNumLayers_48ef47() {
uint res = uint(textureSize(arg_0, 0).z);
return res;
@@ -37,7 +37,7 @@
uint prevent_dce;
};
-uniform highp samplerCubeArrayShadow arg_0;
+uniform highp samplerCubeArray arg_0;
layout(location = 0) flat out uint vertex_main_loc0_Output;
uint textureNumLayers_48ef47() {
uint res = uint(textureSize(arg_0, 0).z);
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/a9d3f5.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/textureNumLayers/a9d3f5.wgsl.expected.ir.glsl
index a8f8628..d6c05cb 100644
--- a/test/tint/builtins/gen/literal/textureNumLayers/a9d3f5.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/textureNumLayers/a9d3f5.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uint tint_symbol;
} v;
-uniform highp sampler2DArrayShadow arg_0;
+uniform highp sampler2DArray arg_0;
uint textureNumLayers_a9d3f5() {
uint res = uint(textureSize(arg_0, 0).z);
return res;
@@ -20,7 +20,7 @@
buffer tint_symbol_1_1_ssbo {
uint tint_symbol;
} v;
-uniform highp sampler2DArrayShadow arg_0;
+uniform highp sampler2DArray arg_0;
uint textureNumLayers_a9d3f5() {
uint res = uint(textureSize(arg_0, 0).z);
return res;
@@ -37,7 +37,7 @@
uint prevent_dce;
};
-uniform highp sampler2DArrayShadow arg_0;
+uniform highp sampler2DArray arg_0;
layout(location = 0) flat out uint vertex_main_loc0_Output;
uint textureNumLayers_a9d3f5() {
uint res = uint(textureSize(arg_0, 0).z);
diff --git a/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.ir.glsl
index d8989ef..c8d10e8 100644
--- a/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp samplerCubeArrayShadow arg_0;
+uniform highp samplerCubeArray arg_0;
uvec2 textureDimensions_0ff9a4() {
int arg_1 = 1;
uvec2 res = uvec2(textureSize(arg_0, arg_1).xy);
@@ -21,7 +21,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp samplerCubeArrayShadow arg_0;
+uniform highp samplerCubeArray arg_0;
uvec2 textureDimensions_0ff9a4() {
int arg_1 = 1;
uvec2 res = uvec2(textureSize(arg_0, arg_1).xy);
@@ -39,7 +39,7 @@
uvec2 prevent_dce;
};
-uniform highp samplerCubeArrayShadow arg_0;
+uniform highp samplerCubeArray arg_0;
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 textureDimensions_0ff9a4() {
int arg_1 = 1;
diff --git a/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.ir.glsl
index 1d43689..0ce603f 100644
--- a/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp sampler2DShadow arg_0;
+uniform highp sampler2D arg_0;
uvec2 textureDimensions_3b38f6() {
uvec2 res = uvec2(textureSize(arg_0, 0));
return res;
@@ -20,7 +20,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp sampler2DShadow arg_0;
+uniform highp sampler2D arg_0;
uvec2 textureDimensions_3b38f6() {
uvec2 res = uvec2(textureSize(arg_0, 0));
return res;
@@ -37,7 +37,7 @@
uvec2 prevent_dce;
};
-uniform highp sampler2DShadow arg_0;
+uniform highp sampler2D arg_0;
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 textureDimensions_3b38f6() {
uvec2 res = uvec2(textureSize(arg_0, 0));
diff --git a/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.ir.glsl
index e0434e8..c963afa 100644
--- a/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp sampler2DShadow arg_0;
+uniform highp sampler2D arg_0;
uvec2 textureDimensions_6f1b5d() {
int arg_1 = 1;
uvec2 res = uvec2(textureSize(arg_0, arg_1));
@@ -21,7 +21,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp sampler2DShadow arg_0;
+uniform highp sampler2D arg_0;
uvec2 textureDimensions_6f1b5d() {
int arg_1 = 1;
uvec2 res = uvec2(textureSize(arg_0, arg_1));
@@ -39,7 +39,7 @@
uvec2 prevent_dce;
};
-uniform highp sampler2DShadow arg_0;
+uniform highp sampler2D arg_0;
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 textureDimensions_6f1b5d() {
int arg_1 = 1;
diff --git a/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.ir.glsl
index 10642ef..bc7a64e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp samplerCubeShadow arg_0;
+uniform highp samplerCube arg_0;
uvec2 textureDimensions_79d168() {
int arg_1 = 1;
uvec2 res = uvec2(textureSize(arg_0, arg_1));
@@ -21,7 +21,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp samplerCubeShadow arg_0;
+uniform highp samplerCube arg_0;
uvec2 textureDimensions_79d168() {
int arg_1 = 1;
uvec2 res = uvec2(textureSize(arg_0, arg_1));
@@ -39,7 +39,7 @@
uvec2 prevent_dce;
};
-uniform highp samplerCubeShadow arg_0;
+uniform highp samplerCube arg_0;
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 textureDimensions_79d168() {
int arg_1 = 1;
diff --git a/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.ir.glsl
index 797873d..5b3cd07 100644
--- a/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp sampler2DShadow arg_0;
+uniform highp sampler2D arg_0;
uvec2 textureDimensions_991ea9() {
uint arg_1 = 1u;
uvec2 res = uvec2(textureSize(arg_0, int(arg_1)));
@@ -21,7 +21,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp sampler2DShadow arg_0;
+uniform highp sampler2D arg_0;
uvec2 textureDimensions_991ea9() {
uint arg_1 = 1u;
uvec2 res = uvec2(textureSize(arg_0, int(arg_1)));
@@ -39,7 +39,7 @@
uvec2 prevent_dce;
};
-uniform highp sampler2DShadow arg_0;
+uniform highp sampler2D arg_0;
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 textureDimensions_991ea9() {
uint arg_1 = 1u;
diff --git a/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.ir.glsl
index 9c87f72..72ee432 100644
--- a/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp samplerCubeArrayShadow arg_0;
+uniform highp samplerCubeArray arg_0;
uvec2 textureDimensions_9fcc3b() {
uvec2 res = uvec2(textureSize(arg_0, 0).xy);
return res;
@@ -20,7 +20,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp samplerCubeArrayShadow arg_0;
+uniform highp samplerCubeArray arg_0;
uvec2 textureDimensions_9fcc3b() {
uvec2 res = uvec2(textureSize(arg_0, 0).xy);
return res;
@@ -37,7 +37,7 @@
uvec2 prevent_dce;
};
-uniform highp samplerCubeArrayShadow arg_0;
+uniform highp samplerCubeArray arg_0;
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 textureDimensions_9fcc3b() {
uvec2 res = uvec2(textureSize(arg_0, 0).xy);
diff --git a/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.ir.glsl
index 52090d7e..646a81d 100644
--- a/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp sampler2DArrayShadow arg_0;
+uniform highp sampler2DArray arg_0;
uvec2 textureDimensions_a4cd56() {
uvec2 res = uvec2(textureSize(arg_0, 0).xy);
return res;
@@ -20,7 +20,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp sampler2DArrayShadow arg_0;
+uniform highp sampler2DArray arg_0;
uvec2 textureDimensions_a4cd56() {
uvec2 res = uvec2(textureSize(arg_0, 0).xy);
return res;
@@ -37,7 +37,7 @@
uvec2 prevent_dce;
};
-uniform highp sampler2DArrayShadow arg_0;
+uniform highp sampler2DArray arg_0;
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 textureDimensions_a4cd56() {
uvec2 res = uvec2(textureSize(arg_0, 0).xy);
diff --git a/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.ir.glsl
index a8275b8..0880b12 100644
--- a/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp samplerCubeArrayShadow arg_0;
+uniform highp samplerCubeArray arg_0;
uvec2 textureDimensions_bd94c8() {
uint arg_1 = 1u;
uvec2 res = uvec2(textureSize(arg_0, int(arg_1)).xy);
@@ -21,7 +21,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp samplerCubeArrayShadow arg_0;
+uniform highp samplerCubeArray arg_0;
uvec2 textureDimensions_bd94c8() {
uint arg_1 = 1u;
uvec2 res = uvec2(textureSize(arg_0, int(arg_1)).xy);
@@ -39,7 +39,7 @@
uvec2 prevent_dce;
};
-uniform highp samplerCubeArrayShadow arg_0;
+uniform highp samplerCubeArray arg_0;
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 textureDimensions_bd94c8() {
uint arg_1 = 1u;
diff --git a/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.ir.glsl
index 26c919d..d3fb18a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp samplerCubeShadow arg_0;
+uniform highp samplerCube arg_0;
uvec2 textureDimensions_c5a36e() {
uvec2 res = uvec2(textureSize(arg_0, 0));
return res;
@@ -20,7 +20,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp samplerCubeShadow arg_0;
+uniform highp samplerCube arg_0;
uvec2 textureDimensions_c5a36e() {
uvec2 res = uvec2(textureSize(arg_0, 0));
return res;
@@ -37,7 +37,7 @@
uvec2 prevent_dce;
};
-uniform highp samplerCubeShadow arg_0;
+uniform highp samplerCube arg_0;
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 textureDimensions_c5a36e() {
uvec2 res = uvec2(textureSize(arg_0, 0));
diff --git a/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.ir.glsl
index f373be5..3fc6c41 100644
--- a/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp samplerCubeShadow arg_0;
+uniform highp samplerCube arg_0;
uvec2 textureDimensions_d3accd() {
uint arg_1 = 1u;
uvec2 res = uvec2(textureSize(arg_0, int(arg_1)));
@@ -21,7 +21,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp samplerCubeShadow arg_0;
+uniform highp samplerCube arg_0;
uvec2 textureDimensions_d3accd() {
uint arg_1 = 1u;
uvec2 res = uvec2(textureSize(arg_0, int(arg_1)));
@@ -39,7 +39,7 @@
uvec2 prevent_dce;
};
-uniform highp samplerCubeShadow arg_0;
+uniform highp samplerCube arg_0;
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 textureDimensions_d3accd() {
uint arg_1 = 1u;
diff --git a/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.ir.glsl
index bb68de9..45007f1 100644
--- a/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp sampler2DArrayShadow arg_0;
+uniform highp sampler2DArray arg_0;
uvec2 textureDimensions_dfdc32() {
int arg_1 = 1;
uvec2 res = uvec2(textureSize(arg_0, arg_1).xy);
@@ -21,7 +21,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp sampler2DArrayShadow arg_0;
+uniform highp sampler2DArray arg_0;
uvec2 textureDimensions_dfdc32() {
int arg_1 = 1;
uvec2 res = uvec2(textureSize(arg_0, arg_1).xy);
@@ -39,7 +39,7 @@
uvec2 prevent_dce;
};
-uniform highp sampler2DArrayShadow arg_0;
+uniform highp sampler2DArray arg_0;
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 textureDimensions_dfdc32() {
int arg_1 = 1;
diff --git a/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.ir.glsl
index 984c7e8..19adbf0 100644
--- a/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp sampler2DArrayShadow arg_0;
+uniform highp sampler2DArray arg_0;
uvec2 textureDimensions_eafe19() {
uint arg_1 = 1u;
uvec2 res = uvec2(textureSize(arg_0, int(arg_1)).xy);
@@ -21,7 +21,7 @@
buffer tint_symbol_1_1_ssbo {
uvec2 tint_symbol;
} v;
-uniform highp sampler2DArrayShadow arg_0;
+uniform highp sampler2DArray arg_0;
uvec2 textureDimensions_eafe19() {
uint arg_1 = 1u;
uvec2 res = uvec2(textureSize(arg_0, int(arg_1)).xy);
@@ -39,7 +39,7 @@
uvec2 prevent_dce;
};
-uniform highp sampler2DArrayShadow arg_0;
+uniform highp sampler2DArray arg_0;
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 textureDimensions_eafe19() {
uint arg_1 = 1u;
diff --git a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.ir.glsl
index ed9078e..6130054 100644
--- a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.ir.glsl
@@ -1,11 +1,80 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_04b911() {
+ uvec2 arg_1 = uvec2(1u);
+ int arg_2 = 1;
+ uint arg_3 = 1u;
+ int v_1 = arg_2;
+ uint v_2 = arg_3;
+ ivec2 v_3 = ivec2(arg_1);
+ ivec3 v_4 = ivec3(v_3, int(v_1));
+ float res = texelFetch(arg_0, v_4, int(v_2)).x;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_04b911();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_04b911() {
+ uvec2 arg_1 = uvec2(1u);
+ int arg_2 = 1;
+ uint arg_3 = 1u;
+ int v_1 = arg_2;
+ uint v_2 = arg_3;
+ ivec2 v_3 = ivec2(arg_1);
+ ivec3 v_4 = ivec3(v_3, int(v_1));
+ float res = texelFetch(arg_0, v_4, int(v_2)).x;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_04b911();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ float prevent_dce;
+};
+
+uniform highp sampler2DArray arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_04b911() {
+ uvec2 arg_1 = uvec2(1u);
+ int arg_2 = 1;
+ uint arg_3 = 1u;
+ int v = arg_2;
+ uint v_1 = arg_3;
+ ivec2 v_2 = ivec2(arg_1);
+ ivec3 v_3 = ivec3(v_2, int(v));
+ float res = texelFetch(arg_0, v_3, int(v_1)).x;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_04b911();
+ return tint_symbol;
+}
+void main() {
+ VertexOutput v_4 = vertex_main_inner();
+ gl_Position = v_4.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_4.prevent_dce;
+ gl_PointSize = 1.0f;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.ir.glsl
index ed9078e..1d096a8 100644
--- a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.ir.glsl
@@ -1,11 +1,71 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2D arg_0;
+float textureLoad_19cf87() {
+ ivec2 arg_1 = ivec2(1);
+ int arg_2 = 1;
+ int v_1 = arg_2;
+ ivec2 v_2 = ivec2(arg_1);
+ float res = texelFetch(arg_0, v_2, int(v_1)).x;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_19cf87();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2D arg_0;
+float textureLoad_19cf87() {
+ ivec2 arg_1 = ivec2(1);
+ int arg_2 = 1;
+ int v_1 = arg_2;
+ ivec2 v_2 = ivec2(arg_1);
+ float res = texelFetch(arg_0, v_2, int(v_1)).x;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_19cf87();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ float prevent_dce;
+};
+
+uniform highp sampler2D arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_19cf87() {
+ ivec2 arg_1 = ivec2(1);
+ int arg_2 = 1;
+ int v = arg_2;
+ ivec2 v_1 = ivec2(arg_1);
+ float res = texelFetch(arg_0, v_1, int(v)).x;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_19cf87();
+ return tint_symbol;
+}
+void main() {
+ VertexOutput v_2 = vertex_main_inner();
+ gl_Position = v_2.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_2.prevent_dce;
+ gl_PointSize = 1.0f;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.ir.glsl
index 20e5502..c2a8eb6 100644
--- a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.ir.glsl
@@ -1,240 +1,71 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-
-@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_4db25c() -> f32 {
- var arg_1 = vec2<u32>(1u);
- var arg_2 = 1u;
- var res : f32 = textureLoad(arg_0, arg_1, arg_2);
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DMS arg_0;
+float textureLoad_4db25c() {
+ uvec2 arg_1 = uvec2(1u);
+ uint arg_2 = 1u;
+ uint v_1 = arg_2;
+ ivec2 v_2 = ivec2(arg_1);
+ float res = texelFetch(arg_0, v_2, int(v_1)).x;
return res;
}
-
-struct VertexOutput {
- @builtin(position)
- pos : vec4<f32>,
- @location(0) @interpolate(flat)
- prevent_dce : f32,
+void main() {
+ v.tint_symbol = textureLoad_4db25c();
}
+#version 310 es
-@fragment
-fn fragment_main() {
- prevent_dce = textureLoad_4db25c();
-}
-
-Failed to generate: :19:15 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %11:f32 = glsl.texelFetch %8, %9, %10
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-tint_symbol_1 = struct @align(4), @block {
- tint_symbol:f32 @offset(0)
-}
-
-$B1: { # root
- %1:ptr<storage, tint_symbol_1, read_write> = var @binding_point(0, 0)
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_4db25c = func():f32 {
- $B2: {
- %arg_1:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %arg_2:ptr<function, u32, read_write> = var, 1u
- %6:vec2<u32> = load %arg_1
- %7:u32 = load %arg_2
- %8:texture_depth_multisampled_2d = load %arg_0
- %9:vec2<i32> = convert %6
- %10:i32 = convert %7
- %11:f32 = glsl.texelFetch %8, %9, %10
- %res:ptr<function, f32, read_write> = var, %11
- %13:f32 = load %res
- ret %13
- }
-}
-%fragment_main = @fragment func():void {
- $B3: {
- %15:f32 = call %textureLoad_4db25c
- %16:ptr<storage, f32, read_write> = access %1, 0u
- store %16, %15
- ret
- }
-}
-
-
-@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_4db25c() -> f32 {
- var arg_1 = vec2<u32>(1u);
- var arg_2 = 1u;
- var res : f32 = textureLoad(arg_0, arg_1, arg_2);
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DMS arg_0;
+float textureLoad_4db25c() {
+ uvec2 arg_1 = uvec2(1u);
+ uint arg_2 = 1u;
+ uint v_1 = arg_2;
+ ivec2 v_2 = ivec2(arg_1);
+ float res = texelFetch(arg_0, v_2, int(v_1)).x;
return res;
}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_4db25c();
+}
+#version 310 es
+
struct VertexOutput {
- @builtin(position)
- pos : vec4<f32>,
- @location(0) @interpolate(flat)
- prevent_dce : f32,
-}
+ vec4 pos;
+ float prevent_dce;
+};
-@compute @workgroup_size(1)
-fn compute_main() {
- prevent_dce = textureLoad_4db25c();
-}
-
-Failed to generate: :19:15 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %11:f32 = glsl.texelFetch %8, %9, %10
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-tint_symbol_1 = struct @align(4), @block {
- tint_symbol:f32 @offset(0)
-}
-
-$B1: { # root
- %1:ptr<storage, tint_symbol_1, read_write> = var @binding_point(0, 0)
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_4db25c = func():f32 {
- $B2: {
- %arg_1:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %arg_2:ptr<function, u32, read_write> = var, 1u
- %6:vec2<u32> = load %arg_1
- %7:u32 = load %arg_2
- %8:texture_depth_multisampled_2d = load %arg_0
- %9:vec2<i32> = convert %6
- %10:i32 = convert %7
- %11:f32 = glsl.texelFetch %8, %9, %10
- %res:ptr<function, f32, read_write> = var, %11
- %13:f32 = load %res
- ret %13
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %15:f32 = call %textureLoad_4db25c
- %16:ptr<storage, f32, read_write> = access %1, 0u
- store %16, %15
- ret
- }
-}
-
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_4db25c() -> f32 {
- var arg_1 = vec2<u32>(1u);
- var arg_2 = 1u;
- var res : f32 = textureLoad(arg_0, arg_1, arg_2);
+uniform highp sampler2DMS arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_4db25c() {
+ uvec2 arg_1 = uvec2(1u);
+ uint arg_2 = 1u;
+ uint v = arg_2;
+ ivec2 v_1 = ivec2(arg_1);
+ float res = texelFetch(arg_0, v_1, int(v)).x;
return res;
}
-
-struct VertexOutput {
- @builtin(position)
- pos : vec4<f32>,
- @location(0) @interpolate(flat)
- prevent_dce : f32,
-}
-
-@vertex
-fn vertex_main() -> VertexOutput {
- var tint_symbol : VertexOutput;
- tint_symbol.pos = vec4<f32>();
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
tint_symbol.prevent_dce = textureLoad_4db25c();
return tint_symbol;
}
-
-Failed to generate: :19:15 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %10:f32 = glsl.texelFetch %7, %8, %9
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-VertexOutput = struct @align(16) {
- pos:vec4<f32> @offset(0), @builtin(position)
- prevent_dce:f32 @offset(16), @location(0), @interpolate(flat)
+void main() {
+ VertexOutput v_2 = vertex_main_inner();
+ gl_Position = v_2.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_2.prevent_dce;
+ gl_PointSize = 1.0f;
}
-
-$B1: { # root
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_4db25c = func():f32 {
- $B2: {
- %arg_1:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %arg_2:ptr<function, u32, read_write> = var, 1u
- %5:vec2<u32> = load %arg_1
- %6:u32 = load %arg_2
- %7:texture_depth_multisampled_2d = load %arg_0
- %8:vec2<i32> = convert %5
- %9:i32 = convert %6
- %10:f32 = glsl.texelFetch %7, %8, %9
- %res:ptr<function, f32, read_write> = var, %10
- %12:f32 = load %res
- ret %12
- }
-}
-%vertex_main = @vertex func():VertexOutput {
- $B3: {
- %tint_symbol:ptr<function, VertexOutput, read_write> = var
- %15:ptr<function, vec4<f32>, read_write> = access %tint_symbol, 0u
- store %15, vec4<f32>(0.0f)
- %16:ptr<function, f32, read_write> = access %tint_symbol, 1u
- %17:f32 = call %textureLoad_4db25c
- store %16, %17
- %18:VertexOutput = load %tint_symbol
- ret %18
- }
-}
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.ir.glsl
index 61170b0..73bec1c 100644
--- a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.ir.glsl
@@ -1,240 +1,71 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-
-@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_6273b1() -> f32 {
- var arg_1 = vec2<i32>(1i);
- var arg_2 = 1i;
- var res : f32 = textureLoad(arg_0, arg_1, arg_2);
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DMS arg_0;
+float textureLoad_6273b1() {
+ ivec2 arg_1 = ivec2(1);
+ int arg_2 = 1;
+ int v_1 = arg_2;
+ ivec2 v_2 = ivec2(arg_1);
+ float res = texelFetch(arg_0, v_2, int(v_1)).x;
return res;
}
-
-struct VertexOutput {
- @builtin(position)
- pos : vec4<f32>,
- @location(0) @interpolate(flat)
- prevent_dce : f32,
+void main() {
+ v.tint_symbol = textureLoad_6273b1();
}
+#version 310 es
-@fragment
-fn fragment_main() {
- prevent_dce = textureLoad_6273b1();
-}
-
-Failed to generate: :19:15 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %11:f32 = glsl.texelFetch %8, %9, %10
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-tint_symbol_1 = struct @align(4), @block {
- tint_symbol:f32 @offset(0)
-}
-
-$B1: { # root
- %1:ptr<storage, tint_symbol_1, read_write> = var @binding_point(0, 0)
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_6273b1 = func():f32 {
- $B2: {
- %arg_1:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %arg_2:ptr<function, i32, read_write> = var, 1i
- %6:vec2<i32> = load %arg_1
- %7:i32 = load %arg_2
- %8:texture_depth_multisampled_2d = load %arg_0
- %9:vec2<i32> = convert %6
- %10:i32 = convert %7
- %11:f32 = glsl.texelFetch %8, %9, %10
- %res:ptr<function, f32, read_write> = var, %11
- %13:f32 = load %res
- ret %13
- }
-}
-%fragment_main = @fragment func():void {
- $B3: {
- %15:f32 = call %textureLoad_6273b1
- %16:ptr<storage, f32, read_write> = access %1, 0u
- store %16, %15
- ret
- }
-}
-
-
-@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_6273b1() -> f32 {
- var arg_1 = vec2<i32>(1i);
- var arg_2 = 1i;
- var res : f32 = textureLoad(arg_0, arg_1, arg_2);
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DMS arg_0;
+float textureLoad_6273b1() {
+ ivec2 arg_1 = ivec2(1);
+ int arg_2 = 1;
+ int v_1 = arg_2;
+ ivec2 v_2 = ivec2(arg_1);
+ float res = texelFetch(arg_0, v_2, int(v_1)).x;
return res;
}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_6273b1();
+}
+#version 310 es
+
struct VertexOutput {
- @builtin(position)
- pos : vec4<f32>,
- @location(0) @interpolate(flat)
- prevent_dce : f32,
-}
+ vec4 pos;
+ float prevent_dce;
+};
-@compute @workgroup_size(1)
-fn compute_main() {
- prevent_dce = textureLoad_6273b1();
-}
-
-Failed to generate: :19:15 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %11:f32 = glsl.texelFetch %8, %9, %10
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-tint_symbol_1 = struct @align(4), @block {
- tint_symbol:f32 @offset(0)
-}
-
-$B1: { # root
- %1:ptr<storage, tint_symbol_1, read_write> = var @binding_point(0, 0)
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_6273b1 = func():f32 {
- $B2: {
- %arg_1:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %arg_2:ptr<function, i32, read_write> = var, 1i
- %6:vec2<i32> = load %arg_1
- %7:i32 = load %arg_2
- %8:texture_depth_multisampled_2d = load %arg_0
- %9:vec2<i32> = convert %6
- %10:i32 = convert %7
- %11:f32 = glsl.texelFetch %8, %9, %10
- %res:ptr<function, f32, read_write> = var, %11
- %13:f32 = load %res
- ret %13
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %15:f32 = call %textureLoad_6273b1
- %16:ptr<storage, f32, read_write> = access %1, 0u
- store %16, %15
- ret
- }
-}
-
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_6273b1() -> f32 {
- var arg_1 = vec2<i32>(1i);
- var arg_2 = 1i;
- var res : f32 = textureLoad(arg_0, arg_1, arg_2);
+uniform highp sampler2DMS arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_6273b1() {
+ ivec2 arg_1 = ivec2(1);
+ int arg_2 = 1;
+ int v = arg_2;
+ ivec2 v_1 = ivec2(arg_1);
+ float res = texelFetch(arg_0, v_1, int(v)).x;
return res;
}
-
-struct VertexOutput {
- @builtin(position)
- pos : vec4<f32>,
- @location(0) @interpolate(flat)
- prevent_dce : f32,
-}
-
-@vertex
-fn vertex_main() -> VertexOutput {
- var tint_symbol : VertexOutput;
- tint_symbol.pos = vec4<f32>();
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
tint_symbol.prevent_dce = textureLoad_6273b1();
return tint_symbol;
}
-
-Failed to generate: :19:15 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %10:f32 = glsl.texelFetch %7, %8, %9
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-VertexOutput = struct @align(16) {
- pos:vec4<f32> @offset(0), @builtin(position)
- prevent_dce:f32 @offset(16), @location(0), @interpolate(flat)
+void main() {
+ VertexOutput v_2 = vertex_main_inner();
+ gl_Position = v_2.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_2.prevent_dce;
+ gl_PointSize = 1.0f;
}
-
-$B1: { # root
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_6273b1 = func():f32 {
- $B2: {
- %arg_1:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %arg_2:ptr<function, i32, read_write> = var, 1i
- %5:vec2<i32> = load %arg_1
- %6:i32 = load %arg_2
- %7:texture_depth_multisampled_2d = load %arg_0
- %8:vec2<i32> = convert %5
- %9:i32 = convert %6
- %10:f32 = glsl.texelFetch %7, %8, %9
- %res:ptr<function, f32, read_write> = var, %10
- %12:f32 = load %res
- ret %12
- }
-}
-%vertex_main = @vertex func():VertexOutput {
- $B3: {
- %tint_symbol:ptr<function, VertexOutput, read_write> = var
- %15:ptr<function, vec4<f32>, read_write> = access %tint_symbol, 0u
- store %15, vec4<f32>(0.0f)
- %16:ptr<function, f32, read_write> = access %tint_symbol, 1u
- %17:f32 = call %textureLoad_6273b1
- store %16, %17
- %18:VertexOutput = load %tint_symbol
- ret %18
- }
-}
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.ir.glsl
index ed9078e..7eca3b3 100644
--- a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.ir.glsl
@@ -1,11 +1,80 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_66be47() {
+ ivec2 arg_1 = ivec2(1);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ uint v_1 = arg_2;
+ uint v_2 = arg_3;
+ ivec2 v_3 = ivec2(arg_1);
+ ivec3 v_4 = ivec3(v_3, int(v_1));
+ float res = texelFetch(arg_0, v_4, int(v_2)).x;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_66be47();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_66be47() {
+ ivec2 arg_1 = ivec2(1);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ uint v_1 = arg_2;
+ uint v_2 = arg_3;
+ ivec2 v_3 = ivec2(arg_1);
+ ivec3 v_4 = ivec3(v_3, int(v_1));
+ float res = texelFetch(arg_0, v_4, int(v_2)).x;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_66be47();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ float prevent_dce;
+};
+
+uniform highp sampler2DArray arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_66be47() {
+ ivec2 arg_1 = ivec2(1);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ uint v = arg_2;
+ uint v_1 = arg_3;
+ ivec2 v_2 = ivec2(arg_1);
+ ivec3 v_3 = ivec3(v_2, int(v));
+ float res = texelFetch(arg_0, v_3, int(v_1)).x;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_66be47();
+ return tint_symbol;
+}
+void main() {
+ VertexOutput v_4 = vertex_main_inner();
+ gl_Position = v_4.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_4.prevent_dce;
+ gl_PointSize = 1.0f;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.ir.glsl
index c2c2df7..3d65f2d 100644
--- a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.ir.glsl
@@ -1,240 +1,71 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-
-@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_6925bc() -> f32 {
- var arg_1 = vec2<i32>(1i);
- var arg_2 = 1u;
- var res : f32 = textureLoad(arg_0, arg_1, arg_2);
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DMS arg_0;
+float textureLoad_6925bc() {
+ ivec2 arg_1 = ivec2(1);
+ uint arg_2 = 1u;
+ uint v_1 = arg_2;
+ ivec2 v_2 = ivec2(arg_1);
+ float res = texelFetch(arg_0, v_2, int(v_1)).x;
return res;
}
-
-struct VertexOutput {
- @builtin(position)
- pos : vec4<f32>,
- @location(0) @interpolate(flat)
- prevent_dce : f32,
+void main() {
+ v.tint_symbol = textureLoad_6925bc();
}
+#version 310 es
-@fragment
-fn fragment_main() {
- prevent_dce = textureLoad_6925bc();
-}
-
-Failed to generate: :19:15 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %11:f32 = glsl.texelFetch %8, %9, %10
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-tint_symbol_1 = struct @align(4), @block {
- tint_symbol:f32 @offset(0)
-}
-
-$B1: { # root
- %1:ptr<storage, tint_symbol_1, read_write> = var @binding_point(0, 0)
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_6925bc = func():f32 {
- $B2: {
- %arg_1:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %arg_2:ptr<function, u32, read_write> = var, 1u
- %6:vec2<i32> = load %arg_1
- %7:u32 = load %arg_2
- %8:texture_depth_multisampled_2d = load %arg_0
- %9:vec2<i32> = convert %6
- %10:i32 = convert %7
- %11:f32 = glsl.texelFetch %8, %9, %10
- %res:ptr<function, f32, read_write> = var, %11
- %13:f32 = load %res
- ret %13
- }
-}
-%fragment_main = @fragment func():void {
- $B3: {
- %15:f32 = call %textureLoad_6925bc
- %16:ptr<storage, f32, read_write> = access %1, 0u
- store %16, %15
- ret
- }
-}
-
-
-@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_6925bc() -> f32 {
- var arg_1 = vec2<i32>(1i);
- var arg_2 = 1u;
- var res : f32 = textureLoad(arg_0, arg_1, arg_2);
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DMS arg_0;
+float textureLoad_6925bc() {
+ ivec2 arg_1 = ivec2(1);
+ uint arg_2 = 1u;
+ uint v_1 = arg_2;
+ ivec2 v_2 = ivec2(arg_1);
+ float res = texelFetch(arg_0, v_2, int(v_1)).x;
return res;
}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_6925bc();
+}
+#version 310 es
+
struct VertexOutput {
- @builtin(position)
- pos : vec4<f32>,
- @location(0) @interpolate(flat)
- prevent_dce : f32,
-}
+ vec4 pos;
+ float prevent_dce;
+};
-@compute @workgroup_size(1)
-fn compute_main() {
- prevent_dce = textureLoad_6925bc();
-}
-
-Failed to generate: :19:15 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %11:f32 = glsl.texelFetch %8, %9, %10
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-tint_symbol_1 = struct @align(4), @block {
- tint_symbol:f32 @offset(0)
-}
-
-$B1: { # root
- %1:ptr<storage, tint_symbol_1, read_write> = var @binding_point(0, 0)
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_6925bc = func():f32 {
- $B2: {
- %arg_1:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %arg_2:ptr<function, u32, read_write> = var, 1u
- %6:vec2<i32> = load %arg_1
- %7:u32 = load %arg_2
- %8:texture_depth_multisampled_2d = load %arg_0
- %9:vec2<i32> = convert %6
- %10:i32 = convert %7
- %11:f32 = glsl.texelFetch %8, %9, %10
- %res:ptr<function, f32, read_write> = var, %11
- %13:f32 = load %res
- ret %13
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %15:f32 = call %textureLoad_6925bc
- %16:ptr<storage, f32, read_write> = access %1, 0u
- store %16, %15
- ret
- }
-}
-
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_6925bc() -> f32 {
- var arg_1 = vec2<i32>(1i);
- var arg_2 = 1u;
- var res : f32 = textureLoad(arg_0, arg_1, arg_2);
+uniform highp sampler2DMS arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_6925bc() {
+ ivec2 arg_1 = ivec2(1);
+ uint arg_2 = 1u;
+ uint v = arg_2;
+ ivec2 v_1 = ivec2(arg_1);
+ float res = texelFetch(arg_0, v_1, int(v)).x;
return res;
}
-
-struct VertexOutput {
- @builtin(position)
- pos : vec4<f32>,
- @location(0) @interpolate(flat)
- prevent_dce : f32,
-}
-
-@vertex
-fn vertex_main() -> VertexOutput {
- var tint_symbol : VertexOutput;
- tint_symbol.pos = vec4<f32>();
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
tint_symbol.prevent_dce = textureLoad_6925bc();
return tint_symbol;
}
-
-Failed to generate: :19:15 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %10:f32 = glsl.texelFetch %7, %8, %9
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-VertexOutput = struct @align(16) {
- pos:vec4<f32> @offset(0), @builtin(position)
- prevent_dce:f32 @offset(16), @location(0), @interpolate(flat)
+void main() {
+ VertexOutput v_2 = vertex_main_inner();
+ gl_Position = v_2.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_2.prevent_dce;
+ gl_PointSize = 1.0f;
}
-
-$B1: { # root
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_6925bc = func():f32 {
- $B2: {
- %arg_1:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %arg_2:ptr<function, u32, read_write> = var, 1u
- %5:vec2<i32> = load %arg_1
- %6:u32 = load %arg_2
- %7:texture_depth_multisampled_2d = load %arg_0
- %8:vec2<i32> = convert %5
- %9:i32 = convert %6
- %10:f32 = glsl.texelFetch %7, %8, %9
- %res:ptr<function, f32, read_write> = var, %10
- %12:f32 = load %res
- ret %12
- }
-}
-%vertex_main = @vertex func():VertexOutput {
- $B3: {
- %tint_symbol:ptr<function, VertexOutput, read_write> = var
- %15:ptr<function, vec4<f32>, read_write> = access %tint_symbol, 0u
- store %15, vec4<f32>(0.0f)
- %16:ptr<function, f32, read_write> = access %tint_symbol, 1u
- %17:f32 = call %textureLoad_6925bc
- store %16, %17
- %18:VertexOutput = load %tint_symbol
- ret %18
- }
-}
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.ir.glsl
index ed9078e..509b48a 100644
--- a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.ir.glsl
@@ -1,11 +1,80 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_7b63e0() {
+ uvec2 arg_1 = uvec2(1u);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ uint v_1 = arg_2;
+ uint v_2 = arg_3;
+ ivec2 v_3 = ivec2(arg_1);
+ ivec3 v_4 = ivec3(v_3, int(v_1));
+ float res = texelFetch(arg_0, v_4, int(v_2)).x;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_7b63e0();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_7b63e0() {
+ uvec2 arg_1 = uvec2(1u);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ uint v_1 = arg_2;
+ uint v_2 = arg_3;
+ ivec2 v_3 = ivec2(arg_1);
+ ivec3 v_4 = ivec3(v_3, int(v_1));
+ float res = texelFetch(arg_0, v_4, int(v_2)).x;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_7b63e0();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ float prevent_dce;
+};
+
+uniform highp sampler2DArray arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_7b63e0() {
+ uvec2 arg_1 = uvec2(1u);
+ uint arg_2 = 1u;
+ uint arg_3 = 1u;
+ uint v = arg_2;
+ uint v_1 = arg_3;
+ ivec2 v_2 = ivec2(arg_1);
+ ivec3 v_3 = ivec3(v_2, int(v));
+ float res = texelFetch(arg_0, v_3, int(v_1)).x;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_7b63e0();
+ return tint_symbol;
+}
+void main() {
+ VertexOutput v_4 = vertex_main_inner();
+ gl_Position = v_4.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_4.prevent_dce;
+ gl_PointSize = 1.0f;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.ir.glsl
index ed9078e..26daba5 100644
--- a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.ir.glsl
@@ -1,11 +1,71 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2D arg_0;
+float textureLoad_7fd822() {
+ uvec2 arg_1 = uvec2(1u);
+ int arg_2 = 1;
+ int v_1 = arg_2;
+ ivec2 v_2 = ivec2(arg_1);
+ float res = texelFetch(arg_0, v_2, int(v_1)).x;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_7fd822();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2D arg_0;
+float textureLoad_7fd822() {
+ uvec2 arg_1 = uvec2(1u);
+ int arg_2 = 1;
+ int v_1 = arg_2;
+ ivec2 v_2 = ivec2(arg_1);
+ float res = texelFetch(arg_0, v_2, int(v_1)).x;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_7fd822();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ float prevent_dce;
+};
+
+uniform highp sampler2D arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_7fd822() {
+ uvec2 arg_1 = uvec2(1u);
+ int arg_2 = 1;
+ int v = arg_2;
+ ivec2 v_1 = ivec2(arg_1);
+ float res = texelFetch(arg_0, v_1, int(v)).x;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_7fd822();
+ return tint_symbol;
+}
+void main() {
+ VertexOutput v_2 = vertex_main_inner();
+ gl_Position = v_2.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_2.prevent_dce;
+ gl_PointSize = 1.0f;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.ir.glsl
index ed9078e..dffc18d 100644
--- a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.ir.glsl
@@ -1,11 +1,71 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2D arg_0;
+float textureLoad_8ccbe3() {
+ ivec2 arg_1 = ivec2(1);
+ uint arg_2 = 1u;
+ uint v_1 = arg_2;
+ ivec2 v_2 = ivec2(arg_1);
+ float res = texelFetch(arg_0, v_2, int(v_1)).x;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_8ccbe3();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2D arg_0;
+float textureLoad_8ccbe3() {
+ ivec2 arg_1 = ivec2(1);
+ uint arg_2 = 1u;
+ uint v_1 = arg_2;
+ ivec2 v_2 = ivec2(arg_1);
+ float res = texelFetch(arg_0, v_2, int(v_1)).x;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_8ccbe3();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ float prevent_dce;
+};
+
+uniform highp sampler2D arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_8ccbe3() {
+ ivec2 arg_1 = ivec2(1);
+ uint arg_2 = 1u;
+ uint v = arg_2;
+ ivec2 v_1 = ivec2(arg_1);
+ float res = texelFetch(arg_0, v_1, int(v)).x;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_8ccbe3();
+ return tint_symbol;
+}
+void main() {
+ VertexOutput v_2 = vertex_main_inner();
+ gl_Position = v_2.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_2.prevent_dce;
+ gl_PointSize = 1.0f;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.ir.glsl
index ed9078e..9c6502c 100644
--- a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.ir.glsl
@@ -1,11 +1,80 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_9b2667() {
+ ivec2 arg_1 = ivec2(1);
+ int arg_2 = 1;
+ int arg_3 = 1;
+ int v_1 = arg_2;
+ int v_2 = arg_3;
+ ivec2 v_3 = ivec2(arg_1);
+ ivec3 v_4 = ivec3(v_3, int(v_1));
+ float res = texelFetch(arg_0, v_4, int(v_2)).x;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_9b2667();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_9b2667() {
+ ivec2 arg_1 = ivec2(1);
+ int arg_2 = 1;
+ int arg_3 = 1;
+ int v_1 = arg_2;
+ int v_2 = arg_3;
+ ivec2 v_3 = ivec2(arg_1);
+ ivec3 v_4 = ivec3(v_3, int(v_1));
+ float res = texelFetch(arg_0, v_4, int(v_2)).x;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_9b2667();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ float prevent_dce;
+};
+
+uniform highp sampler2DArray arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_9b2667() {
+ ivec2 arg_1 = ivec2(1);
+ int arg_2 = 1;
+ int arg_3 = 1;
+ int v = arg_2;
+ int v_1 = arg_3;
+ ivec2 v_2 = ivec2(arg_1);
+ ivec3 v_3 = ivec3(v_2, int(v));
+ float res = texelFetch(arg_0, v_3, int(v_1)).x;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_9b2667();
+ return tint_symbol;
+}
+void main() {
+ VertexOutput v_4 = vertex_main_inner();
+ gl_Position = v_4.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_4.prevent_dce;
+ gl_PointSize = 1.0f;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.ir.glsl
index ed9078e..6a247fc 100644
--- a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.ir.glsl
@@ -1,11 +1,71 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2D arg_0;
+float textureLoad_9ed19e() {
+ uvec2 arg_1 = uvec2(1u);
+ uint arg_2 = 1u;
+ uint v_1 = arg_2;
+ ivec2 v_2 = ivec2(arg_1);
+ float res = texelFetch(arg_0, v_2, int(v_1)).x;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_9ed19e();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2D arg_0;
+float textureLoad_9ed19e() {
+ uvec2 arg_1 = uvec2(1u);
+ uint arg_2 = 1u;
+ uint v_1 = arg_2;
+ ivec2 v_2 = ivec2(arg_1);
+ float res = texelFetch(arg_0, v_2, int(v_1)).x;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_9ed19e();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ float prevent_dce;
+};
+
+uniform highp sampler2D arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_9ed19e() {
+ uvec2 arg_1 = uvec2(1u);
+ uint arg_2 = 1u;
+ uint v = arg_2;
+ ivec2 v_1 = ivec2(arg_1);
+ float res = texelFetch(arg_0, v_1, int(v)).x;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_9ed19e();
+ return tint_symbol;
+}
+void main() {
+ VertexOutput v_2 = vertex_main_inner();
+ gl_Position = v_2.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_2.prevent_dce;
+ gl_PointSize = 1.0f;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.ir.glsl
index ed9078e..a2d84b3 100644
--- a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.ir.glsl
@@ -1,11 +1,80 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_b6ba5d() {
+ uvec2 arg_1 = uvec2(1u);
+ int arg_2 = 1;
+ int arg_3 = 1;
+ int v_1 = arg_2;
+ int v_2 = arg_3;
+ ivec2 v_3 = ivec2(arg_1);
+ ivec3 v_4 = ivec3(v_3, int(v_1));
+ float res = texelFetch(arg_0, v_4, int(v_2)).x;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_b6ba5d();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_b6ba5d() {
+ uvec2 arg_1 = uvec2(1u);
+ int arg_2 = 1;
+ int arg_3 = 1;
+ int v_1 = arg_2;
+ int v_2 = arg_3;
+ ivec2 v_3 = ivec2(arg_1);
+ ivec3 v_4 = ivec3(v_3, int(v_1));
+ float res = texelFetch(arg_0, v_4, int(v_2)).x;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_b6ba5d();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ float prevent_dce;
+};
+
+uniform highp sampler2DArray arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_b6ba5d() {
+ uvec2 arg_1 = uvec2(1u);
+ int arg_2 = 1;
+ int arg_3 = 1;
+ int v = arg_2;
+ int v_1 = arg_3;
+ ivec2 v_2 = ivec2(arg_1);
+ ivec3 v_3 = ivec3(v_2, int(v));
+ float res = texelFetch(arg_0, v_3, int(v_1)).x;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_b6ba5d();
+ return tint_symbol;
+}
+void main() {
+ VertexOutput v_4 = vertex_main_inner();
+ gl_Position = v_4.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_4.prevent_dce;
+ gl_PointSize = 1.0f;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.ir.glsl
index ed9078e..af9f267 100644
--- a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.ir.glsl
@@ -1,11 +1,80 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_c16e00() {
+ ivec2 arg_1 = ivec2(1);
+ uint arg_2 = 1u;
+ int arg_3 = 1;
+ uint v_1 = arg_2;
+ int v_2 = arg_3;
+ ivec2 v_3 = ivec2(arg_1);
+ ivec3 v_4 = ivec3(v_3, int(v_1));
+ float res = texelFetch(arg_0, v_4, int(v_2)).x;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_c16e00();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_c16e00() {
+ ivec2 arg_1 = ivec2(1);
+ uint arg_2 = 1u;
+ int arg_3 = 1;
+ uint v_1 = arg_2;
+ int v_2 = arg_3;
+ ivec2 v_3 = ivec2(arg_1);
+ ivec3 v_4 = ivec3(v_3, int(v_1));
+ float res = texelFetch(arg_0, v_4, int(v_2)).x;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_c16e00();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ float prevent_dce;
+};
+
+uniform highp sampler2DArray arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_c16e00() {
+ ivec2 arg_1 = ivec2(1);
+ uint arg_2 = 1u;
+ int arg_3 = 1;
+ uint v = arg_2;
+ int v_1 = arg_3;
+ ivec2 v_2 = ivec2(arg_1);
+ ivec3 v_3 = ivec3(v_2, int(v));
+ float res = texelFetch(arg_0, v_3, int(v_1)).x;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_c16e00();
+ return tint_symbol;
+}
+void main() {
+ VertexOutput v_4 = vertex_main_inner();
+ gl_Position = v_4.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_4.prevent_dce;
+ gl_PointSize = 1.0f;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.ir.glsl
index ed9078e..3fbd4db602 100644
--- a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.ir.glsl
@@ -1,11 +1,80 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_cb57c2() {
+ uvec2 arg_1 = uvec2(1u);
+ uint arg_2 = 1u;
+ int arg_3 = 1;
+ uint v_1 = arg_2;
+ int v_2 = arg_3;
+ ivec2 v_3 = ivec2(arg_1);
+ ivec3 v_4 = ivec3(v_3, int(v_1));
+ float res = texelFetch(arg_0, v_4, int(v_2)).x;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_cb57c2();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_cb57c2() {
+ uvec2 arg_1 = uvec2(1u);
+ uint arg_2 = 1u;
+ int arg_3 = 1;
+ uint v_1 = arg_2;
+ int v_2 = arg_3;
+ ivec2 v_3 = ivec2(arg_1);
+ ivec3 v_4 = ivec3(v_3, int(v_1));
+ float res = texelFetch(arg_0, v_4, int(v_2)).x;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_cb57c2();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ float prevent_dce;
+};
+
+uniform highp sampler2DArray arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_cb57c2() {
+ uvec2 arg_1 = uvec2(1u);
+ uint arg_2 = 1u;
+ int arg_3 = 1;
+ uint v = arg_2;
+ int v_1 = arg_3;
+ ivec2 v_2 = ivec2(arg_1);
+ ivec3 v_3 = ivec3(v_2, int(v));
+ float res = texelFetch(arg_0, v_3, int(v_1)).x;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_cb57c2();
+ return tint_symbol;
+}
+void main() {
+ VertexOutput v_4 = vertex_main_inner();
+ gl_Position = v_4.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_4.prevent_dce;
+ gl_PointSize = 1.0f;
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.ir.glsl
index 609ed4c..91a608b 100644
--- a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.ir.glsl
@@ -1,240 +1,71 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-
-@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_fcd23d() -> f32 {
- var arg_1 = vec2<u32>(1u);
- var arg_2 = 1i;
- var res : f32 = textureLoad(arg_0, arg_1, arg_2);
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DMS arg_0;
+float textureLoad_fcd23d() {
+ uvec2 arg_1 = uvec2(1u);
+ int arg_2 = 1;
+ int v_1 = arg_2;
+ ivec2 v_2 = ivec2(arg_1);
+ float res = texelFetch(arg_0, v_2, int(v_1)).x;
return res;
}
-
-struct VertexOutput {
- @builtin(position)
- pos : vec4<f32>,
- @location(0) @interpolate(flat)
- prevent_dce : f32,
+void main() {
+ v.tint_symbol = textureLoad_fcd23d();
}
+#version 310 es
-@fragment
-fn fragment_main() {
- prevent_dce = textureLoad_fcd23d();
-}
-
-Failed to generate: :19:15 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %11:f32 = glsl.texelFetch %8, %9, %10
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-tint_symbol_1 = struct @align(4), @block {
- tint_symbol:f32 @offset(0)
-}
-
-$B1: { # root
- %1:ptr<storage, tint_symbol_1, read_write> = var @binding_point(0, 0)
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_fcd23d = func():f32 {
- $B2: {
- %arg_1:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %arg_2:ptr<function, i32, read_write> = var, 1i
- %6:vec2<u32> = load %arg_1
- %7:i32 = load %arg_2
- %8:texture_depth_multisampled_2d = load %arg_0
- %9:vec2<i32> = convert %6
- %10:i32 = convert %7
- %11:f32 = glsl.texelFetch %8, %9, %10
- %res:ptr<function, f32, read_write> = var, %11
- %13:f32 = load %res
- ret %13
- }
-}
-%fragment_main = @fragment func():void {
- $B3: {
- %15:f32 = call %textureLoad_fcd23d
- %16:ptr<storage, f32, read_write> = access %1, 0u
- store %16, %15
- ret
- }
-}
-
-
-@group(0) @binding(0) var<storage, read_write> prevent_dce : f32;
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_fcd23d() -> f32 {
- var arg_1 = vec2<u32>(1u);
- var arg_2 = 1i;
- var res : f32 = textureLoad(arg_0, arg_1, arg_2);
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DMS arg_0;
+float textureLoad_fcd23d() {
+ uvec2 arg_1 = uvec2(1u);
+ int arg_2 = 1;
+ int v_1 = arg_2;
+ ivec2 v_2 = ivec2(arg_1);
+ float res = texelFetch(arg_0, v_2, int(v_1)).x;
return res;
}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_fcd23d();
+}
+#version 310 es
+
struct VertexOutput {
- @builtin(position)
- pos : vec4<f32>,
- @location(0) @interpolate(flat)
- prevent_dce : f32,
-}
+ vec4 pos;
+ float prevent_dce;
+};
-@compute @workgroup_size(1)
-fn compute_main() {
- prevent_dce = textureLoad_fcd23d();
-}
-
-Failed to generate: :19:15 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %11:f32 = glsl.texelFetch %8, %9, %10
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-tint_symbol_1 = struct @align(4), @block {
- tint_symbol:f32 @offset(0)
-}
-
-$B1: { # root
- %1:ptr<storage, tint_symbol_1, read_write> = var @binding_point(0, 0)
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_fcd23d = func():f32 {
- $B2: {
- %arg_1:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %arg_2:ptr<function, i32, read_write> = var, 1i
- %6:vec2<u32> = load %arg_1
- %7:i32 = load %arg_2
- %8:texture_depth_multisampled_2d = load %arg_0
- %9:vec2<i32> = convert %6
- %10:i32 = convert %7
- %11:f32 = glsl.texelFetch %8, %9, %10
- %res:ptr<function, f32, read_write> = var, %11
- %13:f32 = load %res
- ret %13
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B3: {
- %15:f32 = call %textureLoad_fcd23d
- %16:ptr<storage, f32, read_write> = access %1, 0u
- store %16, %15
- ret
- }
-}
-
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_fcd23d() -> f32 {
- var arg_1 = vec2<u32>(1u);
- var arg_2 = 1i;
- var res : f32 = textureLoad(arg_0, arg_1, arg_2);
+uniform highp sampler2DMS arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_fcd23d() {
+ uvec2 arg_1 = uvec2(1u);
+ int arg_2 = 1;
+ int v = arg_2;
+ ivec2 v_1 = ivec2(arg_1);
+ float res = texelFetch(arg_0, v_1, int(v)).x;
return res;
}
-
-struct VertexOutput {
- @builtin(position)
- pos : vec4<f32>,
- @location(0) @interpolate(flat)
- prevent_dce : f32,
-}
-
-@vertex
-fn vertex_main() -> VertexOutput {
- var tint_symbol : VertexOutput;
- tint_symbol.pos = vec4<f32>();
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
tint_symbol.prevent_dce = textureLoad_fcd23d();
return tint_symbol;
}
-
-Failed to generate: :19:15 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %10:f32 = glsl.texelFetch %7, %8, %9
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-VertexOutput = struct @align(16) {
- pos:vec4<f32> @offset(0), @builtin(position)
- prevent_dce:f32 @offset(16), @location(0), @interpolate(flat)
+void main() {
+ VertexOutput v_2 = vertex_main_inner();
+ gl_Position = v_2.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_2.prevent_dce;
+ gl_PointSize = 1.0f;
}
-
-$B1: { # root
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_fcd23d = func():f32 {
- $B2: {
- %arg_1:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %arg_2:ptr<function, i32, read_write> = var, 1i
- %5:vec2<u32> = load %arg_1
- %6:i32 = load %arg_2
- %7:texture_depth_multisampled_2d = load %arg_0
- %8:vec2<i32> = convert %5
- %9:i32 = convert %6
- %10:f32 = glsl.texelFetch %7, %8, %9
- %res:ptr<function, f32, read_write> = var, %10
- %12:f32 = load %res
- ret %12
- }
-}
-%vertex_main = @vertex func():VertexOutput {
- $B3: {
- %tint_symbol:ptr<function, VertexOutput, read_write> = var
- %15:ptr<function, vec4<f32>, read_write> = access %tint_symbol, 0u
- store %15, vec4<f32>(0.0f)
- %16:ptr<function, f32, read_write> = access %tint_symbol, 1u
- %17:f32 = call %textureLoad_fcd23d
- store %16, %17
- %18:VertexOutput = load %tint_symbol
- ret %18
- }
-}
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.ir.glsl
index ed9078e..be83150 100644
--- a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.ir.glsl
@@ -1,11 +1,80 @@
-SKIP: FAILED
+#version 310 es
+precision highp float;
+precision highp int;
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_ff1119() {
+ ivec2 arg_1 = ivec2(1);
+ int arg_2 = 1;
+ uint arg_3 = 1u;
+ int v_1 = arg_2;
+ uint v_2 = arg_3;
+ ivec2 v_3 = ivec2(arg_1);
+ ivec3 v_4 = ivec3(v_3, int(v_1));
+ float res = texelFetch(arg_0, v_4, int(v_2)).x;
+ return res;
+}
+void main() {
+ v.tint_symbol = textureLoad_ff1119();
+}
+#version 310 es
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
+uniform highp sampler2DArray arg_0;
+float textureLoad_ff1119() {
+ ivec2 arg_1 = ivec2(1);
+ int arg_2 = 1;
+ uint arg_3 = 1u;
+ int v_1 = arg_2;
+ uint v_2 = arg_3;
+ ivec2 v_3 = ivec2(arg_1);
+ ivec3 v_4 = ivec3(v_3, int(v_1));
+ float res = texelFetch(arg_0, v_4, int(v_2)).x;
+ return res;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ v.tint_symbol = textureLoad_ff1119();
+}
+#version 310 es
+
+
+struct VertexOutput {
+ vec4 pos;
+ float prevent_dce;
+};
+
+uniform highp sampler2DArray arg_0;
+layout(location = 0) flat out float vertex_main_loc0_Output;
+float textureLoad_ff1119() {
+ ivec2 arg_1 = ivec2(1);
+ int arg_2 = 1;
+ uint arg_3 = 1u;
+ int v = arg_2;
+ uint v_1 = arg_3;
+ ivec2 v_2 = ivec2(arg_1);
+ ivec3 v_3 = ivec3(v_2, int(v));
+ float res = texelFetch(arg_0, v_3, int(v_1)).x;
+ return res;
+}
+VertexOutput vertex_main_inner() {
+ VertexOutput tint_symbol = VertexOutput(vec4(0.0f), 0.0f);
+ tint_symbol.pos = vec4(0.0f);
+ tint_symbol.prevent_dce = textureLoad_ff1119();
+ return tint_symbol;
+}
+void main() {
+ VertexOutput v_4 = vertex_main_inner();
+ gl_Position = v_4.pos;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ vertex_main_loc0_Output = v_4.prevent_dce;
+ gl_PointSize = 1.0f;
+}
diff --git a/test/tint/builtins/gen/var/textureNumLayers/48ef47.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureNumLayers/48ef47.wgsl.expected.ir.glsl
index 2972baf..5514fbf 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/48ef47.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureNumLayers/48ef47.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uint tint_symbol;
} v;
-uniform highp samplerCubeArrayShadow arg_0;
+uniform highp samplerCubeArray arg_0;
uint textureNumLayers_48ef47() {
uint res = uint(textureSize(arg_0, 0).z);
return res;
@@ -20,7 +20,7 @@
buffer tint_symbol_1_1_ssbo {
uint tint_symbol;
} v;
-uniform highp samplerCubeArrayShadow arg_0;
+uniform highp samplerCubeArray arg_0;
uint textureNumLayers_48ef47() {
uint res = uint(textureSize(arg_0, 0).z);
return res;
@@ -37,7 +37,7 @@
uint prevent_dce;
};
-uniform highp samplerCubeArrayShadow arg_0;
+uniform highp samplerCubeArray arg_0;
layout(location = 0) flat out uint vertex_main_loc0_Output;
uint textureNumLayers_48ef47() {
uint res = uint(textureSize(arg_0, 0).z);
diff --git a/test/tint/builtins/gen/var/textureNumLayers/a9d3f5.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/textureNumLayers/a9d3f5.wgsl.expected.ir.glsl
index a8f8628..d6c05cb 100644
--- a/test/tint/builtins/gen/var/textureNumLayers/a9d3f5.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/textureNumLayers/a9d3f5.wgsl.expected.ir.glsl
@@ -6,7 +6,7 @@
buffer tint_symbol_1_1_ssbo {
uint tint_symbol;
} v;
-uniform highp sampler2DArrayShadow arg_0;
+uniform highp sampler2DArray arg_0;
uint textureNumLayers_a9d3f5() {
uint res = uint(textureSize(arg_0, 0).z);
return res;
@@ -20,7 +20,7 @@
buffer tint_symbol_1_1_ssbo {
uint tint_symbol;
} v;
-uniform highp sampler2DArrayShadow arg_0;
+uniform highp sampler2DArray arg_0;
uint textureNumLayers_a9d3f5() {
uint res = uint(textureSize(arg_0, 0).z);
return res;
@@ -37,7 +37,7 @@
uint prevent_dce;
};
-uniform highp sampler2DArrayShadow arg_0;
+uniform highp sampler2DArray arg_0;
layout(location = 0) flat out uint vertex_main_loc0_Output;
uint textureNumLayers_a9d3f5() {
uint res = uint(textureSize(arg_0, 0).z);
diff --git a/test/tint/builtins/textureLoad/depth_ms.spvasm.expected.ir.glsl b/test/tint/builtins/textureLoad/depth_ms.spvasm.expected.ir.glsl
index 7f1d97f..ce0034d 100644
--- a/test/tint/builtins/textureLoad/depth_ms.spvasm.expected.ir.glsl
+++ b/test/tint/builtins/textureLoad/depth_ms.spvasm.expected.ir.glsl
@@ -1,249 +1,62 @@
-SKIP: FAILED
+#version 310 es
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-var<private> tint_symbol_1 = vec4f();
-
-fn textureLoad_6273b1() {
- var res = 0.0f;
- res = vec4f(textureLoad(arg_0, vec2i(), 1i), 0.0f, 0.0f, 0.0f).x;
- return;
-}
-
-fn tint_symbol_2(tint_symbol : vec4f) {
- tint_symbol_1 = tint_symbol;
- return;
-}
-
-fn vertex_main_1() {
- textureLoad_6273b1();
- tint_symbol_2(vec4f());
- return;
-}
-
struct vertex_main_out {
- @builtin(position)
- tint_symbol_1_1 : vec4f,
-}
+ vec4 tint_symbol_1_1;
+};
-@vertex
-fn vertex_main() -> vertex_main_out {
+vec4 tint_symbol_1 = vec4(0.0f);
+uniform highp sampler2DMS arg_0;
+void textureLoad_6273b1() {
+ float res = 0.0f;
+ ivec2 v = ivec2(ivec2(0));
+ res = vec4(texelFetch(arg_0, v, int(1)).x, 0.0f, 0.0f, 0.0f)[0u];
+}
+void tint_symbol_2(vec4 tint_symbol) {
+ tint_symbol_1 = tint_symbol;
+}
+void vertex_main_1() {
+ textureLoad_6273b1();
+ tint_symbol_2(vec4(0.0f));
+}
+vertex_main_out vertex_main_inner() {
vertex_main_1();
return vertex_main_out(tint_symbol_1);
}
-
-Failed to generate: :16:14 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %8:f32 = glsl.texelFetch %5, %6, %7
- ^^^^^^^^^^^^^^^
-
-:11:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-vertex_main_out = struct @align(16) {
- tint_symbol_1_1:vec4<f32> @offset(0), @builtin(position)
+void main() {
+ gl_Position = vertex_main_inner().tint_symbol_1_1;
+ gl_Position[1u] = -(gl_Position.y);
+ gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
+ gl_PointSize = 1.0f;
}
+#version 310 es
+precision highp float;
+precision highp int;
-$B1: { # root
- %tint_symbol_1:ptr<private, vec4<f32>, read_write> = var, vec4<f32>(0.0f)
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
+uniform highp sampler2DMS arg_0;
+void textureLoad_6273b1() {
+ float res = 0.0f;
+ ivec2 v = ivec2(ivec2(0));
+ res = vec4(texelFetch(arg_0, v, int(1)).x, 0.0f, 0.0f, 0.0f)[0u];
}
-
-%textureLoad_6273b1 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.0f
- %5:texture_depth_multisampled_2d = load %arg_0
- %6:vec2<i32> = convert vec2<i32>(0i)
- %7:i32 = convert 1i
- %8:f32 = glsl.texelFetch %5, %6, %7
- %9:vec4<f32> = construct %8, 0.0f, 0.0f, 0.0f
- %10:f32 = access %9, 0u
- store %res, %10
- ret
- }
-}
-%tint_symbol_2 = func(%tint_symbol:vec4<f32>):void {
- $B3: {
- store %tint_symbol_1, %tint_symbol
- ret
- }
-}
-%vertex_main_1 = func():void {
- $B4: {
- %14:void = call %textureLoad_6273b1
- %15:void = call %tint_symbol_2, vec4<f32>(0.0f)
- ret
- }
-}
-%vertex_main = @vertex func():vertex_main_out {
- $B5: {
- %17:void = call %vertex_main_1
- %18:vec4<f32> = load %tint_symbol_1
- %19:vertex_main_out = construct %18
- ret %19
- }
-}
-
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_6273b1() {
- var res = 0.0f;
- res = vec4f(textureLoad(arg_0, vec2i(), 1i), 0.0f, 0.0f, 0.0f).x;
- return;
-}
-
-struct vertex_main_out {
- @builtin(position)
- tint_symbol_1_1 : vec4f,
-}
-
-fn fragment_main_1() {
+void fragment_main_1() {
textureLoad_6273b1();
- return;
}
-
-@fragment
-fn fragment_main() {
+void main() {
fragment_main_1();
}
+#version 310 es
-Failed to generate: :11:14 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %7:f32 = glsl.texelFetch %4, %5, %6
- ^^^^^^^^^^^^^^^
-
-:6:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-$B1: { # root
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
+uniform highp sampler2DMS arg_0;
+void textureLoad_6273b1() {
+ float res = 0.0f;
+ ivec2 v = ivec2(ivec2(0));
+ res = vec4(texelFetch(arg_0, v, int(1)).x, 0.0f, 0.0f, 0.0f)[0u];
}
-
-%textureLoad_6273b1 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.0f
- %4:texture_depth_multisampled_2d = load %arg_0
- %5:vec2<i32> = convert vec2<i32>(0i)
- %6:i32 = convert 1i
- %7:f32 = glsl.texelFetch %4, %5, %6
- %8:vec4<f32> = construct %7, 0.0f, 0.0f, 0.0f
- %9:f32 = access %8, 0u
- store %res, %9
- ret
- }
-}
-%fragment_main_1 = func():void {
- $B3: {
- %11:void = call %textureLoad_6273b1
- ret
- }
-}
-%fragment_main = @fragment func():void {
- $B4: {
- %13:void = call %fragment_main_1
- ret
- }
-}
-
-
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureLoad_6273b1() {
- var res = 0.0f;
- res = vec4f(textureLoad(arg_0, vec2i(), 1i), 0.0f, 0.0f, 0.0f).x;
- return;
-}
-
-struct vertex_main_out {
- @builtin(position)
- tint_symbol_1_1 : vec4f,
-}
-
-fn compute_main_1() {
+void compute_main_1() {
textureLoad_6273b1();
- return;
}
-
-@compute @workgroup_size(1i, 1i, 1i)
-fn compute_main() {
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
compute_main_1();
}
-
-Failed to generate: :11:14 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %7:f32 = glsl.texelFetch %4, %5, %6
- ^^^^^^^^^^^^^^^
-
-:6:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-$B1: { # root
- %arg_0:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%textureLoad_6273b1 = func():void {
- $B2: {
- %res:ptr<function, f32, read_write> = var, 0.0f
- %4:texture_depth_multisampled_2d = load %arg_0
- %5:vec2<i32> = convert vec2<i32>(0i)
- %6:i32 = convert 1i
- %7:f32 = glsl.texelFetch %4, %5, %6
- %8:vec4<f32> = construct %7, 0.0f, 0.0f, 0.0f
- %9:f32 = access %8, 0u
- store %res, %9
- ret
- }
-}
-%compute_main_1 = func():void {
- $B3: {
- %11:void = call %textureLoad_6273b1
- ret
- }
-}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B4: {
- %13:void = call %compute_main_1
- ret
- }
-}
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/types/texture/depth/2d.wgsl.expected.ir.glsl b/test/tint/types/texture/depth/2d.wgsl.expected.ir.glsl
index cc286fc..2425b71 100644
--- a/test/tint/types/texture/depth/2d.wgsl.expected.ir.glsl
+++ b/test/tint/types/texture/depth/2d.wgsl.expected.ir.glsl
@@ -1,6 +1,6 @@
#version 310 es
-uniform highp sampler2DShadow t_f;
+uniform highp sampler2D t_f;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
uvec2 dims = uvec2(textureSize(t_f, 0));
diff --git a/test/tint/types/texture/depth/2d_array.wgsl.expected.ir.glsl b/test/tint/types/texture/depth/2d_array.wgsl.expected.ir.glsl
index 5d7c180..2e6a6a8 100644
--- a/test/tint/types/texture/depth/2d_array.wgsl.expected.ir.glsl
+++ b/test/tint/types/texture/depth/2d_array.wgsl.expected.ir.glsl
@@ -1,6 +1,6 @@
#version 310 es
-uniform highp sampler2DArrayShadow t_f;
+uniform highp sampler2DArray t_f;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
uvec2 dims = uvec2(textureSize(t_f, 0).xy);
diff --git a/test/tint/types/texture/depth/cube.wgsl.expected.ir.glsl b/test/tint/types/texture/depth/cube.wgsl.expected.ir.glsl
index b2ae3f4..319dc93 100644
--- a/test/tint/types/texture/depth/cube.wgsl.expected.ir.glsl
+++ b/test/tint/types/texture/depth/cube.wgsl.expected.ir.glsl
@@ -1,6 +1,6 @@
#version 310 es
-uniform highp samplerCubeShadow t_f;
+uniform highp samplerCube t_f;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
uvec2 dims = uvec2(textureSize(t_f, 0));
diff --git a/test/tint/types/texture/depth/cube_array.wgsl.expected.ir.glsl b/test/tint/types/texture/depth/cube_array.wgsl.expected.ir.glsl
index 084828a..b0ab81d 100644
--- a/test/tint/types/texture/depth/cube_array.wgsl.expected.ir.glsl
+++ b/test/tint/types/texture/depth/cube_array.wgsl.expected.ir.glsl
@@ -1,6 +1,6 @@
#version 460
-uniform highp samplerCubeArrayShadow t_f;
+uniform highp samplerCubeArray t_f;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
uvec2 dims = uvec2(textureSize(t_f, 0).xy);
diff --git a/test/tint/unittest/reader/spirv/ImageFetch_DepthMultisampled_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/ImageFetch_DepthMultisampled_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.ir.glsl
deleted file mode 100644
index b4b0494..0000000
--- a/test/tint/unittest/reader/spirv/ImageFetch_DepthMultisampled_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.ir.glsl
+++ /dev/null
@@ -1,81 +0,0 @@
-SKIP: FAILED
-
-
-@group(2) @binding(1) var x_20 : texture_depth_multisampled_2d;
-
-fn main_1() {
- let f1 = 1.0f;
- let vf12 = vec2f(1.0f, 2.0f);
- let vf123 = vec3f(1.0f, 2.0f, 3.0f);
- let vf1234 = vec4f(1.0f, 2.0f, 3.0f, 4.0f);
- let vi123 = vec3i(1i, 2i, 3i);
- let vi1234 = vec4i(1i, 2i, 3i, 4i);
- let u1 = 1u;
- let vu12 = vec2u(1u, 2u);
- let vu123 = vec3u(1u, 2u, 3u);
- let vu1234 = vec4u(1u, 2u, 3u, 4u);
- let offsets2d = vec2i(3i, 4i);
- let x_99 = vec4f(textureLoad(x_20, vec2i(1i, 2i), 1i), 0.0f, 0.0f, 0.0f);
- return;
-}
-
-@fragment
-fn tint_symbol() {
- main_1();
-}
-
-Failed to generate: :21:15 error: glsl.texelFetch: no matching call to 'glsl.texelFetch(texture_depth_multisampled_2d, vec2<i32>, i32)'
-
-4 candidate functions:
- • 'glsl.texelFetch(texture: texture_2d<T> ✗ , location: vec2<i32> ✓ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_multisampled_2d<T> ✗ , location: vec2<i32> ✓ , sample_index: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_2d_array<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
- • 'glsl.texelFetch(texture: texture_3d<T> ✗ , location: vec3<i32> ✗ , level: i32 ✓ ) -> vec4<T>' where:
- ✗ 'T' is 'f32', 'i32' or 'u32'
-
- %17:f32 = glsl.texelFetch %14, %15, %16
- ^^^^^^^^^^^^^^^
-
-:6:3 note: in block
- $B2: {
- ^^^
-
-note: # Disassembly
-$B1: { # root
- %x_20:ptr<handle, texture_depth_multisampled_2d, read> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %f1:f32 = let 1.0f
- %vf12:vec2<f32> = let vec2<f32>(1.0f, 2.0f)
- %vf123:vec3<f32> = let vec3<f32>(1.0f, 2.0f, 3.0f)
- %vf1234:vec4<f32> = let vec4<f32>(1.0f, 2.0f, 3.0f, 4.0f)
- %vi123:vec3<i32> = let vec3<i32>(1i, 2i, 3i)
- %vi1234:vec4<i32> = let vec4<i32>(1i, 2i, 3i, 4i)
- %u1:u32 = let 1u
- %vu12:vec2<u32> = let vec2<u32>(1u, 2u)
- %vu123:vec3<u32> = let vec3<u32>(1u, 2u, 3u)
- %vu1234:vec4<u32> = let vec4<u32>(1u, 2u, 3u, 4u)
- %offsets2d:vec2<i32> = let vec2<i32>(3i, 4i)
- %14:texture_depth_multisampled_2d = load %x_20
- %15:vec2<i32> = convert vec2<i32>(1i, 2i)
- %16:i32 = convert 1i
- %17:f32 = glsl.texelFetch %14, %15, %16
- %18:vec4<f32> = construct %17, 0.0f, 0.0f, 0.0f
- %x_99:vec4<f32> = let %18
- ret
- }
-}
-%tint_symbol = @fragment func():void {
- $B3: {
- %21:void = call %main_1
- ret
- }
-}
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/unittest/reader/spirv/ImageFetch_Depth_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/ImageFetch_Depth_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.ir.glsl
deleted file mode 100644
index ed9078e..0000000
--- a/test/tint/unittest/reader/spirv/ImageFetch_Depth_SpvParserHandleTest_ImageAccessTest_Variable_0.spvasm.expected.ir.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-SKIP: FAILED
-
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
diff --git a/test/tint/unittest/reader/spirv/ImageFetch_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_2.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/ImageFetch_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_2.spvasm.expected.ir.glsl
deleted file mode 100644
index ed9078e..0000000
--- a/test/tint/unittest/reader/spirv/ImageFetch_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_2.spvasm.expected.ir.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-SKIP: FAILED
-
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap
diff --git a/test/tint/unittest/reader/spirv/ImageFetch_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_3.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/ImageFetch_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_3.spvasm.expected.ir.glsl
deleted file mode 100644
index ed9078e..0000000
--- a/test/tint/unittest/reader/spirv/ImageFetch_OptionalParams_SpvParserHandleTest_ImageAccessTest_Variable_3.spvasm.expected.ir.glsl
+++ /dev/null
@@ -1,11 +0,0 @@
-SKIP: FAILED
-
-<dawn>/src/tint/lang/glsl/writer/raise/texture_polyfill.cc:555 internal compiler error: TINT_ASSERT(!tex->Type()->Is<core::type::DepthTexture>())
-********************************************************************
-* The tint shader compiler has encountered an unexpected error. *
-* *
-* Please help us fix this issue by submitting a bug report at *
-* crbug.com/tint with the source program that triggered the bug. *
-********************************************************************
-
-tint executable returned error: signal: trace/BPT trap