HLSL-IR: polyfill modf and frexp
Bug: 368627641
Change-Id: I1e1ec8d7b642aa59269ce986dae340273d91be84
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/210354
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
diff --git a/src/tint/lang/hlsl/builtin_fn.cc b/src/tint/lang/hlsl/builtin_fn.cc
index 197dc17..74e4cb6 100644
--- a/src/tint/lang/hlsl/builtin_fn.cc
+++ b/src/tint/lang/hlsl/builtin_fn.cc
@@ -94,6 +94,10 @@
return "WaveGetLaneCount";
case BuiltinFn::kWaveReadLaneAt:
return "WaveReadLaneAt";
+ case BuiltinFn::kModf:
+ return "modf";
+ case BuiltinFn::kFrexp:
+ return "frexp";
case BuiltinFn::kLoad:
return "Load";
case BuiltinFn::kLoad2:
diff --git a/src/tint/lang/hlsl/builtin_fn.h b/src/tint/lang/hlsl/builtin_fn.h
index 86c48aa..5be7e6b 100644
--- a/src/tint/lang/hlsl/builtin_fn.h
+++ b/src/tint/lang/hlsl/builtin_fn.h
@@ -73,6 +73,8 @@
kWaveGetLaneIndex,
kWaveGetLaneCount,
kWaveReadLaneAt,
+ kModf,
+ kFrexp,
kLoad,
kLoad2,
kLoad3,
diff --git a/src/tint/lang/hlsl/hlsl.def b/src/tint/lang/hlsl/hlsl.def
index d80b9ba..f0f44ab 100644
--- a/src/tint/lang/hlsl/hlsl.def
+++ b/src/tint/lang/hlsl/hlsl.def
@@ -240,6 +240,12 @@
implicit(T: fiu32_f16) fn WaveReadLaneAt(T, u32) -> T
implicit(N: num, T: fiu32_f16) fn WaveReadLaneAt(vec<N, T>, u32) -> vec<N, T>
+implicit(T: f32_f16) fn modf(T, T) -> T
+implicit(N: num, T: f32_f16) fn modf(vec<N, T>, vec<N, T>) -> vec<N, T>
+
+implicit(T: f32_f16) fn frexp(T, T) -> T
+implicit(N: num, T: f32_f16) fn frexp(vec<N, T>, vec<N, T>) -> vec<N, T>
+
////////////////////////////////////////////////////////////////////////////////
// Member Functions //
////////////////////////////////////////////////////////////////////////////////
diff --git a/src/tint/lang/hlsl/intrinsic/data.cc b/src/tint/lang/hlsl/intrinsic/data.cc
index f2c9bb9..042221a 100644
--- a/src/tint/lang/hlsl/intrinsic/data.cc
+++ b/src/tint/lang/hlsl/intrinsic/data.cc
@@ -3252,67 +3252,67 @@
{
/* [368] */
/* usage */ core::ParameterUsage::kNone,
- /* matcher_indices */ MatcherIndicesIndex(0),
+ /* matcher_indices */ MatcherIndicesIndex(4),
},
{
/* [369] */
+ /* usage */ core::ParameterUsage::kNone,
+ /* matcher_indices */ MatcherIndicesIndex(4),
+ },
+ {
+ /* [370] */
+ /* usage */ core::ParameterUsage::kNone,
+ /* matcher_indices */ MatcherIndicesIndex(60),
+ },
+ {
+ /* [371] */
+ /* usage */ core::ParameterUsage::kNone,
+ /* matcher_indices */ MatcherIndicesIndex(60),
+ },
+ {
+ /* [372] */
+ /* usage */ core::ParameterUsage::kNone,
+ /* matcher_indices */ MatcherIndicesIndex(0),
+ },
+ {
+ /* [373] */
/* usage */ core::ParameterUsage::kOffset,
/* matcher_indices */ MatcherIndicesIndex(7),
},
{
- /* [370] */
+ /* [374] */
/* usage */ core::ParameterUsage::kTexture,
/* matcher_indices */ MatcherIndicesIndex(126),
},
{
- /* [371] */
+ /* [375] */
/* usage */ core::ParameterUsage::kLocation,
/* matcher_indices */ MatcherIndicesIndex(14),
},
{
- /* [372] */
+ /* [376] */
/* usage */ core::ParameterUsage::kTexture,
/* matcher_indices */ MatcherIndicesIndex(128),
},
{
- /* [373] */
- /* usage */ core::ParameterUsage::kLocation,
- /* matcher_indices */ MatcherIndicesIndex(130),
- },
- {
- /* [374] */
- /* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(132),
- },
- {
- /* [375] */
- /* usage */ core::ParameterUsage::kLocation,
- /* matcher_indices */ MatcherIndicesIndex(118),
- },
- {
- /* [376] */
- /* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(136),
- },
- {
/* [377] */
/* usage */ core::ParameterUsage::kLocation,
- /* matcher_indices */ MatcherIndicesIndex(118),
+ /* matcher_indices */ MatcherIndicesIndex(130),
},
{
/* [378] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(174),
+ /* matcher_indices */ MatcherIndicesIndex(132),
},
{
/* [379] */
/* usage */ core::ParameterUsage::kLocation,
- /* matcher_indices */ MatcherIndicesIndex(130),
+ /* matcher_indices */ MatcherIndicesIndex(118),
},
{
/* [380] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(175),
+ /* matcher_indices */ MatcherIndicesIndex(136),
},
{
/* [381] */
@@ -3322,67 +3322,67 @@
{
/* [382] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(102),
+ /* matcher_indices */ MatcherIndicesIndex(174),
},
{
/* [383] */
/* usage */ core::ParameterUsage::kLocation,
- /* matcher_indices */ MatcherIndicesIndex(14),
+ /* matcher_indices */ MatcherIndicesIndex(130),
},
{
/* [384] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(105),
+ /* matcher_indices */ MatcherIndicesIndex(175),
},
{
/* [385] */
/* usage */ core::ParameterUsage::kLocation,
- /* matcher_indices */ MatcherIndicesIndex(130),
+ /* matcher_indices */ MatcherIndicesIndex(118),
},
{
/* [386] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(108),
+ /* matcher_indices */ MatcherIndicesIndex(102),
},
{
/* [387] */
/* usage */ core::ParameterUsage::kLocation,
- /* matcher_indices */ MatcherIndicesIndex(118),
+ /* matcher_indices */ MatcherIndicesIndex(14),
},
{
/* [388] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(111),
+ /* matcher_indices */ MatcherIndicesIndex(105),
},
{
/* [389] */
/* usage */ core::ParameterUsage::kLocation,
- /* matcher_indices */ MatcherIndicesIndex(118),
+ /* matcher_indices */ MatcherIndicesIndex(130),
},
{
/* [390] */
- /* usage */ core::ParameterUsage::kNone,
- /* matcher_indices */ MatcherIndicesIndex(152),
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(108),
},
{
/* [391] */
- /* usage */ core::ParameterUsage::kWidth,
- /* matcher_indices */ MatcherIndicesIndex(11),
+ /* usage */ core::ParameterUsage::kLocation,
+ /* matcher_indices */ MatcherIndicesIndex(118),
},
{
/* [392] */
/* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(126),
+ /* matcher_indices */ MatcherIndicesIndex(111),
},
{
/* [393] */
- /* usage */ core::ParameterUsage::kWidth,
- /* matcher_indices */ MatcherIndicesIndex(11),
+ /* usage */ core::ParameterUsage::kLocation,
+ /* matcher_indices */ MatcherIndicesIndex(118),
},
{
/* [394] */
- /* usage */ core::ParameterUsage::kTexture,
- /* matcher_indices */ MatcherIndicesIndex(102),
+ /* usage */ core::ParameterUsage::kNone,
+ /* matcher_indices */ MatcherIndicesIndex(152),
},
{
/* [395] */
@@ -3391,37 +3391,57 @@
},
{
/* [396] */
- /* usage */ core::ParameterUsage::kNone,
- /* matcher_indices */ MatcherIndicesIndex(2),
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(126),
},
{
/* [397] */
- /* usage */ core::ParameterUsage::kNone,
- /* matcher_indices */ MatcherIndicesIndex(51),
+ /* usage */ core::ParameterUsage::kWidth,
+ /* matcher_indices */ MatcherIndicesIndex(11),
},
{
/* [398] */
- /* usage */ core::ParameterUsage::kNone,
- /* matcher_indices */ MatcherIndicesIndex(48),
+ /* usage */ core::ParameterUsage::kTexture,
+ /* matcher_indices */ MatcherIndicesIndex(102),
},
{
/* [399] */
- /* usage */ core::ParameterUsage::kNone,
- /* matcher_indices */ MatcherIndicesIndex(116),
+ /* usage */ core::ParameterUsage::kWidth,
+ /* matcher_indices */ MatcherIndicesIndex(11),
},
{
/* [400] */
/* usage */ core::ParameterUsage::kNone,
- /* matcher_indices */ MatcherIndicesIndex(118),
+ /* matcher_indices */ MatcherIndicesIndex(2),
},
{
/* [401] */
/* usage */ core::ParameterUsage::kNone,
- /* matcher_indices */ MatcherIndicesIndex(170),
+ /* matcher_indices */ MatcherIndicesIndex(51),
},
{
/* [402] */
/* usage */ core::ParameterUsage::kNone,
+ /* matcher_indices */ MatcherIndicesIndex(48),
+ },
+ {
+ /* [403] */
+ /* usage */ core::ParameterUsage::kNone,
+ /* matcher_indices */ MatcherIndicesIndex(116),
+ },
+ {
+ /* [404] */
+ /* usage */ core::ParameterUsage::kNone,
+ /* matcher_indices */ MatcherIndicesIndex(118),
+ },
+ {
+ /* [405] */
+ /* usage */ core::ParameterUsage::kNone,
+ /* matcher_indices */ MatcherIndicesIndex(170),
+ },
+ {
+ /* [406] */
+ /* usage */ core::ParameterUsage::kNone,
/* matcher_indices */ MatcherIndicesIndex(169),
},
};
@@ -3433,94 +3453,94 @@
{
/* [0] */
/* name */ "T",
- /* matcher_indices */ MatcherIndicesIndex(168),
+ /* matcher_indices */ MatcherIndicesIndex(166),
/* kind */ TemplateInfo::Kind::kType,
},
{
/* [1] */
- /* name */ "K",
+ /* name */ "N",
/* matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* kind */ TemplateInfo::Kind::kNumber,
},
{
/* [2] */
- /* name */ "C",
- /* matcher_indices */ MatcherIndicesIndex(/* invalid */),
- /* kind */ TemplateInfo::Kind::kNumber,
- },
- {
- /* [3] */
- /* name */ "R",
- /* matcher_indices */ MatcherIndicesIndex(/* invalid */),
- /* kind */ TemplateInfo::Kind::kNumber,
- },
- {
- /* [4] */
/* name */ "T",
/* matcher_indices */ MatcherIndicesIndex(168),
/* kind */ TemplateInfo::Kind::kType,
},
{
- /* [5] */
+ /* [3] */
+ /* name */ "K",
+ /* matcher_indices */ MatcherIndicesIndex(/* invalid */),
+ /* kind */ TemplateInfo::Kind::kNumber,
+ },
+ {
+ /* [4] */
/* name */ "C",
/* matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* kind */ TemplateInfo::Kind::kNumber,
},
{
- /* [6] */
+ /* [5] */
/* name */ "R",
/* matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* kind */ TemplateInfo::Kind::kNumber,
},
{
- /* [7] */
+ /* [6] */
/* name */ "T",
- /* matcher_indices */ MatcherIndicesIndex(166),
+ /* matcher_indices */ MatcherIndicesIndex(168),
/* kind */ TemplateInfo::Kind::kType,
},
{
+ /* [7] */
+ /* name */ "C",
+ /* matcher_indices */ MatcherIndicesIndex(/* invalid */),
+ /* kind */ TemplateInfo::Kind::kNumber,
+ },
+ {
/* [8] */
- /* name */ "N",
+ /* name */ "R",
/* matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* kind */ TemplateInfo::Kind::kNumber,
},
{
/* [9] */
/* name */ "T",
- /* matcher_indices */ MatcherIndicesIndex(171),
- /* kind */ TemplateInfo::Kind::kType,
- },
- {
- /* [10] */
- /* name */ "T",
/* matcher_indices */ MatcherIndicesIndex(167),
/* kind */ TemplateInfo::Kind::kType,
},
{
- /* [11] */
+ /* [10] */
/* name */ "N",
/* matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* kind */ TemplateInfo::Kind::kNumber,
},
{
- /* [12] */
+ /* [11] */
/* name */ "T",
- /* matcher_indices */ MatcherIndicesIndex(172),
+ /* matcher_indices */ MatcherIndicesIndex(171),
/* kind */ TemplateInfo::Kind::kType,
},
{
- /* [13] */
+ /* [12] */
/* name */ "T",
/* matcher_indices */ MatcherIndicesIndex(18),
/* kind */ TemplateInfo::Kind::kType,
},
{
- /* [14] */
+ /* [13] */
/* name */ "N",
/* matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* kind */ TemplateInfo::Kind::kNumber,
},
{
+ /* [14] */
+ /* name */ "T",
+ /* matcher_indices */ MatcherIndicesIndex(172),
+ /* kind */ TemplateInfo::Kind::kType,
+ },
+ {
/* [15] */
/* name */ "F",
/* matcher_indices */ MatcherIndicesIndex(64),
@@ -3593,7 +3613,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(22),
- /* parameters */ ParameterIndex(390),
+ /* parameters */ ParameterIndex(394),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -3604,7 +3624,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(24),
- /* parameters */ ParameterIndex(392),
+ /* parameters */ ParameterIndex(396),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -3626,7 +3646,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(21),
- /* parameters */ ParameterIndex(394),
+ /* parameters */ ParameterIndex(398),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -3890,7 +3910,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(368),
+ /* parameters */ ParameterIndex(372),
/* return_matcher_indices */ MatcherIndicesIndex(7),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -3901,7 +3921,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(24),
- /* parameters */ ParameterIndex(370),
+ /* parameters */ ParameterIndex(374),
/* return_matcher_indices */ MatcherIndicesIndex(124),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -3912,7 +3932,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(24),
- /* parameters */ ParameterIndex(372),
+ /* parameters */ ParameterIndex(376),
/* return_matcher_indices */ MatcherIndicesIndex(124),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -3923,7 +3943,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(24),
- /* parameters */ ParameterIndex(374),
+ /* parameters */ ParameterIndex(378),
/* return_matcher_indices */ MatcherIndicesIndex(124),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -3945,7 +3965,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 1,
/* templates */ TemplateIndex(24),
- /* parameters */ ParameterIndex(376),
+ /* parameters */ ParameterIndex(380),
/* return_matcher_indices */ MatcherIndicesIndex(124),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -3956,7 +3976,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(378),
+ /* parameters */ ParameterIndex(382),
/* return_matcher_indices */ MatcherIndicesIndex(120),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -3967,7 +3987,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(380),
+ /* parameters */ ParameterIndex(384),
/* return_matcher_indices */ MatcherIndicesIndex(120),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -3989,7 +4009,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(15),
- /* parameters */ ParameterIndex(382),
+ /* parameters */ ParameterIndex(386),
/* return_matcher_indices */ MatcherIndicesIndex(120),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -4000,7 +4020,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(15),
- /* parameters */ ParameterIndex(384),
+ /* parameters */ ParameterIndex(388),
/* return_matcher_indices */ MatcherIndicesIndex(120),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -4011,7 +4031,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(15),
- /* parameters */ ParameterIndex(386),
+ /* parameters */ ParameterIndex(390),
/* return_matcher_indices */ MatcherIndicesIndex(120),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -4022,7 +4042,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(15),
- /* parameters */ ParameterIndex(388),
+ /* parameters */ ParameterIndex(392),
/* return_matcher_indices */ MatcherIndicesIndex(120),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -4033,7 +4053,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(17),
- /* parameters */ ParameterIndex(382),
+ /* parameters */ ParameterIndex(386),
/* return_matcher_indices */ MatcherIndicesIndex(116),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -4044,7 +4064,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(17),
- /* parameters */ ParameterIndex(384),
+ /* parameters */ ParameterIndex(388),
/* return_matcher_indices */ MatcherIndicesIndex(116),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -4055,7 +4075,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(17),
- /* parameters */ ParameterIndex(386),
+ /* parameters */ ParameterIndex(390),
/* return_matcher_indices */ MatcherIndicesIndex(116),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -4066,7 +4086,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(17),
- /* parameters */ ParameterIndex(388),
+ /* parameters */ ParameterIndex(392),
/* return_matcher_indices */ MatcherIndicesIndex(116),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -4077,7 +4097,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(19),
- /* parameters */ ParameterIndex(382),
+ /* parameters */ ParameterIndex(386),
/* return_matcher_indices */ MatcherIndicesIndex(118),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -4088,7 +4108,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(19),
- /* parameters */ ParameterIndex(384),
+ /* parameters */ ParameterIndex(388),
/* return_matcher_indices */ MatcherIndicesIndex(118),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -4099,7 +4119,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(19),
- /* parameters */ ParameterIndex(386),
+ /* parameters */ ParameterIndex(390),
/* return_matcher_indices */ MatcherIndicesIndex(118),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -4110,7 +4130,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 2,
/* templates */ TemplateIndex(19),
- /* parameters */ ParameterIndex(388),
+ /* parameters */ ParameterIndex(392),
/* return_matcher_indices */ MatcherIndicesIndex(118),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -5011,7 +5031,7 @@
/* num_parameters */ 2,
/* num_explicit_templates */ 0,
/* num_templates */ 3,
- /* templates */ TemplateIndex(4),
+ /* templates */ TemplateIndex(6),
/* parameters */ ParameterIndex(358),
/* return_matcher_indices */ MatcherIndicesIndex(54),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
@@ -5022,7 +5042,7 @@
/* num_parameters */ 2,
/* num_explicit_templates */ 0,
/* num_templates */ 3,
- /* templates */ TemplateIndex(4),
+ /* templates */ TemplateIndex(6),
/* parameters */ ParameterIndex(360),
/* return_matcher_indices */ MatcherIndicesIndex(39),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
@@ -5033,7 +5053,7 @@
/* num_parameters */ 2,
/* num_explicit_templates */ 0,
/* num_templates */ 4,
- /* templates */ TemplateIndex(0),
+ /* templates */ TemplateIndex(2),
/* parameters */ ParameterIndex(362),
/* return_matcher_indices */ MatcherIndicesIndex(24),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
@@ -5044,7 +5064,7 @@
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
/* num_templates */ 1,
- /* templates */ TemplateIndex(7),
+ /* templates */ TemplateIndex(0),
/* parameters */ ParameterIndex(364),
/* return_matcher_indices */ MatcherIndicesIndex(8),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
@@ -5055,7 +5075,7 @@
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
/* num_templates */ 2,
- /* templates */ TemplateIndex(7),
+ /* templates */ TemplateIndex(0),
/* parameters */ ParameterIndex(359),
/* return_matcher_indices */ MatcherIndicesIndex(36),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
@@ -5066,7 +5086,7 @@
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
/* num_templates */ 1,
- /* templates */ TemplateIndex(10),
+ /* templates */ TemplateIndex(9),
/* parameters */ ParameterIndex(364),
/* return_matcher_indices */ MatcherIndicesIndex(7),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
@@ -5077,7 +5097,7 @@
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
/* num_templates */ 2,
- /* templates */ TemplateIndex(10),
+ /* templates */ TemplateIndex(9),
/* parameters */ ParameterIndex(359),
/* return_matcher_indices */ MatcherIndicesIndex(42),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
@@ -5088,7 +5108,7 @@
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
/* num_templates */ 1,
- /* templates */ TemplateIndex(13),
+ /* templates */ TemplateIndex(12),
/* parameters */ ParameterIndex(364),
/* return_matcher_indices */ MatcherIndicesIndex(2),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
@@ -5099,7 +5119,7 @@
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
/* num_templates */ 2,
- /* templates */ TemplateIndex(13),
+ /* templates */ TemplateIndex(12),
/* parameters */ ParameterIndex(359),
/* return_matcher_indices */ MatcherIndicesIndex(45),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
@@ -5111,7 +5131,7 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(396),
+ /* parameters */ ParameterIndex(400),
/* return_matcher_indices */ MatcherIndicesIndex(7),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -5121,8 +5141,8 @@
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
/* num_templates */ 1,
- /* templates */ TemplateIndex(8),
- /* parameters */ ParameterIndex(397),
+ /* templates */ TemplateIndex(1),
+ /* parameters */ ParameterIndex(401),
/* return_matcher_indices */ MatcherIndicesIndex(48),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -5143,8 +5163,8 @@
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
/* num_templates */ 1,
- /* templates */ TemplateIndex(8),
- /* parameters */ ParameterIndex(398),
+ /* templates */ TemplateIndex(1),
+ /* parameters */ ParameterIndex(402),
/* return_matcher_indices */ MatcherIndicesIndex(51),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
@@ -5154,7 +5174,7 @@
/* num_parameters */ 4,
/* num_explicit_templates */ 0,
/* num_templates */ 1,
- /* templates */ TemplateIndex(13),
+ /* templates */ TemplateIndex(12),
/* parameters */ ParameterIndex(143),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
@@ -5176,7 +5196,7 @@
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
/* num_templates */ 1,
- /* templates */ TemplateIndex(13),
+ /* templates */ TemplateIndex(12),
/* parameters */ ParameterIndex(265),
/* return_matcher_indices */ MatcherIndicesIndex(/* invalid */),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
@@ -5198,7 +5218,7 @@
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
/* num_templates */ 1,
- /* templates */ TemplateIndex(9),
+ /* templates */ TemplateIndex(11),
/* parameters */ ParameterIndex(364),
/* return_matcher_indices */ MatcherIndicesIndex(8),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
@@ -5209,7 +5229,7 @@
/* num_parameters */ 1,
/* num_explicit_templates */ 0,
/* num_templates */ 2,
- /* templates */ TemplateIndex(8),
+ /* templates */ TemplateIndex(10),
/* parameters */ ParameterIndex(366),
/* return_matcher_indices */ MatcherIndicesIndex(57),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
@@ -5220,7 +5240,7 @@
/* num_parameters */ 2,
/* num_explicit_templates */ 0,
/* num_templates */ 1,
- /* templates */ TemplateIndex(12),
+ /* templates */ TemplateIndex(14),
/* parameters */ ParameterIndex(364),
/* return_matcher_indices */ MatcherIndicesIndex(4),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
@@ -5231,7 +5251,7 @@
/* num_parameters */ 2,
/* num_explicit_templates */ 0,
/* num_templates */ 2,
- /* templates */ TemplateIndex(11),
+ /* templates */ TemplateIndex(13),
/* parameters */ ParameterIndex(366),
/* return_matcher_indices */ MatcherIndicesIndex(60),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
@@ -5239,6 +5259,28 @@
{
/* [150] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* num_parameters */ 2,
+ /* num_explicit_templates */ 0,
+ /* num_templates */ 1,
+ /* templates */ TemplateIndex(2),
+ /* parameters */ ParameterIndex(368),
+ /* return_matcher_indices */ MatcherIndicesIndex(4),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [151] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
+ /* num_parameters */ 2,
+ /* num_explicit_templates */ 0,
+ /* num_templates */ 2,
+ /* templates */ TemplateIndex(1),
+ /* parameters */ ParameterIndex(370),
+ /* return_matcher_indices */ MatcherIndicesIndex(60),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [152] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
/* num_templates */ 0,
@@ -5248,7 +5290,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [151] */
+ /* [153] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
@@ -5259,36 +5301,14 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [152] */
- /* 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(399),
- /* return_matcher_indices */ MatcherIndicesIndex(169),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
- /* [153] */
- /* 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(400),
- /* return_matcher_indices */ MatcherIndicesIndex(170),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
/* [154] */
/* 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(401),
- /* return_matcher_indices */ MatcherIndicesIndex(118),
+ /* parameters */ ParameterIndex(403),
+ /* return_matcher_indices */ MatcherIndicesIndex(169),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
@@ -5298,13 +5318,35 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(402),
- /* return_matcher_indices */ MatcherIndicesIndex(116),
+ /* parameters */ ParameterIndex(404),
+ /* return_matcher_indices */ MatcherIndicesIndex(170),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
/* [156] */
/* 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(405),
+ /* return_matcher_indices */ MatcherIndicesIndex(118),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [157] */
+ /* 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(406),
+ /* return_matcher_indices */ MatcherIndicesIndex(116),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [158] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
/* num_parameters */ 0,
/* num_explicit_templates */ 0,
/* num_templates */ 0,
@@ -5314,36 +5356,14 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [157] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
- /* num_parameters */ 2,
- /* num_explicit_templates */ 0,
- /* num_templates */ 0,
- /* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(368),
- /* return_matcher_indices */ MatcherIndicesIndex(65),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
- /* [158] */
- /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
- /* num_parameters */ 2,
- /* num_explicit_templates */ 0,
- /* num_templates */ 0,
- /* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(368),
- /* return_matcher_indices */ MatcherIndicesIndex(138),
- /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
- },
- {
/* [159] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
/* num_parameters */ 2,
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(368),
- /* return_matcher_indices */ MatcherIndicesIndex(116),
+ /* parameters */ ParameterIndex(372),
+ /* return_matcher_indices */ MatcherIndicesIndex(65),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
@@ -5353,8 +5373,8 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(368),
- /* return_matcher_indices */ MatcherIndicesIndex(5),
+ /* parameters */ ParameterIndex(372),
+ /* return_matcher_indices */ MatcherIndicesIndex(138),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
@@ -5364,8 +5384,8 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(368),
- /* return_matcher_indices */ MatcherIndicesIndex(69),
+ /* parameters */ ParameterIndex(372),
+ /* return_matcher_indices */ MatcherIndicesIndex(116),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
@@ -5375,8 +5395,8 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(368),
- /* return_matcher_indices */ MatcherIndicesIndex(140),
+ /* parameters */ ParameterIndex(372),
+ /* return_matcher_indices */ MatcherIndicesIndex(5),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
@@ -5386,13 +5406,35 @@
/* num_explicit_templates */ 0,
/* num_templates */ 0,
/* templates */ TemplateIndex(/* invalid */),
- /* parameters */ ParameterIndex(368),
- /* return_matcher_indices */ MatcherIndicesIndex(142),
+ /* parameters */ ParameterIndex(372),
+ /* return_matcher_indices */ MatcherIndicesIndex(69),
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
/* [164] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+ /* num_parameters */ 2,
+ /* num_explicit_templates */ 0,
+ /* num_templates */ 0,
+ /* templates */ TemplateIndex(/* invalid */),
+ /* parameters */ ParameterIndex(372),
+ /* return_matcher_indices */ MatcherIndicesIndex(140),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [165] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+ /* num_parameters */ 2,
+ /* num_explicit_templates */ 0,
+ /* num_templates */ 0,
+ /* templates */ TemplateIndex(/* invalid */),
+ /* parameters */ ParameterIndex(372),
+ /* return_matcher_indices */ MatcherIndicesIndex(142),
+ /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+ },
+ {
+ /* [166] */
+ /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
/* num_templates */ 0,
@@ -5402,7 +5444,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [165] */
+ /* [167] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
@@ -5413,7 +5455,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [166] */
+ /* [168] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
@@ -5424,7 +5466,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [167] */
+ /* [169] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
@@ -5435,7 +5477,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [168] */
+ /* [170] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
@@ -5446,7 +5488,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [169] */
+ /* [171] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
@@ -5457,7 +5499,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [170] */
+ /* [172] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
@@ -5468,7 +5510,7 @@
/* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
},
{
- /* [171] */
+ /* [173] */
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
/* num_parameters */ 3,
/* num_explicit_templates */ 0,
@@ -5509,13 +5551,13 @@
/* [3] */
/* fn dot4add_i8packed(u32, u32, ptr<function, i32, writable>) -> i32 */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(150),
+ /* overloads */ OverloadIndex(152),
},
{
/* [4] */
/* fn dot4add_u8packed(u32, u32, ptr<function, u32, writable>) -> u32 */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(151),
+ /* overloads */ OverloadIndex(153),
},
{
/* [5] */
@@ -5599,19 +5641,19 @@
/* [16] */
/* fn pack_u8(vec4<u32>) -> uint8_t4_packed */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(152),
+ /* overloads */ OverloadIndex(154),
},
{
/* [17] */
/* fn pack_s8(vec4<i32>) -> int8_t4_packed */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(153),
+ /* overloads */ OverloadIndex(155),
},
{
/* [18] */
/* fn pack_clamp_s8(vec4<i32>) -> int8_t4_packed */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(153),
+ /* overloads */ OverloadIndex(155),
},
{
/* [19] */
@@ -5641,25 +5683,25 @@
/* [21] */
/* fn unpack_s8s32(int8_t4_packed) -> vec4<i32> */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(154),
+ /* overloads */ OverloadIndex(156),
},
{
/* [22] */
/* fn unpack_u8u32(uint8_t4_packed) -> vec4<u32> */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(155),
+ /* overloads */ OverloadIndex(157),
},
{
/* [23] */
/* fn WaveGetLaneIndex() -> u32 */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(156),
+ /* overloads */ OverloadIndex(158),
},
{
/* [24] */
/* fn WaveGetLaneCount() -> u32 */
/* num overloads */ 1,
- /* overloads */ OverloadIndex(156),
+ /* overloads */ OverloadIndex(158),
},
{
/* [25] */
@@ -5670,6 +5712,20 @@
},
{
/* [26] */
+ /* fn modf[T : f32_f16](T, T) -> T */
+ /* fn modf[N : num, T : f32_f16](vec<N, T>, vec<N, T>) -> vec<N, T> */
+ /* num overloads */ 2,
+ /* overloads */ OverloadIndex(150),
+ },
+ {
+ /* [27] */
+ /* fn frexp[T : f32_f16](T, T) -> T */
+ /* fn frexp[N : num, T : f32_f16](vec<N, T>, vec<N, T>) -> vec<N, T> */
+ /* num overloads */ 2,
+ /* overloads */ OverloadIndex(150),
+ },
+ {
+ /* [28] */
/* fn Load(byte_address_buffer<readable>, offset: u32) -> u32 */
/* fn Load[T : fiu32](texture: texture_1d<T>, location: vec2<i32>) -> vec4<T> */
/* fn Load[T : fiu32](texture: texture_2d<T>, location: vec3<i32>) -> vec4<T> */
@@ -5695,97 +5751,97 @@
/* overloads */ OverloadIndex(27),
},
{
- /* [27] */
- /* fn Load2(byte_address_buffer<readable>, offset: u32) -> vec2<u32> */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(157),
- },
- {
- /* [28] */
- /* fn Load3(byte_address_buffer<readable>, offset: u32) -> vec3<u32> */
- /* num overloads */ 1,
- /* overloads */ OverloadIndex(158),
- },
- {
/* [29] */
- /* fn Load4(byte_address_buffer<readable>, offset: u32) -> vec4<u32> */
+ /* fn Load2(byte_address_buffer<readable>, offset: u32) -> vec2<u32> */
/* num overloads */ 1,
/* overloads */ OverloadIndex(159),
},
{
/* [30] */
- /* fn LoadF16(byte_address_buffer<readable>, offset: u32) -> f16 */
+ /* fn Load3(byte_address_buffer<readable>, offset: u32) -> vec3<u32> */
/* num overloads */ 1,
/* overloads */ OverloadIndex(160),
},
{
/* [31] */
- /* fn Load2F16(byte_address_buffer<readable>, offset: u32) -> vec2<f16> */
+ /* fn Load4(byte_address_buffer<readable>, offset: u32) -> vec4<u32> */
/* num overloads */ 1,
/* overloads */ OverloadIndex(161),
},
{
/* [32] */
- /* fn Load3F16(byte_address_buffer<readable>, offset: u32) -> vec3<f16> */
+ /* fn LoadF16(byte_address_buffer<readable>, offset: u32) -> f16 */
/* num overloads */ 1,
/* overloads */ OverloadIndex(162),
},
{
/* [33] */
- /* fn Load4F16(byte_address_buffer<readable>, offset: u32) -> vec4<f16> */
+ /* fn Load2F16(byte_address_buffer<readable>, offset: u32) -> vec2<f16> */
/* num overloads */ 1,
/* overloads */ OverloadIndex(163),
},
{
/* [34] */
- /* fn Store(byte_address_buffer<writable>, offset: u32, value: u32) */
+ /* fn Load3F16(byte_address_buffer<readable>, offset: u32) -> vec3<f16> */
/* num overloads */ 1,
/* overloads */ OverloadIndex(164),
},
{
/* [35] */
- /* fn Store2(byte_address_buffer<writable>, offset: u32, value: vec2<u32>) */
+ /* fn Load4F16(byte_address_buffer<readable>, offset: u32) -> vec4<f16> */
/* num overloads */ 1,
/* overloads */ OverloadIndex(165),
},
{
/* [36] */
- /* fn Store3(byte_address_buffer<writable>, offset: u32, value: vec3<u32>) */
+ /* fn Store(byte_address_buffer<writable>, offset: u32, value: u32) */
/* num overloads */ 1,
/* overloads */ OverloadIndex(166),
},
{
/* [37] */
- /* fn Store4(byte_address_buffer<writable>, offset: u32, value: vec4<u32>) */
+ /* fn Store2(byte_address_buffer<writable>, offset: u32, value: vec2<u32>) */
/* num overloads */ 1,
/* overloads */ OverloadIndex(167),
},
{
/* [38] */
- /* fn StoreF16(byte_address_buffer<writable>, offset: u32, value: f16) */
+ /* fn Store3(byte_address_buffer<writable>, offset: u32, value: vec3<u32>) */
/* num overloads */ 1,
/* overloads */ OverloadIndex(168),
},
{
/* [39] */
- /* fn Store2F16(byte_address_buffer<writable>, offset: u32, value: vec2<f16>) */
+ /* fn Store4(byte_address_buffer<writable>, offset: u32, value: vec4<u32>) */
/* num overloads */ 1,
/* overloads */ OverloadIndex(169),
},
{
/* [40] */
- /* fn Store3F16(byte_address_buffer<writable>, offset: u32, value: vec3<f16>) */
+ /* fn StoreF16(byte_address_buffer<writable>, offset: u32, value: f16) */
/* num overloads */ 1,
/* overloads */ OverloadIndex(170),
},
{
/* [41] */
- /* fn Store4F16(byte_address_buffer<writable>, offset: u32, value: vec4<f16>) */
+ /* fn Store2F16(byte_address_buffer<writable>, offset: u32, value: vec2<f16>) */
/* num overloads */ 1,
/* overloads */ OverloadIndex(171),
},
{
/* [42] */
+ /* fn Store3F16(byte_address_buffer<writable>, offset: u32, value: vec3<f16>) */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(172),
+ },
+ {
+ /* [43] */
+ /* fn Store4F16(byte_address_buffer<writable>, offset: u32, value: vec4<f16>) */
+ /* num overloads */ 1,
+ /* overloads */ OverloadIndex(173),
+ },
+ {
+ /* [44] */
/* fn GatherCmp(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> vec4<f32> */
/* fn GatherCmp(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, offset: vec2<i32>) -> vec4<f32> */
/* fn GatherCmp(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> vec4<f32> */
@@ -5796,7 +5852,7 @@
/* overloads */ OverloadIndex(105),
},
{
- /* [43] */
+ /* [45] */
/* fn Gather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> vec4<f32> */
/* fn Gather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<f32> */
/* fn Gather(texture: texture_depth_2d_array, sampler: sampler, coords: vec3<f32>) -> vec4<f32> */
@@ -5807,7 +5863,7 @@
/* overloads */ OverloadIndex(111),
},
{
- /* [44] */
+ /* [46] */
/* fn GatherAlpha[T : fiu32](texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>) -> vec4<T> */
/* fn GatherAlpha[T : fiu32](texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<T> */
/* fn GatherAlpha[T : fiu32](texture: texture_2d_array<T>, sampler: sampler, coords: vec3<f32>) -> vec4<T> */
@@ -5818,7 +5874,7 @@
/* overloads */ OverloadIndex(117),
},
{
- /* [45] */
+ /* [47] */
/* fn GatherBlue[T : fiu32](texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>) -> vec4<T> */
/* fn GatherBlue[T : fiu32](texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<T> */
/* fn GatherBlue[T : fiu32](texture: texture_2d_array<T>, sampler: sampler, coords: vec3<f32>) -> vec4<T> */
@@ -5829,7 +5885,7 @@
/* overloads */ OverloadIndex(117),
},
{
- /* [46] */
+ /* [48] */
/* fn GatherGreen[T : fiu32](texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>) -> vec4<T> */
/* fn GatherGreen[T : fiu32](texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<T> */
/* fn GatherGreen[T : fiu32](texture: texture_2d_array<T>, sampler: sampler, coords: vec3<f32>) -> vec4<T> */
@@ -5840,7 +5896,7 @@
/* overloads */ OverloadIndex(117),
},
{
- /* [47] */
+ /* [49] */
/* fn GatherRed[T : fiu32](texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>) -> vec4<T> */
/* fn GatherRed[T : fiu32](texture: texture_2d<T>, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<T> */
/* fn GatherRed[T : fiu32](texture: texture_2d_array<T>, sampler: sampler, coords: vec3<f32>) -> vec4<T> */
@@ -5851,7 +5907,7 @@
/* overloads */ OverloadIndex(117),
},
{
- /* [48] */
+ /* [50] */
/* fn GetDimensions[A : access](byte_address_buffer<A>, width: ptr<function, u32, writable>) */
/* fn GetDimensions[T : fiu32](texture: texture_1d<T>, width: ptr<function, u32, writable>) */
/* fn GetDimensions[T : fiu32](texture: texture_1d<T>, level: u32, width: ptr<function, u32, writable>, num_levels: ptr<function, u32, writable>) */
@@ -5883,7 +5939,7 @@
/* overloads */ OverloadIndex(0),
},
{
- /* [49] */
+ /* [51] */
/* fn Sample(texture: texture_1d<f32>, sampler: sampler, coords: f32) -> vec4<f32> */
/* fn Sample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32> */
/* fn Sample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, offset: vec2<i32>) -> vec4<f32> */
@@ -5903,7 +5959,7 @@
/* overloads */ OverloadIndex(48),
},
{
- /* [50] */
+ /* [52] */
/* fn SampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32) -> vec4<f32> */
/* fn SampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32, offset: vec2<i32>) -> vec4<f32> */
/* fn SampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32> */
@@ -5916,7 +5972,7 @@
/* overloads */ OverloadIndex(89),
},
{
- /* [51] */
+ /* [53] */
/* fn SampleCmp(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, value: f32) -> f32 */
/* fn SampleCmp(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, value: f32, offset: vec2<i32>) -> f32 */
/* fn SampleCmp(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec3<f32>, value: f32) -> f32 */
@@ -5927,7 +5983,7 @@
/* overloads */ OverloadIndex(123),
},
{
- /* [52] */
+ /* [54] */
/* fn SampleCmpLevelZero(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, value: f32) -> f32 */
/* fn SampleCmpLevelZero(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, value: f32, offset: vec2<i32>) -> f32 */
/* fn SampleCmpLevelZero(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec3<f32>, value: f32) -> f32 */
@@ -5938,7 +5994,7 @@
/* overloads */ OverloadIndex(123),
},
{
- /* [53] */
+ /* [55] */
/* fn SampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32> */
/* fn SampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>, offset: vec2<i32>) -> vec4<f32> */
/* fn SampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32> */
@@ -5951,7 +6007,7 @@
/* overloads */ OverloadIndex(97),
},
{
- /* [54] */
+ /* [56] */
/* fn SampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32) -> vec4<f32> */
/* fn SampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32, offset: vec2<i32>) -> vec4<f32> */
/* fn SampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32> */
diff --git a/src/tint/lang/hlsl/writer/raise/builtin_polyfill.cc b/src/tint/lang/hlsl/writer/raise/builtin_polyfill.cc
index 04e2e05..ac6b7a6 100644
--- a/src/tint/lang/hlsl/writer/raise/builtin_polyfill.cc
+++ b/src/tint/lang/hlsl/writer/raise/builtin_polyfill.cc
@@ -104,6 +104,8 @@
case core::BuiltinFn::kCountOneBits:
case core::BuiltinFn::kDot4I8Packed:
case core::BuiltinFn::kDot4U8Packed:
+ case core::BuiltinFn::kFrexp:
+ case core::BuiltinFn::kModf:
case core::BuiltinFn::kPack2X16Float:
case core::BuiltinFn::kPack2X16Snorm:
case core::BuiltinFn::kPack2X16Unorm:
@@ -226,6 +228,12 @@
case core::BuiltinFn::kDot4U8Packed:
Dot4U8Packed(call);
break;
+ case core::BuiltinFn::kFrexp:
+ Frexp(call);
+ break;
+ case core::BuiltinFn::kModf:
+ Modf(call);
+ break;
case core::BuiltinFn::kPack2X16Float:
Pack2x16Float(call);
break;
@@ -754,17 +762,16 @@
// The HLSL `sign` method always returns an `int` result (scalar or vector). In WGSL the result
// is expected to be the same type as the argument. This injects a cast to the expected WGSL
// result type after the call to `hlsl.sign`.
+ core::ir::Instruction* BuildSign(core::ir::Value* value) {
+ const auto* result_ty = ty.MatchWidth(ty.i32(), value->Type());
+ auto* sign = b.Call<hlsl::ir::BuiltinCall>(result_ty, hlsl::BuiltinFn::kSign, value);
+ return b.Convert(value->Type(), sign);
+ }
+
void Sign(core::ir::BuiltinCall* call) {
b.InsertBefore(call, [&] {
- const core::type::Type* result_ty = ty.i32();
- if (auto* vec = call->Result(0)->Type()->As<core::type::Vector>()) {
- result_ty = ty.vec(result_ty, vec->Width());
- }
-
- auto* sign =
- b.Call<hlsl::ir::BuiltinCall>(result_ty, hlsl::BuiltinFn::kSign, call->Args()[0]);
-
- b.ConvertWithResult(call->DetachResult(), sign);
+ auto* sign = BuildSign(call->Args()[0]);
+ sign->SetResults(Vector{call->DetachResult()});
});
call->Destroy();
}
@@ -1747,6 +1754,44 @@
call->Destroy();
}
+ void Frexp(core::ir::CoreBuiltinCall* call) {
+ auto arg = call->Args()[0];
+ b.InsertBefore(call, [&] {
+ auto* arg_ty = arg->Type();
+ auto* arg_i32_ty = ty.MatchWidth(ty.i32(), arg_ty);
+ // Note: WGSL's frexp expects an i32 for exp, but HLSL expects f32 (same type as first
+ // arg), so we use a temp f32 var that we convert to i32 later.
+ auto* exp_out = b.Var(ty.ptr<function>(arg_ty));
+ // HLSL frexp writes exponent part to second out param, and returns the fraction
+ // (mantissa) part.
+ auto* call_result = b.Call<hlsl::ir::BuiltinCall>(arg_ty, hlsl::BuiltinFn::kFrexp, arg,
+ b.Load(exp_out));
+ // The returned exponent is always positive, but for WGSL, we want it to keep the sign
+ // of the input value.
+ auto* arg_sign = BuildSign(arg);
+ b.Store(exp_out, b.Multiply(arg_ty, arg_sign, b.Load(exp_out)));
+ // Replace the call with new result struct
+ b.ConstructWithResult(call->DetachResult(), call_result,
+ b.Convert(arg_i32_ty, b.Load(exp_out)));
+ });
+ call->Destroy();
+ }
+
+ void Modf(core::ir::CoreBuiltinCall* call) {
+ auto arg = call->Args()[0];
+ b.InsertBefore(call, [&] {
+ auto* arg_ty = arg->Type();
+ auto* whole = b.Var(ty.ptr<function>(arg_ty));
+ // HLSL modf writes whole (integer) part to second out param, and returns the fractional
+ // part.
+ auto* call_result =
+ b.Call<hlsl::ir::BuiltinCall>(arg_ty, hlsl::BuiltinFn::kModf, arg, b.Load(whole));
+ // Replace the call with new result struct
+ b.ConstructWithResult(call->DetachResult(), call_result, b.Load(whole));
+ });
+ call->Destroy();
+ }
+
void QuantizeToF16(core::ir::CoreBuiltinCall* call) {
auto* u32_type = ty.MatchWidth(ty.u32(), call->Result(0)->Type());
b.InsertBefore(call, [&] {
diff --git a/src/tint/lang/hlsl/writer/raise/builtin_polyfill_test.cc b/src/tint/lang/hlsl/writer/raise/builtin_polyfill_test.cc
index e5e05d1..036db8a 100644
--- a/src/tint/lang/hlsl/writer/raise/builtin_polyfill_test.cc
+++ b/src/tint/lang/hlsl/writer/raise/builtin_polyfill_test.cc
@@ -7222,5 +7222,225 @@
EXPECT_EQ(expect, str());
}
+TEST_F(HlslWriter_BuiltinPolyfillTest, Modf_f32) {
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* arg_ty = ty.f32();
+ auto* v = b.Var(ty.ptr<function>(arg_ty));
+ b.Let("a", b.Call(core::type::CreateModfResult(ty, mod.symbols, arg_ty),
+ core::BuiltinFn::kModf, b.Load(v)));
+ b.Return(func);
+ });
+
+ auto* src = R"(
+__modf_result_f32 = struct @align(4) {
+ fract:f32 @offset(0)
+ whole:f32 @offset(4)
+}
+
+%foo = @fragment func():void {
+ $B1: {
+ %2:ptr<function, f32, read_write> = var
+ %3:f32 = load %2
+ %4:__modf_result_f32 = modf %3
+ %a:__modf_result_f32 = let %4
+ ret
+ }
+}
+)";
+ EXPECT_EQ(src, str());
+
+ auto* expect = R"(
+__modf_result_f32 = struct @align(4) {
+ fract:f32 @offset(0)
+ whole:f32 @offset(4)
+}
+
+%foo = @fragment func():void {
+ $B1: {
+ %2:ptr<function, f32, read_write> = var
+ %3:f32 = load %2
+ %4:ptr<function, f32, read_write> = var
+ %5:f32 = load %4
+ %6:f32 = hlsl.modf %3, %5
+ %7:f32 = load %4
+ %8:__modf_result_f32 = construct %6, %7
+ %a:__modf_result_f32 = let %8
+ ret
+ }
+}
+)";
+ Run(BuiltinPolyfill);
+ EXPECT_EQ(expect, str());
+}
+
+TEST_F(HlslWriter_BuiltinPolyfillTest, Modf_vec_f32) {
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* arg_ty = ty.vec3<f32>();
+ auto* v = b.Var(ty.ptr<function>(arg_ty));
+ b.Let("a", b.Call(core::type::CreateModfResult(ty, mod.symbols, arg_ty),
+ core::BuiltinFn::kModf, b.Load(v)));
+ b.Return(func);
+ });
+
+ auto* src = R"(
+__modf_result_vec3_f32 = struct @align(16) {
+ fract:vec3<f32> @offset(0)
+ whole:vec3<f32> @offset(16)
+}
+
+%foo = @fragment func():void {
+ $B1: {
+ %2:ptr<function, vec3<f32>, read_write> = var
+ %3:vec3<f32> = load %2
+ %4:__modf_result_vec3_f32 = modf %3
+ %a:__modf_result_vec3_f32 = let %4
+ ret
+ }
+}
+)";
+ EXPECT_EQ(src, str());
+
+ auto* expect = R"(
+__modf_result_vec3_f32 = struct @align(16) {
+ fract:vec3<f32> @offset(0)
+ whole:vec3<f32> @offset(16)
+}
+
+%foo = @fragment func():void {
+ $B1: {
+ %2:ptr<function, vec3<f32>, read_write> = var
+ %3:vec3<f32> = load %2
+ %4:ptr<function, vec3<f32>, read_write> = var
+ %5:vec3<f32> = load %4
+ %6:vec3<f32> = hlsl.modf %3, %5
+ %7:vec3<f32> = load %4
+ %8:__modf_result_vec3_f32 = construct %6, %7
+ %a:__modf_result_vec3_f32 = let %8
+ ret
+ }
+}
+)";
+ Run(BuiltinPolyfill);
+ EXPECT_EQ(expect, str());
+}
+
+TEST_F(HlslWriter_BuiltinPolyfillTest, Frexp_f32) {
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* arg_ty = ty.f32();
+ auto* v = b.Var(ty.ptr<function>(arg_ty));
+ b.Let("a", b.Call(core::type::CreateFrexpResult(ty, mod.symbols, arg_ty),
+ core::BuiltinFn::kFrexp, b.Load(v)));
+ b.Return(func);
+ });
+
+ auto* src = R"(
+__frexp_result_f32 = struct @align(4) {
+ fract:f32 @offset(0)
+ exp:i32 @offset(4)
+}
+
+%foo = @fragment func():void {
+ $B1: {
+ %2:ptr<function, f32, read_write> = var
+ %3:f32 = load %2
+ %4:__frexp_result_f32 = frexp %3
+ %a:__frexp_result_f32 = let %4
+ ret
+ }
+}
+)";
+ EXPECT_EQ(src, str());
+
+ auto* expect = R"(
+__frexp_result_f32 = struct @align(4) {
+ fract:f32 @offset(0)
+ exp:i32 @offset(4)
+}
+
+%foo = @fragment func():void {
+ $B1: {
+ %2:ptr<function, f32, read_write> = var
+ %3:f32 = load %2
+ %4:ptr<function, f32, read_write> = var
+ %5:f32 = load %4
+ %6:f32 = hlsl.frexp %3, %5
+ %7:i32 = hlsl.sign %3
+ %8:f32 = convert %7
+ %9:f32 = load %4
+ %10:f32 = mul %8, %9
+ store %4, %10
+ %11:f32 = load %4
+ %12:i32 = convert %11
+ %13:__frexp_result_f32 = construct %6, %12
+ %a:__frexp_result_f32 = let %13
+ ret
+ }
+}
+)";
+ Run(BuiltinPolyfill);
+ EXPECT_EQ(expect, str());
+}
+
+TEST_F(HlslWriter_BuiltinPolyfillTest, Frexp_vec_f32) {
+ auto* func = b.Function("foo", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] {
+ auto* arg_ty = ty.vec3<f32>();
+ auto* v = b.Var(ty.ptr<function>(arg_ty));
+ b.Let("a", b.Call(core::type::CreateFrexpResult(ty, mod.symbols, arg_ty),
+ core::BuiltinFn::kFrexp, b.Load(v)));
+ b.Return(func);
+ });
+
+ auto* src = R"(
+__frexp_result_vec3_f32 = struct @align(16) {
+ fract:vec3<f32> @offset(0)
+ exp:vec3<i32> @offset(16)
+}
+
+%foo = @fragment func():void {
+ $B1: {
+ %2:ptr<function, vec3<f32>, read_write> = var
+ %3:vec3<f32> = load %2
+ %4:__frexp_result_vec3_f32 = frexp %3
+ %a:__frexp_result_vec3_f32 = let %4
+ ret
+ }
+}
+)";
+ EXPECT_EQ(src, str());
+
+ auto* expect = R"(
+__frexp_result_vec3_f32 = struct @align(16) {
+ fract:vec3<f32> @offset(0)
+ exp:vec3<i32> @offset(16)
+}
+
+%foo = @fragment func():void {
+ $B1: {
+ %2:ptr<function, vec3<f32>, read_write> = var
+ %3:vec3<f32> = load %2
+ %4:ptr<function, vec3<f32>, read_write> = var
+ %5:vec3<f32> = load %4
+ %6:vec3<f32> = hlsl.frexp %3, %5
+ %7:vec3<i32> = hlsl.sign %3
+ %8:vec3<f32> = convert %7
+ %9:vec3<f32> = load %4
+ %10:vec3<f32> = mul %8, %9
+ store %4, %10
+ %11:vec3<f32> = load %4
+ %12:vec3<i32> = convert %11
+ %13:__frexp_result_vec3_f32 = construct %6, %12
+ %a:__frexp_result_vec3_f32 = let %13
+ ret
+ }
+}
+)";
+ Run(BuiltinPolyfill);
+ EXPECT_EQ(expect, str());
+}
+
} // namespace
} // namespace tint::hlsl::writer::raise
diff --git a/test/tint/builtins/frexp/scalar/mixed.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/frexp/scalar/mixed.wgsl.expected.ir.dxc.hlsl
index 074c496..a0840f8 100644
--- a/test/tint/builtins/frexp/scalar/mixed.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/frexp/scalar/mixed.wgsl.expected.ir.dxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct frexp_result_f32 {
float fract;
int exp;
@@ -9,19 +7,16 @@
[numthreads(1, 1, 1)]
void main() {
float runtime_in = 1.25f;
- frexp_result_f32 res = {0.625f, 1};
- frexp_result_f32 v = frexp(runtime_in);
- res = v;
- frexp_result_f32 v_1 = {0.625f, 1};
- res = v_1;
+ frexp_result_f32 res = {0.625f, int(1)};
+ float v = 0.0f;
+ float v_1 = frexp(runtime_in, v);
+ float v_2 = float(sign(runtime_in));
+ v = (v_2 * v);
+ frexp_result_f32 v_3 = {v_1, int(v)};
+ res = v_3;
+ frexp_result_f32 v_4 = {0.625f, int(1)};
+ res = v_4;
float fract = res.fract;
int exp = res.exp;
}
-DXC validation failure:
-hlsl.hlsl:11:24: error: use of undeclared identifier 'frexp'
- frexp_result_f32 v = frexp(runtime_in);
- ^
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/frexp/scalar/mixed.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/frexp/scalar/mixed.wgsl.expected.ir.fxc.hlsl
index f8691e7..a0840f8 100644
--- a/test/tint/builtins/frexp/scalar/mixed.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/frexp/scalar/mixed.wgsl.expected.ir.fxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct frexp_result_f32 {
float fract;
int exp;
@@ -9,19 +7,16 @@
[numthreads(1, 1, 1)]
void main() {
float runtime_in = 1.25f;
- frexp_result_f32 res = {0.625f, 1};
- frexp_result_f32 v = frexp(runtime_in);
- res = v;
- frexp_result_f32 v_1 = {0.625f, 1};
- res = v_1;
+ frexp_result_f32 res = {0.625f, int(1)};
+ float v = 0.0f;
+ float v_1 = frexp(runtime_in, v);
+ float v_2 = float(sign(runtime_in));
+ v = (v_2 * v);
+ frexp_result_f32 v_3 = {v_1, int(v)};
+ res = v_3;
+ frexp_result_f32 v_4 = {0.625f, int(1)};
+ res = v_4;
float fract = res.fract;
int exp = res.exp;
}
-FXC validation failure:
-<scrubbed_path>(11,24-40): error X3013: 'frexp': no matching 1 parameter intrinsic function
-<scrubbed_path>(11,24-40): error X3013: Possible intrinsic functions are:
-<scrubbed_path>(11,24-40): error X3013: frexp(float|half, out float|half exp)
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/frexp/scalar/runtime.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/frexp/scalar/runtime.wgsl.expected.ir.dxc.hlsl
index deec142..e6e317e 100644
--- a/test/tint/builtins/frexp/scalar/runtime.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/frexp/scalar/runtime.wgsl.expected.ir.dxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct frexp_result_f32 {
float fract;
int exp;
@@ -9,17 +7,14 @@
[numthreads(1, 1, 1)]
void main() {
float tint_symbol = 1.25f;
- frexp_result_f32 v = frexp(tint_symbol);
- frexp_result_f32 res = v;
+ float v = 0.0f;
+ float v_1 = frexp(tint_symbol, v);
+ float v_2 = float(sign(tint_symbol));
+ v = (v_2 * v);
+ frexp_result_f32 v_3 = {v_1, int(v)};
+ frexp_result_f32 res = v_3;
float fract = res.fract;
- frexp_result_f32 v_1 = v;
- int exp = v_1.exp;
+ frexp_result_f32 v_4 = v_3;
+ int exp = v_4.exp;
}
-DXC validation failure:
-hlsl.hlsl:10:24: error: use of undeclared identifier 'frexp'
- frexp_result_f32 v = frexp(tint_symbol);
- ^
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/frexp/scalar/runtime.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/frexp/scalar/runtime.wgsl.expected.ir.fxc.hlsl
index c46c16a..e6e317e 100644
--- a/test/tint/builtins/frexp/scalar/runtime.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/frexp/scalar/runtime.wgsl.expected.ir.fxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct frexp_result_f32 {
float fract;
int exp;
@@ -9,17 +7,14 @@
[numthreads(1, 1, 1)]
void main() {
float tint_symbol = 1.25f;
- frexp_result_f32 v = frexp(tint_symbol);
- frexp_result_f32 res = v;
+ float v = 0.0f;
+ float v_1 = frexp(tint_symbol, v);
+ float v_2 = float(sign(tint_symbol));
+ v = (v_2 * v);
+ frexp_result_f32 v_3 = {v_1, int(v)};
+ frexp_result_f32 res = v_3;
float fract = res.fract;
- frexp_result_f32 v_1 = v;
- int exp = v_1.exp;
+ frexp_result_f32 v_4 = v_3;
+ int exp = v_4.exp;
}
-FXC validation failure:
-<scrubbed_path>(10,24-41): error X3013: 'frexp': no matching 1 parameter intrinsic function
-<scrubbed_path>(10,24-41): error X3013: Possible intrinsic functions are:
-<scrubbed_path>(10,24-41): error X3013: frexp(float|half, out float|half exp)
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/frexp/vector/mixed.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/frexp/vector/mixed.wgsl.expected.ir.dxc.hlsl
index fd6de9f..b0ed985 100644
--- a/test/tint/builtins/frexp/vector/mixed.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/frexp/vector/mixed.wgsl.expected.ir.dxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct frexp_result_vec2_f32 {
float2 fract;
int2 exp;
@@ -9,19 +7,16 @@
[numthreads(1, 1, 1)]
void main() {
float2 runtime_in = float2(1.25f, 3.75f);
- frexp_result_vec2_f32 res = {float2(0.625f, 0.9375f), int2(1, 2)};
- frexp_result_vec2_f32 v = frexp(runtime_in);
- res = v;
- frexp_result_vec2_f32 v_1 = {float2(0.625f, 0.9375f), int2(1, 2)};
- res = v_1;
+ frexp_result_vec2_f32 res = {float2(0.625f, 0.9375f), int2(int(1), int(2))};
+ float2 v = (0.0f).xx;
+ float2 v_1 = frexp(runtime_in, v);
+ float2 v_2 = float2(sign(runtime_in));
+ v = (v_2 * v);
+ frexp_result_vec2_f32 v_3 = {v_1, int2(v)};
+ res = v_3;
+ frexp_result_vec2_f32 v_4 = {float2(0.625f, 0.9375f), int2(int(1), int(2))};
+ res = v_4;
float2 fract = res.fract;
int2 exp = res.exp;
}
-DXC validation failure:
-hlsl.hlsl:11:29: error: use of undeclared identifier 'frexp'
- frexp_result_vec2_f32 v = frexp(runtime_in);
- ^
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/frexp/vector/mixed.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/frexp/vector/mixed.wgsl.expected.ir.fxc.hlsl
index 83480d5..b0ed985 100644
--- a/test/tint/builtins/frexp/vector/mixed.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/frexp/vector/mixed.wgsl.expected.ir.fxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct frexp_result_vec2_f32 {
float2 fract;
int2 exp;
@@ -9,19 +7,16 @@
[numthreads(1, 1, 1)]
void main() {
float2 runtime_in = float2(1.25f, 3.75f);
- frexp_result_vec2_f32 res = {float2(0.625f, 0.9375f), int2(1, 2)};
- frexp_result_vec2_f32 v = frexp(runtime_in);
- res = v;
- frexp_result_vec2_f32 v_1 = {float2(0.625f, 0.9375f), int2(1, 2)};
- res = v_1;
+ frexp_result_vec2_f32 res = {float2(0.625f, 0.9375f), int2(int(1), int(2))};
+ float2 v = (0.0f).xx;
+ float2 v_1 = frexp(runtime_in, v);
+ float2 v_2 = float2(sign(runtime_in));
+ v = (v_2 * v);
+ frexp_result_vec2_f32 v_3 = {v_1, int2(v)};
+ res = v_3;
+ frexp_result_vec2_f32 v_4 = {float2(0.625f, 0.9375f), int2(int(1), int(2))};
+ res = v_4;
float2 fract = res.fract;
int2 exp = res.exp;
}
-FXC validation failure:
-<scrubbed_path>(11,29-45): error X3013: 'frexp': no matching 1 parameter intrinsic function
-<scrubbed_path>(11,29-45): error X3013: Possible intrinsic functions are:
-<scrubbed_path>(11,29-45): error X3013: frexp(float|half, out float|half exp)
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/frexp/vector/runtime.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/frexp/vector/runtime.wgsl.expected.ir.dxc.hlsl
index ccc9f51..085c06c 100644
--- a/test/tint/builtins/frexp/vector/runtime.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/frexp/vector/runtime.wgsl.expected.ir.dxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct frexp_result_vec2_f32 {
float2 fract;
int2 exp;
@@ -9,17 +7,14 @@
[numthreads(1, 1, 1)]
void main() {
float2 tint_symbol = float2(1.25f, 3.75f);
- frexp_result_vec2_f32 v = frexp(tint_symbol);
- frexp_result_vec2_f32 res = v;
+ float2 v = (0.0f).xx;
+ float2 v_1 = frexp(tint_symbol, v);
+ float2 v_2 = float2(sign(tint_symbol));
+ v = (v_2 * v);
+ frexp_result_vec2_f32 v_3 = {v_1, int2(v)};
+ frexp_result_vec2_f32 res = v_3;
float2 fract = res.fract;
- frexp_result_vec2_f32 v_1 = v;
- int2 exp = v_1.exp;
+ frexp_result_vec2_f32 v_4 = v_3;
+ int2 exp = v_4.exp;
}
-DXC validation failure:
-hlsl.hlsl:10:29: error: use of undeclared identifier 'frexp'
- frexp_result_vec2_f32 v = frexp(tint_symbol);
- ^
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/frexp/vector/runtime.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/frexp/vector/runtime.wgsl.expected.ir.fxc.hlsl
index 8c4e524..085c06c 100644
--- a/test/tint/builtins/frexp/vector/runtime.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/frexp/vector/runtime.wgsl.expected.ir.fxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct frexp_result_vec2_f32 {
float2 fract;
int2 exp;
@@ -9,17 +7,14 @@
[numthreads(1, 1, 1)]
void main() {
float2 tint_symbol = float2(1.25f, 3.75f);
- frexp_result_vec2_f32 v = frexp(tint_symbol);
- frexp_result_vec2_f32 res = v;
+ float2 v = (0.0f).xx;
+ float2 v_1 = frexp(tint_symbol, v);
+ float2 v_2 = float2(sign(tint_symbol));
+ v = (v_2 * v);
+ frexp_result_vec2_f32 v_3 = {v_1, int2(v)};
+ frexp_result_vec2_f32 res = v_3;
float2 fract = res.fract;
- frexp_result_vec2_f32 v_1 = v;
- int2 exp = v_1.exp;
+ frexp_result_vec2_f32 v_4 = v_3;
+ int2 exp = v_4.exp;
}
-FXC validation failure:
-<scrubbed_path>(10,29-46): error X3013: 'frexp': no matching 1 parameter intrinsic function
-<scrubbed_path>(10,29-46): error X3013: Possible intrinsic functions are:
-<scrubbed_path>(10,29-46): error X3013: frexp(float|half, out float|half exp)
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.ir.dxc.hlsl
index 5ade8cd..6f6d48e 100644
--- a/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/frexp/3dd21e.wgsl.expected.ir.dxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct frexp_result_vec4_f16 {
vector<float16_t, 4> fract;
int4 exp;
@@ -16,7 +14,12 @@
void frexp_3dd21e() {
vector<float16_t, 4> arg_0 = (float16_t(1.0h)).xxxx;
- frexp_result_vec4_f16 res = frexp(arg_0);
+ vector<float16_t, 4> v = arg_0;
+ vector<float16_t, 4> v_1 = (float16_t(0.0h)).xxxx;
+ vector<float16_t, 4> v_2 = frexp(v, v_1);
+ vector<float16_t, 4> v_3 = vector<float16_t, 4>(sign(v));
+ v_1 = (v_3 * v_1);
+ frexp_result_vec4_f16 res = {v_2, int4(v_1)};
}
void fragment_main() {
@@ -32,20 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
frexp_3dd21e();
- VertexOutput v = tint_symbol;
- return v;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_1 = vertex_main_inner();
- vertex_main_outputs v_2 = {v_1.pos};
- return v_2;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.pos};
+ return v_6;
}
-DXC validation failure:
-hlsl.hlsl:17:31: error: use of undeclared identifier 'frexp'
- frexp_result_vec4_f16 res = frexp(arg_0);
- ^
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/frexp/4b2200.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/frexp/4b2200.wgsl.expected.ir.dxc.hlsl
index 2dc7452..6a78cd0 100644
--- a/test/tint/builtins/gen/var/frexp/4b2200.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/frexp/4b2200.wgsl.expected.ir.dxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct frexp_result_f32 {
float fract;
int exp;
@@ -16,7 +14,12 @@
void frexp_4b2200() {
float arg_0 = 1.0f;
- frexp_result_f32 res = frexp(arg_0);
+ float v = arg_0;
+ float v_1 = 0.0f;
+ float v_2 = frexp(v, v_1);
+ float v_3 = float(sign(v));
+ v_1 = (v_3 * v_1);
+ frexp_result_f32 res = {v_2, int(v_1)};
}
void fragment_main() {
@@ -32,20 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
frexp_4b2200();
- VertexOutput v = tint_symbol;
- return v;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_1 = vertex_main_inner();
- vertex_main_outputs v_2 = {v_1.pos};
- return v_2;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.pos};
+ return v_6;
}
-DXC validation failure:
-hlsl.hlsl:17:26: error: use of undeclared identifier 'frexp'
- frexp_result_f32 res = frexp(arg_0);
- ^
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/frexp/4b2200.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/frexp/4b2200.wgsl.expected.ir.fxc.hlsl
index dd989ec..6a78cd0 100644
--- a/test/tint/builtins/gen/var/frexp/4b2200.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/frexp/4b2200.wgsl.expected.ir.fxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct frexp_result_f32 {
float fract;
int exp;
@@ -16,7 +14,12 @@
void frexp_4b2200() {
float arg_0 = 1.0f;
- frexp_result_f32 res = frexp(arg_0);
+ float v = arg_0;
+ float v_1 = 0.0f;
+ float v_2 = frexp(v, v_1);
+ float v_3 = float(sign(v));
+ v_1 = (v_3 * v_1);
+ frexp_result_f32 res = {v_2, int(v_1)};
}
void fragment_main() {
@@ -32,20 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
frexp_4b2200();
- VertexOutput v = tint_symbol;
- return v;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_1 = vertex_main_inner();
- vertex_main_outputs v_2 = {v_1.pos};
- return v_2;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.pos};
+ return v_6;
}
-FXC validation failure:
-<scrubbed_path>(17,26-37): error X3013: 'frexp': no matching 1 parameter intrinsic function
-<scrubbed_path>(17,26-37): error X3013: Possible intrinsic functions are:
-<scrubbed_path>(17,26-37): error X3013: frexp(float|half, out float|half exp)
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.ir.dxc.hlsl
index 8d2d214..4ba45ef 100644
--- a/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/frexp/5257dd.wgsl.expected.ir.dxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct frexp_result_f16 {
float16_t fract;
int exp;
@@ -16,7 +14,12 @@
void frexp_5257dd() {
float16_t arg_0 = float16_t(1.0h);
- frexp_result_f16 res = frexp(arg_0);
+ float16_t v = arg_0;
+ float16_t v_1 = float16_t(0.0h);
+ float16_t v_2 = frexp(v, v_1);
+ float16_t v_3 = float16_t(sign(v));
+ v_1 = (v_3 * v_1);
+ frexp_result_f16 res = {v_2, int(v_1)};
}
void fragment_main() {
@@ -32,20 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
frexp_5257dd();
- VertexOutput v = tint_symbol;
- return v;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_1 = vertex_main_inner();
- vertex_main_outputs v_2 = {v_1.pos};
- return v_2;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.pos};
+ return v_6;
}
-DXC validation failure:
-hlsl.hlsl:17:26: error: use of undeclared identifier 'frexp'
- frexp_result_f16 res = frexp(arg_0);
- ^
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.ir.dxc.hlsl
index 66f283d..e5fcabf 100644
--- a/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/frexp/5f47bf.wgsl.expected.ir.dxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct frexp_result_vec2_f16 {
vector<float16_t, 2> fract;
int2 exp;
@@ -16,7 +14,12 @@
void frexp_5f47bf() {
vector<float16_t, 2> arg_0 = (float16_t(1.0h)).xx;
- frexp_result_vec2_f16 res = frexp(arg_0);
+ vector<float16_t, 2> v = arg_0;
+ vector<float16_t, 2> v_1 = (float16_t(0.0h)).xx;
+ vector<float16_t, 2> v_2 = frexp(v, v_1);
+ vector<float16_t, 2> v_3 = vector<float16_t, 2>(sign(v));
+ v_1 = (v_3 * v_1);
+ frexp_result_vec2_f16 res = {v_2, int2(v_1)};
}
void fragment_main() {
@@ -32,20 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
frexp_5f47bf();
- VertexOutput v = tint_symbol;
- return v;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_1 = vertex_main_inner();
- vertex_main_outputs v_2 = {v_1.pos};
- return v_2;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.pos};
+ return v_6;
}
-DXC validation failure:
-hlsl.hlsl:17:31: error: use of undeclared identifier 'frexp'
- frexp_result_vec2_f16 res = frexp(arg_0);
- ^
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/frexp/77af93.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/frexp/77af93.wgsl.expected.ir.dxc.hlsl
index 1deda74..3481aa6 100644
--- a/test/tint/builtins/gen/var/frexp/77af93.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/frexp/77af93.wgsl.expected.ir.dxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct frexp_result_vec4_f32 {
float4 fract;
int4 exp;
@@ -16,7 +14,12 @@
void frexp_77af93() {
float4 arg_0 = (1.0f).xxxx;
- frexp_result_vec4_f32 res = frexp(arg_0);
+ float4 v = arg_0;
+ float4 v_1 = (0.0f).xxxx;
+ float4 v_2 = frexp(v, v_1);
+ float4 v_3 = float4(sign(v));
+ v_1 = (v_3 * v_1);
+ frexp_result_vec4_f32 res = {v_2, int4(v_1)};
}
void fragment_main() {
@@ -32,20 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
frexp_77af93();
- VertexOutput v = tint_symbol;
- return v;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_1 = vertex_main_inner();
- vertex_main_outputs v_2 = {v_1.pos};
- return v_2;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.pos};
+ return v_6;
}
-DXC validation failure:
-hlsl.hlsl:17:31: error: use of undeclared identifier 'frexp'
- frexp_result_vec4_f32 res = frexp(arg_0);
- ^
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/frexp/77af93.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/frexp/77af93.wgsl.expected.ir.fxc.hlsl
index b99ed21..3481aa6 100644
--- a/test/tint/builtins/gen/var/frexp/77af93.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/frexp/77af93.wgsl.expected.ir.fxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct frexp_result_vec4_f32 {
float4 fract;
int4 exp;
@@ -16,7 +14,12 @@
void frexp_77af93() {
float4 arg_0 = (1.0f).xxxx;
- frexp_result_vec4_f32 res = frexp(arg_0);
+ float4 v = arg_0;
+ float4 v_1 = (0.0f).xxxx;
+ float4 v_2 = frexp(v, v_1);
+ float4 v_3 = float4(sign(v));
+ v_1 = (v_3 * v_1);
+ frexp_result_vec4_f32 res = {v_2, int4(v_1)};
}
void fragment_main() {
@@ -32,20 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
frexp_77af93();
- VertexOutput v = tint_symbol;
- return v;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_1 = vertex_main_inner();
- vertex_main_outputs v_2 = {v_1.pos};
- return v_2;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.pos};
+ return v_6;
}
-FXC validation failure:
-<scrubbed_path>(17,31-42): error X3013: 'frexp': no matching 1 parameter intrinsic function
-<scrubbed_path>(17,31-42): error X3013: Possible intrinsic functions are:
-<scrubbed_path>(17,31-42): error X3013: frexp(float|half, out float|half exp)
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/frexp/979800.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/frexp/979800.wgsl.expected.ir.dxc.hlsl
index c693879..c8747dd 100644
--- a/test/tint/builtins/gen/var/frexp/979800.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/frexp/979800.wgsl.expected.ir.dxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct frexp_result_vec3_f32 {
float3 fract;
int3 exp;
@@ -16,7 +14,12 @@
void frexp_979800() {
float3 arg_0 = (1.0f).xxx;
- frexp_result_vec3_f32 res = frexp(arg_0);
+ float3 v = arg_0;
+ float3 v_1 = (0.0f).xxx;
+ float3 v_2 = frexp(v, v_1);
+ float3 v_3 = float3(sign(v));
+ v_1 = (v_3 * v_1);
+ frexp_result_vec3_f32 res = {v_2, int3(v_1)};
}
void fragment_main() {
@@ -32,20 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
frexp_979800();
- VertexOutput v = tint_symbol;
- return v;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_1 = vertex_main_inner();
- vertex_main_outputs v_2 = {v_1.pos};
- return v_2;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.pos};
+ return v_6;
}
-DXC validation failure:
-hlsl.hlsl:17:31: error: use of undeclared identifier 'frexp'
- frexp_result_vec3_f32 res = frexp(arg_0);
- ^
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/frexp/979800.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/frexp/979800.wgsl.expected.ir.fxc.hlsl
index 238954a..c8747dd 100644
--- a/test/tint/builtins/gen/var/frexp/979800.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/frexp/979800.wgsl.expected.ir.fxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct frexp_result_vec3_f32 {
float3 fract;
int3 exp;
@@ -16,7 +14,12 @@
void frexp_979800() {
float3 arg_0 = (1.0f).xxx;
- frexp_result_vec3_f32 res = frexp(arg_0);
+ float3 v = arg_0;
+ float3 v_1 = (0.0f).xxx;
+ float3 v_2 = frexp(v, v_1);
+ float3 v_3 = float3(sign(v));
+ v_1 = (v_3 * v_1);
+ frexp_result_vec3_f32 res = {v_2, int3(v_1)};
}
void fragment_main() {
@@ -32,20 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
frexp_979800();
- VertexOutput v = tint_symbol;
- return v;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_1 = vertex_main_inner();
- vertex_main_outputs v_2 = {v_1.pos};
- return v_2;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.pos};
+ return v_6;
}
-FXC validation failure:
-<scrubbed_path>(17,31-42): error X3013: 'frexp': no matching 1 parameter intrinsic function
-<scrubbed_path>(17,31-42): error X3013: Possible intrinsic functions are:
-<scrubbed_path>(17,31-42): error X3013: frexp(float|half, out float|half exp)
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.ir.dxc.hlsl
index 8959233..99d8b50 100644
--- a/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/frexp/ae4a66.wgsl.expected.ir.dxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct frexp_result_vec3_f16 {
vector<float16_t, 3> fract;
int3 exp;
@@ -16,7 +14,12 @@
void frexp_ae4a66() {
vector<float16_t, 3> arg_0 = (float16_t(1.0h)).xxx;
- frexp_result_vec3_f16 res = frexp(arg_0);
+ vector<float16_t, 3> v = arg_0;
+ vector<float16_t, 3> v_1 = (float16_t(0.0h)).xxx;
+ vector<float16_t, 3> v_2 = frexp(v, v_1);
+ vector<float16_t, 3> v_3 = vector<float16_t, 3>(sign(v));
+ v_1 = (v_3 * v_1);
+ frexp_result_vec3_f16 res = {v_2, int3(v_1)};
}
void fragment_main() {
@@ -32,20 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
frexp_ae4a66();
- VertexOutput v = tint_symbol;
- return v;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_1 = vertex_main_inner();
- vertex_main_outputs v_2 = {v_1.pos};
- return v_2;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.pos};
+ return v_6;
}
-DXC validation failure:
-hlsl.hlsl:17:31: error: use of undeclared identifier 'frexp'
- frexp_result_vec3_f16 res = frexp(arg_0);
- ^
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/frexp/eb2421.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/frexp/eb2421.wgsl.expected.ir.dxc.hlsl
index 0500d93..b8265a9 100644
--- a/test/tint/builtins/gen/var/frexp/eb2421.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/frexp/eb2421.wgsl.expected.ir.dxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct frexp_result_vec2_f32 {
float2 fract;
int2 exp;
@@ -16,7 +14,12 @@
void frexp_eb2421() {
float2 arg_0 = (1.0f).xx;
- frexp_result_vec2_f32 res = frexp(arg_0);
+ float2 v = arg_0;
+ float2 v_1 = (0.0f).xx;
+ float2 v_2 = frexp(v, v_1);
+ float2 v_3 = float2(sign(v));
+ v_1 = (v_3 * v_1);
+ frexp_result_vec2_f32 res = {v_2, int2(v_1)};
}
void fragment_main() {
@@ -32,20 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
frexp_eb2421();
- VertexOutput v = tint_symbol;
- return v;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_1 = vertex_main_inner();
- vertex_main_outputs v_2 = {v_1.pos};
- return v_2;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.pos};
+ return v_6;
}
-DXC validation failure:
-hlsl.hlsl:17:31: error: use of undeclared identifier 'frexp'
- frexp_result_vec2_f32 res = frexp(arg_0);
- ^
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/frexp/eb2421.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/frexp/eb2421.wgsl.expected.ir.fxc.hlsl
index 17e9550..b8265a9 100644
--- a/test/tint/builtins/gen/var/frexp/eb2421.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/frexp/eb2421.wgsl.expected.ir.fxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct frexp_result_vec2_f32 {
float2 fract;
int2 exp;
@@ -16,7 +14,12 @@
void frexp_eb2421() {
float2 arg_0 = (1.0f).xx;
- frexp_result_vec2_f32 res = frexp(arg_0);
+ float2 v = arg_0;
+ float2 v_1 = (0.0f).xx;
+ float2 v_2 = frexp(v, v_1);
+ float2 v_3 = float2(sign(v));
+ v_1 = (v_3 * v_1);
+ frexp_result_vec2_f32 res = {v_2, int2(v_1)};
}
void fragment_main() {
@@ -32,20 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
frexp_eb2421();
- VertexOutput v = tint_symbol;
- return v;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_1 = vertex_main_inner();
- vertex_main_outputs v_2 = {v_1.pos};
- return v_2;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.pos};
+ return v_6;
}
-FXC validation failure:
-<scrubbed_path>(17,31-42): error X3013: 'frexp': no matching 1 parameter intrinsic function
-<scrubbed_path>(17,31-42): error X3013: Possible intrinsic functions are:
-<scrubbed_path>(17,31-42): error X3013: frexp(float|half, out float|half exp)
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/modf/2d50da.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/modf/2d50da.wgsl.expected.ir.dxc.hlsl
index ad1e570..9ca858a 100644
--- a/test/tint/builtins/gen/var/modf/2d50da.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/2d50da.wgsl.expected.ir.dxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct modf_result_vec2_f32 {
float2 fract;
float2 whole;
@@ -16,7 +14,9 @@
void modf_2d50da() {
float2 arg_0 = (-1.5f).xx;
- modf_result_vec2_f32 res = modf(arg_0);
+ float2 v = (0.0f).xx;
+ float2 v_1 = modf(arg_0, v);
+ modf_result_vec2_f32 res = {v_1, v};
}
void fragment_main() {
@@ -32,20 +32,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
modf_2d50da();
- VertexOutput v = tint_symbol;
- return v;
-}
-
-vertex_main_outputs vertex_main() {
- VertexOutput v_1 = vertex_main_inner();
- vertex_main_outputs v_2 = {v_1.pos};
+ VertexOutput v_2 = tint_symbol;
return v_2;
}
-DXC validation failure:
-hlsl.hlsl:17:30: error: use of undeclared identifier 'modf'
- modf_result_vec2_f32 res = modf(arg_0);
- ^
+vertex_main_outputs vertex_main() {
+ VertexOutput v_3 = vertex_main_inner();
+ vertex_main_outputs v_4 = {v_3.pos};
+ return v_4;
+}
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/modf/2d50da.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/modf/2d50da.wgsl.expected.ir.fxc.hlsl
index 38a76d3..9ca858a 100644
--- a/test/tint/builtins/gen/var/modf/2d50da.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/2d50da.wgsl.expected.ir.fxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct modf_result_vec2_f32 {
float2 fract;
float2 whole;
@@ -16,7 +14,9 @@
void modf_2d50da() {
float2 arg_0 = (-1.5f).xx;
- modf_result_vec2_f32 res = modf(arg_0);
+ float2 v = (0.0f).xx;
+ float2 v_1 = modf(arg_0, v);
+ modf_result_vec2_f32 res = {v_1, v};
}
void fragment_main() {
@@ -32,20 +32,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
modf_2d50da();
- VertexOutput v = tint_symbol;
- return v;
-}
-
-vertex_main_outputs vertex_main() {
- VertexOutput v_1 = vertex_main_inner();
- vertex_main_outputs v_2 = {v_1.pos};
+ VertexOutput v_2 = tint_symbol;
return v_2;
}
-FXC validation failure:
-<scrubbed_path>(17,30-40): error X3013: 'modf': no matching 1 parameter intrinsic function
-<scrubbed_path>(17,30-40): error X3013: Possible intrinsic functions are:
-<scrubbed_path>(17,30-40): error X3013: modf(float|half|min10float|min16float, out float|half|min10float|min16float ip)
+vertex_main_outputs vertex_main() {
+ VertexOutput v_3 = vertex_main_inner();
+ vertex_main_outputs v_4 = {v_3.pos};
+ return v_4;
+}
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.ir.dxc.hlsl
index 48dff53..b99294e 100644
--- a/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.ir.dxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct modf_result_vec3_f16 {
vector<float16_t, 3> fract;
vector<float16_t, 3> whole;
@@ -16,7 +14,9 @@
void modf_45005f() {
vector<float16_t, 3> arg_0 = (float16_t(-1.5h)).xxx;
- modf_result_vec3_f16 res = modf(arg_0);
+ vector<float16_t, 3> v = (float16_t(0.0h)).xxx;
+ vector<float16_t, 3> v_1 = modf(arg_0, v);
+ modf_result_vec3_f16 res = {v_1, v};
}
void fragment_main() {
@@ -32,20 +32,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
modf_45005f();
- VertexOutput v = tint_symbol;
- return v;
-}
-
-vertex_main_outputs vertex_main() {
- VertexOutput v_1 = vertex_main_inner();
- vertex_main_outputs v_2 = {v_1.pos};
+ VertexOutput v_2 = tint_symbol;
return v_2;
}
-DXC validation failure:
-hlsl.hlsl:17:30: error: use of undeclared identifier 'modf'
- modf_result_vec3_f16 res = modf(arg_0);
- ^
+vertex_main_outputs vertex_main() {
+ VertexOutput v_3 = vertex_main_inner();
+ vertex_main_outputs v_4 = {v_3.pos};
+ return v_4;
+}
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/modf/4bfced.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/modf/4bfced.wgsl.expected.ir.dxc.hlsl
index 108314f..21207c1 100644
--- a/test/tint/builtins/gen/var/modf/4bfced.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/4bfced.wgsl.expected.ir.dxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct modf_result_vec4_f32 {
float4 fract;
float4 whole;
@@ -16,7 +14,9 @@
void modf_4bfced() {
float4 arg_0 = (-1.5f).xxxx;
- modf_result_vec4_f32 res = modf(arg_0);
+ float4 v = (0.0f).xxxx;
+ float4 v_1 = modf(arg_0, v);
+ modf_result_vec4_f32 res = {v_1, v};
}
void fragment_main() {
@@ -32,20 +32,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
modf_4bfced();
- VertexOutput v = tint_symbol;
- return v;
-}
-
-vertex_main_outputs vertex_main() {
- VertexOutput v_1 = vertex_main_inner();
- vertex_main_outputs v_2 = {v_1.pos};
+ VertexOutput v_2 = tint_symbol;
return v_2;
}
-DXC validation failure:
-hlsl.hlsl:17:30: error: use of undeclared identifier 'modf'
- modf_result_vec4_f32 res = modf(arg_0);
- ^
+vertex_main_outputs vertex_main() {
+ VertexOutput v_3 = vertex_main_inner();
+ vertex_main_outputs v_4 = {v_3.pos};
+ return v_4;
+}
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/modf/4bfced.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/modf/4bfced.wgsl.expected.ir.fxc.hlsl
index f17ef3c..21207c1 100644
--- a/test/tint/builtins/gen/var/modf/4bfced.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/4bfced.wgsl.expected.ir.fxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct modf_result_vec4_f32 {
float4 fract;
float4 whole;
@@ -16,7 +14,9 @@
void modf_4bfced() {
float4 arg_0 = (-1.5f).xxxx;
- modf_result_vec4_f32 res = modf(arg_0);
+ float4 v = (0.0f).xxxx;
+ float4 v_1 = modf(arg_0, v);
+ modf_result_vec4_f32 res = {v_1, v};
}
void fragment_main() {
@@ -32,20 +32,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
modf_4bfced();
- VertexOutput v = tint_symbol;
- return v;
-}
-
-vertex_main_outputs vertex_main() {
- VertexOutput v_1 = vertex_main_inner();
- vertex_main_outputs v_2 = {v_1.pos};
+ VertexOutput v_2 = tint_symbol;
return v_2;
}
-FXC validation failure:
-<scrubbed_path>(17,30-40): error X3013: 'modf': no matching 1 parameter intrinsic function
-<scrubbed_path>(17,30-40): error X3013: Possible intrinsic functions are:
-<scrubbed_path>(17,30-40): error X3013: modf(float|half|min10float|min16float, out float|half|min10float|min16float ip)
+vertex_main_outputs vertex_main() {
+ VertexOutput v_3 = vertex_main_inner();
+ vertex_main_outputs v_4 = {v_3.pos};
+ return v_4;
+}
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/modf/5ea256.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/modf/5ea256.wgsl.expected.ir.dxc.hlsl
index 7a788df..9f155fe 100644
--- a/test/tint/builtins/gen/var/modf/5ea256.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/5ea256.wgsl.expected.ir.dxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct modf_result_vec3_f32 {
float3 fract;
float3 whole;
@@ -16,7 +14,9 @@
void modf_5ea256() {
float3 arg_0 = (-1.5f).xxx;
- modf_result_vec3_f32 res = modf(arg_0);
+ float3 v = (0.0f).xxx;
+ float3 v_1 = modf(arg_0, v);
+ modf_result_vec3_f32 res = {v_1, v};
}
void fragment_main() {
@@ -32,20 +32,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
modf_5ea256();
- VertexOutput v = tint_symbol;
- return v;
-}
-
-vertex_main_outputs vertex_main() {
- VertexOutput v_1 = vertex_main_inner();
- vertex_main_outputs v_2 = {v_1.pos};
+ VertexOutput v_2 = tint_symbol;
return v_2;
}
-DXC validation failure:
-hlsl.hlsl:17:30: error: use of undeclared identifier 'modf'
- modf_result_vec3_f32 res = modf(arg_0);
- ^
+vertex_main_outputs vertex_main() {
+ VertexOutput v_3 = vertex_main_inner();
+ vertex_main_outputs v_4 = {v_3.pos};
+ return v_4;
+}
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/modf/5ea256.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/modf/5ea256.wgsl.expected.ir.fxc.hlsl
index bdea697..9f155fe 100644
--- a/test/tint/builtins/gen/var/modf/5ea256.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/5ea256.wgsl.expected.ir.fxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct modf_result_vec3_f32 {
float3 fract;
float3 whole;
@@ -16,7 +14,9 @@
void modf_5ea256() {
float3 arg_0 = (-1.5f).xxx;
- modf_result_vec3_f32 res = modf(arg_0);
+ float3 v = (0.0f).xxx;
+ float3 v_1 = modf(arg_0, v);
+ modf_result_vec3_f32 res = {v_1, v};
}
void fragment_main() {
@@ -32,20 +32,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
modf_5ea256();
- VertexOutput v = tint_symbol;
- return v;
-}
-
-vertex_main_outputs vertex_main() {
- VertexOutput v_1 = vertex_main_inner();
- vertex_main_outputs v_2 = {v_1.pos};
+ VertexOutput v_2 = tint_symbol;
return v_2;
}
-FXC validation failure:
-<scrubbed_path>(17,30-40): error X3013: 'modf': no matching 1 parameter intrinsic function
-<scrubbed_path>(17,30-40): error X3013: Possible intrinsic functions are:
-<scrubbed_path>(17,30-40): error X3013: modf(float|half|min10float|min16float, out float|half|min10float|min16float ip)
+vertex_main_outputs vertex_main() {
+ VertexOutput v_3 = vertex_main_inner();
+ vertex_main_outputs v_4 = {v_3.pos};
+ return v_4;
+}
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.ir.dxc.hlsl
index 2b610f8..baddf63 100644
--- a/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.ir.dxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct modf_result_f16 {
float16_t fract;
float16_t whole;
@@ -16,7 +14,9 @@
void modf_8dbbbf() {
float16_t arg_0 = float16_t(-1.5h);
- modf_result_f16 res = modf(arg_0);
+ float16_t v = float16_t(0.0h);
+ float16_t v_1 = modf(arg_0, v);
+ modf_result_f16 res = {v_1, v};
}
void fragment_main() {
@@ -32,20 +32,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
modf_8dbbbf();
- VertexOutput v = tint_symbol;
- return v;
-}
-
-vertex_main_outputs vertex_main() {
- VertexOutput v_1 = vertex_main_inner();
- vertex_main_outputs v_2 = {v_1.pos};
+ VertexOutput v_2 = tint_symbol;
return v_2;
}
-DXC validation failure:
-hlsl.hlsl:17:25: error: use of undeclared identifier 'modf'
- modf_result_f16 res = modf(arg_0);
- ^
+vertex_main_outputs vertex_main() {
+ VertexOutput v_3 = vertex_main_inner();
+ vertex_main_outputs v_4 = {v_3.pos};
+ return v_4;
+}
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/modf/995934.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.ir.dxc.hlsl
index 04d59b9..6fe9378 100644
--- a/test/tint/builtins/gen/var/modf/995934.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.ir.dxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct modf_result_vec4_f16 {
vector<float16_t, 4> fract;
vector<float16_t, 4> whole;
@@ -16,7 +14,9 @@
void modf_995934() {
vector<float16_t, 4> arg_0 = (float16_t(-1.5h)).xxxx;
- modf_result_vec4_f16 res = modf(arg_0);
+ vector<float16_t, 4> v = (float16_t(0.0h)).xxxx;
+ vector<float16_t, 4> v_1 = modf(arg_0, v);
+ modf_result_vec4_f16 res = {v_1, v};
}
void fragment_main() {
@@ -32,20 +32,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
modf_995934();
- VertexOutput v = tint_symbol;
- return v;
-}
-
-vertex_main_outputs vertex_main() {
- VertexOutput v_1 = vertex_main_inner();
- vertex_main_outputs v_2 = {v_1.pos};
+ VertexOutput v_2 = tint_symbol;
return v_2;
}
-DXC validation failure:
-hlsl.hlsl:17:30: error: use of undeclared identifier 'modf'
- modf_result_vec4_f16 res = modf(arg_0);
- ^
+vertex_main_outputs vertex_main() {
+ VertexOutput v_3 = vertex_main_inner();
+ vertex_main_outputs v_4 = {v_3.pos};
+ return v_4;
+}
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.ir.dxc.hlsl
index 9a45850..62431b2 100644
--- a/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.ir.dxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct modf_result_vec2_f16 {
vector<float16_t, 2> fract;
vector<float16_t, 2> whole;
@@ -16,7 +14,9 @@
void modf_a545b9() {
vector<float16_t, 2> arg_0 = (float16_t(-1.5h)).xx;
- modf_result_vec2_f16 res = modf(arg_0);
+ vector<float16_t, 2> v = (float16_t(0.0h)).xx;
+ vector<float16_t, 2> v_1 = modf(arg_0, v);
+ modf_result_vec2_f16 res = {v_1, v};
}
void fragment_main() {
@@ -32,20 +32,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
modf_a545b9();
- VertexOutput v = tint_symbol;
- return v;
-}
-
-vertex_main_outputs vertex_main() {
- VertexOutput v_1 = vertex_main_inner();
- vertex_main_outputs v_2 = {v_1.pos};
+ VertexOutput v_2 = tint_symbol;
return v_2;
}
-DXC validation failure:
-hlsl.hlsl:17:30: error: use of undeclared identifier 'modf'
- modf_result_vec2_f16 res = modf(arg_0);
- ^
+vertex_main_outputs vertex_main() {
+ VertexOutput v_3 = vertex_main_inner();
+ vertex_main_outputs v_4 = {v_3.pos};
+ return v_4;
+}
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/modf/bbf7f7.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/modf/bbf7f7.wgsl.expected.ir.dxc.hlsl
index 22939d1..6c84711 100644
--- a/test/tint/builtins/gen/var/modf/bbf7f7.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/bbf7f7.wgsl.expected.ir.dxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct modf_result_f32 {
float fract;
float whole;
@@ -16,7 +14,9 @@
void modf_bbf7f7() {
float arg_0 = -1.5f;
- modf_result_f32 res = modf(arg_0);
+ float v = 0.0f;
+ float v_1 = modf(arg_0, v);
+ modf_result_f32 res = {v_1, v};
}
void fragment_main() {
@@ -32,20 +32,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
modf_bbf7f7();
- VertexOutput v = tint_symbol;
- return v;
-}
-
-vertex_main_outputs vertex_main() {
- VertexOutput v_1 = vertex_main_inner();
- vertex_main_outputs v_2 = {v_1.pos};
+ VertexOutput v_2 = tint_symbol;
return v_2;
}
-DXC validation failure:
-hlsl.hlsl:17:25: error: use of undeclared identifier 'modf'
- modf_result_f32 res = modf(arg_0);
- ^
+vertex_main_outputs vertex_main() {
+ VertexOutput v_3 = vertex_main_inner();
+ vertex_main_outputs v_4 = {v_3.pos};
+ return v_4;
+}
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/gen/var/modf/bbf7f7.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/modf/bbf7f7.wgsl.expected.ir.fxc.hlsl
index 825470f..6c84711 100644
--- a/test/tint/builtins/gen/var/modf/bbf7f7.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/bbf7f7.wgsl.expected.ir.fxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct modf_result_f32 {
float fract;
float whole;
@@ -16,7 +14,9 @@
void modf_bbf7f7() {
float arg_0 = -1.5f;
- modf_result_f32 res = modf(arg_0);
+ float v = 0.0f;
+ float v_1 = modf(arg_0, v);
+ modf_result_f32 res = {v_1, v};
}
void fragment_main() {
@@ -32,20 +32,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
modf_bbf7f7();
- VertexOutput v = tint_symbol;
- return v;
-}
-
-vertex_main_outputs vertex_main() {
- VertexOutput v_1 = vertex_main_inner();
- vertex_main_outputs v_2 = {v_1.pos};
+ VertexOutput v_2 = tint_symbol;
return v_2;
}
-FXC validation failure:
-<scrubbed_path>(17,25-35): error X3013: 'modf': no matching 1 parameter intrinsic function
-<scrubbed_path>(17,25-35): error X3013: Possible intrinsic functions are:
-<scrubbed_path>(17,25-35): error X3013: modf(float|half|min10float|min16float, out float|half|min10float|min16float ip)
+vertex_main_outputs vertex_main() {
+ VertexOutput v_3 = vertex_main_inner();
+ vertex_main_outputs v_4 = {v_3.pos};
+ return v_4;
+}
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/modf/scalar/mixed.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/modf/scalar/mixed.wgsl.expected.ir.dxc.hlsl
index 7293c73..55d5071 100644
--- a/test/tint/builtins/modf/scalar/mixed.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/modf/scalar/mixed.wgsl.expected.ir.dxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct modf_result_f32 {
float fract;
float whole;
@@ -10,18 +8,13 @@
void main() {
float runtime_in = 1.25f;
modf_result_f32 res = {0.25f, 1.0f};
- modf_result_f32 v = modf(runtime_in);
- res = v;
- modf_result_f32 v_1 = {0.25f, 1.0f};
- res = v_1;
+ float v = 0.0f;
+ float v_1 = modf(runtime_in, v);
+ modf_result_f32 v_2 = {v_1, v};
+ res = v_2;
+ modf_result_f32 v_3 = {0.25f, 1.0f};
+ res = v_3;
float fract = res.fract;
float whole = res.whole;
}
-DXC validation failure:
-hlsl.hlsl:11:23: error: use of undeclared identifier 'modf'
- modf_result_f32 v = modf(runtime_in);
- ^
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/modf/scalar/mixed.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/modf/scalar/mixed.wgsl.expected.ir.fxc.hlsl
index 79ae9ed..55d5071 100644
--- a/test/tint/builtins/modf/scalar/mixed.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/modf/scalar/mixed.wgsl.expected.ir.fxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct modf_result_f32 {
float fract;
float whole;
@@ -10,18 +8,13 @@
void main() {
float runtime_in = 1.25f;
modf_result_f32 res = {0.25f, 1.0f};
- modf_result_f32 v = modf(runtime_in);
- res = v;
- modf_result_f32 v_1 = {0.25f, 1.0f};
- res = v_1;
+ float v = 0.0f;
+ float v_1 = modf(runtime_in, v);
+ modf_result_f32 v_2 = {v_1, v};
+ res = v_2;
+ modf_result_f32 v_3 = {0.25f, 1.0f};
+ res = v_3;
float fract = res.fract;
float whole = res.whole;
}
-FXC validation failure:
-<scrubbed_path>(11,23-38): error X3013: 'modf': no matching 1 parameter intrinsic function
-<scrubbed_path>(11,23-38): error X3013: Possible intrinsic functions are:
-<scrubbed_path>(11,23-38): error X3013: modf(float|half|min10float|min16float, out float|half|min10float|min16float ip)
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/modf/scalar/runtime.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/modf/scalar/runtime.wgsl.expected.ir.dxc.hlsl
index 8fd4a363..323250c 100644
--- a/test/tint/builtins/modf/scalar/runtime.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/modf/scalar/runtime.wgsl.expected.ir.dxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct modf_result_f32 {
float fract;
float whole;
@@ -9,17 +7,12 @@
[numthreads(1, 1, 1)]
void main() {
float tint_symbol = 1.25f;
- modf_result_f32 v = modf(tint_symbol);
- modf_result_f32 res = v;
+ float v = 0.0f;
+ float v_1 = modf(tint_symbol, v);
+ modf_result_f32 v_2 = {v_1, v};
+ modf_result_f32 res = v_2;
float fract = res.fract;
- modf_result_f32 v_1 = v;
- float whole = v_1.whole;
+ modf_result_f32 v_3 = v_2;
+ float whole = v_3.whole;
}
-DXC validation failure:
-hlsl.hlsl:10:23: error: use of undeclared identifier 'modf'
- modf_result_f32 v = modf(tint_symbol);
- ^
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/modf/scalar/runtime.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/modf/scalar/runtime.wgsl.expected.ir.fxc.hlsl
index caff705..323250c 100644
--- a/test/tint/builtins/modf/scalar/runtime.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/modf/scalar/runtime.wgsl.expected.ir.fxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct modf_result_f32 {
float fract;
float whole;
@@ -9,17 +7,12 @@
[numthreads(1, 1, 1)]
void main() {
float tint_symbol = 1.25f;
- modf_result_f32 v = modf(tint_symbol);
- modf_result_f32 res = v;
+ float v = 0.0f;
+ float v_1 = modf(tint_symbol, v);
+ modf_result_f32 v_2 = {v_1, v};
+ modf_result_f32 res = v_2;
float fract = res.fract;
- modf_result_f32 v_1 = v;
- float whole = v_1.whole;
+ modf_result_f32 v_3 = v_2;
+ float whole = v_3.whole;
}
-FXC validation failure:
-<scrubbed_path>(10,23-39): error X3013: 'modf': no matching 1 parameter intrinsic function
-<scrubbed_path>(10,23-39): error X3013: Possible intrinsic functions are:
-<scrubbed_path>(10,23-39): error X3013: modf(float|half|min10float|min16float, out float|half|min10float|min16float ip)
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/modf/vector/mixed.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/modf/vector/mixed.wgsl.expected.ir.dxc.hlsl
index 474fbf2..3aa1172 100644
--- a/test/tint/builtins/modf/vector/mixed.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/modf/vector/mixed.wgsl.expected.ir.dxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct modf_result_vec2_f32 {
float2 fract;
float2 whole;
@@ -10,18 +8,13 @@
void main() {
float2 runtime_in = float2(1.25f, 3.75f);
modf_result_vec2_f32 res = {float2(0.25f, 0.75f), float2(1.0f, 3.0f)};
- modf_result_vec2_f32 v = modf(runtime_in);
- res = v;
- modf_result_vec2_f32 v_1 = {float2(0.25f, 0.75f), float2(1.0f, 3.0f)};
- res = v_1;
+ float2 v = (0.0f).xx;
+ float2 v_1 = modf(runtime_in, v);
+ modf_result_vec2_f32 v_2 = {v_1, v};
+ res = v_2;
+ modf_result_vec2_f32 v_3 = {float2(0.25f, 0.75f), float2(1.0f, 3.0f)};
+ res = v_3;
float2 fract = res.fract;
float2 whole = res.whole;
}
-DXC validation failure:
-hlsl.hlsl:11:28: error: use of undeclared identifier 'modf'
- modf_result_vec2_f32 v = modf(runtime_in);
- ^
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/modf/vector/mixed.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/modf/vector/mixed.wgsl.expected.ir.fxc.hlsl
index 4cdad88..3aa1172 100644
--- a/test/tint/builtins/modf/vector/mixed.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/modf/vector/mixed.wgsl.expected.ir.fxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct modf_result_vec2_f32 {
float2 fract;
float2 whole;
@@ -10,18 +8,13 @@
void main() {
float2 runtime_in = float2(1.25f, 3.75f);
modf_result_vec2_f32 res = {float2(0.25f, 0.75f), float2(1.0f, 3.0f)};
- modf_result_vec2_f32 v = modf(runtime_in);
- res = v;
- modf_result_vec2_f32 v_1 = {float2(0.25f, 0.75f), float2(1.0f, 3.0f)};
- res = v_1;
+ float2 v = (0.0f).xx;
+ float2 v_1 = modf(runtime_in, v);
+ modf_result_vec2_f32 v_2 = {v_1, v};
+ res = v_2;
+ modf_result_vec2_f32 v_3 = {float2(0.25f, 0.75f), float2(1.0f, 3.0f)};
+ res = v_3;
float2 fract = res.fract;
float2 whole = res.whole;
}
-FXC validation failure:
-<scrubbed_path>(11,28-43): error X3013: 'modf': no matching 1 parameter intrinsic function
-<scrubbed_path>(11,28-43): error X3013: Possible intrinsic functions are:
-<scrubbed_path>(11,28-43): error X3013: modf(float|half|min10float|min16float, out float|half|min10float|min16float ip)
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/modf/vector/runtime.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/modf/vector/runtime.wgsl.expected.ir.dxc.hlsl
index daafdb4..b939394 100644
--- a/test/tint/builtins/modf/vector/runtime.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/modf/vector/runtime.wgsl.expected.ir.dxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct modf_result_vec2_f32 {
float2 fract;
float2 whole;
@@ -9,17 +7,12 @@
[numthreads(1, 1, 1)]
void main() {
float2 tint_symbol = float2(1.25f, 3.75f);
- modf_result_vec2_f32 v = modf(tint_symbol);
- modf_result_vec2_f32 res = v;
+ float2 v = (0.0f).xx;
+ float2 v_1 = modf(tint_symbol, v);
+ modf_result_vec2_f32 v_2 = {v_1, v};
+ modf_result_vec2_f32 res = v_2;
float2 fract = res.fract;
- modf_result_vec2_f32 v_1 = v;
- float2 whole = v_1.whole;
+ modf_result_vec2_f32 v_3 = v_2;
+ float2 whole = v_3.whole;
}
-DXC validation failure:
-hlsl.hlsl:10:28: error: use of undeclared identifier 'modf'
- modf_result_vec2_f32 v = modf(tint_symbol);
- ^
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/builtins/modf/vector/runtime.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/modf/vector/runtime.wgsl.expected.ir.fxc.hlsl
index 91be9cc..b939394 100644
--- a/test/tint/builtins/modf/vector/runtime.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/modf/vector/runtime.wgsl.expected.ir.fxc.hlsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
struct modf_result_vec2_f32 {
float2 fract;
float2 whole;
@@ -9,17 +7,12 @@
[numthreads(1, 1, 1)]
void main() {
float2 tint_symbol = float2(1.25f, 3.75f);
- modf_result_vec2_f32 v = modf(tint_symbol);
- modf_result_vec2_f32 res = v;
+ float2 v = (0.0f).xx;
+ float2 v_1 = modf(tint_symbol, v);
+ modf_result_vec2_f32 v_2 = {v_1, v};
+ modf_result_vec2_f32 res = v_2;
float2 fract = res.fract;
- modf_result_vec2_f32 v_1 = v;
- float2 whole = v_1.whole;
+ modf_result_vec2_f32 v_3 = v_2;
+ float2 whole = v_3.whole;
}
-FXC validation failure:
-<scrubbed_path>(10,28-44): error X3013: 'modf': no matching 1 parameter intrinsic function
-<scrubbed_path>(10,28-44): error X3013: Possible intrinsic functions are:
-<scrubbed_path>(10,28-44): error X3013: modf(float|half|min10float|min16float, out float|half|min10float|min16float ip)
-
-
-tint executable returned error: exit status 1