tint: Rename `frexp().sig` to `frexp().fract`

Fixed: tint:1757
Change-Id: Iacce6ab0f08f89abbe5831e6f2285a0c964e74d7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110100
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton 2022-11-14 15:29:29 +00:00 committed by Dawn LUCI CQ
parent 1ef277db0e
commit 10fae7ac79
101 changed files with 5804 additions and 5406 deletions

View File

@ -1,5 +1,11 @@
# Tint changes during Origin Trial # Tint changes during Origin Trial
## Changes for M110
### Deprecated Features
* The `sig` member of the return type of `frexp()` has been renamed to `fract`. [tint:1757](crbug.com/tint/1757)
## Changes for M109 ## Changes for M109
### Breaking changes ### Breaking changes

View File

@ -34,6 +34,7 @@
#include "src/tint/sem/member_accessor_expression.h" #include "src/tint/sem/member_accessor_expression.h"
#include "src/tint/sem/sampled_texture.h" #include "src/tint/sem/sampled_texture.h"
#include "src/tint/sem/statement.h" #include "src/tint/sem/statement.h"
#include "src/tint/sem/test_helper.h"
#include "src/tint/sem/variable.h" #include "src/tint/sem/variable.h"
using ::testing::ElementsAre; using ::testing::ElementsAre;
@ -927,12 +928,12 @@ TEST_F(ResolverBuiltinFloatTest, FrexpScalar_f32) {
ASSERT_NE(ty, nullptr); ASSERT_NE(ty, nullptr);
ASSERT_EQ(ty->Members().size(), 2u); ASSERT_EQ(ty->Members().size(), 2u);
auto* sig = ty->Members()[0]; auto* fract = ty->Members()[0];
EXPECT_TRUE(sig->Type()->Is<sem::F32>()); EXPECT_TRUE(fract->Type()->Is<sem::F32>());
EXPECT_EQ(sig->Offset(), 0u); EXPECT_EQ(fract->Offset(), 0u);
EXPECT_EQ(sig->Size(), 4u); EXPECT_EQ(fract->Size(), 4u);
EXPECT_EQ(sig->Align(), 4u); EXPECT_EQ(fract->Align(), 4u);
EXPECT_EQ(sig->Name(), Sym("sig")); EXPECT_EQ(fract->Name(), Sym("fract"));
auto* exp = ty->Members()[1]; auto* exp = ty->Members()[1];
EXPECT_TRUE(exp->Type()->Is<sem::I32>()); EXPECT_TRUE(exp->Type()->Is<sem::I32>());
@ -958,12 +959,12 @@ TEST_F(ResolverBuiltinFloatTest, FrexpScalar_f16) {
ASSERT_NE(ty, nullptr); ASSERT_NE(ty, nullptr);
ASSERT_EQ(ty->Members().size(), 2u); ASSERT_EQ(ty->Members().size(), 2u);
auto* sig = ty->Members()[0]; auto* fract = ty->Members()[0];
EXPECT_TRUE(sig->Type()->Is<sem::F16>()); EXPECT_TRUE(fract->Type()->Is<sem::F16>());
EXPECT_EQ(sig->Offset(), 0u); EXPECT_EQ(fract->Offset(), 0u);
EXPECT_EQ(sig->Size(), 2u); EXPECT_EQ(fract->Size(), 2u);
EXPECT_EQ(sig->Align(), 2u); EXPECT_EQ(fract->Align(), 2u);
EXPECT_EQ(sig->Name(), Sym("sig")); EXPECT_EQ(fract->Name(), Sym("fract"));
auto* exp = ty->Members()[1]; auto* exp = ty->Members()[1];
EXPECT_TRUE(exp->Type()->Is<sem::I32>()); EXPECT_TRUE(exp->Type()->Is<sem::I32>());
@ -987,14 +988,14 @@ TEST_F(ResolverBuiltinFloatTest, FrexpVector_f32) {
ASSERT_NE(ty, nullptr); ASSERT_NE(ty, nullptr);
ASSERT_EQ(ty->Members().size(), 2u); ASSERT_EQ(ty->Members().size(), 2u);
auto* sig = ty->Members()[0]; auto* fract = ty->Members()[0];
ASSERT_TRUE(sig->Type()->Is<sem::Vector>()); ASSERT_TRUE(fract->Type()->Is<sem::Vector>());
EXPECT_EQ(sig->Type()->As<sem::Vector>()->Width(), 3u); EXPECT_EQ(fract->Type()->As<sem::Vector>()->Width(), 3u);
EXPECT_TRUE(sig->Type()->As<sem::Vector>()->type()->Is<sem::F32>()); EXPECT_TRUE(fract->Type()->As<sem::Vector>()->type()->Is<sem::F32>());
EXPECT_EQ(sig->Offset(), 0u); EXPECT_EQ(fract->Offset(), 0u);
EXPECT_EQ(sig->Size(), 12u); EXPECT_EQ(fract->Size(), 12u);
EXPECT_EQ(sig->Align(), 16u); EXPECT_EQ(fract->Align(), 16u);
EXPECT_EQ(sig->Name(), Sym("sig")); EXPECT_EQ(fract->Name(), Sym("fract"));
auto* exp = ty->Members()[1]; auto* exp = ty->Members()[1];
ASSERT_TRUE(exp->Type()->Is<sem::Vector>()); ASSERT_TRUE(exp->Type()->Is<sem::Vector>());
@ -1022,14 +1023,14 @@ TEST_F(ResolverBuiltinFloatTest, FrexpVector_f16) {
ASSERT_NE(ty, nullptr); ASSERT_NE(ty, nullptr);
ASSERT_EQ(ty->Members().size(), 2u); ASSERT_EQ(ty->Members().size(), 2u);
auto* sig = ty->Members()[0]; auto* fract = ty->Members()[0];
ASSERT_TRUE(sig->Type()->Is<sem::Vector>()); ASSERT_TRUE(fract->Type()->Is<sem::Vector>());
EXPECT_EQ(sig->Type()->As<sem::Vector>()->Width(), 3u); EXPECT_EQ(fract->Type()->As<sem::Vector>()->Width(), 3u);
EXPECT_TRUE(sig->Type()->As<sem::Vector>()->type()->Is<sem::F16>()); EXPECT_TRUE(fract->Type()->As<sem::Vector>()->type()->Is<sem::F16>());
EXPECT_EQ(sig->Offset(), 0u); EXPECT_EQ(fract->Offset(), 0u);
EXPECT_EQ(sig->Size(), 6u); EXPECT_EQ(fract->Size(), 6u);
EXPECT_EQ(sig->Align(), 8u); EXPECT_EQ(fract->Align(), 8u);
EXPECT_EQ(sig->Name(), Sym("sig")); EXPECT_EQ(fract->Name(), Sym("fract"));
auto* exp = ty->Members()[1]; auto* exp = ty->Members()[1];
ASSERT_TRUE(exp->Type()->Is<sem::Vector>()); ASSERT_TRUE(exp->Type()->Is<sem::Vector>());
@ -1044,6 +1045,29 @@ TEST_F(ResolverBuiltinFloatTest, FrexpVector_f16) {
EXPECT_EQ(ty->SizeNoPadding(), 28u); EXPECT_EQ(ty->SizeNoPadding(), 28u);
} }
// TODO(crbug.com/tint/1757): Remove once deprecation period for `frexp().sig` is over
TEST_F(ResolverBuiltinFloatTest, FrexpVector_sig) {
Enable(ast::Extension::kF16);
auto* call = Call("frexp", vec3<f16>());
auto* expr = MemberAccessor(call, "sig");
WrapInFunction(expr);
EXPECT_TRUE(r()->Resolve()) << r()->error();
ASSERT_NE(TypeOf(call), nullptr);
auto* ty = TypeOf(call)->As<sem::Struct>();
ASSERT_NE(ty, nullptr);
ASSERT_EQ(ty->Members().size(), 2u);
auto* sig = ty->Members()[0];
EXPECT_TYPE(sig->Type(), TypeOf(expr));
auto* access = Sem().Get<sem::StructMemberAccess>(expr);
ASSERT_NE(access, nullptr);
EXPECT_EQ(access->Member(), sig);
}
TEST_F(ResolverBuiltinFloatTest, Frexp_Error_FirstParamInt) { TEST_F(ResolverBuiltinFloatTest, Frexp_Error_FirstParamInt) {
GlobalVar("v", ty.i32(), ast::AddressSpace::kWorkgroup); GlobalVar("v", ty.i32(), ast::AddressSpace::kWorkgroup);
auto* call = Call("frexp", 1_i, AddressOf("v")); auto* call = Call("frexp", 1_i, AddressOf("v"));

View File

@ -856,7 +856,7 @@ const sem::Struct* build_frexp_result(MatchState& state, const sem::Type* el) {
display_name = "__frexp_result"; display_name = "__frexp_result";
} }
auto* i32 = state.builder.create<sem::I32>(); auto* i32 = state.builder.create<sem::I32>();
return build_struct(state, display_name, {{"sig", el}, {"exp", i32}}); return build_struct(state, display_name, {{"fract", el}, {"exp", i32}});
} }
const sem::Struct* build_frexp_result_vec(MatchState& state, Number& n, const sem::Type* el) { const sem::Struct* build_frexp_result_vec(MatchState& state, Number& n, const sem::Type* el) {
std::string display_name; std::string display_name;
@ -867,7 +867,7 @@ const sem::Struct* build_frexp_result_vec(MatchState& state, Number& n, const se
} }
auto* vec = state.builder.create<sem::Vector>(el, n.Value()); auto* vec = state.builder.create<sem::Vector>(el, n.Value());
auto* vec_i32 = state.builder.create<sem::Vector>(state.builder.create<sem::I32>(), n.Value()); auto* vec_i32 = state.builder.create<sem::Vector>(state.builder.create<sem::I32>(), n.Value());
return build_struct(state, display_name, {{"sig", vec}, {"exp", vec_i32}}); return build_struct(state, display_name, {{"fract", vec}, {"exp", vec_i32}});
} }
const sem::Struct* build_atomic_compare_exchange_result(MatchState& state, const sem::Type* ty) { const sem::Struct* build_atomic_compare_exchange_result(MatchState& state, const sem::Type* ty) {
return build_struct( return build_struct(

File diff suppressed because it is too large Load Diff

View File

@ -86,6 +86,7 @@
#include "src/tint/utils/math.h" #include "src/tint/utils/math.h"
#include "src/tint/utils/reverse.h" #include "src/tint/utils/reverse.h"
#include "src/tint/utils/scoped_assignment.h" #include "src/tint/utils/scoped_assignment.h"
#include "src/tint/utils/string.h"
#include "src/tint/utils/transform.h" #include "src/tint/utils/transform.h"
#include "src/tint/utils/vector.h" #include "src/tint/utils/vector.h"
@ -2380,18 +2381,29 @@ sem::Expression* Resolver::MemberAccessor(const ast::MemberAccessorExpression* e
const sem::StructMember* member = nullptr; const sem::StructMember* member = nullptr;
for (auto* m : str->Members()) { for (auto* m : str->Members()) {
if (m->Name() == symbol) { if (m->Name() == symbol) {
ty = m->Type();
member = m; member = m;
break; break;
} }
} }
if (ty == nullptr) { // TODO(crbug.com/tint/1757): Remove
if (utils::HasPrefix(builder_->Symbols().NameFor(str->Name()), "__frexp_result")) {
if (builder_->Symbols().NameFor(symbol) == "sig") {
AddWarning(
"use of deprecated language feature: 'sig' has been renamed to 'fract'",
expr->member->source);
member = str->Members()[0];
}
}
if (member == nullptr) {
AddError("struct member " + builder_->Symbols().NameFor(symbol) + " not found", AddError("struct member " + builder_->Symbols().NameFor(symbol) + " not found",
expr->source); expr->source);
return nullptr; return nullptr;
} }
ty = member->Type();
// If we're extracting from a reference, we return a reference. // If we're extracting from a reference, we return a reference.
if (auto* ref = structure->As<sem::Reference>()) { if (auto* ref = structure->As<sem::Reference>()) {
ty = builder_->create<sem::Reference>(ty, ref->AddressSpace(), ref->Access()); ty = builder_->create<sem::Reference>(ty, ref->AddressSpace(), ref->Access());

View File

@ -19,7 +19,7 @@
namespace tint::utils { namespace tint::utils {
size_t Distance(const std::string& str_a, const std::string& str_b) { size_t Distance(std::string_view str_a, std::string_view str_b) {
const auto len_a = str_a.size(); const auto len_a = str_a.size();
const auto len_b = str_b.size(); const auto len_b = str_b.size();

View File

@ -25,10 +25,10 @@ namespace tint::utils {
/// @param replacement the replacement string to use instead of `substr` /// @param replacement the replacement string to use instead of `substr`
/// @returns `str` with all occurrences of `substr` replaced with `replacement` /// @returns `str` with all occurrences of `substr` replaced with `replacement`
[[nodiscard]] inline std::string ReplaceAll(std::string str, [[nodiscard]] inline std::string ReplaceAll(std::string str,
const std::string& substr, std::string_view substr,
const std::string& replacement) { std::string_view replacement) {
size_t pos = 0; size_t pos = 0;
while ((pos = str.find(substr, pos)) != std::string::npos) { while ((pos = str.find(substr, pos)) != std::string_view::npos) {
str.replace(pos, substr.length(), replacement); str.replace(pos, substr.length(), replacement);
pos += replacement.length(); pos += replacement.length();
} }
@ -44,10 +44,17 @@ std::string ToString(const T& value) {
return s.str(); return s.str();
} }
/// @param str the input string
/// @param prefix the prefix string
/// @returns true iff @p str has the prefix @p prefix
inline size_t HasPrefix(std::string_view str, std::string_view prefix) {
return str.compare(0, prefix.size(), prefix) == 0;
}
/// @param a the first string /// @param a the first string
/// @param b the second string /// @param b the second string
/// @returns the Levenshtein distance between @p a and @p b /// @returns the Levenshtein distance between @p a and @p b
size_t Distance(const std::string& a, const std::string& b); size_t Distance(std::string_view a, std::string_view b);
} // namespace tint::utils } // namespace tint::utils

View File

@ -37,6 +37,15 @@ TEST(StringTest, ToString) {
EXPECT_EQ("hello", ToString("hello")); EXPECT_EQ("hello", ToString("hello"));
} }
TEST(StringTest, HasPrefix) {
EXPECT_TRUE(HasPrefix("abc", "a"));
EXPECT_TRUE(HasPrefix("abc", "ab"));
EXPECT_TRUE(HasPrefix("abc", "abc"));
EXPECT_FALSE(HasPrefix("abc", "abc1"));
EXPECT_FALSE(HasPrefix("abc", "ac"));
EXPECT_FALSE(HasPrefix("abc", "b"));
}
TEST(StringTest, Distance) { TEST(StringTest, Distance) {
EXPECT_EQ(Distance("hello world", "hello world"), 0u); EXPECT_EQ(Distance("hello world", "hello world"), 0u);
EXPECT_EQ(Distance("hello world", "helloworld"), 1u); EXPECT_EQ(Distance("hello world", "helloworld"), 1u);

View File

@ -1264,7 +1264,7 @@ bool GeneratorImpl::EmitFrexpCall(std::ostream& out,
} }
l << " result;"; l << " result;";
} }
line(b) << "result.sig = frexp(" << params[0] << ", result.exp);"; line(b) << "result.fract = frexp(" << params[0] << ", result.exp);";
line(b) << "return result;"; line(b) << "return result;";
return true; return true;
}); });
@ -2697,14 +2697,24 @@ bool GeneratorImpl::EmitMemberAccessor(std::ostream& out,
} }
out << "."; out << ".";
// Swizzles output the name directly auto* sem = builder_.Sem().Get(expr);
if (builder_.Sem().Get(expr)->Is<sem::Swizzle>()) {
out << builder_.Symbols().NameFor(expr->member->symbol);
} else if (!EmitExpression(out, expr->member)) {
return false;
}
return true; return Switch(
sem,
[&](const sem::Swizzle*) {
// Swizzles output the name directly
out << builder_.Symbols().NameFor(expr->member->symbol);
return true;
},
[&](const sem::StructMemberAccess* member_access) {
out << program_->Symbols().NameFor(member_access->Member()->Name());
return true;
},
[&](Default) {
TINT_ICE(Writer, diagnostics_)
<< "unknown member access type: " << sem->TypeInfo().name;
return false;
});
} }
bool GeneratorImpl::EmitReturn(const ast::ReturnStatement* stmt) { bool GeneratorImpl::EmitReturn(const ast::ReturnStatement* stmt) {

View File

@ -561,14 +561,16 @@ TEST_F(GlslGeneratorImplTest_Builtin, Frexp_Scalar_f32) {
GeneratorImpl& gen = SanitizeAndBuild(); GeneratorImpl& gen = SanitizeAndBuild();
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_THAT(gen.result(), HasSubstr(R"( EXPECT_EQ(gen.result(), R"(#version 310 es
float sig;
struct frexp_result {
float fract;
int exp; int exp;
}; };
frexp_result tint_frexp(float param_0) { frexp_result tint_frexp(float param_0) {
frexp_result result; frexp_result result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -578,7 +580,11 @@ void test_function() {
} }
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
)")); void main() {
test_function();
return;
}
)");
} }
TEST_F(GlslGeneratorImplTest_Builtin, Frexp_Scalar_f16) { TEST_F(GlslGeneratorImplTest_Builtin, Frexp_Scalar_f16) {
@ -590,17 +596,17 @@ TEST_F(GlslGeneratorImplTest_Builtin, Frexp_Scalar_f16) {
GeneratorImpl& gen = SanitizeAndBuild(); GeneratorImpl& gen = SanitizeAndBuild();
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_THAT(gen.result(), HasSubstr(R"(#version 310 es EXPECT_EQ(gen.result(), R"(#version 310 es
#extension GL_AMD_gpu_shader_half_float : require #extension GL_AMD_gpu_shader_half_float : require
struct frexp_result_f16 { struct frexp_result_f16 {
float16_t sig; float16_t fract;
int exp; int exp;
}; };
frexp_result_f16 tint_frexp(float16_t param_0) { frexp_result_f16 tint_frexp(float16_t param_0) {
frexp_result_f16 result; frexp_result_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -613,7 +619,8 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() { void main() {
test_function(); test_function();
return; return;
)")); }
)");
} }
TEST_F(GlslGeneratorImplTest_Builtin, Frexp_Vector_f32) { TEST_F(GlslGeneratorImplTest_Builtin, Frexp_Vector_f32) {
@ -623,16 +630,16 @@ TEST_F(GlslGeneratorImplTest_Builtin, Frexp_Vector_f32) {
GeneratorImpl& gen = SanitizeAndBuild(); GeneratorImpl& gen = SanitizeAndBuild();
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_THAT(gen.result(), HasSubstr(R"( EXPECT_EQ(gen.result(), R"(#version 310 es
struct frexp_result_vec3 { struct frexp_result_vec3 {
vec3 sig; vec3 fract;
ivec3 exp; ivec3 exp;
}; };
frexp_result_vec3 tint_frexp(vec3 param_0) { frexp_result_vec3 tint_frexp(vec3 param_0) {
frexp_result_vec3 result; frexp_result_vec3 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -645,7 +652,8 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() { void main() {
test_function(); test_function();
return; return;
)")); }
)");
} }
TEST_F(GlslGeneratorImplTest_Builtin, Frexp_Vector_f16) { TEST_F(GlslGeneratorImplTest_Builtin, Frexp_Vector_f16) {
@ -657,17 +665,17 @@ TEST_F(GlslGeneratorImplTest_Builtin, Frexp_Vector_f16) {
GeneratorImpl& gen = SanitizeAndBuild(); GeneratorImpl& gen = SanitizeAndBuild();
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_THAT(gen.result(), HasSubstr(R"(#version 310 es EXPECT_EQ(gen.result(), R"(#version 310 es
#extension GL_AMD_gpu_shader_half_float : require #extension GL_AMD_gpu_shader_half_float : require
struct frexp_result_vec3_f16 { struct frexp_result_vec3_f16 {
f16vec3 sig; f16vec3 fract;
ivec3 exp; ivec3 exp;
}; };
frexp_result_vec3_f16 tint_frexp(f16vec3 param_0) { frexp_result_vec3_f16 tint_frexp(f16vec3 param_0) {
frexp_result_vec3_f16 result; frexp_result_vec3_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -681,7 +689,40 @@ void main() {
test_function(); test_function();
return; return;
} }
)")); )");
}
// TODO(crbug.com/tint/1757): Remove once deprecation period for `frexp().sig` is over
TEST_F(GlslGeneratorImplTest_Builtin, Frexp_Sig_Deprecation) {
WrapInFunction(MemberAccessor(Call("frexp", 1_f), "sig"));
GeneratorImpl& gen = SanitizeAndBuild();
ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"(#version 310 es
struct frexp_result {
float fract;
int exp;
};
frexp_result tint_frexp(float param_0) {
frexp_result result;
result.fract = frexp(param_0, result.exp);
return result;
}
void test_function() {
float tint_symbol = tint_frexp(1.0f).fract;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
test_function();
return;
}
)");
} }
TEST_F(GlslGeneratorImplTest_Builtin, Degrees_Scalar_f32) { TEST_F(GlslGeneratorImplTest_Builtin, Degrees_Scalar_f32) {
@ -1349,7 +1390,6 @@ void main() {
)"); )");
} }
TEST_F(GlslGeneratorImplTest_Builtin, QuantizeToF16_Vec4) { TEST_F(GlslGeneratorImplTest_Builtin, QuantizeToF16_Vec4) {
GlobalVar("v", vec4<f32>(2_f), ast::AddressSpace::kPrivate); GlobalVar("v", vec4<f32>(2_f), ast::AddressSpace::kPrivate);
WrapInFunction(Call("quantizeToF16", "v")); WrapInFunction(Call("quantizeToF16", "v"));

View File

@ -1793,14 +1793,14 @@ bool GeneratorImpl::EmitFrexpCall(std::ostream& out,
} }
line(b) << member_type << " exp;"; line(b) << member_type << " exp;";
line(b) << member_type << " sig = frexp(" << in << ", exp);"; line(b) << member_type << " fract = frexp(" << in << ", exp);";
{ {
auto l = line(b); auto l = line(b);
if (!EmitType(l, builtin->ReturnType(), ast::AddressSpace::kNone, if (!EmitType(l, builtin->ReturnType(), ast::AddressSpace::kNone,
ast::Access::kUndefined, "")) { ast::Access::kUndefined, "")) {
return false; return false;
} }
l << " result = {sig, int" << width << "(exp)};"; l << " result = {fract, int" << width << "(exp)};";
} }
line(b) << "return result;"; line(b) << "return result;";
return true; return true;
@ -3471,14 +3471,24 @@ bool GeneratorImpl::EmitMemberAccessor(std::ostream& out,
} }
out << "."; out << ".";
// Swizzles output the name directly auto* sem = builder_.Sem().Get(expr);
if (builder_.Sem().Get(expr)->Is<sem::Swizzle>()) {
out << builder_.Symbols().NameFor(expr->member->symbol);
} else if (!EmitExpression(out, expr->member)) {
return false;
}
return true; return Switch(
sem,
[&](const sem::Swizzle*) {
// Swizzles output the name directly
out << builder_.Symbols().NameFor(expr->member->symbol);
return true;
},
[&](const sem::StructMemberAccess* member_access) {
out << program_->Symbols().NameFor(member_access->Member()->Name());
return true;
},
[&](Default) {
TINT_ICE(Writer, diagnostics_)
<< "unknown member access type: " << sem->TypeInfo().name;
return false;
});
} }
bool GeneratorImpl::EmitReturn(const ast::ReturnStatement* stmt) { bool GeneratorImpl::EmitReturn(const ast::ReturnStatement* stmt) {

View File

@ -493,13 +493,13 @@ TEST_F(HlslGeneratorImplTest_Builtin, Frexp_Scalar_f32) {
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"(struct frexp_result { EXPECT_EQ(gen.result(), R"(struct frexp_result {
float sig; float fract;
int exp; int exp;
}; };
frexp_result tint_frexp(float param_0) { frexp_result tint_frexp(float param_0) {
float exp; float exp;
float sig = frexp(param_0, exp); float fract = frexp(param_0, exp);
frexp_result result = {sig, int(exp)}; frexp_result result = {fract, int(exp)};
return result; return result;
} }
@ -521,13 +521,13 @@ TEST_F(HlslGeneratorImplTest_Builtin, Frexp_Scalar_f16) {
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"(struct frexp_result_f16 { EXPECT_EQ(gen.result(), R"(struct frexp_result_f16 {
float16_t sig; float16_t fract;
int exp; int exp;
}; };
frexp_result_f16 tint_frexp(float16_t param_0) { frexp_result_f16 tint_frexp(float16_t param_0) {
float16_t exp; float16_t exp;
float16_t sig = frexp(param_0, exp); float16_t fract = frexp(param_0, exp);
frexp_result_f16 result = {sig, int(exp)}; frexp_result_f16 result = {fract, int(exp)};
return result; return result;
} }
@ -547,13 +547,13 @@ TEST_F(HlslGeneratorImplTest_Builtin, Frexp_Vector_f32) {
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"(struct frexp_result_vec3 { EXPECT_EQ(gen.result(), R"(struct frexp_result_vec3 {
float3 sig; float3 fract;
int3 exp; int3 exp;
}; };
frexp_result_vec3 tint_frexp(float3 param_0) { frexp_result_vec3 tint_frexp(float3 param_0) {
float3 exp; float3 exp;
float3 sig = frexp(param_0, exp); float3 fract = frexp(param_0, exp);
frexp_result_vec3 result = {sig, int3(exp)}; frexp_result_vec3 result = {fract, int3(exp)};
return result; return result;
} }
@ -575,13 +575,13 @@ TEST_F(HlslGeneratorImplTest_Builtin, Frexp_Vector_f16) {
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"(struct frexp_result_vec3_f16 { EXPECT_EQ(gen.result(), R"(struct frexp_result_vec3_f16 {
vector<float16_t, 3> sig; vector<float16_t, 3> fract;
int3 exp; int3 exp;
}; };
frexp_result_vec3_f16 tint_frexp(vector<float16_t, 3> param_0) { frexp_result_vec3_f16 tint_frexp(vector<float16_t, 3> param_0) {
vector<float16_t, 3> exp; vector<float16_t, 3> exp;
vector<float16_t, 3> sig = frexp(param_0, exp); vector<float16_t, 3> fract = frexp(param_0, exp);
frexp_result_vec3_f16 result = {sig, int3(exp)}; frexp_result_vec3_f16 result = {fract, int3(exp)};
return result; return result;
} }
@ -593,6 +593,32 @@ void test_function() {
)"); )");
} }
// TODO(crbug.com/tint/1757): Remove once deprecation period for `frexp().sig` is over
TEST_F(HlslGeneratorImplTest_Builtin, Frexp_Sig_Deprecation) {
WrapInFunction(MemberAccessor(Call("frexp", 1_f), "sig"));
GeneratorImpl& gen = SanitizeAndBuild();
ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"(struct frexp_result {
float fract;
int exp;
};
frexp_result tint_frexp(float param_0) {
float exp;
float fract = frexp(param_0, exp);
frexp_result result = {fract, int(exp)};
return result;
}
[numthreads(1, 1, 1)]
void test_function() {
const float tint_symbol = tint_frexp(1.0f).fract;
return;
}
)");
}
TEST_F(HlslGeneratorImplTest_Builtin, Degrees_Scalar_f32) { TEST_F(HlslGeneratorImplTest_Builtin, Degrees_Scalar_f32) {
auto* val = Var("val", ty.f32()); auto* val = Var("val", ty.f32());
auto* call = Call("degrees", val); auto* call = Call("degrees", val);

View File

@ -1377,7 +1377,7 @@ bool GeneratorImpl::EmitFrexpCall(std::ostream& out,
} }
line(b) << StructName(builtin->ReturnType()->As<sem::Struct>()) << " result;"; line(b) << StructName(builtin->ReturnType()->As<sem::Struct>()) << " result;";
line(b) << "result.sig = frexp(" << in << ", result.exp);"; line(b) << "result.fract = frexp(" << in << ", result.exp);";
line(b) << "return result;"; line(b) << "return result;";
return true; return true;
}); });
@ -2331,40 +2331,45 @@ bool GeneratorImpl::EmitMemberAccessor(std::ostream& out,
return true; return true;
}; };
auto& sem = program_->Sem(); auto* sem = builder_.Sem().Get(expr);
if (auto* swizzle = sem.Get(expr)->As<sem::Swizzle>()) { return Switch(
// Metal 1.x does not support swizzling of packed vector types. sem,
// For single element swizzles, we can use the index operator. [&](const sem::Swizzle* swizzle) {
// For multi-element swizzles, we need to cast to a regular vector type // Metal 1.x does not support swizzling of packed vector types.
// first. Note that we do not currently allow assignments to swizzles, so // For single element swizzles, we can use the index operator.
// the casting which will convert the l-value to r-value is fine. // For multi-element swizzles, we need to cast to a regular vector type
if (swizzle->Indices().Length() == 1) { // first. Note that we do not currently allow assignments to swizzles, so
// the casting which will convert the l-value to r-value is fine.
if (swizzle->Indices().Length() == 1) {
if (!write_lhs()) {
return false;
}
out << "[" << swizzle->Indices()[0] << "]";
} else {
if (!EmitType(out, swizzle->Object()->Type()->UnwrapRef(), "")) {
return false;
}
out << "(";
if (!write_lhs()) {
return false;
}
out << ")." << program_->Symbols().NameFor(expr->member->symbol);
}
return true;
},
[&](const sem::StructMemberAccess* member_access) {
if (!write_lhs()) { if (!write_lhs()) {
return false; return false;
} }
out << "[" << swizzle->Indices()[0] << "]"; out << "." << program_->Symbols().NameFor(member_access->Member()->Name());
} else { return true;
if (!EmitType(out, sem.Get(expr->structure)->Type()->UnwrapRef(), "")) { },
return false; [&](Default) {
} TINT_ICE(Writer, diagnostics_)
out << "("; << "unknown member access type: " << sem->TypeInfo().name;
if (!write_lhs()) {
return false;
}
out << ")." << program_->Symbols().NameFor(expr->member->symbol);
}
} else {
if (!write_lhs()) {
return false; return false;
} });
out << ".";
if (!EmitExpression(out, expr->member)) {
return false;
}
}
return true;
} }
bool GeneratorImpl::EmitReturn(const ast::ReturnStatement* stmt) { bool GeneratorImpl::EmitReturn(const ast::ReturnStatement* stmt) {

View File

@ -537,12 +537,12 @@ TEST_F(MslGeneratorImplTest, Frexp_Scalar_f32) {
using namespace metal; using namespace metal;
struct frexp_result { struct frexp_result {
float sig; float fract;
int exp; int exp;
}; };
frexp_result tint_frexp(float param_0) { frexp_result tint_frexp(float param_0) {
frexp_result result; frexp_result result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -568,12 +568,12 @@ TEST_F(MslGeneratorImplTest, Frexp_Scalar_f16) {
using namespace metal; using namespace metal;
struct frexp_result_f16 { struct frexp_result_f16 {
half sig; half fract;
int exp; int exp;
}; };
frexp_result_f16 tint_frexp(half param_0) { frexp_result_f16 tint_frexp(half param_0) {
frexp_result_f16 result; frexp_result_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -597,12 +597,12 @@ TEST_F(MslGeneratorImplTest, Frexp_Vector_f32) {
using namespace metal; using namespace metal;
struct frexp_result_vec3 { struct frexp_result_vec3 {
float3 sig; float3 fract;
int3 exp; int3 exp;
}; };
frexp_result_vec3 tint_frexp(float3 param_0) { frexp_result_vec3 tint_frexp(float3 param_0) {
frexp_result_vec3 result; frexp_result_vec3 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -628,12 +628,12 @@ TEST_F(MslGeneratorImplTest, Frexp_Vector_f16) {
using namespace metal; using namespace metal;
struct frexp_result_vec3_f16 { struct frexp_result_vec3_f16 {
half3 sig; half3 fract;
int3 exp; int3 exp;
}; };
frexp_result_vec3_f16 tint_frexp(half3 param_0) { frexp_result_vec3_f16 tint_frexp(half3 param_0) {
frexp_result_vec3_f16 result; frexp_result_vec3_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -645,6 +645,35 @@ kernel void test_function() {
)"); )");
} }
// TODO(crbug.com/tint/1757): Remove once deprecation period for `frexp().sig` is over
TEST_F(MslGeneratorImplTest, Frexp_Sig_Deprecation) {
WrapInFunction(MemberAccessor(Call("frexp", 1_f), "sig"));
GeneratorImpl& gen = SanitizeAndBuild();
ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"(#include <metal_stdlib>
using namespace metal;
struct frexp_result {
float fract;
int exp;
};
frexp_result tint_frexp(float param_0) {
frexp_result result;
result.fract = frexp(param_0, result.exp);
return result;
}
kernel void test_function() {
float const tint_symbol = tint_frexp(1.0f).fract;
return;
}
)");
}
TEST_F(MslGeneratorImplTest, Degrees_Scalar_f32) { TEST_F(MslGeneratorImplTest, Degrees_Scalar_f32) {
auto* val = Var("val", ty.f32()); auto* val = Var("val", ty.f32());
auto* call = Call("degrees", val); auto* call = Call("degrees", val);

View File

@ -1764,7 +1764,7 @@ OpExecutionMode %3 OriginUpperLeft
OpName %3 "a_func" OpName %3 "a_func"
OpName %10 "vec" OpName %10 "vec"
OpName %14 "__frexp_result_vec2" OpName %14 "__frexp_result_vec2"
OpMemberName %14 0 "sig" OpMemberName %14 0 "fract"
OpMemberName %14 1 "exp" OpMemberName %14 1 "exp"
OpMemberDecorate %14 0 Offset 0 OpMemberDecorate %14 0 Offset 0
OpMemberDecorate %14 1 Offset 8 OpMemberDecorate %14 1 Offset 8
@ -1824,7 +1824,7 @@ OpExecutionMode %3 OriginUpperLeft
OpName %3 "a_func" OpName %3 "a_func"
OpName %10 "vec" OpName %10 "vec"
OpName %14 "__frexp_result_vec2_f16" OpName %14 "__frexp_result_vec2_f16"
OpMemberName %14 0 "sig" OpMemberName %14 0 "fract"
OpMemberName %14 1 "exp" OpMemberName %14 1 "exp"
OpMemberDecorate %14 0 Offset 0 OpMemberDecorate %14 0 Offset 0
OpMemberDecorate %14 1 Offset 8 OpMemberDecorate %14 1 Offset 8
@ -1854,6 +1854,78 @@ OpFunctionEnd
Validate(b); Validate(b);
} }
// TODO(crbug.com/tint/1757): Remove once deprecation period for `frexp().sig` is over
TEST_F(BuiltinBuilderTest, Frexp_Sig_Deprecation) {
WrapInFunction(MemberAccessor(Call("frexp", 1_f), "sig"));
auto* vec = Var("vec", vec2<f32>(1_f, 2_f));
Func("a_func", utils::Empty, ty.void_(),
utils::Vector{
Decl(vec),
Decl(Let("s", MemberAccessor(Call("frexp", vec), "sig"))),
},
utils::Vector{
Stage(ast::PipelineStage::kFragment),
});
spirv::Builder& b = Build();
ASSERT_TRUE(b.Build()) << b.error();
auto got = DumpBuilder(b);
auto* expect = R"(OpCapability Shader
%9 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %3 "test_function"
OpEntryPoint Fragment %12 "a_func"
OpExecutionMode %3 LocalSize 1 1 1
OpExecutionMode %12 OriginUpperLeft
OpName %3 "test_function"
OpName %6 "__frexp_result"
OpMemberName %6 0 "fract"
OpMemberName %6 1 "exp"
OpName %12 "a_func"
OpName %17 "vec"
OpName %21 "__frexp_result_vec2"
OpMemberName %21 0 "fract"
OpMemberName %21 1 "exp"
OpMemberDecorate %6 0 Offset 0
OpMemberDecorate %6 1 Offset 4
OpMemberDecorate %21 0 Offset 0
OpMemberDecorate %21 1 Offset 8
%2 = OpTypeVoid
%1 = OpTypeFunction %2
%7 = OpTypeFloat 32
%8 = OpTypeInt 32 1
%6 = OpTypeStruct %7 %8
%10 = OpConstant %7 1
%14 = OpTypeVector %7 2
%15 = OpConstant %7 2
%16 = OpConstantComposite %14 %10 %15
%18 = OpTypePointer Function %14
%19 = OpConstantNull %14
%22 = OpTypeVector %8 2
%21 = OpTypeStruct %14 %22
%3 = OpFunction %2 None %1
%4 = OpLabel
%5 = OpExtInst %6 %9 FrexpStruct %10
%11 = OpCompositeExtract %7 %5 0
OpReturn
OpFunctionEnd
%12 = OpFunction %2 None %1
%13 = OpLabel
%17 = OpVariable %18 Function %19
OpStore %17 %16
%23 = OpLoad %14 %17
%20 = OpExtInst %21 %9 FrexpStruct %23
%24 = OpCompositeExtract %14 %20 0
OpReturn
OpFunctionEnd
)";
EXPECT_EQ(expect, got);
Validate(b);
}
TEST_F(BuiltinBuilderTest, Call_QuantizeToF16_Scalar) { TEST_F(BuiltinBuilderTest, Call_QuantizeToF16_Scalar) {
GlobalVar("v", Expr(2_f), ast::AddressSpace::kPrivate); GlobalVar("v", Expr(2_f), ast::AddressSpace::kPrivate);

View File

@ -0,0 +1,7 @@
// TODO(crbug.com/tint/1757): Remove this test once the deprecation period for `frexp().sig` is over
@compute @workgroup_size(1)
fn main() {
let res = frexp(1.23);
let exp : i32 = res.exp;
let sig : f32 = res.sig;
}

View File

@ -0,0 +1,22 @@
bug/tint/1757.wgsl:6:25 warning: use of deprecated language feature: 'sig' has been renamed to 'fract'
let sig : f32 = res.sig;
^^^
struct frexp_result {
float fract;
int exp;
};
frexp_result tint_frexp(float param_0) {
float exp;
float fract = frexp(param_0, exp);
frexp_result result = {fract, int(exp)};
return result;
}
[numthreads(1, 1, 1)]
void main() {
const frexp_result res = tint_frexp(1.230000019f);
const int exp = res.exp;
const float sig = res.fract;
return;
}

View File

@ -0,0 +1,22 @@
bug/tint/1757.wgsl:6:25 warning: use of deprecated language feature: 'sig' has been renamed to 'fract'
let sig : f32 = res.sig;
^^^
struct frexp_result {
float fract;
int exp;
};
frexp_result tint_frexp(float param_0) {
float exp;
float fract = frexp(param_0, exp);
frexp_result result = {fract, int(exp)};
return result;
}
[numthreads(1, 1, 1)]
void main() {
const frexp_result res = tint_frexp(1.230000019f);
const int exp = res.exp;
const float sig = res.fract;
return;
}

View File

@ -0,0 +1,29 @@
bug/tint/1757.wgsl:6:25 warning: use of deprecated language feature: 'sig' has been renamed to 'fract'
let sig : f32 = res.sig;
^^^
#version 310 es
struct frexp_result {
float fract;
int exp;
};
frexp_result tint_frexp(float param_0) {
frexp_result result;
result.fract = frexp(param_0, result.exp);
return result;
}
void tint_symbol() {
frexp_result res = tint_frexp(1.230000019f);
int tint_symbol_1 = res.exp;
float sig = res.fract;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
tint_symbol();
return;
}

View File

@ -0,0 +1,25 @@
bug/tint/1757.wgsl:6:25 warning: use of deprecated language feature: 'sig' has been renamed to 'fract'
let sig : f32 = res.sig;
^^^
#include <metal_stdlib>
using namespace metal;
struct frexp_result {
float fract;
int exp;
};
frexp_result tint_frexp(float param_0) {
frexp_result result;
result.fract = frexp(param_0, result.exp);
return result;
}
kernel void tint_symbol() {
frexp_result const res = tint_frexp(1.230000019f);
int const exp = res.exp;
float const sig = res.fract;
return;
}

View File

@ -0,0 +1,33 @@
bug/tint/1757.wgsl:6:25 warning: use of deprecated language feature: 'sig' has been renamed to 'fract'
let sig : f32 = res.sig;
^^^
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 13
; Schema: 0
OpCapability Shader
%9 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpName %main "main"
OpName %__frexp_result "__frexp_result"
OpMemberName %__frexp_result 0 "fract"
OpMemberName %__frexp_result 1 "exp"
OpMemberDecorate %__frexp_result 0 Offset 0
OpMemberDecorate %__frexp_result 1 Offset 4
%void = OpTypeVoid
%1 = OpTypeFunction %void
%float = OpTypeFloat 32
%int = OpTypeInt 32 1
%__frexp_result = OpTypeStruct %float %int
%float_1_23000002 = OpConstant %float 1.23000002
%main = OpFunction %void None %1
%4 = OpLabel
%5 = OpExtInst %__frexp_result %9 FrexpStruct %float_1_23000002
%11 = OpCompositeExtract %int %5 1
%12 = OpCompositeExtract %float %5 0
OpReturn
OpFunctionEnd

View File

@ -0,0 +1,10 @@
bug/tint/1757.wgsl:6:25 warning: use of deprecated language feature: 'sig' has been renamed to 'fract'
let sig : f32 = res.sig;
^^^
@compute @workgroup_size(1)
fn main() {
let res = frexp(1.23);
let exp : i32 = res.exp;
let sig : f32 = res.sig;
}

View File

@ -2,5 +2,5 @@
fn main() { fn main() {
let res = frexp(1.23); let res = frexp(1.23);
let exp : i32 = res.exp; let exp : i32 = res.exp;
let sig : f32 = res.sig; let fract : f32 = res.fract;
} }

View File

@ -1,11 +1,11 @@
struct frexp_result { struct frexp_result {
float sig; float fract;
int exp; int exp;
}; };
frexp_result tint_frexp(float param_0) { frexp_result tint_frexp(float param_0) {
float exp; float exp;
float sig = frexp(param_0, exp); float fract = frexp(param_0, exp);
frexp_result result = {sig, int(exp)}; frexp_result result = {fract, int(exp)};
return result; return result;
} }
@ -13,6 +13,6 @@ frexp_result tint_frexp(float param_0) {
void main() { void main() {
const frexp_result res = tint_frexp(1.230000019f); const frexp_result res = tint_frexp(1.230000019f);
const int exp = res.exp; const int exp = res.exp;
const float sig = res.sig; const float fract = res.fract;
return; return;
} }

View File

@ -1,11 +1,11 @@
struct frexp_result { struct frexp_result {
float sig; float fract;
int exp; int exp;
}; };
frexp_result tint_frexp(float param_0) { frexp_result tint_frexp(float param_0) {
float exp; float exp;
float sig = frexp(param_0, exp); float fract = frexp(param_0, exp);
frexp_result result = {sig, int(exp)}; frexp_result result = {fract, int(exp)};
return result; return result;
} }
@ -13,6 +13,6 @@ frexp_result tint_frexp(float param_0) {
void main() { void main() {
const frexp_result res = tint_frexp(1.230000019f); const frexp_result res = tint_frexp(1.230000019f);
const int exp = res.exp; const int exp = res.exp;
const float sig = res.sig; const float fract = res.fract;
return; return;
} }

View File

@ -1,13 +1,13 @@
#version 310 es #version 310 es
struct frexp_result { struct frexp_result {
float sig; float fract;
int exp; int exp;
}; };
frexp_result tint_frexp(float param_0) { frexp_result tint_frexp(float param_0) {
frexp_result result; frexp_result result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -15,7 +15,7 @@ frexp_result tint_frexp(float param_0) {
void tint_symbol() { void tint_symbol() {
frexp_result res = tint_frexp(1.230000019f); frexp_result res = tint_frexp(1.230000019f);
int tint_symbol_1 = res.exp; int tint_symbol_1 = res.exp;
float sig = res.sig; float tint_symbol_2 = res.fract;
} }
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@ -3,19 +3,19 @@
using namespace metal; using namespace metal;
struct frexp_result { struct frexp_result {
float sig; float fract;
int exp; int exp;
}; };
frexp_result tint_frexp(float param_0) { frexp_result tint_frexp(float param_0) {
frexp_result result; frexp_result result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
kernel void tint_symbol() { kernel void tint_symbol() {
frexp_result const res = tint_frexp(1.230000019f); frexp_result const res = tint_frexp(1.230000019f);
int const exp = res.exp; int const exp = res.exp;
float const sig = res.sig; float const fract = res.fract;
return; return;
} }

View File

@ -10,7 +10,7 @@
OpExecutionMode %main LocalSize 1 1 1 OpExecutionMode %main LocalSize 1 1 1
OpName %main "main" OpName %main "main"
OpName %__frexp_result "__frexp_result" OpName %__frexp_result "__frexp_result"
OpMemberName %__frexp_result 0 "sig" OpMemberName %__frexp_result 0 "fract"
OpMemberName %__frexp_result 1 "exp" OpMemberName %__frexp_result 1 "exp"
OpMemberDecorate %__frexp_result 0 Offset 0 OpMemberDecorate %__frexp_result 0 Offset 0
OpMemberDecorate %__frexp_result 1 Offset 4 OpMemberDecorate %__frexp_result 1 Offset 4

View File

@ -2,5 +2,5 @@
fn main() { fn main() {
let res = frexp(1.23); let res = frexp(1.23);
let exp : i32 = res.exp; let exp : i32 = res.exp;
let sig : f32 = res.sig; let fract : f32 = res.fract;
} }

View File

@ -1,11 +1,11 @@
struct frexp_result_vec4_f16 { struct frexp_result_vec4_f16 {
vector<float16_t, 4> sig; vector<float16_t, 4> fract;
int4 exp; int4 exp;
}; };
frexp_result_vec4_f16 tint_frexp(vector<float16_t, 4> param_0) { frexp_result_vec4_f16 tint_frexp(vector<float16_t, 4> param_0) {
vector<float16_t, 4> exp; vector<float16_t, 4> exp;
vector<float16_t, 4> sig = frexp(param_0, exp); vector<float16_t, 4> fract = frexp(param_0, exp);
frexp_result_vec4_f16 result = {sig, int4(exp)}; frexp_result_vec4_f16 result = {fract, int4(exp)};
return result; return result;
} }

View File

@ -2,13 +2,13 @@
#extension GL_AMD_gpu_shader_half_float : require #extension GL_AMD_gpu_shader_half_float : require
struct frexp_result_vec4_f16 { struct frexp_result_vec4_f16 {
f16vec4 sig; f16vec4 fract;
ivec4 exp; ivec4 exp;
}; };
frexp_result_vec4_f16 tint_frexp(f16vec4 param_0) { frexp_result_vec4_f16 tint_frexp(f16vec4 param_0) {
frexp_result_vec4_f16 result; frexp_result_vec4_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -35,13 +35,13 @@ void main() {
precision mediump float; precision mediump float;
struct frexp_result_vec4_f16 { struct frexp_result_vec4_f16 {
f16vec4 sig; f16vec4 fract;
ivec4 exp; ivec4 exp;
}; };
frexp_result_vec4_f16 tint_frexp(f16vec4 param_0) { frexp_result_vec4_f16 tint_frexp(f16vec4 param_0) {
frexp_result_vec4_f16 result; frexp_result_vec4_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -62,13 +62,13 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require #extension GL_AMD_gpu_shader_half_float : require
struct frexp_result_vec4_f16 { struct frexp_result_vec4_f16 {
f16vec4 sig; f16vec4 fract;
ivec4 exp; ivec4 exp;
}; };
frexp_result_vec4_f16 tint_frexp(f16vec4 param_0) { frexp_result_vec4_f16 tint_frexp(f16vec4 param_0) {
frexp_result_vec4_f16 result; frexp_result_vec4_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -3,12 +3,12 @@
using namespace metal; using namespace metal;
struct frexp_result_vec4_f16 { struct frexp_result_vec4_f16 {
half4 sig; half4 fract;
int4 exp; int4 exp;
}; };
frexp_result_vec4_f16 tint_frexp(half4 param_0) { frexp_result_vec4_f16 tint_frexp(half4 param_0) {
frexp_result_vec4_f16 result; frexp_result_vec4_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -19,7 +19,7 @@
OpName %vertex_point_size "vertex_point_size" OpName %vertex_point_size "vertex_point_size"
OpName %frexp_3dd21e "frexp_3dd21e" OpName %frexp_3dd21e "frexp_3dd21e"
OpName %__frexp_result_vec4_f16 "__frexp_result_vec4_f16" OpName %__frexp_result_vec4_f16 "__frexp_result_vec4_f16"
OpMemberName %__frexp_result_vec4_f16 0 "sig" OpMemberName %__frexp_result_vec4_f16 0 "fract"
OpMemberName %__frexp_result_vec4_f16 1 "exp" OpMemberName %__frexp_result_vec4_f16 1 "exp"
OpName %res "res" OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner" OpName %vertex_main_inner "vertex_main_inner"

View File

@ -1,11 +1,11 @@
struct frexp_result { struct frexp_result {
float sig; float fract;
int exp; int exp;
}; };
frexp_result tint_frexp(float param_0) { frexp_result tint_frexp(float param_0) {
float exp; float exp;
float sig = frexp(param_0, exp); float fract = frexp(param_0, exp);
frexp_result result = {sig, int(exp)}; frexp_result result = {fract, int(exp)};
return result; return result;
} }

View File

@ -1,11 +1,11 @@
struct frexp_result { struct frexp_result {
float sig; float fract;
int exp; int exp;
}; };
frexp_result tint_frexp(float param_0) { frexp_result tint_frexp(float param_0) {
float exp; float exp;
float sig = frexp(param_0, exp); float fract = frexp(param_0, exp);
frexp_result result = {sig, int(exp)}; frexp_result result = {fract, int(exp)};
return result; return result;
} }

View File

@ -1,13 +1,13 @@
#version 310 es #version 310 es
struct frexp_result { struct frexp_result {
float sig; float fract;
int exp; int exp;
}; };
frexp_result tint_frexp(float param_0) { frexp_result tint_frexp(float param_0) {
frexp_result result; frexp_result result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -33,13 +33,13 @@ void main() {
precision mediump float; precision mediump float;
struct frexp_result { struct frexp_result {
float sig; float fract;
int exp; int exp;
}; };
frexp_result tint_frexp(float param_0) { frexp_result tint_frexp(float param_0) {
frexp_result result; frexp_result result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -59,13 +59,13 @@ void main() {
#version 310 es #version 310 es
struct frexp_result { struct frexp_result {
float sig; float fract;
int exp; int exp;
}; };
frexp_result tint_frexp(float param_0) { frexp_result tint_frexp(float param_0) {
frexp_result result; frexp_result result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -3,12 +3,12 @@
using namespace metal; using namespace metal;
struct frexp_result { struct frexp_result {
float sig; float fract;
int exp; int exp;
}; };
frexp_result tint_frexp(float param_0) { frexp_result tint_frexp(float param_0) {
frexp_result result; frexp_result result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -15,7 +15,7 @@
OpName %vertex_point_size "vertex_point_size" OpName %vertex_point_size "vertex_point_size"
OpName %frexp_4b2200 "frexp_4b2200" OpName %frexp_4b2200 "frexp_4b2200"
OpName %__frexp_result "__frexp_result" OpName %__frexp_result "__frexp_result"
OpMemberName %__frexp_result 0 "sig" OpMemberName %__frexp_result 0 "fract"
OpMemberName %__frexp_result 1 "exp" OpMemberName %__frexp_result 1 "exp"
OpName %res "res" OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner" OpName %vertex_main_inner "vertex_main_inner"

View File

@ -1,11 +1,11 @@
struct frexp_result_f16 { struct frexp_result_f16 {
float16_t sig; float16_t fract;
int exp; int exp;
}; };
frexp_result_f16 tint_frexp(float16_t param_0) { frexp_result_f16 tint_frexp(float16_t param_0) {
float16_t exp; float16_t exp;
float16_t sig = frexp(param_0, exp); float16_t fract = frexp(param_0, exp);
frexp_result_f16 result = {sig, int(exp)}; frexp_result_f16 result = {fract, int(exp)};
return result; return result;
} }

View File

@ -2,13 +2,13 @@
#extension GL_AMD_gpu_shader_half_float : require #extension GL_AMD_gpu_shader_half_float : require
struct frexp_result_f16 { struct frexp_result_f16 {
float16_t sig; float16_t fract;
int exp; int exp;
}; };
frexp_result_f16 tint_frexp(float16_t param_0) { frexp_result_f16 tint_frexp(float16_t param_0) {
frexp_result_f16 result; frexp_result_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -35,13 +35,13 @@ void main() {
precision mediump float; precision mediump float;
struct frexp_result_f16 { struct frexp_result_f16 {
float16_t sig; float16_t fract;
int exp; int exp;
}; };
frexp_result_f16 tint_frexp(float16_t param_0) { frexp_result_f16 tint_frexp(float16_t param_0) {
frexp_result_f16 result; frexp_result_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -62,13 +62,13 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require #extension GL_AMD_gpu_shader_half_float : require
struct frexp_result_f16 { struct frexp_result_f16 {
float16_t sig; float16_t fract;
int exp; int exp;
}; };
frexp_result_f16 tint_frexp(float16_t param_0) { frexp_result_f16 tint_frexp(float16_t param_0) {
frexp_result_f16 result; frexp_result_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -3,12 +3,12 @@
using namespace metal; using namespace metal;
struct frexp_result_f16 { struct frexp_result_f16 {
half sig; half fract;
int exp; int exp;
}; };
frexp_result_f16 tint_frexp(half param_0) { frexp_result_f16 tint_frexp(half param_0) {
frexp_result_f16 result; frexp_result_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -19,7 +19,7 @@
OpName %vertex_point_size "vertex_point_size" OpName %vertex_point_size "vertex_point_size"
OpName %frexp_5257dd "frexp_5257dd" OpName %frexp_5257dd "frexp_5257dd"
OpName %__frexp_result_f16 "__frexp_result_f16" OpName %__frexp_result_f16 "__frexp_result_f16"
OpMemberName %__frexp_result_f16 0 "sig" OpMemberName %__frexp_result_f16 0 "fract"
OpMemberName %__frexp_result_f16 1 "exp" OpMemberName %__frexp_result_f16 1 "exp"
OpName %res "res" OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner" OpName %vertex_main_inner "vertex_main_inner"

View File

@ -1,11 +1,11 @@
struct frexp_result_vec2_f16 { struct frexp_result_vec2_f16 {
vector<float16_t, 2> sig; vector<float16_t, 2> fract;
int2 exp; int2 exp;
}; };
frexp_result_vec2_f16 tint_frexp(vector<float16_t, 2> param_0) { frexp_result_vec2_f16 tint_frexp(vector<float16_t, 2> param_0) {
vector<float16_t, 2> exp; vector<float16_t, 2> exp;
vector<float16_t, 2> sig = frexp(param_0, exp); vector<float16_t, 2> fract = frexp(param_0, exp);
frexp_result_vec2_f16 result = {sig, int2(exp)}; frexp_result_vec2_f16 result = {fract, int2(exp)};
return result; return result;
} }

View File

@ -2,13 +2,13 @@
#extension GL_AMD_gpu_shader_half_float : require #extension GL_AMD_gpu_shader_half_float : require
struct frexp_result_vec2_f16 { struct frexp_result_vec2_f16 {
f16vec2 sig; f16vec2 fract;
ivec2 exp; ivec2 exp;
}; };
frexp_result_vec2_f16 tint_frexp(f16vec2 param_0) { frexp_result_vec2_f16 tint_frexp(f16vec2 param_0) {
frexp_result_vec2_f16 result; frexp_result_vec2_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -35,13 +35,13 @@ void main() {
precision mediump float; precision mediump float;
struct frexp_result_vec2_f16 { struct frexp_result_vec2_f16 {
f16vec2 sig; f16vec2 fract;
ivec2 exp; ivec2 exp;
}; };
frexp_result_vec2_f16 tint_frexp(f16vec2 param_0) { frexp_result_vec2_f16 tint_frexp(f16vec2 param_0) {
frexp_result_vec2_f16 result; frexp_result_vec2_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -62,13 +62,13 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require #extension GL_AMD_gpu_shader_half_float : require
struct frexp_result_vec2_f16 { struct frexp_result_vec2_f16 {
f16vec2 sig; f16vec2 fract;
ivec2 exp; ivec2 exp;
}; };
frexp_result_vec2_f16 tint_frexp(f16vec2 param_0) { frexp_result_vec2_f16 tint_frexp(f16vec2 param_0) {
frexp_result_vec2_f16 result; frexp_result_vec2_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -3,12 +3,12 @@
using namespace metal; using namespace metal;
struct frexp_result_vec2_f16 { struct frexp_result_vec2_f16 {
half2 sig; half2 fract;
int2 exp; int2 exp;
}; };
frexp_result_vec2_f16 tint_frexp(half2 param_0) { frexp_result_vec2_f16 tint_frexp(half2 param_0) {
frexp_result_vec2_f16 result; frexp_result_vec2_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -19,7 +19,7 @@
OpName %vertex_point_size "vertex_point_size" OpName %vertex_point_size "vertex_point_size"
OpName %frexp_5f47bf "frexp_5f47bf" OpName %frexp_5f47bf "frexp_5f47bf"
OpName %__frexp_result_vec2_f16 "__frexp_result_vec2_f16" OpName %__frexp_result_vec2_f16 "__frexp_result_vec2_f16"
OpMemberName %__frexp_result_vec2_f16 0 "sig" OpMemberName %__frexp_result_vec2_f16 0 "fract"
OpMemberName %__frexp_result_vec2_f16 1 "exp" OpMemberName %__frexp_result_vec2_f16 1 "exp"
OpName %res "res" OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner" OpName %vertex_main_inner "vertex_main_inner"

View File

@ -1,11 +1,11 @@
struct frexp_result_vec4 { struct frexp_result_vec4 {
float4 sig; float4 fract;
int4 exp; int4 exp;
}; };
frexp_result_vec4 tint_frexp(float4 param_0) { frexp_result_vec4 tint_frexp(float4 param_0) {
float4 exp; float4 exp;
float4 sig = frexp(param_0, exp); float4 fract = frexp(param_0, exp);
frexp_result_vec4 result = {sig, int4(exp)}; frexp_result_vec4 result = {fract, int4(exp)};
return result; return result;
} }

View File

@ -1,11 +1,11 @@
struct frexp_result_vec4 { struct frexp_result_vec4 {
float4 sig; float4 fract;
int4 exp; int4 exp;
}; };
frexp_result_vec4 tint_frexp(float4 param_0) { frexp_result_vec4 tint_frexp(float4 param_0) {
float4 exp; float4 exp;
float4 sig = frexp(param_0, exp); float4 fract = frexp(param_0, exp);
frexp_result_vec4 result = {sig, int4(exp)}; frexp_result_vec4 result = {fract, int4(exp)};
return result; return result;
} }

View File

@ -1,13 +1,13 @@
#version 310 es #version 310 es
struct frexp_result_vec4 { struct frexp_result_vec4 {
vec4 sig; vec4 fract;
ivec4 exp; ivec4 exp;
}; };
frexp_result_vec4 tint_frexp(vec4 param_0) { frexp_result_vec4 tint_frexp(vec4 param_0) {
frexp_result_vec4 result; frexp_result_vec4 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -33,13 +33,13 @@ void main() {
precision mediump float; precision mediump float;
struct frexp_result_vec4 { struct frexp_result_vec4 {
vec4 sig; vec4 fract;
ivec4 exp; ivec4 exp;
}; };
frexp_result_vec4 tint_frexp(vec4 param_0) { frexp_result_vec4 tint_frexp(vec4 param_0) {
frexp_result_vec4 result; frexp_result_vec4 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -59,13 +59,13 @@ void main() {
#version 310 es #version 310 es
struct frexp_result_vec4 { struct frexp_result_vec4 {
vec4 sig; vec4 fract;
ivec4 exp; ivec4 exp;
}; };
frexp_result_vec4 tint_frexp(vec4 param_0) { frexp_result_vec4 tint_frexp(vec4 param_0) {
frexp_result_vec4 result; frexp_result_vec4 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -3,12 +3,12 @@
using namespace metal; using namespace metal;
struct frexp_result_vec4 { struct frexp_result_vec4 {
float4 sig; float4 fract;
int4 exp; int4 exp;
}; };
frexp_result_vec4 tint_frexp(float4 param_0) { frexp_result_vec4 tint_frexp(float4 param_0) {
frexp_result_vec4 result; frexp_result_vec4 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -15,7 +15,7 @@
OpName %vertex_point_size "vertex_point_size" OpName %vertex_point_size "vertex_point_size"
OpName %frexp_77af93 "frexp_77af93" OpName %frexp_77af93 "frexp_77af93"
OpName %__frexp_result_vec4 "__frexp_result_vec4" OpName %__frexp_result_vec4 "__frexp_result_vec4"
OpMemberName %__frexp_result_vec4 0 "sig" OpMemberName %__frexp_result_vec4 0 "fract"
OpMemberName %__frexp_result_vec4 1 "exp" OpMemberName %__frexp_result_vec4 1 "exp"
OpName %res "res" OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner" OpName %vertex_main_inner "vertex_main_inner"

View File

@ -1,11 +1,11 @@
struct frexp_result_vec3 { struct frexp_result_vec3 {
float3 sig; float3 fract;
int3 exp; int3 exp;
}; };
frexp_result_vec3 tint_frexp(float3 param_0) { frexp_result_vec3 tint_frexp(float3 param_0) {
float3 exp; float3 exp;
float3 sig = frexp(param_0, exp); float3 fract = frexp(param_0, exp);
frexp_result_vec3 result = {sig, int3(exp)}; frexp_result_vec3 result = {fract, int3(exp)};
return result; return result;
} }

View File

@ -1,11 +1,11 @@
struct frexp_result_vec3 { struct frexp_result_vec3 {
float3 sig; float3 fract;
int3 exp; int3 exp;
}; };
frexp_result_vec3 tint_frexp(float3 param_0) { frexp_result_vec3 tint_frexp(float3 param_0) {
float3 exp; float3 exp;
float3 sig = frexp(param_0, exp); float3 fract = frexp(param_0, exp);
frexp_result_vec3 result = {sig, int3(exp)}; frexp_result_vec3 result = {fract, int3(exp)};
return result; return result;
} }

View File

@ -1,13 +1,13 @@
#version 310 es #version 310 es
struct frexp_result_vec3 { struct frexp_result_vec3 {
vec3 sig; vec3 fract;
ivec3 exp; ivec3 exp;
}; };
frexp_result_vec3 tint_frexp(vec3 param_0) { frexp_result_vec3 tint_frexp(vec3 param_0) {
frexp_result_vec3 result; frexp_result_vec3 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -33,13 +33,13 @@ void main() {
precision mediump float; precision mediump float;
struct frexp_result_vec3 { struct frexp_result_vec3 {
vec3 sig; vec3 fract;
ivec3 exp; ivec3 exp;
}; };
frexp_result_vec3 tint_frexp(vec3 param_0) { frexp_result_vec3 tint_frexp(vec3 param_0) {
frexp_result_vec3 result; frexp_result_vec3 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -59,13 +59,13 @@ void main() {
#version 310 es #version 310 es
struct frexp_result_vec3 { struct frexp_result_vec3 {
vec3 sig; vec3 fract;
ivec3 exp; ivec3 exp;
}; };
frexp_result_vec3 tint_frexp(vec3 param_0) { frexp_result_vec3 tint_frexp(vec3 param_0) {
frexp_result_vec3 result; frexp_result_vec3 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -3,12 +3,12 @@
using namespace metal; using namespace metal;
struct frexp_result_vec3 { struct frexp_result_vec3 {
float3 sig; float3 fract;
int3 exp; int3 exp;
}; };
frexp_result_vec3 tint_frexp(float3 param_0) { frexp_result_vec3 tint_frexp(float3 param_0) {
frexp_result_vec3 result; frexp_result_vec3 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -15,7 +15,7 @@
OpName %vertex_point_size "vertex_point_size" OpName %vertex_point_size "vertex_point_size"
OpName %frexp_979800 "frexp_979800" OpName %frexp_979800 "frexp_979800"
OpName %__frexp_result_vec3 "__frexp_result_vec3" OpName %__frexp_result_vec3 "__frexp_result_vec3"
OpMemberName %__frexp_result_vec3 0 "sig" OpMemberName %__frexp_result_vec3 0 "fract"
OpMemberName %__frexp_result_vec3 1 "exp" OpMemberName %__frexp_result_vec3 1 "exp"
OpName %res "res" OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner" OpName %vertex_main_inner "vertex_main_inner"

View File

@ -1,11 +1,11 @@
struct frexp_result_vec3_f16 { struct frexp_result_vec3_f16 {
vector<float16_t, 3> sig; vector<float16_t, 3> fract;
int3 exp; int3 exp;
}; };
frexp_result_vec3_f16 tint_frexp(vector<float16_t, 3> param_0) { frexp_result_vec3_f16 tint_frexp(vector<float16_t, 3> param_0) {
vector<float16_t, 3> exp; vector<float16_t, 3> exp;
vector<float16_t, 3> sig = frexp(param_0, exp); vector<float16_t, 3> fract = frexp(param_0, exp);
frexp_result_vec3_f16 result = {sig, int3(exp)}; frexp_result_vec3_f16 result = {fract, int3(exp)};
return result; return result;
} }

View File

@ -2,13 +2,13 @@
#extension GL_AMD_gpu_shader_half_float : require #extension GL_AMD_gpu_shader_half_float : require
struct frexp_result_vec3_f16 { struct frexp_result_vec3_f16 {
f16vec3 sig; f16vec3 fract;
ivec3 exp; ivec3 exp;
}; };
frexp_result_vec3_f16 tint_frexp(f16vec3 param_0) { frexp_result_vec3_f16 tint_frexp(f16vec3 param_0) {
frexp_result_vec3_f16 result; frexp_result_vec3_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -35,13 +35,13 @@ void main() {
precision mediump float; precision mediump float;
struct frexp_result_vec3_f16 { struct frexp_result_vec3_f16 {
f16vec3 sig; f16vec3 fract;
ivec3 exp; ivec3 exp;
}; };
frexp_result_vec3_f16 tint_frexp(f16vec3 param_0) { frexp_result_vec3_f16 tint_frexp(f16vec3 param_0) {
frexp_result_vec3_f16 result; frexp_result_vec3_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -62,13 +62,13 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require #extension GL_AMD_gpu_shader_half_float : require
struct frexp_result_vec3_f16 { struct frexp_result_vec3_f16 {
f16vec3 sig; f16vec3 fract;
ivec3 exp; ivec3 exp;
}; };
frexp_result_vec3_f16 tint_frexp(f16vec3 param_0) { frexp_result_vec3_f16 tint_frexp(f16vec3 param_0) {
frexp_result_vec3_f16 result; frexp_result_vec3_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -3,12 +3,12 @@
using namespace metal; using namespace metal;
struct frexp_result_vec3_f16 { struct frexp_result_vec3_f16 {
half3 sig; half3 fract;
int3 exp; int3 exp;
}; };
frexp_result_vec3_f16 tint_frexp(half3 param_0) { frexp_result_vec3_f16 tint_frexp(half3 param_0) {
frexp_result_vec3_f16 result; frexp_result_vec3_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -19,7 +19,7 @@
OpName %vertex_point_size "vertex_point_size" OpName %vertex_point_size "vertex_point_size"
OpName %frexp_ae4a66 "frexp_ae4a66" OpName %frexp_ae4a66 "frexp_ae4a66"
OpName %__frexp_result_vec3_f16 "__frexp_result_vec3_f16" OpName %__frexp_result_vec3_f16 "__frexp_result_vec3_f16"
OpMemberName %__frexp_result_vec3_f16 0 "sig" OpMemberName %__frexp_result_vec3_f16 0 "fract"
OpMemberName %__frexp_result_vec3_f16 1 "exp" OpMemberName %__frexp_result_vec3_f16 1 "exp"
OpName %res "res" OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner" OpName %vertex_main_inner "vertex_main_inner"

View File

@ -1,11 +1,11 @@
struct frexp_result_vec2 { struct frexp_result_vec2 {
float2 sig; float2 fract;
int2 exp; int2 exp;
}; };
frexp_result_vec2 tint_frexp(float2 param_0) { frexp_result_vec2 tint_frexp(float2 param_0) {
float2 exp; float2 exp;
float2 sig = frexp(param_0, exp); float2 fract = frexp(param_0, exp);
frexp_result_vec2 result = {sig, int2(exp)}; frexp_result_vec2 result = {fract, int2(exp)};
return result; return result;
} }

View File

@ -1,11 +1,11 @@
struct frexp_result_vec2 { struct frexp_result_vec2 {
float2 sig; float2 fract;
int2 exp; int2 exp;
}; };
frexp_result_vec2 tint_frexp(float2 param_0) { frexp_result_vec2 tint_frexp(float2 param_0) {
float2 exp; float2 exp;
float2 sig = frexp(param_0, exp); float2 fract = frexp(param_0, exp);
frexp_result_vec2 result = {sig, int2(exp)}; frexp_result_vec2 result = {fract, int2(exp)};
return result; return result;
} }

View File

@ -1,13 +1,13 @@
#version 310 es #version 310 es
struct frexp_result_vec2 { struct frexp_result_vec2 {
vec2 sig; vec2 fract;
ivec2 exp; ivec2 exp;
}; };
frexp_result_vec2 tint_frexp(vec2 param_0) { frexp_result_vec2 tint_frexp(vec2 param_0) {
frexp_result_vec2 result; frexp_result_vec2 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -33,13 +33,13 @@ void main() {
precision mediump float; precision mediump float;
struct frexp_result_vec2 { struct frexp_result_vec2 {
vec2 sig; vec2 fract;
ivec2 exp; ivec2 exp;
}; };
frexp_result_vec2 tint_frexp(vec2 param_0) { frexp_result_vec2 tint_frexp(vec2 param_0) {
frexp_result_vec2 result; frexp_result_vec2 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -59,13 +59,13 @@ void main() {
#version 310 es #version 310 es
struct frexp_result_vec2 { struct frexp_result_vec2 {
vec2 sig; vec2 fract;
ivec2 exp; ivec2 exp;
}; };
frexp_result_vec2 tint_frexp(vec2 param_0) { frexp_result_vec2 tint_frexp(vec2 param_0) {
frexp_result_vec2 result; frexp_result_vec2 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -3,12 +3,12 @@
using namespace metal; using namespace metal;
struct frexp_result_vec2 { struct frexp_result_vec2 {
float2 sig; float2 fract;
int2 exp; int2 exp;
}; };
frexp_result_vec2 tint_frexp(float2 param_0) { frexp_result_vec2 tint_frexp(float2 param_0) {
frexp_result_vec2 result; frexp_result_vec2 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -15,7 +15,7 @@
OpName %vertex_point_size "vertex_point_size" OpName %vertex_point_size "vertex_point_size"
OpName %frexp_eb2421 "frexp_eb2421" OpName %frexp_eb2421 "frexp_eb2421"
OpName %__frexp_result_vec2 "__frexp_result_vec2" OpName %__frexp_result_vec2 "__frexp_result_vec2"
OpMemberName %__frexp_result_vec2 0 "sig" OpMemberName %__frexp_result_vec2 0 "fract"
OpMemberName %__frexp_result_vec2 1 "exp" OpMemberName %__frexp_result_vec2 1 "exp"
OpName %res "res" OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner" OpName %vertex_main_inner "vertex_main_inner"

View File

@ -1,11 +1,11 @@
struct frexp_result_vec4_f16 { struct frexp_result_vec4_f16 {
vector<float16_t, 4> sig; vector<float16_t, 4> fract;
int4 exp; int4 exp;
}; };
frexp_result_vec4_f16 tint_frexp(vector<float16_t, 4> param_0) { frexp_result_vec4_f16 tint_frexp(vector<float16_t, 4> param_0) {
vector<float16_t, 4> exp; vector<float16_t, 4> exp;
vector<float16_t, 4> sig = frexp(param_0, exp); vector<float16_t, 4> fract = frexp(param_0, exp);
frexp_result_vec4_f16 result = {sig, int4(exp)}; frexp_result_vec4_f16 result = {fract, int4(exp)};
return result; return result;
} }

View File

@ -2,13 +2,13 @@
#extension GL_AMD_gpu_shader_half_float : require #extension GL_AMD_gpu_shader_half_float : require
struct frexp_result_vec4_f16 { struct frexp_result_vec4_f16 {
f16vec4 sig; f16vec4 fract;
ivec4 exp; ivec4 exp;
}; };
frexp_result_vec4_f16 tint_frexp(f16vec4 param_0) { frexp_result_vec4_f16 tint_frexp(f16vec4 param_0) {
frexp_result_vec4_f16 result; frexp_result_vec4_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -36,13 +36,13 @@ void main() {
precision mediump float; precision mediump float;
struct frexp_result_vec4_f16 { struct frexp_result_vec4_f16 {
f16vec4 sig; f16vec4 fract;
ivec4 exp; ivec4 exp;
}; };
frexp_result_vec4_f16 tint_frexp(f16vec4 param_0) { frexp_result_vec4_f16 tint_frexp(f16vec4 param_0) {
frexp_result_vec4_f16 result; frexp_result_vec4_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -64,13 +64,13 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require #extension GL_AMD_gpu_shader_half_float : require
struct frexp_result_vec4_f16 { struct frexp_result_vec4_f16 {
f16vec4 sig; f16vec4 fract;
ivec4 exp; ivec4 exp;
}; };
frexp_result_vec4_f16 tint_frexp(f16vec4 param_0) { frexp_result_vec4_f16 tint_frexp(f16vec4 param_0) {
frexp_result_vec4_f16 result; frexp_result_vec4_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -3,12 +3,12 @@
using namespace metal; using namespace metal;
struct frexp_result_vec4_f16 { struct frexp_result_vec4_f16 {
half4 sig; half4 fract;
int4 exp; int4 exp;
}; };
frexp_result_vec4_f16 tint_frexp(half4 param_0) { frexp_result_vec4_f16 tint_frexp(half4 param_0) {
frexp_result_vec4_f16 result; frexp_result_vec4_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -20,7 +20,7 @@
OpName %frexp_3dd21e "frexp_3dd21e" OpName %frexp_3dd21e "frexp_3dd21e"
OpName %arg_0 "arg_0" OpName %arg_0 "arg_0"
OpName %__frexp_result_vec4_f16 "__frexp_result_vec4_f16" OpName %__frexp_result_vec4_f16 "__frexp_result_vec4_f16"
OpMemberName %__frexp_result_vec4_f16 0 "sig" OpMemberName %__frexp_result_vec4_f16 0 "fract"
OpMemberName %__frexp_result_vec4_f16 1 "exp" OpMemberName %__frexp_result_vec4_f16 1 "exp"
OpName %res "res" OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner" OpName %vertex_main_inner "vertex_main_inner"

View File

@ -1,11 +1,11 @@
struct frexp_result { struct frexp_result {
float sig; float fract;
int exp; int exp;
}; };
frexp_result tint_frexp(float param_0) { frexp_result tint_frexp(float param_0) {
float exp; float exp;
float sig = frexp(param_0, exp); float fract = frexp(param_0, exp);
frexp_result result = {sig, int(exp)}; frexp_result result = {fract, int(exp)};
return result; return result;
} }

View File

@ -1,11 +1,11 @@
struct frexp_result { struct frexp_result {
float sig; float fract;
int exp; int exp;
}; };
frexp_result tint_frexp(float param_0) { frexp_result tint_frexp(float param_0) {
float exp; float exp;
float sig = frexp(param_0, exp); float fract = frexp(param_0, exp);
frexp_result result = {sig, int(exp)}; frexp_result result = {fract, int(exp)};
return result; return result;
} }

View File

@ -1,13 +1,13 @@
#version 310 es #version 310 es
struct frexp_result { struct frexp_result {
float sig; float fract;
int exp; int exp;
}; };
frexp_result tint_frexp(float param_0) { frexp_result tint_frexp(float param_0) {
frexp_result result; frexp_result result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -34,13 +34,13 @@ void main() {
precision mediump float; precision mediump float;
struct frexp_result { struct frexp_result {
float sig; float fract;
int exp; int exp;
}; };
frexp_result tint_frexp(float param_0) { frexp_result tint_frexp(float param_0) {
frexp_result result; frexp_result result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -61,13 +61,13 @@ void main() {
#version 310 es #version 310 es
struct frexp_result { struct frexp_result {
float sig; float fract;
int exp; int exp;
}; };
frexp_result tint_frexp(float param_0) { frexp_result tint_frexp(float param_0) {
frexp_result result; frexp_result result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -3,12 +3,12 @@
using namespace metal; using namespace metal;
struct frexp_result { struct frexp_result {
float sig; float fract;
int exp; int exp;
}; };
frexp_result tint_frexp(float param_0) { frexp_result tint_frexp(float param_0) {
frexp_result result; frexp_result result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -16,7 +16,7 @@
OpName %frexp_4b2200 "frexp_4b2200" OpName %frexp_4b2200 "frexp_4b2200"
OpName %arg_0 "arg_0" OpName %arg_0 "arg_0"
OpName %__frexp_result "__frexp_result" OpName %__frexp_result "__frexp_result"
OpMemberName %__frexp_result 0 "sig" OpMemberName %__frexp_result 0 "fract"
OpMemberName %__frexp_result 1 "exp" OpMemberName %__frexp_result 1 "exp"
OpName %res "res" OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner" OpName %vertex_main_inner "vertex_main_inner"

View File

@ -1,11 +1,11 @@
struct frexp_result_f16 { struct frexp_result_f16 {
float16_t sig; float16_t fract;
int exp; int exp;
}; };
frexp_result_f16 tint_frexp(float16_t param_0) { frexp_result_f16 tint_frexp(float16_t param_0) {
float16_t exp; float16_t exp;
float16_t sig = frexp(param_0, exp); float16_t fract = frexp(param_0, exp);
frexp_result_f16 result = {sig, int(exp)}; frexp_result_f16 result = {fract, int(exp)};
return result; return result;
} }

View File

@ -2,13 +2,13 @@
#extension GL_AMD_gpu_shader_half_float : require #extension GL_AMD_gpu_shader_half_float : require
struct frexp_result_f16 { struct frexp_result_f16 {
float16_t sig; float16_t fract;
int exp; int exp;
}; };
frexp_result_f16 tint_frexp(float16_t param_0) { frexp_result_f16 tint_frexp(float16_t param_0) {
frexp_result_f16 result; frexp_result_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -36,13 +36,13 @@ void main() {
precision mediump float; precision mediump float;
struct frexp_result_f16 { struct frexp_result_f16 {
float16_t sig; float16_t fract;
int exp; int exp;
}; };
frexp_result_f16 tint_frexp(float16_t param_0) { frexp_result_f16 tint_frexp(float16_t param_0) {
frexp_result_f16 result; frexp_result_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -64,13 +64,13 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require #extension GL_AMD_gpu_shader_half_float : require
struct frexp_result_f16 { struct frexp_result_f16 {
float16_t sig; float16_t fract;
int exp; int exp;
}; };
frexp_result_f16 tint_frexp(float16_t param_0) { frexp_result_f16 tint_frexp(float16_t param_0) {
frexp_result_f16 result; frexp_result_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -3,12 +3,12 @@
using namespace metal; using namespace metal;
struct frexp_result_f16 { struct frexp_result_f16 {
half sig; half fract;
int exp; int exp;
}; };
frexp_result_f16 tint_frexp(half param_0) { frexp_result_f16 tint_frexp(half param_0) {
frexp_result_f16 result; frexp_result_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -20,7 +20,7 @@
OpName %frexp_5257dd "frexp_5257dd" OpName %frexp_5257dd "frexp_5257dd"
OpName %arg_0 "arg_0" OpName %arg_0 "arg_0"
OpName %__frexp_result_f16 "__frexp_result_f16" OpName %__frexp_result_f16 "__frexp_result_f16"
OpMemberName %__frexp_result_f16 0 "sig" OpMemberName %__frexp_result_f16 0 "fract"
OpMemberName %__frexp_result_f16 1 "exp" OpMemberName %__frexp_result_f16 1 "exp"
OpName %res "res" OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner" OpName %vertex_main_inner "vertex_main_inner"

View File

@ -1,11 +1,11 @@
struct frexp_result_vec2_f16 { struct frexp_result_vec2_f16 {
vector<float16_t, 2> sig; vector<float16_t, 2> fract;
int2 exp; int2 exp;
}; };
frexp_result_vec2_f16 tint_frexp(vector<float16_t, 2> param_0) { frexp_result_vec2_f16 tint_frexp(vector<float16_t, 2> param_0) {
vector<float16_t, 2> exp; vector<float16_t, 2> exp;
vector<float16_t, 2> sig = frexp(param_0, exp); vector<float16_t, 2> fract = frexp(param_0, exp);
frexp_result_vec2_f16 result = {sig, int2(exp)}; frexp_result_vec2_f16 result = {fract, int2(exp)};
return result; return result;
} }

View File

@ -2,13 +2,13 @@
#extension GL_AMD_gpu_shader_half_float : require #extension GL_AMD_gpu_shader_half_float : require
struct frexp_result_vec2_f16 { struct frexp_result_vec2_f16 {
f16vec2 sig; f16vec2 fract;
ivec2 exp; ivec2 exp;
}; };
frexp_result_vec2_f16 tint_frexp(f16vec2 param_0) { frexp_result_vec2_f16 tint_frexp(f16vec2 param_0) {
frexp_result_vec2_f16 result; frexp_result_vec2_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -36,13 +36,13 @@ void main() {
precision mediump float; precision mediump float;
struct frexp_result_vec2_f16 { struct frexp_result_vec2_f16 {
f16vec2 sig; f16vec2 fract;
ivec2 exp; ivec2 exp;
}; };
frexp_result_vec2_f16 tint_frexp(f16vec2 param_0) { frexp_result_vec2_f16 tint_frexp(f16vec2 param_0) {
frexp_result_vec2_f16 result; frexp_result_vec2_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -64,13 +64,13 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require #extension GL_AMD_gpu_shader_half_float : require
struct frexp_result_vec2_f16 { struct frexp_result_vec2_f16 {
f16vec2 sig; f16vec2 fract;
ivec2 exp; ivec2 exp;
}; };
frexp_result_vec2_f16 tint_frexp(f16vec2 param_0) { frexp_result_vec2_f16 tint_frexp(f16vec2 param_0) {
frexp_result_vec2_f16 result; frexp_result_vec2_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -3,12 +3,12 @@
using namespace metal; using namespace metal;
struct frexp_result_vec2_f16 { struct frexp_result_vec2_f16 {
half2 sig; half2 fract;
int2 exp; int2 exp;
}; };
frexp_result_vec2_f16 tint_frexp(half2 param_0) { frexp_result_vec2_f16 tint_frexp(half2 param_0) {
frexp_result_vec2_f16 result; frexp_result_vec2_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -20,7 +20,7 @@
OpName %frexp_5f47bf "frexp_5f47bf" OpName %frexp_5f47bf "frexp_5f47bf"
OpName %arg_0 "arg_0" OpName %arg_0 "arg_0"
OpName %__frexp_result_vec2_f16 "__frexp_result_vec2_f16" OpName %__frexp_result_vec2_f16 "__frexp_result_vec2_f16"
OpMemberName %__frexp_result_vec2_f16 0 "sig" OpMemberName %__frexp_result_vec2_f16 0 "fract"
OpMemberName %__frexp_result_vec2_f16 1 "exp" OpMemberName %__frexp_result_vec2_f16 1 "exp"
OpName %res "res" OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner" OpName %vertex_main_inner "vertex_main_inner"

View File

@ -1,11 +1,11 @@
struct frexp_result_vec4 { struct frexp_result_vec4 {
float4 sig; float4 fract;
int4 exp; int4 exp;
}; };
frexp_result_vec4 tint_frexp(float4 param_0) { frexp_result_vec4 tint_frexp(float4 param_0) {
float4 exp; float4 exp;
float4 sig = frexp(param_0, exp); float4 fract = frexp(param_0, exp);
frexp_result_vec4 result = {sig, int4(exp)}; frexp_result_vec4 result = {fract, int4(exp)};
return result; return result;
} }

View File

@ -1,11 +1,11 @@
struct frexp_result_vec4 { struct frexp_result_vec4 {
float4 sig; float4 fract;
int4 exp; int4 exp;
}; };
frexp_result_vec4 tint_frexp(float4 param_0) { frexp_result_vec4 tint_frexp(float4 param_0) {
float4 exp; float4 exp;
float4 sig = frexp(param_0, exp); float4 fract = frexp(param_0, exp);
frexp_result_vec4 result = {sig, int4(exp)}; frexp_result_vec4 result = {fract, int4(exp)};
return result; return result;
} }

View File

@ -1,13 +1,13 @@
#version 310 es #version 310 es
struct frexp_result_vec4 { struct frexp_result_vec4 {
vec4 sig; vec4 fract;
ivec4 exp; ivec4 exp;
}; };
frexp_result_vec4 tint_frexp(vec4 param_0) { frexp_result_vec4 tint_frexp(vec4 param_0) {
frexp_result_vec4 result; frexp_result_vec4 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -34,13 +34,13 @@ void main() {
precision mediump float; precision mediump float;
struct frexp_result_vec4 { struct frexp_result_vec4 {
vec4 sig; vec4 fract;
ivec4 exp; ivec4 exp;
}; };
frexp_result_vec4 tint_frexp(vec4 param_0) { frexp_result_vec4 tint_frexp(vec4 param_0) {
frexp_result_vec4 result; frexp_result_vec4 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -61,13 +61,13 @@ void main() {
#version 310 es #version 310 es
struct frexp_result_vec4 { struct frexp_result_vec4 {
vec4 sig; vec4 fract;
ivec4 exp; ivec4 exp;
}; };
frexp_result_vec4 tint_frexp(vec4 param_0) { frexp_result_vec4 tint_frexp(vec4 param_0) {
frexp_result_vec4 result; frexp_result_vec4 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -3,12 +3,12 @@
using namespace metal; using namespace metal;
struct frexp_result_vec4 { struct frexp_result_vec4 {
float4 sig; float4 fract;
int4 exp; int4 exp;
}; };
frexp_result_vec4 tint_frexp(float4 param_0) { frexp_result_vec4 tint_frexp(float4 param_0) {
frexp_result_vec4 result; frexp_result_vec4 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -16,7 +16,7 @@
OpName %frexp_77af93 "frexp_77af93" OpName %frexp_77af93 "frexp_77af93"
OpName %arg_0 "arg_0" OpName %arg_0 "arg_0"
OpName %__frexp_result_vec4 "__frexp_result_vec4" OpName %__frexp_result_vec4 "__frexp_result_vec4"
OpMemberName %__frexp_result_vec4 0 "sig" OpMemberName %__frexp_result_vec4 0 "fract"
OpMemberName %__frexp_result_vec4 1 "exp" OpMemberName %__frexp_result_vec4 1 "exp"
OpName %res "res" OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner" OpName %vertex_main_inner "vertex_main_inner"

View File

@ -1,11 +1,11 @@
struct frexp_result_vec3 { struct frexp_result_vec3 {
float3 sig; float3 fract;
int3 exp; int3 exp;
}; };
frexp_result_vec3 tint_frexp(float3 param_0) { frexp_result_vec3 tint_frexp(float3 param_0) {
float3 exp; float3 exp;
float3 sig = frexp(param_0, exp); float3 fract = frexp(param_0, exp);
frexp_result_vec3 result = {sig, int3(exp)}; frexp_result_vec3 result = {fract, int3(exp)};
return result; return result;
} }

View File

@ -1,11 +1,11 @@
struct frexp_result_vec3 { struct frexp_result_vec3 {
float3 sig; float3 fract;
int3 exp; int3 exp;
}; };
frexp_result_vec3 tint_frexp(float3 param_0) { frexp_result_vec3 tint_frexp(float3 param_0) {
float3 exp; float3 exp;
float3 sig = frexp(param_0, exp); float3 fract = frexp(param_0, exp);
frexp_result_vec3 result = {sig, int3(exp)}; frexp_result_vec3 result = {fract, int3(exp)};
return result; return result;
} }

View File

@ -1,13 +1,13 @@
#version 310 es #version 310 es
struct frexp_result_vec3 { struct frexp_result_vec3 {
vec3 sig; vec3 fract;
ivec3 exp; ivec3 exp;
}; };
frexp_result_vec3 tint_frexp(vec3 param_0) { frexp_result_vec3 tint_frexp(vec3 param_0) {
frexp_result_vec3 result; frexp_result_vec3 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -34,13 +34,13 @@ void main() {
precision mediump float; precision mediump float;
struct frexp_result_vec3 { struct frexp_result_vec3 {
vec3 sig; vec3 fract;
ivec3 exp; ivec3 exp;
}; };
frexp_result_vec3 tint_frexp(vec3 param_0) { frexp_result_vec3 tint_frexp(vec3 param_0) {
frexp_result_vec3 result; frexp_result_vec3 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -61,13 +61,13 @@ void main() {
#version 310 es #version 310 es
struct frexp_result_vec3 { struct frexp_result_vec3 {
vec3 sig; vec3 fract;
ivec3 exp; ivec3 exp;
}; };
frexp_result_vec3 tint_frexp(vec3 param_0) { frexp_result_vec3 tint_frexp(vec3 param_0) {
frexp_result_vec3 result; frexp_result_vec3 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -3,12 +3,12 @@
using namespace metal; using namespace metal;
struct frexp_result_vec3 { struct frexp_result_vec3 {
float3 sig; float3 fract;
int3 exp; int3 exp;
}; };
frexp_result_vec3 tint_frexp(float3 param_0) { frexp_result_vec3 tint_frexp(float3 param_0) {
frexp_result_vec3 result; frexp_result_vec3 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -16,7 +16,7 @@
OpName %frexp_979800 "frexp_979800" OpName %frexp_979800 "frexp_979800"
OpName %arg_0 "arg_0" OpName %arg_0 "arg_0"
OpName %__frexp_result_vec3 "__frexp_result_vec3" OpName %__frexp_result_vec3 "__frexp_result_vec3"
OpMemberName %__frexp_result_vec3 0 "sig" OpMemberName %__frexp_result_vec3 0 "fract"
OpMemberName %__frexp_result_vec3 1 "exp" OpMemberName %__frexp_result_vec3 1 "exp"
OpName %res "res" OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner" OpName %vertex_main_inner "vertex_main_inner"

View File

@ -1,11 +1,11 @@
struct frexp_result_vec3_f16 { struct frexp_result_vec3_f16 {
vector<float16_t, 3> sig; vector<float16_t, 3> fract;
int3 exp; int3 exp;
}; };
frexp_result_vec3_f16 tint_frexp(vector<float16_t, 3> param_0) { frexp_result_vec3_f16 tint_frexp(vector<float16_t, 3> param_0) {
vector<float16_t, 3> exp; vector<float16_t, 3> exp;
vector<float16_t, 3> sig = frexp(param_0, exp); vector<float16_t, 3> fract = frexp(param_0, exp);
frexp_result_vec3_f16 result = {sig, int3(exp)}; frexp_result_vec3_f16 result = {fract, int3(exp)};
return result; return result;
} }

View File

@ -2,13 +2,13 @@
#extension GL_AMD_gpu_shader_half_float : require #extension GL_AMD_gpu_shader_half_float : require
struct frexp_result_vec3_f16 { struct frexp_result_vec3_f16 {
f16vec3 sig; f16vec3 fract;
ivec3 exp; ivec3 exp;
}; };
frexp_result_vec3_f16 tint_frexp(f16vec3 param_0) { frexp_result_vec3_f16 tint_frexp(f16vec3 param_0) {
frexp_result_vec3_f16 result; frexp_result_vec3_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -36,13 +36,13 @@ void main() {
precision mediump float; precision mediump float;
struct frexp_result_vec3_f16 { struct frexp_result_vec3_f16 {
f16vec3 sig; f16vec3 fract;
ivec3 exp; ivec3 exp;
}; };
frexp_result_vec3_f16 tint_frexp(f16vec3 param_0) { frexp_result_vec3_f16 tint_frexp(f16vec3 param_0) {
frexp_result_vec3_f16 result; frexp_result_vec3_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -64,13 +64,13 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require #extension GL_AMD_gpu_shader_half_float : require
struct frexp_result_vec3_f16 { struct frexp_result_vec3_f16 {
f16vec3 sig; f16vec3 fract;
ivec3 exp; ivec3 exp;
}; };
frexp_result_vec3_f16 tint_frexp(f16vec3 param_0) { frexp_result_vec3_f16 tint_frexp(f16vec3 param_0) {
frexp_result_vec3_f16 result; frexp_result_vec3_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -3,12 +3,12 @@
using namespace metal; using namespace metal;
struct frexp_result_vec3_f16 { struct frexp_result_vec3_f16 {
half3 sig; half3 fract;
int3 exp; int3 exp;
}; };
frexp_result_vec3_f16 tint_frexp(half3 param_0) { frexp_result_vec3_f16 tint_frexp(half3 param_0) {
frexp_result_vec3_f16 result; frexp_result_vec3_f16 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -20,7 +20,7 @@
OpName %frexp_ae4a66 "frexp_ae4a66" OpName %frexp_ae4a66 "frexp_ae4a66"
OpName %arg_0 "arg_0" OpName %arg_0 "arg_0"
OpName %__frexp_result_vec3_f16 "__frexp_result_vec3_f16" OpName %__frexp_result_vec3_f16 "__frexp_result_vec3_f16"
OpMemberName %__frexp_result_vec3_f16 0 "sig" OpMemberName %__frexp_result_vec3_f16 0 "fract"
OpMemberName %__frexp_result_vec3_f16 1 "exp" OpMemberName %__frexp_result_vec3_f16 1 "exp"
OpName %res "res" OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner" OpName %vertex_main_inner "vertex_main_inner"

View File

@ -1,11 +1,11 @@
struct frexp_result_vec2 { struct frexp_result_vec2 {
float2 sig; float2 fract;
int2 exp; int2 exp;
}; };
frexp_result_vec2 tint_frexp(float2 param_0) { frexp_result_vec2 tint_frexp(float2 param_0) {
float2 exp; float2 exp;
float2 sig = frexp(param_0, exp); float2 fract = frexp(param_0, exp);
frexp_result_vec2 result = {sig, int2(exp)}; frexp_result_vec2 result = {fract, int2(exp)};
return result; return result;
} }

View File

@ -1,11 +1,11 @@
struct frexp_result_vec2 { struct frexp_result_vec2 {
float2 sig; float2 fract;
int2 exp; int2 exp;
}; };
frexp_result_vec2 tint_frexp(float2 param_0) { frexp_result_vec2 tint_frexp(float2 param_0) {
float2 exp; float2 exp;
float2 sig = frexp(param_0, exp); float2 fract = frexp(param_0, exp);
frexp_result_vec2 result = {sig, int2(exp)}; frexp_result_vec2 result = {fract, int2(exp)};
return result; return result;
} }

View File

@ -1,13 +1,13 @@
#version 310 es #version 310 es
struct frexp_result_vec2 { struct frexp_result_vec2 {
vec2 sig; vec2 fract;
ivec2 exp; ivec2 exp;
}; };
frexp_result_vec2 tint_frexp(vec2 param_0) { frexp_result_vec2 tint_frexp(vec2 param_0) {
frexp_result_vec2 result; frexp_result_vec2 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -34,13 +34,13 @@ void main() {
precision mediump float; precision mediump float;
struct frexp_result_vec2 { struct frexp_result_vec2 {
vec2 sig; vec2 fract;
ivec2 exp; ivec2 exp;
}; };
frexp_result_vec2 tint_frexp(vec2 param_0) { frexp_result_vec2 tint_frexp(vec2 param_0) {
frexp_result_vec2 result; frexp_result_vec2 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }
@ -61,13 +61,13 @@ void main() {
#version 310 es #version 310 es
struct frexp_result_vec2 { struct frexp_result_vec2 {
vec2 sig; vec2 fract;
ivec2 exp; ivec2 exp;
}; };
frexp_result_vec2 tint_frexp(vec2 param_0) { frexp_result_vec2 tint_frexp(vec2 param_0) {
frexp_result_vec2 result; frexp_result_vec2 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

View File

@ -3,12 +3,12 @@
using namespace metal; using namespace metal;
struct frexp_result_vec2 { struct frexp_result_vec2 {
float2 sig; float2 fract;
int2 exp; int2 exp;
}; };
frexp_result_vec2 tint_frexp(float2 param_0) { frexp_result_vec2 tint_frexp(float2 param_0) {
frexp_result_vec2 result; frexp_result_vec2 result;
result.sig = frexp(param_0, result.exp); result.fract = frexp(param_0, result.exp);
return result; return result;
} }

Some files were not shown because too many files have changed in this diff Show More