[glsl][ir] Polyfill `textureSampleLevel`
This Cl replaces the WGSL `textureSampleLevel` call with the needed
GLSL polyfill.
Bug: 42251044
Change-Id: I22f63ed6c580975de8f3f0fef2f7abaf6c808cb8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/209536
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: James Price <jrprice@google.com>
diff --git a/src/tint/lang/glsl/builtin_fn.cc b/src/tint/lang/glsl/builtin_fn.cc
index 779e729..ead1558 100644
--- a/src/tint/lang/glsl/builtin_fn.cc
+++ b/src/tint/lang/glsl/builtin_fn.cc
@@ -90,6 +90,14 @@
return "texture";
case BuiltinFn::kTextureOffset:
return "textureOffset";
+ case BuiltinFn::kTextureLod:
+ return "textureLod";
+ case BuiltinFn::kExtTextureLod:
+ return "extTextureLod";
+ case BuiltinFn::kTextureLodOffset:
+ return "textureLodOffset";
+ case BuiltinFn::kExtTextureLodOffset:
+ return "extTextureLodOffset";
case BuiltinFn::kTextureGradOffset:
return "textureGradOffset";
case BuiltinFn::kTextureGather:
diff --git a/src/tint/lang/glsl/builtin_fn.h b/src/tint/lang/glsl/builtin_fn.h
index 00654a2..e166a66 100644
--- a/src/tint/lang/glsl/builtin_fn.h
+++ b/src/tint/lang/glsl/builtin_fn.h
@@ -71,6 +71,10 @@
kFrexp,
kTexture,
kTextureOffset,
+ kTextureLod,
+ kExtTextureLod,
+ kTextureLodOffset,
+ kExtTextureLodOffset,
kTextureGradOffset,
kTextureGather,
kTextureGatherOffset,
diff --git a/src/tint/lang/glsl/glsl.def b/src/tint/lang/glsl/glsl.def
index dcb3450..645f578 100644
--- a/src/tint/lang/glsl/glsl.def
+++ b/src/tint/lang/glsl/glsl.def
@@ -212,6 +212,25 @@
fn textureOffset(texture: texture_2d_array<f32>, coords: vec3<f32>, offset: vec2<i32>, bias: f32) -> vec4<f32>
fn textureOffset(texture: texture_3d<f32>, coords: vec3<f32>, offset: vec3<i32>, bias: f32) -> vec4<f32>
+fn textureLod(texture: texture_2d<f32>, coords: vec2<f32>, level: f32) -> vec4<f32>
+fn textureLod(texture: texture_2d_array<f32>, coords: vec3<f32>, level: f32) -> vec4<f32>
+fn textureLod(texture: texture_3d<f32>, coords: vec3<f32>, level: f32) -> vec4<f32>
+fn textureLod(texture: texture_cube<f32>, coords: vec3<f32>, level: f32) -> vec4<f32>
+fn textureLod(texture: texture_cube_array<f32>, coords: vec4<f32>, level: f32) -> vec4<f32>
+fn textureLod(texture: texture_depth_2d, coords: vec3<f32>, level: f32) -> f32
+
+fn extTextureLod(texture: texture_depth_2d_array, coords: vec4<f32>, level: f32) -> f32
+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
+
+fn textureLodOffset(texture: texture_2d<f32>, coords: vec2<f32>, level: f32, offset: vec2<i32>) -> vec4<f32>
+fn textureLodOffset(texture: texture_2d_array<f32>, coords: vec3<f32>, level: f32, offset: vec2<i32>) -> vec4<f32>
+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
+
+fn extTextureLodOffset(texture: texture_depth_2d_array, coords: vec4<f32>, level: f32, offset: vec2<i32>) -> f32
+
+
fn textureGradOffset(texture: texture_2d<f32>,
coords: vec2<f32>,
ddx: vec2<f32>,
diff --git a/src/tint/lang/glsl/intrinsic/data.cc b/src/tint/lang/glsl/intrinsic/data.cc
index 03370e0..b278cf6 100644
--- a/src/tint/lang/glsl/intrinsic/data.cc
+++ b/src/tint/lang/glsl/intrinsic/data.cc
@@ -1337,56 +1337,56 @@
{
/* [45] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(121),
+ /* matcher_indices */ MatcherIndicesIndex(148),
},
{
/* [46] */
/* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(69),
+ /* matcher_indices */ MatcherIndicesIndex(103),
},
{
/* [47] */
- /* usage */ core::ParameterUsage::kOffset,
- /* matcher_indices */ MatcherIndicesIndex(115),
+ /* usage */ core::ParameterUsage::kCompareValue,
+ /* matcher_indices */ MatcherIndicesIndex(37),
},
{
/* [48] */
- /* usage */ core::ParameterUsage::kComponent,
- /* matcher_indices */ MatcherIndicesIndex(10),
+ /* usage */ core::ParameterUsage::kLevel,
+ /* matcher_indices */ MatcherIndicesIndex(37),
},
{
/* [49] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(123),
+ /* matcher_indices */ MatcherIndicesIndex(105),
},
{
/* [50] */
/* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(66),
+ /* matcher_indices */ MatcherIndicesIndex(69),
},
{
/* [51] */
+ /* usage */ core::ParameterUsage::kLevel,
+ /* matcher_indices */ MatcherIndicesIndex(37),
+ },
+ {
+ /* [52] */
/* usage */ core::ParameterUsage::kOffset,
/* matcher_indices */ MatcherIndicesIndex(115),
},
{
- /* [52] */
- /* usage */ core::ParameterUsage::kComponent,
- /* matcher_indices */ MatcherIndicesIndex(10),
- },
- {
/* [53] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(145),
+ /* matcher_indices */ MatcherIndicesIndex(107),
},
{
/* [54] */
/* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(69),
+ /* matcher_indices */ MatcherIndicesIndex(66),
},
{
/* [55] */
- /* usage */ core::ParameterUsage::kRefz,
+ /* usage */ core::ParameterUsage::kLevel,
/* matcher_indices */ MatcherIndicesIndex(37),
},
{
@@ -1397,7 +1397,7 @@
{
/* [57] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(146),
+ /* matcher_indices */ MatcherIndicesIndex(109),
},
{
/* [58] */
@@ -1406,118 +1406,118 @@
},
{
/* [59] */
- /* usage */ core::ParameterUsage::kRefz,
+ /* usage */ core::ParameterUsage::kLevel,
/* matcher_indices */ MatcherIndicesIndex(37),
},
{
/* [60] */
/* usage */ core::ParameterUsage::kOffset,
- /* matcher_indices */ MatcherIndicesIndex(115),
+ /* matcher_indices */ MatcherIndicesIndex(117),
},
{
/* [61] */
- /* usage */ core::ParameterUsage::kNone,
- /* matcher_indices */ MatcherIndicesIndex(17),
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(145),
},
{
/* [62] */
- /* usage */ core::ParameterUsage::kCompareValue,
- /* matcher_indices */ MatcherIndicesIndex(3),
+ /* usage */ core::ParameterUsage::kCoords,
+ /* matcher_indices */ MatcherIndicesIndex(66),
},
{
/* [63] */
- /* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(3),
+ /* usage */ core::ParameterUsage::kLevel,
+ /* matcher_indices */ MatcherIndicesIndex(37),
},
{
/* [64] */
/* usage */ core::ParameterUsage::kOffset,
- /* matcher_indices */ MatcherIndicesIndex(10),
+ /* matcher_indices */ MatcherIndicesIndex(115),
},
{
/* [65] */
- /* usage */ core::ParameterUsage::kBits,
- /* matcher_indices */ MatcherIndicesIndex(10),
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(146),
},
{
/* [66] */
- /* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(44),
- },
- {
- /* [67] */
- /* usage */ core::ParameterUsage::kOffset,
- /* matcher_indices */ MatcherIndicesIndex(10),
- },
- {
- /* [68] */
- /* usage */ core::ParameterUsage::kBits,
- /* matcher_indices */ MatcherIndicesIndex(10),
- },
- {
- /* [69] */
- /* usage */ core::ParameterUsage::kNone,
- /* matcher_indices */ MatcherIndicesIndex(3),
- },
- {
- /* [70] */
- /* usage */ core::ParameterUsage::kNone,
- /* matcher_indices */ MatcherIndicesIndex(3),
- },
- {
- /* [71] */
- /* usage */ core::ParameterUsage::kNone,
- /* matcher_indices */ MatcherIndicesIndex(5),
- },
- {
- /* [72] */
- /* usage */ core::ParameterUsage::kNone,
- /* matcher_indices */ MatcherIndicesIndex(2),
- },
- {
- /* [73] */
- /* usage */ core::ParameterUsage::kNone,
- /* matcher_indices */ MatcherIndicesIndex(2),
- },
- {
- /* [74] */
- /* usage */ core::ParameterUsage::kNone,
- /* matcher_indices */ MatcherIndicesIndex(47),
- },
- {
- /* [75] */
- /* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(148),
- },
- {
- /* [76] */
/* usage */ core::ParameterUsage::kCoords,
/* matcher_indices */ MatcherIndicesIndex(103),
},
{
- /* [77] */
- /* usage */ core::ParameterUsage::kCompareValue,
+ /* [67] */
+ /* usage */ core::ParameterUsage::kLevel,
/* matcher_indices */ MatcherIndicesIndex(37),
},
{
- /* [78] */
- /* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(105),
+ /* [68] */
+ /* usage */ core::ParameterUsage::kOffset,
+ /* matcher_indices */ MatcherIndicesIndex(115),
},
{
- /* [79] */
+ /* [69] */
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(121),
+ },
+ {
+ /* [70] */
/* usage */ core::ParameterUsage::kCoords,
/* matcher_indices */ MatcherIndicesIndex(69),
},
{
- /* [80] */
- /* usage */ core::ParameterUsage::kBias,
+ /* [71] */
+ /* usage */ core::ParameterUsage::kOffset,
+ /* matcher_indices */ MatcherIndicesIndex(115),
+ },
+ {
+ /* [72] */
+ /* usage */ core::ParameterUsage::kComponent,
+ /* matcher_indices */ MatcherIndicesIndex(10),
+ },
+ {
+ /* [73] */
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(123),
+ },
+ {
+ /* [74] */
+ /* usage */ core::ParameterUsage::kCoords,
+ /* matcher_indices */ MatcherIndicesIndex(66),
+ },
+ {
+ /* [75] */
+ /* usage */ core::ParameterUsage::kOffset,
+ /* matcher_indices */ MatcherIndicesIndex(115),
+ },
+ {
+ /* [76] */
+ /* usage */ core::ParameterUsage::kComponent,
+ /* matcher_indices */ MatcherIndicesIndex(10),
+ },
+ {
+ /* [77] */
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(145),
+ },
+ {
+ /* [78] */
+ /* usage */ core::ParameterUsage::kCoords,
+ /* matcher_indices */ MatcherIndicesIndex(69),
+ },
+ {
+ /* [79] */
+ /* usage */ core::ParameterUsage::kRefz,
/* matcher_indices */ MatcherIndicesIndex(37),
},
{
+ /* [80] */
+ /* usage */ core::ParameterUsage::kOffset,
+ /* matcher_indices */ MatcherIndicesIndex(115),
+ },
+ {
/* [81] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(107),
+ /* matcher_indices */ MatcherIndicesIndex(146),
},
{
/* [82] */
@@ -1526,88 +1526,88 @@
},
{
/* [83] */
- /* usage */ core::ParameterUsage::kBias,
+ /* usage */ core::ParameterUsage::kRefz,
/* matcher_indices */ MatcherIndicesIndex(37),
},
{
/* [84] */
- /* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(109),
+ /* usage */ core::ParameterUsage::kOffset,
+ /* matcher_indices */ MatcherIndicesIndex(115),
},
{
/* [85] */
- /* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(66),
+ /* usage */ core::ParameterUsage::kNone,
+ /* matcher_indices */ MatcherIndicesIndex(17),
},
{
/* [86] */
- /* usage */ core::ParameterUsage::kBias,
- /* matcher_indices */ MatcherIndicesIndex(37),
+ /* usage */ core::ParameterUsage::kCompareValue,
+ /* matcher_indices */ MatcherIndicesIndex(3),
},
{
/* [87] */
- /* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(111),
+ /* usage */ core::ParameterUsage::kValue,
+ /* matcher_indices */ MatcherIndicesIndex(3),
},
{
/* [88] */
- /* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(66),
+ /* usage */ core::ParameterUsage::kOffset,
+ /* matcher_indices */ MatcherIndicesIndex(10),
},
{
/* [89] */
- /* usage */ core::ParameterUsage::kBias,
- /* matcher_indices */ MatcherIndicesIndex(37),
+ /* usage */ core::ParameterUsage::kBits,
+ /* matcher_indices */ MatcherIndicesIndex(10),
},
{
/* [90] */
- /* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(113),
+ /* usage */ core::ParameterUsage::kValue,
+ /* matcher_indices */ MatcherIndicesIndex(44),
},
{
/* [91] */
- /* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(103),
+ /* usage */ core::ParameterUsage::kOffset,
+ /* matcher_indices */ MatcherIndicesIndex(10),
},
{
/* [92] */
- /* usage */ core::ParameterUsage::kBias,
- /* matcher_indices */ MatcherIndicesIndex(37),
+ /* usage */ core::ParameterUsage::kBits,
+ /* matcher_indices */ MatcherIndicesIndex(10),
},
{
/* [93] */
- /* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(145),
+ /* usage */ core::ParameterUsage::kNone,
+ /* matcher_indices */ MatcherIndicesIndex(3),
},
{
/* [94] */
- /* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(66),
+ /* usage */ core::ParameterUsage::kNone,
+ /* matcher_indices */ MatcherIndicesIndex(3),
},
{
/* [95] */
- /* usage */ core::ParameterUsage::kOffset,
- /* matcher_indices */ MatcherIndicesIndex(115),
+ /* usage */ core::ParameterUsage::kNone,
+ /* matcher_indices */ MatcherIndicesIndex(5),
},
{
/* [96] */
- /* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(146),
+ /* usage */ core::ParameterUsage::kNone,
+ /* matcher_indices */ MatcherIndicesIndex(2),
},
{
/* [97] */
- /* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(103),
+ /* usage */ core::ParameterUsage::kNone,
+ /* matcher_indices */ MatcherIndicesIndex(2),
},
{
/* [98] */
- /* usage */ core::ParameterUsage::kOffset,
- /* matcher_indices */ MatcherIndicesIndex(115),
+ /* usage */ core::ParameterUsage::kNone,
+ /* matcher_indices */ MatcherIndicesIndex(47),
},
{
/* [99] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(121),
+ /* matcher_indices */ MatcherIndicesIndex(105),
},
{
/* [100] */
@@ -1616,13 +1616,13 @@
},
{
/* [101] */
- /* usage */ core::ParameterUsage::kComponent,
- /* matcher_indices */ MatcherIndicesIndex(10),
+ /* usage */ core::ParameterUsage::kBias,
+ /* matcher_indices */ MatcherIndicesIndex(37),
},
{
/* [102] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(123),
+ /* matcher_indices */ MatcherIndicesIndex(107),
},
{
/* [103] */
@@ -1631,13 +1631,13 @@
},
{
/* [104] */
- /* usage */ core::ParameterUsage::kComponent,
- /* matcher_indices */ MatcherIndicesIndex(10),
+ /* usage */ core::ParameterUsage::kBias,
+ /* matcher_indices */ MatcherIndicesIndex(37),
},
{
/* [105] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(125),
+ /* matcher_indices */ MatcherIndicesIndex(109),
},
{
/* [106] */
@@ -1646,536 +1646,676 @@
},
{
/* [107] */
- /* usage */ core::ParameterUsage::kComponent,
- /* matcher_indices */ MatcherIndicesIndex(10),
+ /* usage */ core::ParameterUsage::kBias,
+ /* matcher_indices */ MatcherIndicesIndex(37),
},
{
/* [108] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(127),
+ /* matcher_indices */ MatcherIndicesIndex(111),
},
{
/* [109] */
/* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(103),
+ /* matcher_indices */ MatcherIndicesIndex(66),
},
{
/* [110] */
- /* usage */ core::ParameterUsage::kComponent,
- /* matcher_indices */ MatcherIndicesIndex(10),
+ /* usage */ core::ParameterUsage::kBias,
+ /* matcher_indices */ MatcherIndicesIndex(37),
},
{
/* [111] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(147),
+ /* matcher_indices */ MatcherIndicesIndex(113),
},
{
/* [112] */
/* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(66),
+ /* matcher_indices */ MatcherIndicesIndex(103),
},
{
/* [113] */
- /* usage */ core::ParameterUsage::kRefz,
+ /* usage */ core::ParameterUsage::kBias,
/* matcher_indices */ MatcherIndicesIndex(37),
},
{
/* [114] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(148),
+ /* matcher_indices */ MatcherIndicesIndex(145),
},
{
/* [115] */
/* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(103),
+ /* matcher_indices */ MatcherIndicesIndex(66),
},
{
/* [116] */
- /* usage */ core::ParameterUsage::kRefz,
- /* matcher_indices */ MatcherIndicesIndex(37),
+ /* usage */ core::ParameterUsage::kOffset,
+ /* matcher_indices */ MatcherIndicesIndex(115),
},
{
/* [117] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(121),
+ /* matcher_indices */ MatcherIndicesIndex(146),
},
{
/* [118] */
- /* usage */ core::ParameterUsage::kLocation,
- /* matcher_indices */ MatcherIndicesIndex(115),
+ /* usage */ core::ParameterUsage::kCoords,
+ /* matcher_indices */ MatcherIndicesIndex(103),
},
{
/* [119] */
- /* usage */ core::ParameterUsage::kLevel,
- /* matcher_indices */ MatcherIndicesIndex(10),
+ /* usage */ core::ParameterUsage::kOffset,
+ /* matcher_indices */ MatcherIndicesIndex(115),
},
{
/* [120] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(123),
+ /* matcher_indices */ MatcherIndicesIndex(111),
},
{
/* [121] */
- /* usage */ core::ParameterUsage::kLocation,
- /* matcher_indices */ MatcherIndicesIndex(117),
+ /* usage */ core::ParameterUsage::kCoords,
+ /* matcher_indices */ MatcherIndicesIndex(66),
},
{
/* [122] */
/* usage */ core::ParameterUsage::kLevel,
- /* matcher_indices */ MatcherIndicesIndex(10),
+ /* matcher_indices */ MatcherIndicesIndex(37),
},
{
/* [123] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(131),
+ /* matcher_indices */ MatcherIndicesIndex(113),
},
{
/* [124] */
- /* usage */ core::ParameterUsage::kLocation,
- /* matcher_indices */ MatcherIndicesIndex(115),
+ /* usage */ core::ParameterUsage::kCoords,
+ /* matcher_indices */ MatcherIndicesIndex(103),
},
{
/* [125] */
- /* usage */ core::ParameterUsage::kSampleIndex,
- /* matcher_indices */ MatcherIndicesIndex(10),
+ /* usage */ core::ParameterUsage::kLevel,
+ /* matcher_indices */ MatcherIndicesIndex(37),
},
{
/* [126] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(129),
+ /* matcher_indices */ MatcherIndicesIndex(147),
},
{
/* [127] */
- /* usage */ core::ParameterUsage::kLocation,
- /* matcher_indices */ MatcherIndicesIndex(117),
+ /* usage */ core::ParameterUsage::kCoords,
+ /* matcher_indices */ MatcherIndicesIndex(103),
},
{
/* [128] */
/* usage */ core::ParameterUsage::kLevel,
- /* matcher_indices */ MatcherIndicesIndex(10),
+ /* matcher_indices */ MatcherIndicesIndex(37),
},
{
/* [129] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(62),
+ /* matcher_indices */ MatcherIndicesIndex(121),
},
{
/* [130] */
/* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(3),
+ /* matcher_indices */ MatcherIndicesIndex(69),
},
{
/* [131] */
- /* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(103),
+ /* usage */ core::ParameterUsage::kComponent,
+ /* matcher_indices */ MatcherIndicesIndex(10),
},
{
/* [132] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(65),
+ /* matcher_indices */ MatcherIndicesIndex(123),
},
{
/* [133] */
/* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(3),
+ /* matcher_indices */ MatcherIndicesIndex(66),
},
{
/* [134] */
- /* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(133),
+ /* usage */ core::ParameterUsage::kComponent,
+ /* matcher_indices */ MatcherIndicesIndex(10),
},
{
/* [135] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(68),
+ /* matcher_indices */ MatcherIndicesIndex(125),
},
{
/* [136] */
/* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(3),
+ /* matcher_indices */ MatcherIndicesIndex(66),
},
{
/* [137] */
- /* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(135),
+ /* usage */ core::ParameterUsage::kComponent,
+ /* matcher_indices */ MatcherIndicesIndex(10),
},
{
/* [138] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(71),
+ /* matcher_indices */ MatcherIndicesIndex(127),
},
{
/* [139] */
/* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(137),
+ /* matcher_indices */ MatcherIndicesIndex(103),
},
{
/* [140] */
- /* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(103),
+ /* usage */ core::ParameterUsage::kComponent,
+ /* matcher_indices */ MatcherIndicesIndex(10),
},
{
/* [141] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(74),
+ /* matcher_indices */ MatcherIndicesIndex(147),
},
{
/* [142] */
/* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(137),
+ /* matcher_indices */ MatcherIndicesIndex(66),
},
{
/* [143] */
- /* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(133),
+ /* usage */ core::ParameterUsage::kRefz,
+ /* matcher_indices */ MatcherIndicesIndex(37),
},
{
/* [144] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(77),
+ /* matcher_indices */ MatcherIndicesIndex(148),
},
{
/* [145] */
/* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(137),
+ /* matcher_indices */ MatcherIndicesIndex(103),
},
{
/* [146] */
- /* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(135),
+ /* usage */ core::ParameterUsage::kRefz,
+ /* matcher_indices */ MatcherIndicesIndex(37),
},
{
/* [147] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(80),
+ /* matcher_indices */ MatcherIndicesIndex(121),
},
{
/* [148] */
- /* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(139),
+ /* usage */ core::ParameterUsage::kLocation,
+ /* matcher_indices */ MatcherIndicesIndex(115),
},
{
/* [149] */
- /* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(103),
+ /* usage */ core::ParameterUsage::kLevel,
+ /* matcher_indices */ MatcherIndicesIndex(10),
},
{
/* [150] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(83),
+ /* matcher_indices */ MatcherIndicesIndex(123),
},
{
/* [151] */
- /* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(139),
+ /* usage */ core::ParameterUsage::kLocation,
+ /* matcher_indices */ MatcherIndicesIndex(117),
},
{
/* [152] */
- /* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(133),
+ /* usage */ core::ParameterUsage::kLevel,
+ /* matcher_indices */ MatcherIndicesIndex(10),
},
{
/* [153] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(86),
+ /* matcher_indices */ MatcherIndicesIndex(131),
},
{
/* [154] */
- /* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(139),
+ /* usage */ core::ParameterUsage::kLocation,
+ /* matcher_indices */ MatcherIndicesIndex(115),
},
{
/* [155] */
- /* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(135),
+ /* usage */ core::ParameterUsage::kSampleIndex,
+ /* matcher_indices */ MatcherIndicesIndex(10),
},
{
/* [156] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(89),
+ /* matcher_indices */ MatcherIndicesIndex(129),
},
{
/* [157] */
- /* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(139),
+ /* usage */ core::ParameterUsage::kLocation,
+ /* matcher_indices */ MatcherIndicesIndex(117),
},
{
/* [158] */
- /* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(103),
+ /* usage */ core::ParameterUsage::kLevel,
+ /* matcher_indices */ MatcherIndicesIndex(10),
},
{
/* [159] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(92),
+ /* matcher_indices */ MatcherIndicesIndex(62),
},
{
/* [160] */
/* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(139),
+ /* matcher_indices */ MatcherIndicesIndex(3),
},
{
/* [161] */
/* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(133),
+ /* matcher_indices */ MatcherIndicesIndex(103),
},
{
/* [162] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(95),
+ /* matcher_indices */ MatcherIndicesIndex(65),
},
{
/* [163] */
/* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(139),
+ /* matcher_indices */ MatcherIndicesIndex(3),
},
{
/* [164] */
/* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(135),
+ /* matcher_indices */ MatcherIndicesIndex(133),
},
{
/* [165] */
- /* usage */ core::ParameterUsage::kNone,
- /* matcher_indices */ MatcherIndicesIndex(22),
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(68),
},
{
/* [166] */
- /* usage */ core::ParameterUsage::kNone,
+ /* usage */ core::ParameterUsage::kCoords,
/* matcher_indices */ MatcherIndicesIndex(3),
},
{
/* [167] */
- /* usage */ core::ParameterUsage::kNone,
- /* matcher_indices */ MatcherIndicesIndex(44),
+ /* usage */ core::ParameterUsage::kValue,
+ /* matcher_indices */ MatcherIndicesIndex(135),
},
{
/* [168] */
- /* usage */ core::ParameterUsage::kNone,
- /* matcher_indices */ MatcherIndicesIndex(44),
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(71),
},
{
/* [169] */
- /* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(3),
+ /* usage */ core::ParameterUsage::kCoords,
+ /* matcher_indices */ MatcherIndicesIndex(137),
},
{
/* [170] */
- /* usage */ core::ParameterUsage::kResult,
- /* matcher_indices */ MatcherIndicesIndex(27),
+ /* usage */ core::ParameterUsage::kValue,
+ /* matcher_indices */ MatcherIndicesIndex(103),
},
{
/* [171] */
- /* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(2),
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(74),
},
{
/* [172] */
- /* usage */ core::ParameterUsage::kResult,
- /* matcher_indices */ MatcherIndicesIndex(0),
+ /* usage */ core::ParameterUsage::kCoords,
+ /* matcher_indices */ MatcherIndicesIndex(137),
},
{
/* [173] */
/* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(3),
+ /* matcher_indices */ MatcherIndicesIndex(133),
},
{
/* [174] */
- /* usage */ core::ParameterUsage::kExp,
- /* matcher_indices */ MatcherIndicesIndex(31),
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(77),
},
{
/* [175] */
- /* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(2),
+ /* usage */ core::ParameterUsage::kCoords,
+ /* matcher_indices */ MatcherIndicesIndex(137),
},
{
/* [176] */
- /* usage */ core::ParameterUsage::kExp,
- /* matcher_indices */ MatcherIndicesIndex(6),
+ /* usage */ core::ParameterUsage::kValue,
+ /* matcher_indices */ MatcherIndicesIndex(135),
},
{
/* [177] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(147),
+ /* matcher_indices */ MatcherIndicesIndex(80),
},
{
/* [178] */
/* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(103),
+ /* matcher_indices */ MatcherIndicesIndex(139),
},
{
/* [179] */
- /* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(121),
+ /* usage */ core::ParameterUsage::kValue,
+ /* matcher_indices */ MatcherIndicesIndex(103),
},
{
/* [180] */
- /* usage */ core::ParameterUsage::kLevel,
- /* matcher_indices */ MatcherIndicesIndex(10),
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(83),
},
{
/* [181] */
- /* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(123),
+ /* usage */ core::ParameterUsage::kCoords,
+ /* matcher_indices */ MatcherIndicesIndex(139),
},
{
/* [182] */
- /* usage */ core::ParameterUsage::kLevel,
- /* matcher_indices */ MatcherIndicesIndex(10),
+ /* usage */ core::ParameterUsage::kValue,
+ /* matcher_indices */ MatcherIndicesIndex(133),
},
{
/* [183] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(129),
+ /* matcher_indices */ MatcherIndicesIndex(86),
},
{
/* [184] */
- /* usage */ core::ParameterUsage::kLevel,
- /* matcher_indices */ MatcherIndicesIndex(10),
+ /* usage */ core::ParameterUsage::kCoords,
+ /* matcher_indices */ MatcherIndicesIndex(139),
},
{
/* [185] */
- /* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(125),
+ /* usage */ core::ParameterUsage::kValue,
+ /* matcher_indices */ MatcherIndicesIndex(135),
},
{
/* [186] */
- /* usage */ core::ParameterUsage::kLevel,
- /* matcher_indices */ MatcherIndicesIndex(10),
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(89),
},
{
/* [187] */
- /* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(127),
+ /* usage */ core::ParameterUsage::kCoords,
+ /* matcher_indices */ MatcherIndicesIndex(139),
},
{
/* [188] */
- /* usage */ core::ParameterUsage::kLevel,
- /* matcher_indices */ MatcherIndicesIndex(10),
+ /* usage */ core::ParameterUsage::kValue,
+ /* matcher_indices */ MatcherIndicesIndex(103),
},
{
/* [189] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(145),
+ /* matcher_indices */ MatcherIndicesIndex(92),
},
{
/* [190] */
- /* usage */ core::ParameterUsage::kLevel,
- /* matcher_indices */ MatcherIndicesIndex(10),
+ /* usage */ core::ParameterUsage::kCoords,
+ /* matcher_indices */ MatcherIndicesIndex(139),
},
{
/* [191] */
- /* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(146),
+ /* usage */ core::ParameterUsage::kValue,
+ /* matcher_indices */ MatcherIndicesIndex(133),
},
{
/* [192] */
- /* usage */ core::ParameterUsage::kLevel,
- /* matcher_indices */ MatcherIndicesIndex(10),
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(95),
},
{
/* [193] */
- /* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(147),
+ /* usage */ core::ParameterUsage::kCoords,
+ /* matcher_indices */ MatcherIndicesIndex(139),
},
{
/* [194] */
- /* usage */ core::ParameterUsage::kLevel,
- /* matcher_indices */ MatcherIndicesIndex(10),
+ /* usage */ core::ParameterUsage::kValue,
+ /* matcher_indices */ MatcherIndicesIndex(135),
},
{
/* [195] */
- /* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(148),
+ /* usage */ core::ParameterUsage::kNone,
+ /* matcher_indices */ MatcherIndicesIndex(22),
},
{
/* [196] */
- /* usage */ core::ParameterUsage::kLevel,
- /* matcher_indices */ MatcherIndicesIndex(10),
+ /* usage */ core::ParameterUsage::kNone,
+ /* matcher_indices */ MatcherIndicesIndex(3),
},
{
/* [197] */
- /* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(50),
+ /* usage */ core::ParameterUsage::kNone,
+ /* matcher_indices */ MatcherIndicesIndex(44),
},
{
/* [198] */
- /* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(10),
+ /* usage */ core::ParameterUsage::kNone,
+ /* matcher_indices */ MatcherIndicesIndex(44),
},
{
/* [199] */
- /* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(53),
+ /* usage */ core::ParameterUsage::kValue,
+ /* matcher_indices */ MatcherIndicesIndex(3),
},
{
/* [200] */
- /* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(115),
+ /* usage */ core::ParameterUsage::kResult,
+ /* matcher_indices */ MatcherIndicesIndex(27),
},
{
/* [201] */
- /* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(56),
+ /* usage */ core::ParameterUsage::kValue,
+ /* matcher_indices */ MatcherIndicesIndex(2),
},
{
/* [202] */
- /* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(117),
+ /* usage */ core::ParameterUsage::kResult,
+ /* matcher_indices */ MatcherIndicesIndex(0),
},
{
/* [203] */
- /* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(59),
+ /* usage */ core::ParameterUsage::kValue,
+ /* matcher_indices */ MatcherIndicesIndex(3),
},
{
/* [204] */
- /* usage */ core::ParameterUsage::kCoords,
- /* matcher_indices */ MatcherIndicesIndex(117),
+ /* usage */ core::ParameterUsage::kExp,
+ /* matcher_indices */ MatcherIndicesIndex(31),
},
{
/* [205] */
- /* usage */ core::ParameterUsage::kNone,
- /* matcher_indices */ MatcherIndicesIndex(12),
+ /* usage */ core::ParameterUsage::kValue,
+ /* matcher_indices */ MatcherIndicesIndex(2),
},
{
/* [206] */
- /* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(37),
+ /* usage */ core::ParameterUsage::kExp,
+ /* matcher_indices */ MatcherIndicesIndex(6),
},
{
/* [207] */
- /* usage */ core::ParameterUsage::kValue,
- /* matcher_indices */ MatcherIndicesIndex(35),
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(121),
},
{
/* [208] */
- /* usage */ core::ParameterUsage::kValue,
+ /* usage */ core::ParameterUsage::kLevel,
/* matcher_indices */ MatcherIndicesIndex(10),
},
{
/* [209] */
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(123),
+ },
+ {
+ /* [210] */
+ /* usage */ core::ParameterUsage::kLevel,
+ /* matcher_indices */ MatcherIndicesIndex(10),
+ },
+ {
+ /* [211] */
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(129),
+ },
+ {
+ /* [212] */
+ /* usage */ core::ParameterUsage::kLevel,
+ /* matcher_indices */ MatcherIndicesIndex(10),
+ },
+ {
+ /* [213] */
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(125),
+ },
+ {
+ /* [214] */
+ /* usage */ core::ParameterUsage::kLevel,
+ /* matcher_indices */ MatcherIndicesIndex(10),
+ },
+ {
+ /* [215] */
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(127),
+ },
+ {
+ /* [216] */
+ /* usage */ core::ParameterUsage::kLevel,
+ /* matcher_indices */ MatcherIndicesIndex(10),
+ },
+ {
+ /* [217] */
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(145),
+ },
+ {
+ /* [218] */
+ /* usage */ core::ParameterUsage::kLevel,
+ /* matcher_indices */ MatcherIndicesIndex(10),
+ },
+ {
+ /* [219] */
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(146),
+ },
+ {
+ /* [220] */
+ /* usage */ core::ParameterUsage::kLevel,
+ /* matcher_indices */ MatcherIndicesIndex(10),
+ },
+ {
+ /* [221] */
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(147),
+ },
+ {
+ /* [222] */
+ /* usage */ core::ParameterUsage::kLevel,
+ /* matcher_indices */ MatcherIndicesIndex(10),
+ },
+ {
+ /* [223] */
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(148),
+ },
+ {
+ /* [224] */
+ /* usage */ core::ParameterUsage::kLevel,
+ /* matcher_indices */ MatcherIndicesIndex(10),
+ },
+ {
+ /* [225] */
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(50),
+ },
+ {
+ /* [226] */
+ /* usage */ core::ParameterUsage::kCoords,
+ /* matcher_indices */ MatcherIndicesIndex(10),
+ },
+ {
+ /* [227] */
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(53),
+ },
+ {
+ /* [228] */
+ /* usage */ core::ParameterUsage::kCoords,
+ /* matcher_indices */ MatcherIndicesIndex(115),
+ },
+ {
+ /* [229] */
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(56),
+ },
+ {
+ /* [230] */
+ /* usage */ core::ParameterUsage::kCoords,
+ /* matcher_indices */ MatcherIndicesIndex(117),
+ },
+ {
+ /* [231] */
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(59),
+ },
+ {
+ /* [232] */
+ /* usage */ core::ParameterUsage::kCoords,
+ /* matcher_indices */ MatcherIndicesIndex(117),
+ },
+ {
+ /* [233] */
+ /* usage */ core::ParameterUsage::kNone,
+ /* matcher_indices */ MatcherIndicesIndex(12),
+ },
+ {
+ /* [234] */
+ /* usage */ core::ParameterUsage::kValue,
+ /* matcher_indices */ MatcherIndicesIndex(37),
+ },
+ {
+ /* [235] */
+ /* usage */ core::ParameterUsage::kValue,
+ /* matcher_indices */ MatcherIndicesIndex(35),
+ },
+ {
+ /* [236] */
+ /* usage */ core::ParameterUsage::kValue,
+ /* matcher_indices */ MatcherIndicesIndex(10),
+ },
+ {
+ /* [237] */
/* usage */ core::ParameterUsage::kValue,
/* matcher_indices */ MatcherIndicesIndex(8),
},
{
- /* [210] */
+ /* [238] */
/* usage */ core::ParameterUsage::kValue,
/* matcher_indices */ MatcherIndicesIndex(1),
},
{
- /* [211] */
+ /* [239] */
/* usage */ core::ParameterUsage::kValue,
/* matcher_indices */ MatcherIndicesIndex(38),
},
{
- /* [212] */
+ /* [240] */
/* usage */ core::ParameterUsage::kValue,
/* matcher_indices */ MatcherIndicesIndex(101),
},
{
- /* [213] */
+ /* [241] */
/* usage */ core::ParameterUsage::kTexture,
/* matcher_indices */ MatcherIndicesIndex(150),
},
@@ -2389,7 +2529,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(87),
+ /* parameters */ ParameterIndex(108),
/* return_matcher_indices */ MatcherIndicesIndex(103),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2400,7 +2540,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(90),
+ /* parameters */ ParameterIndex(111),
/* return_matcher_indices */ MatcherIndicesIndex(103),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2433,7 +2573,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(177),
+ /* parameters */ ParameterIndex(126),
/* return_matcher_indices */ MatcherIndicesIndex(37),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2444,7 +2584,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(75),
+ /* parameters */ ParameterIndex(45),
/* return_matcher_indices */ MatcherIndicesIndex(37),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2455,7 +2595,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(78),
+ /* parameters */ ParameterIndex(99),
/* return_matcher_indices */ MatcherIndicesIndex(103),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2466,7 +2606,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(81),
+ /* parameters */ ParameterIndex(102),
/* return_matcher_indices */ MatcherIndicesIndex(103),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2477,7 +2617,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(84),
+ /* parameters */ ParameterIndex(105),
/* return_matcher_indices */ MatcherIndicesIndex(103),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2488,7 +2628,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(87),
+ /* parameters */ ParameterIndex(108),
/* return_matcher_indices */ MatcherIndicesIndex(103),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2499,7 +2639,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(90),
+ /* parameters */ ParameterIndex(111),
/* return_matcher_indices */ MatcherIndicesIndex(103),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2510,7 +2650,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(13),
- /* parameters */ ParameterIndex(197),
+ /* parameters */ ParameterIndex(225),
/* return_matcher_indices */ MatcherIndicesIndex(103),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2521,7 +2661,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(13),
- /* parameters */ ParameterIndex(199),
+ /* parameters */ ParameterIndex(227),
/* return_matcher_indices */ MatcherIndicesIndex(103),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2532,7 +2672,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(13),
- /* parameters */ ParameterIndex(201),
+ /* parameters */ ParameterIndex(229),
/* return_matcher_indices */ MatcherIndicesIndex(103),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2543,7 +2683,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(13),
- /* parameters */ ParameterIndex(203),
+ /* parameters */ ParameterIndex(231),
/* return_matcher_indices */ MatcherIndicesIndex(103),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2554,7 +2694,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(15),
- /* parameters */ ParameterIndex(197),
+ /* parameters */ ParameterIndex(225),
/* return_matcher_indices */ MatcherIndicesIndex(133),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2565,7 +2705,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(15),
- /* parameters */ ParameterIndex(199),
+ /* parameters */ ParameterIndex(227),
/* return_matcher_indices */ MatcherIndicesIndex(133),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2576,7 +2716,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(15),
- /* parameters */ ParameterIndex(201),
+ /* parameters */ ParameterIndex(229),
/* return_matcher_indices */ MatcherIndicesIndex(133),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2587,7 +2727,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(15),
- /* parameters */ ParameterIndex(203),
+ /* parameters */ ParameterIndex(231),
/* return_matcher_indices */ MatcherIndicesIndex(133),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2598,7 +2738,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(17),
- /* parameters */ ParameterIndex(197),
+ /* parameters */ ParameterIndex(225),
/* return_matcher_indices */ MatcherIndicesIndex(135),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2609,7 +2749,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(17),
- /* parameters */ ParameterIndex(199),
+ /* parameters */ ParameterIndex(227),
/* return_matcher_indices */ MatcherIndicesIndex(135),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2620,7 +2760,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(17),
- /* parameters */ ParameterIndex(201),
+ /* parameters */ ParameterIndex(229),
/* return_matcher_indices */ MatcherIndicesIndex(135),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2631,7 +2771,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(17),
- /* parameters */ ParameterIndex(203),
+ /* parameters */ ParameterIndex(231),
/* return_matcher_indices */ MatcherIndicesIndex(135),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2642,7 +2782,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(24),
- /* parameters */ ParameterIndex(129),
+ /* parameters */ ParameterIndex(159),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2653,7 +2793,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(24),
- /* parameters */ ParameterIndex(132),
+ /* parameters */ ParameterIndex(162),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2664,7 +2804,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(24),
- /* parameters */ ParameterIndex(135),
+ /* parameters */ ParameterIndex(165),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2675,7 +2815,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(24),
- /* parameters */ ParameterIndex(138),
+ /* parameters */ ParameterIndex(168),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2686,7 +2826,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(24),
- /* parameters */ ParameterIndex(141),
+ /* parameters */ ParameterIndex(171),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2697,7 +2837,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(24),
- /* parameters */ ParameterIndex(144),
+ /* parameters */ ParameterIndex(174),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2708,7 +2848,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(24),
- /* parameters */ ParameterIndex(147),
+ /* parameters */ ParameterIndex(177),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2719,7 +2859,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(24),
- /* parameters */ ParameterIndex(150),
+ /* parameters */ ParameterIndex(180),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2730,7 +2870,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(24),
- /* parameters */ ParameterIndex(153),
+ /* parameters */ ParameterIndex(183),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2741,7 +2881,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(24),
- /* parameters */ ParameterIndex(156),
+ /* parameters */ ParameterIndex(186),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2752,7 +2892,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(24),
- /* parameters */ ParameterIndex(159),
+ /* parameters */ ParameterIndex(189),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2763,7 +2903,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(24),
- /* parameters */ ParameterIndex(162),
+ /* parameters */ ParameterIndex(192),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2774,7 +2914,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(23),
- /* parameters */ ParameterIndex(179),
+ /* parameters */ ParameterIndex(207),
/* return_matcher_indices */ MatcherIndicesIndex(115),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2785,7 +2925,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(23),
- /* parameters */ ParameterIndex(181),
+ /* parameters */ ParameterIndex(209),
/* return_matcher_indices */ MatcherIndicesIndex(117),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2796,7 +2936,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(23),
- /* parameters */ ParameterIndex(183),
+ /* parameters */ ParameterIndex(211),
/* return_matcher_indices */ MatcherIndicesIndex(117),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2807,7 +2947,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(23),
- /* parameters */ ParameterIndex(185),
+ /* parameters */ ParameterIndex(213),
/* return_matcher_indices */ MatcherIndicesIndex(115),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2818,7 +2958,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(23),
- /* parameters */ ParameterIndex(187),
+ /* parameters */ ParameterIndex(215),
/* return_matcher_indices */ MatcherIndicesIndex(117),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2829,7 +2969,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(189),
+ /* parameters */ ParameterIndex(217),
/* return_matcher_indices */ MatcherIndicesIndex(115),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2840,7 +2980,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(191),
+ /* parameters */ ParameterIndex(219),
/* return_matcher_indices */ MatcherIndicesIndex(117),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2851,7 +2991,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(193),
+ /* parameters */ ParameterIndex(221),
/* return_matcher_indices */ MatcherIndicesIndex(115),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2862,7 +3002,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(195),
+ /* parameters */ ParameterIndex(223),
/* return_matcher_indices */ MatcherIndicesIndex(117),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2873,7 +3013,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(23),
- /* parameters */ ParameterIndex(123),
+ /* parameters */ ParameterIndex(153),
/* return_matcher_indices */ MatcherIndicesIndex(115),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2884,7 +3024,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(213),
+ /* parameters */ ParameterIndex(241),
/* return_matcher_indices */ MatcherIndicesIndex(115),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2928,7 +3068,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(93),
+ /* parameters */ ParameterIndex(114),
/* return_matcher_indices */ MatcherIndicesIndex(37),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2939,7 +3079,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(96),
+ /* parameters */ ParameterIndex(117),
/* return_matcher_indices */ MatcherIndicesIndex(37),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2983,7 +3123,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(23),
- /* parameters */ ParameterIndex(99),
+ /* parameters */ ParameterIndex(129),
/* return_matcher_indices */ MatcherIndicesIndex(119),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -2994,7 +3134,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(23),
- /* parameters */ ParameterIndex(102),
+ /* parameters */ ParameterIndex(132),
/* return_matcher_indices */ MatcherIndicesIndex(119),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -3005,7 +3145,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(23),
- /* parameters */ ParameterIndex(105),
+ /* parameters */ ParameterIndex(135),
/* return_matcher_indices */ MatcherIndicesIndex(119),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -3016,7 +3156,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(23),
- /* parameters */ ParameterIndex(108),
+ /* parameters */ ParameterIndex(138),
/* return_matcher_indices */ MatcherIndicesIndex(119),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -3027,7 +3167,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(53),
+ /* parameters */ ParameterIndex(77),
/* return_matcher_indices */ MatcherIndicesIndex(103),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -3038,7 +3178,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(57),
+ /* parameters */ ParameterIndex(81),
/* return_matcher_indices */ MatcherIndicesIndex(103),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -3049,7 +3189,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(111),
+ /* parameters */ ParameterIndex(141),
/* return_matcher_indices */ MatcherIndicesIndex(103),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -3060,13 +3200,79 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(114),
+ /* parameters */ ParameterIndex(144),
/* return_matcher_indices */ MatcherIndicesIndex(103),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
/* [65] */
/* 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(49),
+ /* return_matcher_indices */ MatcherIndicesIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [66] */
+ /* 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(53),
+ /* return_matcher_indices */ MatcherIndicesIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [67] */
+ /* 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(57),
+ /* return_matcher_indices */ MatcherIndicesIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [68] */
+ /* 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(120),
+ /* return_matcher_indices */ MatcherIndicesIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [69] */
+ /* 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(123),
+ /* return_matcher_indices */ MatcherIndicesIndex(103),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [70] */
+ /* 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(61),
+ /* return_matcher_indices */ MatcherIndicesIndex(37),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [71] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 5,
/* num_explicit_templates */ 0,
/* num_templates */ 0,
@@ -3076,7 +3282,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [66] */
+ /* [72] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 5,
/* num_explicit_templates */ 0,
@@ -3087,7 +3293,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [67] */
+ /* [73] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 5,
/* num_explicit_templates */ 0,
@@ -3098,7 +3304,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [68] */
+ /* [74] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 5,
/* num_explicit_templates */ 0,
@@ -3109,7 +3315,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [69] */
+ /* [75] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 5,
/* num_explicit_templates */ 0,
@@ -3120,30 +3326,19 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [70] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* [76] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 4,
/* num_explicit_templates */ 0,
- /* num_templates */ 1,
- /* templates */ TemplateIndex(23),
- /* parameters */ ParameterIndex(45),
- /* return_matcher_indices */ MatcherIndicesIndex(119),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
- /* [71] */
- /* 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),
+ /* num_templates */ 0,
+ /* templates */ TemplateIndex(/* invalid */),
/* parameters */ ParameterIndex(49),
- /* return_matcher_indices */ MatcherIndicesIndex(119),
+ /* return_matcher_indices */ MatcherIndicesIndex(103),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [72] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* [77] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 4,
/* num_explicit_templates */ 0,
/* num_templates */ 0,
@@ -3153,8 +3348,8 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [73] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* [78] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 4,
/* num_explicit_templates */ 0,
/* num_templates */ 0,
@@ -3164,201 +3359,146 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [74] */
- /* 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(197),
- /* return_matcher_indices */ MatcherIndicesIndex(10),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
- /* [75] */
- /* 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(199),
- /* return_matcher_indices */ MatcherIndicesIndex(115),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
- /* [76] */
- /* 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(201),
- /* return_matcher_indices */ MatcherIndicesIndex(117),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
- /* [77] */
- /* 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(203),
- /* return_matcher_indices */ MatcherIndicesIndex(117),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
- /* [78] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* num_parameters */ 3,
- /* num_explicit_templates */ 0,
- /* num_templates */ 1,
- /* templates */ TemplateIndex(23),
- /* parameters */ ParameterIndex(117),
- /* return_matcher_indices */ MatcherIndicesIndex(119),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
/* [79] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* num_parameters */ 3,
+ /* num_parameters */ 4,
/* num_explicit_templates */ 0,
- /* num_templates */ 1,
- /* templates */ TemplateIndex(23),
- /* parameters */ ParameterIndex(120),
- /* return_matcher_indices */ MatcherIndicesIndex(119),
+ /* num_templates */ 0,
+ /* templates */ TemplateIndex(/* invalid */),
+ /* parameters */ ParameterIndex(61),
+ /* return_matcher_indices */ MatcherIndicesIndex(37),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
/* [80] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* num_parameters */ 3,
+ /* 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(123),
+ /* parameters */ ParameterIndex(69),
/* return_matcher_indices */ MatcherIndicesIndex(119),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
/* [81] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* num_parameters */ 3,
+ /* 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(126),
+ /* parameters */ ParameterIndex(73),
/* return_matcher_indices */ MatcherIndicesIndex(119),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
/* [82] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* num_parameters */ 1,
+ /* 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(206),
- /* return_matcher_indices */ MatcherIndicesIndex(10),
+ /* parameters */ ParameterIndex(77),
+ /* return_matcher_indices */ MatcherIndicesIndex(103),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
/* [83] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* num_parameters */ 1,
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
+ /* num_parameters */ 4,
/* num_explicit_templates */ 0,
- /* num_templates */ 1,
- /* templates */ TemplateIndex(5),
- /* parameters */ ParameterIndex(207),
- /* return_matcher_indices */ MatcherIndicesIndex(8),
+ /* num_templates */ 0,
+ /* templates */ TemplateIndex(/* invalid */),
+ /* parameters */ ParameterIndex(81),
+ /* return_matcher_indices */ MatcherIndicesIndex(103),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
/* [84] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
- /* num_templates */ 0,
- /* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(206),
- /* return_matcher_indices */ MatcherIndicesIndex(1),
+ /* num_templates */ 2,
+ /* templates */ TemplateIndex(11),
+ /* parameters */ ParameterIndex(225),
+ /* return_matcher_indices */ MatcherIndicesIndex(10),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
/* [85] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
- /* num_templates */ 1,
- /* templates */ TemplateIndex(5),
- /* parameters */ ParameterIndex(207),
- /* return_matcher_indices */ MatcherIndicesIndex(38),
+ /* num_templates */ 2,
+ /* templates */ TemplateIndex(11),
+ /* parameters */ ParameterIndex(227),
+ /* return_matcher_indices */ MatcherIndicesIndex(115),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
/* [86] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
- /* num_templates */ 0,
- /* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(208),
- /* return_matcher_indices */ MatcherIndicesIndex(37),
+ /* num_templates */ 2,
+ /* templates */ TemplateIndex(11),
+ /* parameters */ ParameterIndex(229),
+ /* return_matcher_indices */ MatcherIndicesIndex(117),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
/* [87] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
- /* num_templates */ 1,
- /* templates */ TemplateIndex(5),
- /* parameters */ ParameterIndex(209),
- /* return_matcher_indices */ MatcherIndicesIndex(35),
+ /* num_templates */ 2,
+ /* templates */ TemplateIndex(11),
+ /* parameters */ ParameterIndex(231),
+ /* return_matcher_indices */ MatcherIndicesIndex(117),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
/* [88] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* num_parameters */ 1,
+ /* num_parameters */ 3,
/* num_explicit_templates */ 0,
- /* num_templates */ 0,
- /* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(210),
- /* return_matcher_indices */ MatcherIndicesIndex(37),
+ /* num_templates */ 1,
+ /* templates */ TemplateIndex(23),
+ /* parameters */ ParameterIndex(147),
+ /* return_matcher_indices */ MatcherIndicesIndex(119),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
/* [89] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* num_parameters */ 1,
+ /* num_parameters */ 3,
/* num_explicit_templates */ 0,
/* num_templates */ 1,
- /* templates */ TemplateIndex(5),
- /* parameters */ ParameterIndex(211),
- /* return_matcher_indices */ MatcherIndicesIndex(35),
+ /* templates */ TemplateIndex(23),
+ /* parameters */ ParameterIndex(150),
+ /* return_matcher_indices */ MatcherIndicesIndex(119),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
/* [90] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* num_parameters */ 1,
+ /* num_parameters */ 3,
/* num_explicit_templates */ 0,
/* num_templates */ 1,
- /* templates */ TemplateIndex(2),
- /* parameters */ ParameterIndex(63),
- /* return_matcher_indices */ MatcherIndicesIndex(10),
+ /* templates */ TemplateIndex(23),
+ /* parameters */ ParameterIndex(153),
+ /* return_matcher_indices */ MatcherIndicesIndex(119),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
/* [91] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
- /* num_parameters */ 1,
+ /* num_parameters */ 3,
/* num_explicit_templates */ 0,
- /* num_templates */ 2,
- /* templates */ TemplateIndex(4),
- /* parameters */ ParameterIndex(66),
- /* return_matcher_indices */ MatcherIndicesIndex(41),
+ /* num_templates */ 1,
+ /* templates */ TemplateIndex(23),
+ /* parameters */ ParameterIndex(156),
+ /* return_matcher_indices */ MatcherIndicesIndex(119),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
@@ -3366,10 +3506,10 @@
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
- /* num_templates */ 1,
- /* templates */ TemplateIndex(2),
- /* parameters */ ParameterIndex(63),
- /* return_matcher_indices */ MatcherIndicesIndex(3),
+ /* num_templates */ 0,
+ /* templates */ TemplateIndex(/* invalid */),
+ /* parameters */ ParameterIndex(65),
+ /* return_matcher_indices */ MatcherIndicesIndex(37),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
@@ -3377,10 +3517,10 @@
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
- /* num_templates */ 2,
- /* templates */ TemplateIndex(4),
- /* parameters */ ParameterIndex(66),
- /* return_matcher_indices */ MatcherIndicesIndex(44),
+ /* num_templates */ 0,
+ /* templates */ TemplateIndex(/* invalid */),
+ /* parameters */ ParameterIndex(126),
+ /* return_matcher_indices */ MatcherIndicesIndex(37),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
@@ -3388,6 +3528,149 @@
/* 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(45),
+ /* return_matcher_indices */ MatcherIndicesIndex(37),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [95] */
+ /* 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(234),
+ /* return_matcher_indices */ MatcherIndicesIndex(10),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [96] */
+ /* 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(235),
+ /* return_matcher_indices */ MatcherIndicesIndex(8),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [97] */
+ /* 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(234),
+ /* return_matcher_indices */ MatcherIndicesIndex(1),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [98] */
+ /* 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(235),
+ /* return_matcher_indices */ MatcherIndicesIndex(38),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [99] */
+ /* 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(236),
+ /* return_matcher_indices */ MatcherIndicesIndex(37),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [100] */
+ /* 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(237),
+ /* return_matcher_indices */ MatcherIndicesIndex(35),
+ /* 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 */ 0,
+ /* templates */ TemplateIndex(/* invalid */),
+ /* parameters */ ParameterIndex(238),
+ /* return_matcher_indices */ MatcherIndicesIndex(37),
+ /* 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 */ 1,
+ /* templates */ TemplateIndex(5),
+ /* parameters */ ParameterIndex(239),
+ /* return_matcher_indices */ MatcherIndicesIndex(35),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [103] */
+ /* 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(87),
+ /* return_matcher_indices */ MatcherIndicesIndex(10),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [104] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* num_parameters */ 1,
+ /* num_explicit_templates */ 0,
+ /* num_templates */ 2,
+ /* templates */ TemplateIndex(4),
+ /* parameters */ ParameterIndex(90),
+ /* return_matcher_indices */ MatcherIndicesIndex(41),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [105] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* num_parameters */ 3,
+ /* num_explicit_templates */ 0,
+ /* num_templates */ 1,
+ /* templates */ TemplateIndex(2),
+ /* parameters */ ParameterIndex(87),
+ /* return_matcher_indices */ MatcherIndicesIndex(3),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [106] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* num_parameters */ 3,
+ /* num_explicit_templates */ 0,
+ /* num_templates */ 2,
+ /* templates */ TemplateIndex(4),
+ /* parameters */ ParameterIndex(90),
+ /* return_matcher_indices */ MatcherIndicesIndex(44),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [107] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* num_parameters */ 4,
+ /* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(2),
/* parameters */ ParameterIndex(25),
@@ -3395,7 +3678,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [95] */
+ /* [108] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 4,
/* num_explicit_templates */ 0,
@@ -3406,106 +3689,106 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [96] */
+ /* [109] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(7),
- /* parameters */ ParameterIndex(69),
+ /* parameters */ ParameterIndex(93),
/* return_matcher_indices */ MatcherIndicesIndex(3),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [97] */
+ /* [110] */
/* 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(167),
+ /* parameters */ ParameterIndex(197),
/* return_matcher_indices */ MatcherIndicesIndex(44),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [98] */
+ /* [111] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(6),
- /* parameters */ ParameterIndex(69),
+ /* parameters */ ParameterIndex(93),
/* return_matcher_indices */ MatcherIndicesIndex(3),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [99] */
+ /* [112] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMustUse),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(5),
- /* parameters */ ParameterIndex(72),
+ /* parameters */ ParameterIndex(96),
/* return_matcher_indices */ MatcherIndicesIndex(2),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [100] */
+ /* [113] */
/* 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(169),
+ /* parameters */ ParameterIndex(199),
/* return_matcher_indices */ MatcherIndicesIndex(3),
/* const_eval_fn */ ConstEvalFunctionIndex(0),
},
{
- /* [101] */
+ /* [114] */
/* 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(171),
+ /* parameters */ ParameterIndex(201),
/* return_matcher_indices */ MatcherIndicesIndex(2),
/* const_eval_fn */ ConstEvalFunctionIndex(0),
},
{
- /* [102] */
+ /* [115] */
/* 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(173),
+ /* parameters */ ParameterIndex(203),
/* return_matcher_indices */ MatcherIndicesIndex(3),
/* const_eval_fn */ ConstEvalFunctionIndex(1),
},
{
- /* [103] */
+ /* [116] */
/* 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(175),
+ /* parameters */ ParameterIndex(205),
/* return_matcher_indices */ MatcherIndicesIndex(2),
/* const_eval_fn */ ConstEvalFunctionIndex(1),
},
{
- /* [104] */
+ /* [117] */
/* 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(205),
+ /* parameters */ ParameterIndex(233),
/* return_matcher_indices */ MatcherIndicesIndex(10),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [105] */
+ /* [118] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 0,
/* num_explicit_templates */ 0,
@@ -3516,90 +3799,101 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [106] */
+ /* [119] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(2),
- /* parameters */ ParameterIndex(61),
+ /* parameters */ ParameterIndex(85),
/* return_matcher_indices */ MatcherIndicesIndex(3),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [107] */
+ /* [120] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 2,
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(2),
- /* parameters */ ParameterIndex(165),
+ /* parameters */ ParameterIndex(195),
/* return_matcher_indices */ MatcherIndicesIndex(3),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [108] */
+ /* [121] */
/* 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(212),
+ /* parameters */ ParameterIndex(240),
/* return_matcher_indices */ MatcherIndicesIndex(1),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [109] */
+ /* [122] */
/* 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(210),
+ /* parameters */ ParameterIndex(238),
/* return_matcher_indices */ MatcherIndicesIndex(101),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [110] */
+ /* [123] */
/* 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(74),
+ /* parameters */ ParameterIndex(98),
/* return_matcher_indices */ MatcherIndicesIndex(5),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [111] */
+ /* [124] */
/* 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(167),
+ /* parameters */ ParameterIndex(197),
/* return_matcher_indices */ MatcherIndicesIndex(3),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [112] */
+ /* [125] */
+ /* 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(65),
+ /* return_matcher_indices */ MatcherIndicesIndex(37),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [126] */
/* 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(167),
+ /* parameters */ ParameterIndex(197),
/* return_matcher_indices */ MatcherIndicesIndex(98),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [113] */
+ /* [127] */
/* 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(167),
+ /* parameters */ ParameterIndex(197),
/* return_matcher_indices */ MatcherIndicesIndex(98),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -3613,144 +3907,144 @@
/* [0] */
/* fn length[T, A : access](ptr<storage, array<T>, A>) -> i32 */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(104),
+ /* overloads */ OverloadIndex(117),
},
{
/* [1] */
/* fn barrier() */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(105),
+ /* overloads */ OverloadIndex(118),
},
{
/* [2] */
/* fn memoryBarrierBuffer() */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(105),
+ /* overloads */ OverloadIndex(118),
},
{
/* [3] */
/* fn memoryBarrierImage() */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(105),
+ /* overloads */ OverloadIndex(118),
},
{
/* [4] */
/* fn atomicCompSwap[T : iu32](ptr<workgroup_or_storage, atomic<T>, read_write>, compare_value: T, value: T) -> T */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(106),
+ /* overloads */ OverloadIndex(119),
},
{
/* [5] */
/* fn atomicSub[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T) -> T */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(107),
+ /* overloads */ OverloadIndex(120),
},
{
/* [6] */
/* fn floatBitsToInt(value: f32) -> i32 */
/* fn floatBitsToInt[N : num](value: vec<N, f32>) -> vec<N, i32> */
/* num overloads */ 2,
- /* overloads */ OverloadIndex(82),
+ /* overloads */ OverloadIndex(95),
},
{
/* [7] */
/* fn floatBitsToUint(value: f32) -> u32 */
/* fn floatBitsToUint[N : num](value: vec<N, f32>) -> vec<N, u32> */
/* num overloads */ 2,
- /* overloads */ OverloadIndex(84),
+ /* overloads */ OverloadIndex(97),
},
{
/* [8] */
/* fn intBitsToFloat(value: i32) -> f32 */
/* fn intBitsToFloat[N : num](value: vec<N, i32>) -> vec<N, f32> */
/* num overloads */ 2,
- /* overloads */ OverloadIndex(86),
+ /* overloads */ OverloadIndex(99),
},
{
/* [9] */
/* fn uintBitsToFloat(value: u32) -> f32 */
/* fn uintBitsToFloat[N : num](value: vec<N, u32>) -> vec<N, f32> */
/* num overloads */ 2,
- /* overloads */ OverloadIndex(88),
+ /* overloads */ OverloadIndex(101),
},
{
/* [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(90),
+ /* overloads */ OverloadIndex(103),
},
{
/* [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(92),
+ /* overloads */ OverloadIndex(105),
},
{
/* [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(94),
+ /* overloads */ OverloadIndex(107),
},
{
/* [13] */
/* fn packFloat2x16(value: vec2<f16>) -> u32 */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(108),
+ /* overloads */ OverloadIndex(121),
},
{
/* [14] */
/* fn unpackFloat2x16(value: u32) -> vec2<f16> */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(109),
+ /* overloads */ OverloadIndex(122),
},
{
/* [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(96),
+ /* overloads */ OverloadIndex(109),
},
{
/* [16] */
/* fn any[N : num](vec<N, bool>) -> bool */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(110),
+ /* overloads */ OverloadIndex(123),
},
{
/* [17] */
/* fn all[N : num](vec<N, bool>) -> bool */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(110),
+ /* overloads */ OverloadIndex(123),
},
{
/* [18] */
/* fn dot[T : f32_f16, N : num](vec<N, T>, vec<N, T>) -> T */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(111),
+ /* overloads */ OverloadIndex(124),
},
{
/* [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(98),
+ /* overloads */ OverloadIndex(111),
},
{
/* [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(100),
+ /* overloads */ OverloadIndex(113),
},
{
/* [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(102),
+ /* overloads */ OverloadIndex(115),
},
{
/* [22] */
@@ -3786,16 +4080,50 @@
},
{
/* [24] */
+ /* fn textureLod(texture: texture_2d<f32>, coords: vec2<f32>, level: f32) -> vec4<f32> */
+ /* fn textureLod(texture: texture_2d_array<f32>, coords: vec3<f32>, level: f32) -> vec4<f32> */
+ /* fn textureLod(texture: texture_3d<f32>, coords: vec3<f32>, level: f32) -> vec4<f32> */
+ /* fn textureLod(texture: texture_cube<f32>, coords: vec3<f32>, level: f32) -> vec4<f32> */
+ /* fn textureLod(texture: texture_cube_array<f32>, coords: vec4<f32>, level: f32) -> vec4<f32> */
+ /* fn textureLod(texture: texture_depth_2d, coords: vec3<f32>, level: f32) -> f32 */
+ /* num overloads */ 6,
+ /* overloads */ OverloadIndex(65),
+ },
+ {
+ /* [25] */
+ /* fn extTextureLod(texture: texture_depth_2d_array, coords: vec4<f32>, level: f32) -> f32 */
+ /* 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(92),
+ },
+ {
+ /* [26] */
+ /* fn textureLodOffset(texture: texture_2d<f32>, coords: vec2<f32>, level: f32, offset: vec2<i32>) -> vec4<f32> */
+ /* fn textureLodOffset(texture: texture_2d_array<f32>, coords: vec3<f32>, level: f32, offset: vec2<i32>) -> vec4<f32> */
+ /* 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(76),
+ },
+ {
+ /* [27] */
+ /* fn extTextureLodOffset(texture: texture_depth_2d_array, coords: vec4<f32>, level: f32, offset: vec2<i32>) -> f32 */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(125),
+ },
+ {
+ /* [28] */
/* fn textureGradOffset(texture: texture_2d<f32>, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>, offset: vec2<i32>) -> vec4<f32> */
/* fn textureGradOffset(texture: texture_2d_array<f32>, coords: vec3<f32>, ddx: vec2<f32>, ddy: vec2<f32>, offset: vec2<i32>) -> vec4<f32> */
/* fn textureGradOffset(texture: texture_3d<f32>, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>, offset: vec3<i32>) -> vec4<f32> */
/* fn textureGradOffset(texture: texture_depth_2d, coords: vec3<f32>, ddx: vec2<f32>, ddy: vec2<f32>, offset: vec2<i32>) -> f32 */
/* fn textureGradOffset(texture: texture_depth_2d_array, coords: vec4<f32>, ddx: vec2<f32>, ddy: vec2<f32>, offset: vec2<i32>) -> f32 */
/* num overloads */ 5,
- /* overloads */ OverloadIndex(65),
+ /* overloads */ OverloadIndex(71),
},
{
- /* [25] */
+ /* [29] */
/* fn textureGather[T : fiu32](texture: texture_2d<T>, coords: vec2<f32>, component: i32) -> vec4<T> */
/* fn textureGather[T : fiu32](texture: texture_2d_array<T>, coords: vec3<f32>, component: i32) -> vec4<T> */
/* fn textureGather[T : fiu32](texture: texture_cube<T>, coords: vec3<f32>, component: i32) -> vec4<T> */
@@ -3808,16 +4136,16 @@
/* overloads */ OverloadIndex(57),
},
{
- /* [26] */
+ /* [30] */
/* fn textureGatherOffset[T : fiu32](texture: texture_2d<T>, coords: vec2<f32>, offset: vec2<i32>, component: i32) -> vec4<T> */
/* fn textureGatherOffset[T : fiu32](texture: texture_2d_array<T>, coords: vec3<f32>, offset: vec2<i32>, component: i32) -> vec4<T> */
/* 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(70),
+ /* overloads */ OverloadIndex(80),
},
{
- /* [27] */
+ /* [31] */
/* fn textureSize[T : fiu32](texture: texture_2d<T>, level: i32) -> vec2<i32> */
/* fn textureSize[T : fiu32](texture: texture_2d_array<T>, level: i32) -> vec3<i32> */
/* fn textureSize[T : fiu32](texture: texture_3d<T>, level: i32) -> vec3<i32> */
@@ -3833,25 +4161,25 @@
/* overloads */ OverloadIndex(38),
},
{
- /* [28] */
+ /* [32] */
/* fn imageSize[F : texel_format, A : access](texture: texture_storage_1d<F, A>) -> i32 */
/* fn imageSize[F : texel_format, A : access](texture: texture_storage_2d<F, A>) -> vec2<i32> */
/* 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(74),
+ /* overloads */ OverloadIndex(84),
},
{
- /* [29] */
+ /* [33] */
/* fn texelFetch[T : fiu32](texture: texture_2d<T>, location: vec2<i32>, level: i32) -> vec4<T> */
/* 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(78),
+ /* overloads */ OverloadIndex(88),
},
{
- /* [30] */
+ /* [34] */
/* fn imageLoad[F : f32_texel_format, A : readable](texture: texture_storage_1d<F, A>, coords: i32) -> vec4<f32> */
/* fn imageLoad[F : f32_texel_format, A : readable](texture: texture_storage_2d<F, A>, coords: vec2<i32>) -> vec4<f32> */
/* fn imageLoad[F : f32_texel_format, A : readable](texture: texture_storage_2d_array<F, A>, coords: vec3<i32>) -> vec4<f32> */
@@ -3868,7 +4196,7 @@
/* overloads */ OverloadIndex(14),
},
{
- /* [31] */
+ /* [35] */
/* fn imageStore[C : iu32](texture: texture_storage_1d<f32_texel_format, writable>, coords: C, value: vec4<f32>) */
/* fn imageStore[C : iu32](texture: texture_storage_1d<i32_texel_format, writable>, coords: C, value: vec4<i32>) */
/* fn imageStore[C : iu32](texture: texture_storage_1d<u32_texel_format, writable>, coords: C, value: vec4<u32>) */
@@ -3885,40 +4213,40 @@
/* overloads */ OverloadIndex(26),
},
{
- /* [32] */
+ /* [36] */
/* fn lessThan[T : fiu32_f16, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(112),
- },
- {
- /* [33] */
- /* fn lessThanEqual[T : fiu32_f16, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(112),
- },
- {
- /* [34] */
- /* fn greaterThan[T : fiu32_f16, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(112),
- },
- {
- /* [35] */
- /* fn greaterThanEqual[T : fiu32_f16, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(112),
- },
- {
- /* [36] */
- /* fn equal[T : fiu32_f16_bool, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(113),
+ /* overloads */ OverloadIndex(126),
},
{
/* [37] */
+ /* fn lessThanEqual[T : fiu32_f16, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(126),
+ },
+ {
+ /* [38] */
+ /* fn greaterThan[T : fiu32_f16, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(126),
+ },
+ {
+ /* [39] */
+ /* fn greaterThanEqual[T : fiu32_f16, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(126),
+ },
+ {
+ /* [40] */
+ /* fn equal[T : fiu32_f16_bool, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(127),
+ },
+ {
+ /* [41] */
/* fn notEqual[T : fiu32_f16_bool, N : num](vec<N, T>, vec<N, T>) -> vec<N, bool> */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(113),
+ /* overloads */ OverloadIndex(127),
},
};
diff --git a/src/tint/lang/glsl/writer/builtin_test.cc b/src/tint/lang/glsl/writer/builtin_test.cc
index dc11edc..8a3194e 100644
--- a/src/tint/lang/glsl/writer/builtin_test.cc
+++ b/src/tint/lang/glsl/writer/builtin_test.cc
@@ -2997,5 +2997,495 @@
)");
}
+TEST_F(GlslWriterTest, BuiltinTextureSampleLevel_2d) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(ty.ptr(handle, ty.Get<core::type::SampledTexture>(
+ core::type::TextureDimension::k2d, ty.f32())));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec2<f32>(), b.Value(1_f), b.Value(2_f));
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x", b.Call<vec4<f32>>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, 3_f));
+ b.Return(func);
+ });
+
+ ASSERT_TRUE(Generate()) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float;
+precision highp int;
+
+uniform highp sampler2D t_s;
+void main() {
+ vec2 v = vec2(1.0f, 2.0f);
+ vec4 x = textureLod(t_s, v, float(3.0f));
+}
+)");
+}
+
+TEST_F(GlslWriterTest, BuiltinTextureSampleLevel_2d_Offset) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(ty.ptr(handle, ty.Get<core::type::SampledTexture>(
+ core::type::TextureDimension::k2d, ty.f32())));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec2<f32>(), b.Value(1_f), b.Value(2_f));
+ auto* offset = b.Composite<vec2<i32>>(4_i, 5_i);
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x",
+ b.Call<vec4<f32>>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, 3_f, offset));
+ b.Return(func);
+ });
+
+ ASSERT_TRUE(Generate()) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float;
+precision highp int;
+
+uniform highp sampler2D t_s;
+void main() {
+ vec2 v = vec2(1.0f, 2.0f);
+ vec4 x = textureLodOffset(t_s, v, float(3.0f), ivec2(4, 5));
+}
+)");
+}
+
+TEST_F(GlslWriterTest, BuiltinTextureSampleLevel_2d_Array) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(ty.ptr(handle, ty.Get<core::type::SampledTexture>(
+ core::type::TextureDimension::k2dArray, ty.f32())));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec2<f32>(), b.Value(1_f), b.Value(2_f));
+ auto* array_idx = b.Value(4_u);
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x", b.Call<vec4<f32>>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, array_idx,
+ 3_f));
+ b.Return(func);
+ });
+
+ ASSERT_TRUE(Generate()) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float;
+precision highp int;
+
+uniform highp sampler2DArray t_s;
+void main() {
+ vec2 v = vec2(1.0f, 2.0f);
+ vec3 v_1 = vec3(v, float(4u));
+ vec4 x = textureLod(t_s, v_1, float(3.0f));
+}
+)");
+}
+
+TEST_F(GlslWriterTest, BuiltinTextureSampleLevel_2d_Array_Offset) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(ty.ptr(handle, ty.Get<core::type::SampledTexture>(
+ core::type::TextureDimension::k2dArray, ty.f32())));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec2<f32>(), b.Value(1_f), b.Value(2_f));
+ auto* array_idx = b.Value(4_u);
+ auto* offset = b.Composite<vec2<i32>>(4_i, 5_i);
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x", b.Call<vec4<f32>>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, array_idx,
+ 3_f, offset));
+ b.Return(func);
+ });
+
+ ASSERT_TRUE(Generate()) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float;
+precision highp int;
+
+uniform highp sampler2DArray t_s;
+void main() {
+ vec2 v = vec2(1.0f, 2.0f);
+ vec3 v_1 = vec3(v, float(4u));
+ vec4 x = textureLodOffset(t_s, v_1, float(3.0f), ivec2(4, 5));
+}
+)");
+}
+
+TEST_F(GlslWriterTest, BuiltinTextureSampleLevel_3d) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(ty.ptr(handle, ty.Get<core::type::SampledTexture>(
+ core::type::TextureDimension::k3d, ty.f32())));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec3<f32>(), b.Value(1_f), b.Value(2_f), b.Value(3_f));
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x", b.Call<vec4<f32>>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, 3_f));
+ b.Return(func);
+ });
+
+ ASSERT_TRUE(Generate()) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float;
+precision highp int;
+
+uniform highp sampler3D t_s;
+void main() {
+ vec3 v = vec3(1.0f, 2.0f, 3.0f);
+ vec4 x = textureLod(t_s, v, float(3.0f));
+}
+)");
+}
+
+TEST_F(GlslWriterTest, BuiltinTextureSampleLevel_3d_Offset) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(ty.ptr(handle, ty.Get<core::type::SampledTexture>(
+ core::type::TextureDimension::k3d, ty.f32())));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec3<f32>(), b.Value(1_f), b.Value(2_f), b.Value(3_f));
+ auto* offset = b.Composite<vec3<i32>>(4_i, 5_i, 6_i);
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x",
+ b.Call<vec4<f32>>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, 3_f, offset));
+ b.Return(func);
+ });
+
+ ASSERT_TRUE(Generate()) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float;
+precision highp int;
+
+uniform highp sampler3D t_s;
+void main() {
+ vec3 v = vec3(1.0f, 2.0f, 3.0f);
+ vec4 x = textureLodOffset(t_s, v, float(3.0f), ivec3(4, 5, 6));
+}
+)");
+}
+
+TEST_F(GlslWriterTest, BuiltinTextureSampleLevel_Cube) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(ty.ptr(handle, ty.Get<core::type::SampledTexture>(
+ core::type::TextureDimension::kCube, ty.f32())));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec3<f32>(), b.Value(1_f), b.Value(2_f), b.Value(3_f));
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x", b.Call<vec4<f32>>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, 3_f));
+ b.Return(func);
+ });
+
+ ASSERT_TRUE(Generate()) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float;
+precision highp int;
+
+uniform highp samplerCube t_s;
+void main() {
+ vec3 v = vec3(1.0f, 2.0f, 3.0f);
+ vec4 x = textureLod(t_s, v, float(3.0f));
+}
+)");
+}
+
+TEST_F(GlslWriterTest, BuiltinTextureSampleLevel_Cube_Array) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(ty.ptr(handle, ty.Get<core::type::SampledTexture>(
+ core::type::TextureDimension::kCubeArray, ty.f32())));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec3<f32>(), b.Value(1_f), b.Value(2_f), b.Value(3_f));
+ auto* array_idx = b.Value(4_u);
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x", b.Call<vec4<f32>>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, array_idx,
+ 3_f));
+ b.Return(func);
+ });
+
+ Options opts{};
+ opts.version = Version(Version::Standard::kDesktop, 4, 6);
+ ASSERT_TRUE(Generate(opts)) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, R"(#version 460
+precision highp float;
+precision highp int;
+
+uniform highp samplerCubeArray t_s;
+void main() {
+ vec3 v = vec3(1.0f, 2.0f, 3.0f);
+ vec4 v_1 = vec4(v, float(4u));
+ vec4 x = textureLod(t_s, v_1, float(3.0f));
+}
+)");
+}
+
+TEST_F(GlslWriterTest, BuiltinTextureSampleLevel_Depth2d) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(
+ ty.ptr(handle, ty.Get<core::type::DepthTexture>(core::type::TextureDimension::k2d)));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec2<f32>(), b.Value(1_f), b.Value(2_f));
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x", b.Call<f32>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, 3_i));
+ b.Return(func);
+ });
+
+ ASSERT_TRUE(Generate()) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float;
+precision highp int;
+
+uniform highp sampler2DShadow t_s;
+void main() {
+ vec3 v = vec3(vec2(1.0f, 2.0f), 0.0f);
+ float x = textureLod(t_s, v, float(3));
+}
+)");
+}
+
+TEST_F(GlslWriterTest, BuiltinTextureSampleLevel_Depth2d_Offset) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(
+ ty.ptr(handle, ty.Get<core::type::DepthTexture>(core::type::TextureDimension::k2d)));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec2<f32>(), b.Value(1_f), b.Value(2_f));
+ auto* offset = b.Composite<vec2<i32>>(4_i, 5_i);
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x", b.Call<f32>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, 3_i, offset));
+ b.Return(func);
+ });
+
+ ASSERT_TRUE(Generate()) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float;
+precision highp int;
+
+uniform highp sampler2DShadow t_s;
+void main() {
+ vec3 v = vec3(vec2(1.0f, 2.0f), 0.0f);
+ float x = textureLodOffset(t_s, v, float(3), ivec2(4, 5));
+}
+)");
+}
+
+TEST_F(GlslWriterTest, BuiltinTextureSampleLevel_Depth2d_Array) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(ty.ptr(
+ handle, ty.Get<core::type::DepthTexture>(core::type::TextureDimension::k2dArray)));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec2<f32>(), b.Value(1_f), b.Value(2_f));
+ auto* array_idx = b.Value(4_u);
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x", b.Call<f32>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, array_idx, 3_u));
+ b.Return(func);
+ });
+
+ Options opts{};
+ opts.version = Version(Version::Standard::kDesktop, 4, 6);
+ ASSERT_TRUE(Generate(opts)) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, R"(#version 460
+precision highp float;
+precision highp int;
+#extension GL_EXT_texture_shadow_lod: require
+
+uniform highp sampler2DArrayShadow t_s;
+void main() {
+ vec2 v = vec2(1.0f, 2.0f);
+ vec4 v_1 = vec4(v, float(4u), 0.0f);
+ float x = textureLod(t_s, v_1, float(3u));
+}
+)");
+}
+
+TEST_F(GlslWriterTest, BuiltinTextureSampleLevel_Depth2d_Array_Offset) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(ty.ptr(
+ handle, ty.Get<core::type::DepthTexture>(core::type::TextureDimension::k2dArray)));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec2<f32>(), b.Value(1_f), b.Value(2_f));
+ auto* array_idx = b.Value(4_u);
+ auto* offset = b.Composite<vec2<i32>>(4_i, 5_i);
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x", b.Call<f32>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, array_idx, 3_i,
+ offset));
+ b.Return(func);
+ });
+
+ ASSERT_TRUE(Generate()) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float;
+precision highp int;
+#extension GL_EXT_texture_shadow_lod: require
+
+uniform highp sampler2DArrayShadow t_s;
+void main() {
+ vec2 v = vec2(1.0f, 2.0f);
+ vec4 v_1 = vec4(v, float(4u), 0.0f);
+ float x = textureLodOffset(t_s, v_1, float(3), ivec2(4, 5));
+}
+)");
+}
+
+TEST_F(GlslWriterTest, BuiltinTextureSampleLevel_DepthCube_Array) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(ty.ptr(
+ handle, ty.Get<core::type::DepthTexture>(core::type::TextureDimension::kCubeArray)));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec3<f32>(), b.Value(1_f), b.Value(2_f), b.Value(3_f));
+ auto* array_idx = b.Value(4_u);
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x", b.Call<f32>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, array_idx, 3_u));
+ b.Return(func);
+ });
+
+ Options opts{};
+ opts.version = Version(Version::Standard::kDesktop, 4, 6);
+ ASSERT_TRUE(Generate(opts)) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, R"(#version 460
+precision highp float;
+precision highp int;
+#extension GL_EXT_texture_shadow_lod: require
+
+uniform highp samplerCubeArrayShadow t_s;
+void main() {
+ vec3 v = vec3(1.0f, 2.0f, 3.0f);
+ vec4 v_1 = vec4(v, float(4u));
+ float x = textureLod(t_s, v_1, 0.0f, float(3u));
+}
+)");
+}
+
} // namespace
} // namespace tint::glsl::writer
diff --git a/src/tint/lang/glsl/writer/printer/printer.cc b/src/tint/lang/glsl/writer/printer/printer.cc
index 00652a7..02c1af5 100644
--- a/src/tint/lang/glsl/writer/printer/printer.cc
+++ b/src/tint/lang/glsl/writer/printer/printer.cc
@@ -99,6 +99,7 @@
constexpr const char* kAMDGpuShaderHalfFloat = "GL_AMD_gpu_shader_half_float";
constexpr const char* kOESSampleVariables = "GL_OES_sample_variables";
constexpr const char* kEXTBlendFuncExtended = "GL_EXT_blend_func_extended";
+constexpr const char* kEXTTextureShadowLod = "GL_EXT_texture_shadow_lod";
enum class LayoutFormat : uint8_t {
kStd140,
@@ -1127,6 +1128,21 @@
out << ")";
}
+ bool RequiresEXTTextureShadowLod(glsl::BuiltinFn fn) {
+ return fn == glsl::BuiltinFn::kExtTextureLod || fn == glsl::BuiltinFn::kExtTextureLodOffset;
+ }
+
+ glsl::BuiltinFn EXTToNonEXT(glsl::BuiltinFn fn) {
+ switch (fn) {
+ case glsl::BuiltinFn::kExtTextureLod:
+ return glsl::BuiltinFn::kTextureLod;
+ case glsl::BuiltinFn::kExtTextureLodOffset:
+ return glsl::BuiltinFn::kTextureLodOffset;
+ default:
+ TINT_UNREACHABLE() << "invalid function for conversion: " << fn;
+ }
+ }
+
void EmitGlslBuiltinCall(StringStream& out, const glsl::ir::BuiltinCall* c) {
// The atomic subtract is an add in GLSL. If the value is a u32, it just negates the u32 and
// GLSL handles it. We don't have u32 negation in the IR, so fake it in the printer.
@@ -1145,7 +1161,14 @@
return;
}
- out << c->Func() << "(";
+ auto fn = c->Func();
+
+ if (RequiresEXTTextureShadowLod(fn)) {
+ EmitExtension(kEXTTextureShadowLod);
+ fn = EXTToNonEXT(fn);
+ }
+
+ out << fn << "(";
bool needs_comma = false;
for (const auto* arg : c->Args()) {
if (needs_comma) {
diff --git a/src/tint/lang/glsl/writer/raise/texture_polyfill.cc b/src/tint/lang/glsl/writer/raise/texture_polyfill.cc
index 41b1405..1f3f4b7 100644
--- a/src/tint/lang/glsl/writer/raise/texture_polyfill.cc
+++ b/src/tint/lang/glsl/writer/raise/texture_polyfill.cc
@@ -63,7 +63,15 @@
/// The type manager.
core::type::Manager& ty{ir.Types()};
- // A map of the <texture,sampler> binding pair to the replacement var
+ // A map of single texture to the replacement var. Note, this doesn't just re-use the
+ // `texture_sampler_to_replacment` with the placeholder sampler because we can share an
+ // individual texture with a texture,sampler pair. So, if we create the texture as `t1,s1` we
+ // want to use that `t1` individually but if we look it up with `t1,sp` then we won't find it.
+ // This secondary map exists to allow us access to textures which may have been created
+ // with a sampler.
+ Hashmap<core::ir::Var*, std::optional<core::ir::Var*>, 2> texture_to_replacement_{};
+
+ // A map of the <texture,sampler> binding pair to the replacement var.
Hashmap<binding::CombinedTextureSamplerPair, core::ir::Var*, 2>
texture_sampler_to_replacement_{};
@@ -130,13 +138,15 @@
case core::BuiltinFn::kTextureSampleBias:
TextureSampleBias(call);
break;
+ case core::BuiltinFn::kTextureSampleLevel:
+ TextureSampleLevel(call);
+ break;
case core::BuiltinFn::kTextureStore:
TextureStore(call);
break;
case core::BuiltinFn::kTextureSampleCompare:
case core::BuiltinFn::kTextureSampleCompareLevel:
case core::BuiltinFn::kTextureSampleGrad:
- case core::BuiltinFn::kTextureSampleLevel:
default:
TINT_UNREACHABLE() << "TODO(dsinclair): " << call->Func();
}
@@ -158,14 +168,29 @@
return tex;
}
+ if (!sampler) {
+ auto existing_var = texture_to_replacement_.Get(tex);
+ if (existing_var) {
+ return existing_var->value();
+ }
+
+ replaced_textures_and_samplers_.Add(tex);
+
+ // If the texture wasn't already in the map this means it was an individual texture we
+ // 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);
+ texture_to_replacement_.Add(tex, replacement);
+ return replacement;
+ }
+
auto tex_bp = tex->BindingPoint();
- auto samp_bp = sampler ? sampler->BindingPoint() : cfg.placeholder_sampler_bind_point;
+ auto samp_bp = sampler->BindingPoint();
TINT_ASSERT(tex_bp.has_value() && samp_bp.has_value());
replaced_textures_and_samplers_.Add(tex);
- if (sampler) {
- replaced_textures_and_samplers_.Add(sampler);
- }
+ replaced_textures_and_samplers_.Add(sampler);
binding::CombinedTextureSamplerPair key{tex_bp.value(), samp_bp.value()};
auto var = texture_sampler_to_replacement_.Get(key);
@@ -280,20 +305,18 @@
auto* tex = tex_sampler.texture;
auto* sampler = tex_sampler.sampler;
- // No change to storage textures.
- if (tex->Result(0)->Type()->UnwrapPtr()->Is<core::type::StorageTexture>()) {
+ // No sampler, then we aren't going to be creating a combined sampler.
+ if (!sampler) {
continue;
}
BindingPoint tex_bp = tex->BindingPoint().value();
-
- // No sampler, use the placeholder binding
- BindingPoint samp_bp =
- sampler ? sampler->BindingPoint().value() : cfg.placeholder_sampler_bind_point;
+ BindingPoint samp_bp = sampler->BindingPoint().value();
binding::CombinedTextureSamplerPair key{tex_bp, samp_bp};
- texture_sampler_to_replacement_.GetOrAdd(key,
- [&] { return MakeVar(key, tex, sampler); });
+ auto* replacement = texture_sampler_to_replacement_.GetOrAdd(
+ key, [&] { return MakeVar(key, tex, sampler); });
+ texture_to_replacement_.Add(tex, replacement);
}
}
@@ -862,6 +885,84 @@
});
call->Destroy();
}
+
+ void TextureSampleLevel(core::ir::BuiltinCall* call) {
+ auto args = call->Args();
+ b.InsertBefore(call, [&] {
+ Vector<core::ir::Value*, 4> params;
+
+ uint32_t idx = 0;
+ uint32_t tex_arg = idx++;
+ uint32_t sampler_arg = idx++;
+
+ auto* tex = GetNewTexture(args[tex_arg], args[sampler_arg]);
+ auto* tex_type = tex->Type()->As<core::type::Texture>();
+ TINT_ASSERT(tex_type);
+
+ params.Push(tex);
+
+ bool is_depth = tex_type->Is<core::type::DepthTexture>();
+ bool needs_ext = false;
+
+ auto depth_ref = 0_f;
+
+ core::ir::Value* coords = args[idx++];
+ switch (tex_type->Dim()) {
+ case core::type::TextureDimension::k2d:
+ if (is_depth) {
+ coords = b.Construct(ty.vec3<f32>(), coords, depth_ref)->Result(0);
+ }
+ params.Push(coords);
+
+ break;
+ case core::type::TextureDimension::k2dArray: {
+ Vector<core::ir::Value*, 3> new_coords;
+ new_coords.Push(coords);
+ new_coords.Push(b.Convert<f32>(args[idx++])->Result(0));
+
+ uint32_t vec_width = 3;
+ if (is_depth) {
+ needs_ext = true;
+ new_coords.Push(b.Value(depth_ref));
+ ++vec_width;
+ }
+ params.Push(b.Construct(ty.vec(ty.f32(), vec_width), new_coords)->Result(0));
+ break;
+ }
+ case core::type::TextureDimension::k3d:
+ case core::type::TextureDimension::kCube:
+ if (is_depth) {
+ needs_ext = tex_type->Dim() == core::type::TextureDimension::kCube;
+ coords = b.Construct(ty.vec4<f32>(), coords, depth_ref)->Result(0);
+ }
+ params.Push(coords);
+ break;
+ case core::type::TextureDimension::kCubeArray:
+ params.Push(b.Construct(ty.vec4<f32>(), coords, b.Convert<f32>(args[idx++]))
+ ->Result(0));
+
+ if (is_depth) {
+ needs_ext = true;
+ params.Push(b.Value(depth_ref));
+ }
+ break;
+ default:
+ TINT_UNREACHABLE();
+ }
+
+ params.Push(b.Convert(ty.f32(), args[idx++])->Result(0));
+
+ auto fn = needs_ext ? glsl::BuiltinFn::kExtTextureLod : glsl::BuiltinFn::kTextureLod;
+ if (idx < args.Length()) {
+ fn = needs_ext ? glsl::BuiltinFn::kExtTextureLodOffset
+ : glsl::BuiltinFn::kTextureLodOffset;
+ params.Push(args[idx++]);
+ }
+
+ b.CallWithResult<glsl::ir::BuiltinCall>(call->DetachResult(), fn, params);
+ });
+ call->Destroy();
+ }
};
} // namespace
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 671a054..336ed88 100644
--- a/src/tint/lang/glsl/writer/raise/texture_polyfill_test.cc
+++ b/src/tint/lang/glsl/writer/raise/texture_polyfill_test.cc
@@ -3653,5 +3653,985 @@
EXPECT_EQ(expect, str());
}
+TEST_F(GlslWriter_TexturePolyfillTest, TextureSampleLevel_2d) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(ty.ptr(handle, ty.Get<core::type::SampledTexture>(
+ core::type::TextureDimension::k2d, ty.f32())));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec2<f32>(), b.Value(1_f), b.Value(2_f));
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x", b.Call<vec4<f32>>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, 3_f));
+ b.Return(func);
+ });
+
+ auto* src = R"(
+$B1: { # root
+ %1:ptr<handle, texture_2d<f32>, read> = var @binding_point(0, 0)
+ %2:ptr<handle, sampler, read> = var @binding_point(0, 1)
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %4:vec2<f32> = construct 1.0f, 2.0f
+ %5:texture_2d<f32> = load %1
+ %6:sampler = load %2
+ %7:vec4<f32> = textureSampleLevel %5, %6, %4, 3.0f
+ %x:vec4<f32> = let %7
+ ret
+ }
+}
+)";
+ ASSERT_EQ(src, str());
+
+ auto* expect = R"(
+$B1: { # root
+ %my_tex:ptr<handle, texture_2d<f32>, read> = var
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %3:vec2<f32> = construct 1.0f, 2.0f
+ %4:texture_2d<f32> = load %my_tex
+ %5:f32 = convert 3.0f
+ %6:vec4<f32> = glsl.textureLod %4, %3, %5
+ %x:vec4<f32> = let %6
+ ret
+ }
+}
+)";
+
+ capabilities = core::ir::Capabilities{core::ir::Capability::kAllowHandleVarsWithoutBindings};
+
+ TexturePolyfillConfig cfg;
+ cfg.placeholder_sampler_bind_point = {2, 2};
+
+ binding::CombinedTextureSamplerPair pair;
+ pair.texture = {0, 0};
+ pair.sampler = {0, 1};
+ cfg.sampler_texture_to_name[pair] = "my_tex";
+
+ Run(TexturePolyfill, cfg);
+ EXPECT_EQ(expect, str());
+}
+
+TEST_F(GlslWriter_TexturePolyfillTest, TextureSampleLevel_2d_Offset) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(ty.ptr(handle, ty.Get<core::type::SampledTexture>(
+ core::type::TextureDimension::k2d, ty.f32())));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec2<f32>(), b.Value(1_f), b.Value(2_f));
+ auto* offset = b.Composite<vec2<i32>>(4_i, 5_i);
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x",
+ b.Call<vec4<f32>>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, 3_f, offset));
+ b.Return(func);
+ });
+
+ auto* src = R"(
+$B1: { # root
+ %1:ptr<handle, texture_2d<f32>, read> = var @binding_point(0, 0)
+ %2:ptr<handle, sampler, read> = var @binding_point(0, 1)
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %4:vec2<f32> = construct 1.0f, 2.0f
+ %5:texture_2d<f32> = load %1
+ %6:sampler = load %2
+ %7:vec4<f32> = textureSampleLevel %5, %6, %4, 3.0f, vec2<i32>(4i, 5i)
+ %x:vec4<f32> = let %7
+ ret
+ }
+}
+)";
+ ASSERT_EQ(src, str());
+
+ auto* expect = R"(
+$B1: { # root
+ %my_tex:ptr<handle, texture_2d<f32>, read> = var
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %3:vec2<f32> = construct 1.0f, 2.0f
+ %4:texture_2d<f32> = load %my_tex
+ %5:f32 = convert 3.0f
+ %6:vec4<f32> = glsl.textureLodOffset %4, %3, %5, vec2<i32>(4i, 5i)
+ %x:vec4<f32> = let %6
+ ret
+ }
+}
+)";
+
+ capabilities = core::ir::Capabilities{core::ir::Capability::kAllowHandleVarsWithoutBindings};
+
+ TexturePolyfillConfig cfg;
+ cfg.placeholder_sampler_bind_point = {2, 2};
+
+ binding::CombinedTextureSamplerPair pair;
+ pair.texture = {0, 0};
+ pair.sampler = {0, 1};
+ cfg.sampler_texture_to_name[pair] = "my_tex";
+
+ Run(TexturePolyfill, cfg);
+ EXPECT_EQ(expect, str());
+}
+
+TEST_F(GlslWriter_TexturePolyfillTest, TextureSampleLevel_2d_Array) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(ty.ptr(handle, ty.Get<core::type::SampledTexture>(
+ core::type::TextureDimension::k2dArray, ty.f32())));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec2<f32>(), b.Value(1_f), b.Value(2_f));
+ auto* array_idx = b.Value(4_u);
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x", b.Call<vec4<f32>>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, array_idx,
+ 3_f));
+ b.Return(func);
+ });
+
+ auto* src = R"(
+$B1: { # root
+ %1:ptr<handle, texture_2d_array<f32>, read> = var @binding_point(0, 0)
+ %2:ptr<handle, sampler, read> = var @binding_point(0, 1)
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %4:vec2<f32> = construct 1.0f, 2.0f
+ %5:texture_2d_array<f32> = load %1
+ %6:sampler = load %2
+ %7:vec4<f32> = textureSampleLevel %5, %6, %4, 4u, 3.0f
+ %x:vec4<f32> = let %7
+ ret
+ }
+}
+)";
+ ASSERT_EQ(src, str());
+
+ auto* expect = R"(
+$B1: { # root
+ %my_tex:ptr<handle, texture_2d_array<f32>, read> = var
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %3:vec2<f32> = construct 1.0f, 2.0f
+ %4:texture_2d_array<f32> = load %my_tex
+ %5:f32 = convert 4u
+ %6:vec3<f32> = construct %3, %5
+ %7:f32 = convert 3.0f
+ %8:vec4<f32> = glsl.textureLod %4, %6, %7
+ %x:vec4<f32> = let %8
+ ret
+ }
+}
+)";
+
+ capabilities = core::ir::Capabilities{core::ir::Capability::kAllowHandleVarsWithoutBindings};
+
+ TexturePolyfillConfig cfg;
+ cfg.placeholder_sampler_bind_point = {2, 2};
+
+ binding::CombinedTextureSamplerPair pair;
+ pair.texture = {0, 0};
+ pair.sampler = {0, 1};
+ cfg.sampler_texture_to_name[pair] = "my_tex";
+
+ Run(TexturePolyfill, cfg);
+ EXPECT_EQ(expect, str());
+}
+
+TEST_F(GlslWriter_TexturePolyfillTest, TextureSampleLevel_2d_Array_Offset) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(ty.ptr(handle, ty.Get<core::type::SampledTexture>(
+ core::type::TextureDimension::k2dArray, ty.f32())));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec2<f32>(), b.Value(1_f), b.Value(2_f));
+ auto* array_idx = b.Value(4_u);
+ auto* offset = b.Composite<vec2<i32>>(4_i, 5_i);
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x", b.Call<vec4<f32>>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, array_idx,
+ 3_f, offset));
+ b.Return(func);
+ });
+
+ auto* src = R"(
+$B1: { # root
+ %1:ptr<handle, texture_2d_array<f32>, read> = var @binding_point(0, 0)
+ %2:ptr<handle, sampler, read> = var @binding_point(0, 1)
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %4:vec2<f32> = construct 1.0f, 2.0f
+ %5:texture_2d_array<f32> = load %1
+ %6:sampler = load %2
+ %7:vec4<f32> = textureSampleLevel %5, %6, %4, 4u, 3.0f, vec2<i32>(4i, 5i)
+ %x:vec4<f32> = let %7
+ ret
+ }
+}
+)";
+ ASSERT_EQ(src, str());
+
+ auto* expect = R"(
+$B1: { # root
+ %my_tex:ptr<handle, texture_2d_array<f32>, read> = var
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %3:vec2<f32> = construct 1.0f, 2.0f
+ %4:texture_2d_array<f32> = load %my_tex
+ %5:f32 = convert 4u
+ %6:vec3<f32> = construct %3, %5
+ %7:f32 = convert 3.0f
+ %8:vec4<f32> = glsl.textureLodOffset %4, %6, %7, vec2<i32>(4i, 5i)
+ %x:vec4<f32> = let %8
+ ret
+ }
+}
+)";
+
+ capabilities = core::ir::Capabilities{core::ir::Capability::kAllowHandleVarsWithoutBindings};
+
+ TexturePolyfillConfig cfg;
+ cfg.placeholder_sampler_bind_point = {2, 2};
+
+ binding::CombinedTextureSamplerPair pair;
+ pair.texture = {0, 0};
+ pair.sampler = {0, 1};
+ cfg.sampler_texture_to_name[pair] = "my_tex";
+
+ Run(TexturePolyfill, cfg);
+ EXPECT_EQ(expect, str());
+}
+
+TEST_F(GlslWriter_TexturePolyfillTest, TextureSampleLevel_3d) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(ty.ptr(handle, ty.Get<core::type::SampledTexture>(
+ core::type::TextureDimension::k3d, ty.f32())));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec3<f32>(), b.Value(1_f), b.Value(2_f), b.Value(3_f));
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x", b.Call<vec4<f32>>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, 3_f));
+ b.Return(func);
+ });
+
+ auto* src = R"(
+$B1: { # root
+ %1:ptr<handle, texture_3d<f32>, read> = var @binding_point(0, 0)
+ %2:ptr<handle, sampler, read> = var @binding_point(0, 1)
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %4:vec3<f32> = construct 1.0f, 2.0f, 3.0f
+ %5:texture_3d<f32> = load %1
+ %6:sampler = load %2
+ %7:vec4<f32> = textureSampleLevel %5, %6, %4, 3.0f
+ %x:vec4<f32> = let %7
+ ret
+ }
+}
+)";
+ ASSERT_EQ(src, str());
+
+ auto* expect = R"(
+$B1: { # root
+ %my_tex:ptr<handle, texture_3d<f32>, read> = var
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
+ %4:texture_3d<f32> = load %my_tex
+ %5:f32 = convert 3.0f
+ %6:vec4<f32> = glsl.textureLod %4, %3, %5
+ %x:vec4<f32> = let %6
+ ret
+ }
+}
+)";
+
+ capabilities = core::ir::Capabilities{core::ir::Capability::kAllowHandleVarsWithoutBindings};
+
+ TexturePolyfillConfig cfg;
+ cfg.placeholder_sampler_bind_point = {2, 2};
+
+ binding::CombinedTextureSamplerPair pair;
+ pair.texture = {0, 0};
+ pair.sampler = {0, 1};
+ cfg.sampler_texture_to_name[pair] = "my_tex";
+
+ Run(TexturePolyfill, cfg);
+ EXPECT_EQ(expect, str());
+}
+
+TEST_F(GlslWriter_TexturePolyfillTest, TextureSampleLevel_3d_Offset) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(ty.ptr(handle, ty.Get<core::type::SampledTexture>(
+ core::type::TextureDimension::k3d, ty.f32())));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec3<f32>(), b.Value(1_f), b.Value(2_f), b.Value(3_f));
+ auto* offset = b.Composite<vec3<i32>>(4_i, 5_i, 6_i);
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x",
+ b.Call<vec4<f32>>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, 3_f, offset));
+ b.Return(func);
+ });
+
+ auto* src = R"(
+$B1: { # root
+ %1:ptr<handle, texture_3d<f32>, read> = var @binding_point(0, 0)
+ %2:ptr<handle, sampler, read> = var @binding_point(0, 1)
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %4:vec3<f32> = construct 1.0f, 2.0f, 3.0f
+ %5:texture_3d<f32> = load %1
+ %6:sampler = load %2
+ %7:vec4<f32> = textureSampleLevel %5, %6, %4, 3.0f, vec3<i32>(4i, 5i, 6i)
+ %x:vec4<f32> = let %7
+ ret
+ }
+}
+)";
+ ASSERT_EQ(src, str());
+
+ auto* expect = R"(
+$B1: { # root
+ %my_tex:ptr<handle, texture_3d<f32>, read> = var
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
+ %4:texture_3d<f32> = load %my_tex
+ %5:f32 = convert 3.0f
+ %6:vec4<f32> = glsl.textureLodOffset %4, %3, %5, vec3<i32>(4i, 5i, 6i)
+ %x:vec4<f32> = let %6
+ ret
+ }
+}
+)";
+
+ capabilities = core::ir::Capabilities{core::ir::Capability::kAllowHandleVarsWithoutBindings};
+
+ TexturePolyfillConfig cfg;
+ cfg.placeholder_sampler_bind_point = {2, 2};
+
+ binding::CombinedTextureSamplerPair pair;
+ pair.texture = {0, 0};
+ pair.sampler = {0, 1};
+ cfg.sampler_texture_to_name[pair] = "my_tex";
+
+ Run(TexturePolyfill, cfg);
+ EXPECT_EQ(expect, str());
+}
+
+TEST_F(GlslWriter_TexturePolyfillTest, TextureSampleLevel_Cube) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(ty.ptr(handle, ty.Get<core::type::SampledTexture>(
+ core::type::TextureDimension::kCube, ty.f32())));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec3<f32>(), b.Value(1_f), b.Value(2_f), b.Value(3_f));
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x", b.Call<vec4<f32>>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, 3_f));
+ b.Return(func);
+ });
+
+ auto* src = R"(
+$B1: { # root
+ %1:ptr<handle, texture_cube<f32>, read> = var @binding_point(0, 0)
+ %2:ptr<handle, sampler, read> = var @binding_point(0, 1)
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %4:vec3<f32> = construct 1.0f, 2.0f, 3.0f
+ %5:texture_cube<f32> = load %1
+ %6:sampler = load %2
+ %7:vec4<f32> = textureSampleLevel %5, %6, %4, 3.0f
+ %x:vec4<f32> = let %7
+ ret
+ }
+}
+)";
+ ASSERT_EQ(src, str());
+
+ auto* expect = R"(
+$B1: { # root
+ %my_tex:ptr<handle, texture_cube<f32>, read> = var
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
+ %4:texture_cube<f32> = load %my_tex
+ %5:f32 = convert 3.0f
+ %6:vec4<f32> = glsl.textureLod %4, %3, %5
+ %x:vec4<f32> = let %6
+ ret
+ }
+}
+)";
+
+ capabilities = core::ir::Capabilities{core::ir::Capability::kAllowHandleVarsWithoutBindings};
+
+ TexturePolyfillConfig cfg;
+ cfg.placeholder_sampler_bind_point = {2, 2};
+
+ binding::CombinedTextureSamplerPair pair;
+ pair.texture = {0, 0};
+ pair.sampler = {0, 1};
+ cfg.sampler_texture_to_name[pair] = "my_tex";
+
+ Run(TexturePolyfill, cfg);
+ EXPECT_EQ(expect, str());
+}
+
+TEST_F(GlslWriter_TexturePolyfillTest, TextureSampleLevel_Cube_Array) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(ty.ptr(handle, ty.Get<core::type::SampledTexture>(
+ core::type::TextureDimension::kCubeArray, ty.f32())));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec3<f32>(), b.Value(1_f), b.Value(2_f), b.Value(3_f));
+ auto* array_idx = b.Value(4_u);
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x", b.Call<vec4<f32>>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, array_idx,
+ 3_f));
+ b.Return(func);
+ });
+
+ auto* src = R"(
+$B1: { # root
+ %1:ptr<handle, texture_cube_array<f32>, read> = var @binding_point(0, 0)
+ %2:ptr<handle, sampler, read> = var @binding_point(0, 1)
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %4:vec3<f32> = construct 1.0f, 2.0f, 3.0f
+ %5:texture_cube_array<f32> = load %1
+ %6:sampler = load %2
+ %7:vec4<f32> = textureSampleLevel %5, %6, %4, 4u, 3.0f
+ %x:vec4<f32> = let %7
+ ret
+ }
+}
+)";
+ ASSERT_EQ(src, str());
+
+ auto* expect = R"(
+$B1: { # root
+ %my_tex:ptr<handle, texture_cube_array<f32>, read> = var
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %3:vec3<f32> = construct 1.0f, 2.0f, 3.0f
+ %4:texture_cube_array<f32> = load %my_tex
+ %5:f32 = convert 4u
+ %6:vec4<f32> = construct %3, %5
+ %7:f32 = convert 3.0f
+ %8:vec4<f32> = glsl.textureLod %4, %6, %7
+ %x:vec4<f32> = let %8
+ ret
+ }
+}
+)";
+
+ capabilities = core::ir::Capabilities{core::ir::Capability::kAllowHandleVarsWithoutBindings};
+
+ TexturePolyfillConfig cfg;
+ cfg.placeholder_sampler_bind_point = {2, 2};
+
+ binding::CombinedTextureSamplerPair pair;
+ pair.texture = {0, 0};
+ pair.sampler = {0, 1};
+ cfg.sampler_texture_to_name[pair] = "my_tex";
+
+ Run(TexturePolyfill, cfg);
+ EXPECT_EQ(expect, str());
+}
+
+TEST_F(GlslWriter_TexturePolyfillTest, TextureSampleLevel_Depth2d) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(
+ ty.ptr(handle, ty.Get<core::type::DepthTexture>(core::type::TextureDimension::k2d)));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec2<f32>(), b.Value(1_f), b.Value(2_f));
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x", b.Call<f32>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, 3_i));
+ b.Return(func);
+ });
+
+ auto* src = R"(
+$B1: { # root
+ %1:ptr<handle, texture_depth_2d, read> = var @binding_point(0, 0)
+ %2:ptr<handle, sampler, read> = var @binding_point(0, 1)
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %4:vec2<f32> = construct 1.0f, 2.0f
+ %5:texture_depth_2d = load %1
+ %6:sampler = load %2
+ %7:f32 = textureSampleLevel %5, %6, %4, 3i
+ %x:f32 = let %7
+ ret
+ }
+}
+)";
+ ASSERT_EQ(src, str());
+
+ auto* expect = R"(
+$B1: { # root
+ %my_tex:ptr<handle, texture_depth_2d, read> = var
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %3:vec2<f32> = construct 1.0f, 2.0f
+ %4:texture_depth_2d = load %my_tex
+ %5:vec3<f32> = construct %3, 0.0f
+ %6:f32 = convert 3i
+ %7:f32 = glsl.textureLod %4, %5, %6
+ %x:f32 = let %7
+ ret
+ }
+}
+)";
+
+ capabilities = core::ir::Capabilities{core::ir::Capability::kAllowHandleVarsWithoutBindings};
+
+ TexturePolyfillConfig cfg;
+ cfg.placeholder_sampler_bind_point = {2, 2};
+
+ binding::CombinedTextureSamplerPair pair;
+ pair.texture = {0, 0};
+ pair.sampler = {0, 1};
+ cfg.sampler_texture_to_name[pair] = "my_tex";
+
+ Run(TexturePolyfill, cfg);
+ EXPECT_EQ(expect, str());
+}
+
+TEST_F(GlslWriter_TexturePolyfillTest, TextureSampleLevel_Depth2d_Offset) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(
+ ty.ptr(handle, ty.Get<core::type::DepthTexture>(core::type::TextureDimension::k2d)));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec2<f32>(), b.Value(1_f), b.Value(2_f));
+ auto* offset = b.Composite<vec2<i32>>(4_i, 5_i);
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x", b.Call<f32>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, 3_u, offset));
+ b.Return(func);
+ });
+
+ auto* src = R"(
+$B1: { # root
+ %1:ptr<handle, texture_depth_2d, read> = var @binding_point(0, 0)
+ %2:ptr<handle, sampler, read> = var @binding_point(0, 1)
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %4:vec2<f32> = construct 1.0f, 2.0f
+ %5:texture_depth_2d = load %1
+ %6:sampler = load %2
+ %7:f32 = textureSampleLevel %5, %6, %4, 3u, vec2<i32>(4i, 5i)
+ %x:f32 = let %7
+ ret
+ }
+}
+)";
+ ASSERT_EQ(src, str());
+
+ auto* expect = R"(
+$B1: { # root
+ %my_tex:ptr<handle, texture_depth_2d, read> = var
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %3:vec2<f32> = construct 1.0f, 2.0f
+ %4:texture_depth_2d = load %my_tex
+ %5:vec3<f32> = construct %3, 0.0f
+ %6:f32 = convert 3u
+ %7:f32 = glsl.textureLodOffset %4, %5, %6, vec2<i32>(4i, 5i)
+ %x:f32 = let %7
+ ret
+ }
+}
+)";
+
+ capabilities = core::ir::Capabilities{core::ir::Capability::kAllowHandleVarsWithoutBindings};
+
+ TexturePolyfillConfig cfg;
+ cfg.placeholder_sampler_bind_point = {2, 2};
+
+ binding::CombinedTextureSamplerPair pair;
+ pair.texture = {0, 0};
+ pair.sampler = {0, 1};
+ cfg.sampler_texture_to_name[pair] = "my_tex";
+
+ Run(TexturePolyfill, cfg);
+ EXPECT_EQ(expect, str());
+}
+
+TEST_F(GlslWriter_TexturePolyfillTest, TextureSampleLevel_Depth2d_Array) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(ty.ptr(
+ handle, ty.Get<core::type::DepthTexture>(core::type::TextureDimension::k2dArray)));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec2<f32>(), b.Value(1_f), b.Value(2_f));
+ auto* array_idx = b.Value(4_u);
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x", b.Call<f32>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, array_idx, 3_i));
+ b.Return(func);
+ });
+
+ auto* src = R"(
+$B1: { # root
+ %1:ptr<handle, texture_depth_2d_array, read> = var @binding_point(0, 0)
+ %2:ptr<handle, sampler, read> = var @binding_point(0, 1)
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %4:vec2<f32> = construct 1.0f, 2.0f
+ %5:texture_depth_2d_array = load %1
+ %6:sampler = load %2
+ %7:f32 = textureSampleLevel %5, %6, %4, 4u, 3i
+ %x:f32 = let %7
+ ret
+ }
+}
+)";
+ ASSERT_EQ(src, str());
+
+ auto* expect = R"(
+$B1: { # root
+ %my_tex:ptr<handle, texture_depth_2d_array, read> = var
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %3:vec2<f32> = construct 1.0f, 2.0f
+ %4:texture_depth_2d_array = load %my_tex
+ %5:f32 = convert 4u
+ %6:vec4<f32> = construct %3, %5, 0.0f
+ %7:f32 = convert 3i
+ %8:f32 = glsl.extTextureLod %4, %6, %7
+ %x:f32 = let %8
+ ret
+ }
+}
+)";
+
+ capabilities = core::ir::Capabilities{core::ir::Capability::kAllowHandleVarsWithoutBindings};
+
+ TexturePolyfillConfig cfg;
+ cfg.placeholder_sampler_bind_point = {2, 2};
+
+ binding::CombinedTextureSamplerPair pair;
+ pair.texture = {0, 0};
+ pair.sampler = {0, 1};
+ cfg.sampler_texture_to_name[pair] = "my_tex";
+
+ Run(TexturePolyfill, cfg);
+ EXPECT_EQ(expect, str());
+}
+
+TEST_F(GlslWriter_TexturePolyfillTest, TextureSampleLevel_Depth2d_Array_Offset) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(ty.ptr(
+ handle, ty.Get<core::type::DepthTexture>(core::type::TextureDimension::k2dArray)));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec2<f32>(), b.Value(1_f), b.Value(2_f));
+ auto* array_idx = b.Value(4_u);
+ auto* offset = b.Composite<vec2<i32>>(4_i, 5_i);
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x", b.Call<f32>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, array_idx, 3_u,
+ offset));
+ b.Return(func);
+ });
+
+ auto* src = R"(
+$B1: { # root
+ %1:ptr<handle, texture_depth_2d_array, read> = var @binding_point(0, 0)
+ %2:ptr<handle, sampler, read> = var @binding_point(0, 1)
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %4:vec2<f32> = construct 1.0f, 2.0f
+ %5:texture_depth_2d_array = load %1
+ %6:sampler = load %2
+ %7:f32 = textureSampleLevel %5, %6, %4, 4u, 3u, vec2<i32>(4i, 5i)
+ %x:f32 = let %7
+ ret
+ }
+}
+)";
+ ASSERT_EQ(src, str());
+
+ auto* expect = R"(
+$B1: { # root
+ %my_tex:ptr<handle, texture_depth_2d_array, read> = var
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %3:vec2<f32> = construct 1.0f, 2.0f
+ %4:texture_depth_2d_array = load %my_tex
+ %5:f32 = convert 4u
+ %6:vec4<f32> = construct %3, %5, 0.0f
+ %7:f32 = convert 3u
+ %8:f32 = glsl.extTextureLodOffset %4, %6, %7, vec2<i32>(4i, 5i)
+ %x:f32 = let %8
+ ret
+ }
+}
+)";
+
+ capabilities = core::ir::Capabilities{core::ir::Capability::kAllowHandleVarsWithoutBindings};
+
+ TexturePolyfillConfig cfg;
+ cfg.placeholder_sampler_bind_point = {2, 2};
+
+ binding::CombinedTextureSamplerPair pair;
+ pair.texture = {0, 0};
+ pair.sampler = {0, 1};
+ cfg.sampler_texture_to_name[pair] = "my_tex";
+
+ Run(TexturePolyfill, cfg);
+ EXPECT_EQ(expect, str());
+}
+
+TEST_F(GlslWriter_TexturePolyfillTest, TextureSampleLevel_DepthCube_Array) {
+ core::ir::Var* tex = nullptr;
+ core::ir::Var* sampler = nullptr;
+ b.Append(b.ir.root_block, [&] {
+ tex = b.Var(ty.ptr(
+ handle, ty.Get<core::type::DepthTexture>(core::type::TextureDimension::kCubeArray)));
+ tex->SetBindingPoint(0, 0);
+
+ sampler =
+ b.Var(ty.ptr(handle, ty.Get<core::type::Sampler>(core::type::SamplerKind::kSampler)));
+ sampler->SetBindingPoint(0, 1);
+ });
+
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* coords = b.Construct(ty.vec3<f32>(), b.Value(1_f), b.Value(2_f), b.Value(3_i));
+ auto* array_idx = b.Value(4_u);
+
+ auto* t = b.Load(tex);
+ auto* s = b.Load(sampler);
+ b.Let("x", b.Call<f32>(core::BuiltinFn::kTextureSampleLevel, t, s, coords, array_idx, 3_i));
+ b.Return(func);
+ });
+
+ auto* src = R"(
+$B1: { # root
+ %1:ptr<handle, texture_depth_cube_array, read> = var @binding_point(0, 0)
+ %2:ptr<handle, sampler, read> = var @binding_point(0, 1)
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %4:vec3<f32> = construct 1.0f, 2.0f, 3i
+ %5:texture_depth_cube_array = load %1
+ %6:sampler = load %2
+ %7:f32 = textureSampleLevel %5, %6, %4, 4u, 3i
+ %x:f32 = let %7
+ ret
+ }
+}
+)";
+ ASSERT_EQ(src, str());
+
+ auto* expect = R"(
+$B1: { # root
+ %my_tex:ptr<handle, texture_depth_cube_array, read> = var
+}
+
+%foo = @fragment func():void {
+ $B2: {
+ %3:vec3<f32> = construct 1.0f, 2.0f, 3i
+ %4:texture_depth_cube_array = load %my_tex
+ %5:f32 = convert 4u
+ %6:vec4<f32> = construct %3, %5
+ %7:f32 = convert 3i
+ %8:f32 = glsl.extTextureLod %4, %6, 0.0f, %7
+ %x:f32 = let %8
+ ret
+ }
+}
+)";
+
+ capabilities = core::ir::Capabilities{core::ir::Capability::kAllowHandleVarsWithoutBindings};
+
+ TexturePolyfillConfig cfg;
+ cfg.placeholder_sampler_bind_point = {2, 2};
+
+ binding::CombinedTextureSamplerPair pair;
+ pair.texture = {0, 0};
+ pair.sampler = {0, 1};
+ cfg.sampler_texture_to_name[pair] = "my_tex";
+
+ Run(TexturePolyfill, cfg);
+ EXPECT_EQ(expect, str());
+}
+
} // namespace
} // namespace tint::glsl::writer::raise