Remove isNan, isInf, isFinite, and isNormal
These were deprecated in M98. Fixed: tint:1312 Change-Id: Ieec17bfcc729f90d0a9aa8904a162167b9de54ed Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/82800 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: James Price <jrprice@google.com>
This commit is contained in:
parent
e228319549
commit
bcd9ad2ebb
|
@ -6,6 +6,10 @@
|
||||||
|
|
||||||
* Tint now supports unicode identifiers. [tint:1437](crbug.com/tint/1437)
|
* Tint now supports unicode identifiers. [tint:1437](crbug.com/tint/1437)
|
||||||
|
|
||||||
|
### Breaking changes
|
||||||
|
|
||||||
|
* The `isNan()`, `isInf()`, `isFinite()`, and `isNormal()` builtins have been removed. [tint:1312](https://crbug.com/tint/1312)
|
||||||
|
|
||||||
## Changes for M100
|
## Changes for M100
|
||||||
|
|
||||||
### Breaking changes
|
### Breaking changes
|
||||||
|
|
|
@ -75,10 +75,6 @@ decorated with `NonWritable` or each member of the struct can be decorated with
|
||||||
| fwidthCoarse | SpvOpFwidthCoarse | fwidth | fwidth |
|
| fwidthCoarse | SpvOpFwidthCoarse | fwidth | fwidth |
|
||||||
| fwidthFine | SpvOpFwidthFine | fwidth | fwidth |
|
| fwidthFine | SpvOpFwidthFine | fwidth | fwidth |
|
||||||
| inverseSqrt | GLSLstd450InverseSqrt | rsqrt | rsqrt |
|
| inverseSqrt | GLSLstd450InverseSqrt | rsqrt | rsqrt |
|
||||||
| isFinite | | isfinite | isfinite |
|
|
||||||
| isInf | SpvOpIsInf | isinf | isinf |
|
|
||||||
| isNan | SpvOpIsNan | isnan | isnan |
|
|
||||||
| isNormal | | isnormal | |
|
|
||||||
| ldexp | GLSLstd450Ldexp | | |
|
| ldexp | GLSLstd450Ldexp | | |
|
||||||
| length | GLSLstd450Length | length | length |
|
| length | GLSLstd450Length | length | length |
|
||||||
| log | GLSLstd450Log | log | log |
|
| log | GLSLstd450Log | log | log |
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -340,14 +340,6 @@ fn insertBits<T: iu32>(T, T, u32, u32) -> T
|
||||||
fn insertBits<N: num, T: iu32>(vec<N, T>, vec<N, T>, u32, u32) -> vec<N, T>
|
fn insertBits<N: num, T: iu32>(vec<N, T>, vec<N, T>, u32, u32) -> vec<N, T>
|
||||||
fn inverseSqrt(f32) -> f32
|
fn inverseSqrt(f32) -> f32
|
||||||
fn inverseSqrt<N: num>(vec<N, f32>) -> vec<N, f32>
|
fn inverseSqrt<N: num>(vec<N, f32>) -> vec<N, f32>
|
||||||
[[deprecated]] fn isFinite(f32) -> bool
|
|
||||||
[[deprecated]] fn isFinite<N: num>(vec<N, f32>) -> vec<N, bool>
|
|
||||||
[[deprecated]] fn isInf(f32) -> bool
|
|
||||||
[[deprecated]] fn isInf<N: num>(vec<N, f32>) -> vec<N, bool>
|
|
||||||
[[deprecated]] fn isNan(f32) -> bool
|
|
||||||
[[deprecated]] fn isNan<N: num>(vec<N, f32>) -> vec<N, bool>
|
|
||||||
[[deprecated]] fn isNormal(f32) -> bool
|
|
||||||
[[deprecated]] fn isNormal<N: num>(vec<N, f32>) -> vec<N, bool>
|
|
||||||
fn ldexp(f32, i32) -> f32
|
fn ldexp(f32, i32) -> f32
|
||||||
fn ldexp<N: num>(vec<N, f32>, vec<N, i32>) -> vec<N, f32>
|
fn ldexp<N: num>(vec<N, f32>, vec<N, i32>) -> vec<N, f32>
|
||||||
fn length(f32) -> f32
|
fn length(f32) -> f32
|
||||||
|
|
|
@ -138,75 +138,6 @@ INSTANTIATE_TEST_SUITE_P(ResolverTest,
|
||||||
ResolverBuiltinTest_BoolMethod,
|
ResolverBuiltinTest_BoolMethod,
|
||||||
testing::Values("any", "all"));
|
testing::Values("any", "all"));
|
||||||
|
|
||||||
using ResolverBuiltinTest_FloatMethod = ResolverTestWithParam<std::string>;
|
|
||||||
TEST_P(ResolverBuiltinTest_FloatMethod, Vector) {
|
|
||||||
auto name = GetParam();
|
|
||||||
|
|
||||||
Global("my_var", ty.vec3<f32>(), ast::StorageClass::kPrivate);
|
|
||||||
|
|
||||||
auto* expr = Call(name, "my_var");
|
|
||||||
WrapInFunction(expr);
|
|
||||||
|
|
||||||
EXPECT_TRUE(r()->Resolve()) << r()->error();
|
|
||||||
|
|
||||||
ASSERT_NE(TypeOf(expr), nullptr);
|
|
||||||
ASSERT_TRUE(TypeOf(expr)->Is<sem::Vector>());
|
|
||||||
EXPECT_TRUE(TypeOf(expr)->As<sem::Vector>()->type()->Is<sem::Bool>());
|
|
||||||
EXPECT_EQ(TypeOf(expr)->As<sem::Vector>()->Width(), 3u);
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_P(ResolverBuiltinTest_FloatMethod, Scalar) {
|
|
||||||
auto name = GetParam();
|
|
||||||
|
|
||||||
Global("my_var", ty.f32(), ast::StorageClass::kPrivate);
|
|
||||||
|
|
||||||
auto* expr = Call(name, "my_var");
|
|
||||||
WrapInFunction(expr);
|
|
||||||
|
|
||||||
EXPECT_TRUE(r()->Resolve()) << r()->error();
|
|
||||||
|
|
||||||
ASSERT_NE(TypeOf(expr), nullptr);
|
|
||||||
EXPECT_TRUE(TypeOf(expr)->Is<sem::Bool>());
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_P(ResolverBuiltinTest_FloatMethod, MissingParam) {
|
|
||||||
auto name = GetParam();
|
|
||||||
|
|
||||||
Global("my_var", ty.f32(), ast::StorageClass::kPrivate);
|
|
||||||
|
|
||||||
auto* expr = Call(name);
|
|
||||||
WrapInFunction(expr);
|
|
||||||
|
|
||||||
EXPECT_FALSE(r()->Resolve());
|
|
||||||
|
|
||||||
EXPECT_EQ(r()->error(), "error: no matching call to " + name +
|
|
||||||
"()\n\n"
|
|
||||||
"2 candidate functions:\n " +
|
|
||||||
name + "(f32) -> bool\n " + name +
|
|
||||||
"(vecN<f32>) -> vecN<bool>\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_P(ResolverBuiltinTest_FloatMethod, TooManyParams) {
|
|
||||||
auto name = GetParam();
|
|
||||||
|
|
||||||
Global("my_var", ty.f32(), ast::StorageClass::kPrivate);
|
|
||||||
|
|
||||||
auto* expr = Call(name, "my_var", 1.23f);
|
|
||||||
WrapInFunction(expr);
|
|
||||||
|
|
||||||
EXPECT_FALSE(r()->Resolve());
|
|
||||||
|
|
||||||
EXPECT_EQ(r()->error(), "error: no matching call to " + name +
|
|
||||||
"(f32, f32)\n\n"
|
|
||||||
"2 candidate functions:\n " +
|
|
||||||
name + "(f32) -> bool\n " + name +
|
|
||||||
"(vecN<f32>) -> vecN<bool>\n");
|
|
||||||
}
|
|
||||||
INSTANTIATE_TEST_SUITE_P(
|
|
||||||
ResolverTest,
|
|
||||||
ResolverBuiltinTest_FloatMethod,
|
|
||||||
testing::Values("isInf", "isNan", "isFinite", "isNormal"));
|
|
||||||
|
|
||||||
enum class Texture { kF32, kI32, kU32 };
|
enum class Texture { kF32, kI32, kU32 };
|
||||||
inline std::ostream& operator<<(std::ostream& out, Texture data) {
|
inline std::ostream& operator<<(std::ostream& out, Texture data) {
|
||||||
if (data == Texture::kF32) {
|
if (data == Texture::kF32) {
|
||||||
|
|
|
@ -46,11 +46,6 @@ bool IsDerivativeBuiltin(BuiltinType i) {
|
||||||
IsFineDerivativeBuiltin(i);
|
IsFineDerivativeBuiltin(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsFloatClassificationBuiltin(BuiltinType i) {
|
|
||||||
return i == BuiltinType::kIsFinite || i == BuiltinType::kIsInf ||
|
|
||||||
i == BuiltinType::kIsNan || i == BuiltinType::kIsNormal;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IsTextureBuiltin(BuiltinType i) {
|
bool IsTextureBuiltin(BuiltinType i) {
|
||||||
return IsImageQueryBuiltin(i) || i == BuiltinType::kTextureLoad ||
|
return IsImageQueryBuiltin(i) || i == BuiltinType::kTextureLoad ||
|
||||||
i == BuiltinType::kTextureGather ||
|
i == BuiltinType::kTextureGather ||
|
||||||
|
@ -132,10 +127,6 @@ bool Builtin::IsDerivative() const {
|
||||||
return IsDerivativeBuiltin(type_);
|
return IsDerivativeBuiltin(type_);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Builtin::IsFloatClassification() const {
|
|
||||||
return IsFloatClassificationBuiltin(type_);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Builtin::IsTexture() const {
|
bool Builtin::IsTexture() const {
|
||||||
return IsTextureBuiltin(type_);
|
return IsTextureBuiltin(type_);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,11 +41,6 @@ bool IsFineDerivativeBuiltin(BuiltinType i);
|
||||||
/// @returns true if the given `i` is a derivative builtin
|
/// @returns true if the given `i` is a derivative builtin
|
||||||
bool IsDerivativeBuiltin(BuiltinType i);
|
bool IsDerivativeBuiltin(BuiltinType i);
|
||||||
|
|
||||||
/// Determines if the given `i` is a float classification builtin
|
|
||||||
/// @param i the builtin type
|
|
||||||
/// @returns true if the given `i` is a float builtin
|
|
||||||
bool IsFloatClassificationBuiltin(BuiltinType i);
|
|
||||||
|
|
||||||
/// Determines if the given `i` is a texture operation builtin
|
/// Determines if the given `i` is a texture operation builtin
|
||||||
/// @param i the builtin type
|
/// @param i the builtin type
|
||||||
/// @returns true if the given `i` is a texture operation builtin
|
/// @returns true if the given `i` is a texture operation builtin
|
||||||
|
@ -118,9 +113,6 @@ class Builtin : public Castable<Builtin, CallTarget> {
|
||||||
/// @returns true if builtin is a derivative builtin
|
/// @returns true if builtin is a derivative builtin
|
||||||
bool IsDerivative() const;
|
bool IsDerivative() const;
|
||||||
|
|
||||||
/// @returns true if builtin is a float builtin
|
|
||||||
bool IsFloatClassification() const;
|
|
||||||
|
|
||||||
/// @returns true if builtin is a texture operation builtin
|
/// @returns true if builtin is a texture operation builtin
|
||||||
bool IsTexture() const;
|
bool IsTexture() const;
|
||||||
|
|
||||||
|
|
|
@ -75,10 +75,6 @@ INSTANTIATE_TEST_SUITE_P(
|
||||||
BuiltinData{"fwidthCoarse", BuiltinType::kFwidthCoarse},
|
BuiltinData{"fwidthCoarse", BuiltinType::kFwidthCoarse},
|
||||||
BuiltinData{"fwidthFine", BuiltinType::kFwidthFine},
|
BuiltinData{"fwidthFine", BuiltinType::kFwidthFine},
|
||||||
BuiltinData{"inverseSqrt", BuiltinType::kInverseSqrt},
|
BuiltinData{"inverseSqrt", BuiltinType::kInverseSqrt},
|
||||||
BuiltinData{"isFinite", BuiltinType::kIsFinite},
|
|
||||||
BuiltinData{"isInf", BuiltinType::kIsInf},
|
|
||||||
BuiltinData{"isNan", BuiltinType::kIsNan},
|
|
||||||
BuiltinData{"isNormal", BuiltinType::kIsNormal},
|
|
||||||
BuiltinData{"ldexp", BuiltinType::kLdexp},
|
BuiltinData{"ldexp", BuiltinType::kLdexp},
|
||||||
BuiltinData{"length", BuiltinType::kLength},
|
BuiltinData{"length", BuiltinType::kLength},
|
||||||
BuiltinData{"log", BuiltinType::kLog},
|
BuiltinData{"log", BuiltinType::kLog},
|
||||||
|
|
|
@ -153,18 +153,6 @@ BuiltinType ParseBuiltinType(const std::string& name) {
|
||||||
if (name == "inverseSqrt") {
|
if (name == "inverseSqrt") {
|
||||||
return BuiltinType::kInverseSqrt;
|
return BuiltinType::kInverseSqrt;
|
||||||
}
|
}
|
||||||
if (name == "isFinite") {
|
|
||||||
return BuiltinType::kIsFinite;
|
|
||||||
}
|
|
||||||
if (name == "isInf") {
|
|
||||||
return BuiltinType::kIsInf;
|
|
||||||
}
|
|
||||||
if (name == "isNan") {
|
|
||||||
return BuiltinType::kIsNan;
|
|
||||||
}
|
|
||||||
if (name == "isNormal") {
|
|
||||||
return BuiltinType::kIsNormal;
|
|
||||||
}
|
|
||||||
if (name == "ldexp") {
|
if (name == "ldexp") {
|
||||||
return BuiltinType::kLdexp;
|
return BuiltinType::kLdexp;
|
||||||
}
|
}
|
||||||
|
@ -443,14 +431,6 @@ const char* str(BuiltinType i) {
|
||||||
return "insertBits";
|
return "insertBits";
|
||||||
case BuiltinType::kInverseSqrt:
|
case BuiltinType::kInverseSqrt:
|
||||||
return "inverseSqrt";
|
return "inverseSqrt";
|
||||||
case BuiltinType::kIsFinite:
|
|
||||||
return "isFinite";
|
|
||||||
case BuiltinType::kIsInf:
|
|
||||||
return "isInf";
|
|
||||||
case BuiltinType::kIsNan:
|
|
||||||
return "isNan";
|
|
||||||
case BuiltinType::kIsNormal:
|
|
||||||
return "isNormal";
|
|
||||||
case BuiltinType::kLdexp:
|
case BuiltinType::kLdexp:
|
||||||
return "ldexp";
|
return "ldexp";
|
||||||
case BuiltinType::kLength:
|
case BuiltinType::kLength:
|
||||||
|
|
|
@ -75,10 +75,6 @@ enum class BuiltinType {
|
||||||
kFwidthFine,
|
kFwidthFine,
|
||||||
kInsertBits,
|
kInsertBits,
|
||||||
kInverseSqrt,
|
kInverseSqrt,
|
||||||
kIsFinite,
|
|
||||||
kIsInf,
|
|
||||||
kIsNan,
|
|
||||||
kIsNormal,
|
|
||||||
kLdexp,
|
kLdexp,
|
||||||
kLength,
|
kLength,
|
||||||
kLog,
|
kLog,
|
||||||
|
|
|
@ -663,9 +663,6 @@ bool GeneratorImpl::EmitBuiltinCall(std::ostream& out,
|
||||||
if (builtin->Type() == sem::BuiltinType::kFrexp) {
|
if (builtin->Type() == sem::BuiltinType::kFrexp) {
|
||||||
return EmitFrexpCall(out, expr, builtin);
|
return EmitFrexpCall(out, expr, builtin);
|
||||||
}
|
}
|
||||||
if (builtin->Type() == sem::BuiltinType::kIsNormal) {
|
|
||||||
return EmitIsNormalCall(out, expr, builtin);
|
|
||||||
}
|
|
||||||
if (builtin->Type() == sem::BuiltinType::kDegrees) {
|
if (builtin->Type() == sem::BuiltinType::kDegrees) {
|
||||||
return EmitDegreesCall(out, expr, builtin);
|
return EmitDegreesCall(out, expr, builtin);
|
||||||
}
|
}
|
||||||
|
@ -1191,40 +1188,6 @@ bool GeneratorImpl::EmitFrexpCall(std::ostream& out,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GeneratorImpl::EmitIsNormalCall(std::ostream& out,
|
|
||||||
const ast::CallExpression* expr,
|
|
||||||
const sem::Builtin* builtin) {
|
|
||||||
// GLSL doesn't have a isNormal builtin, we need to emulate
|
|
||||||
return CallBuiltinHelper(
|
|
||||||
out, expr, builtin,
|
|
||||||
[&](TextBuffer* b, const std::vector<std::string>& params) {
|
|
||||||
auto* input_ty = builtin->Parameters()[0]->Type();
|
|
||||||
|
|
||||||
std::string vec_type;
|
|
||||||
if (auto* vec = input_ty->As<sem::Vector>()) {
|
|
||||||
vec_type = "uvec" + std::to_string(vec->Width());
|
|
||||||
} else {
|
|
||||||
vec_type = "uint";
|
|
||||||
}
|
|
||||||
|
|
||||||
constexpr auto* kExponentMask = "0x7f80000u";
|
|
||||||
constexpr auto* kMinNormalExponent = "0x0080000u";
|
|
||||||
constexpr auto* kMaxNormalExponent = "0x7f00000u";
|
|
||||||
|
|
||||||
line(b) << vec_type << " exponent = floatBitsToUint(" << params[0]
|
|
||||||
<< ") & " << kExponentMask << ";";
|
|
||||||
line(b) << vec_type << " clamped = "
|
|
||||||
<< "clamp(exponent, " << kMinNormalExponent << ", "
|
|
||||||
<< kMaxNormalExponent << ");";
|
|
||||||
if (input_ty->Is<sem::Vector>()) {
|
|
||||||
line(b) << "return equal(clamped, exponent);";
|
|
||||||
} else {
|
|
||||||
line(b) << "return clamped == exponent;";
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
bool GeneratorImpl::EmitDegreesCall(std::ostream& out,
|
bool GeneratorImpl::EmitDegreesCall(std::ostream& out,
|
||||||
const ast::CallExpression* expr,
|
const ast::CallExpression* expr,
|
||||||
const sem::Builtin* builtin) {
|
const sem::Builtin* builtin) {
|
||||||
|
@ -1625,12 +1588,6 @@ std::string GeneratorImpl::generate_builtin_name(const sem::Builtin* builtin) {
|
||||||
return "fwidth";
|
return "fwidth";
|
||||||
case sem::BuiltinType::kInverseSqrt:
|
case sem::BuiltinType::kInverseSqrt:
|
||||||
return "inversesqrt";
|
return "inversesqrt";
|
||||||
case sem::BuiltinType::kIsFinite:
|
|
||||||
return "isfinite";
|
|
||||||
case sem::BuiltinType::kIsInf:
|
|
||||||
return "isinf";
|
|
||||||
case sem::BuiltinType::kIsNan:
|
|
||||||
return "isnan";
|
|
||||||
case sem::BuiltinType::kMix:
|
case sem::BuiltinType::kMix:
|
||||||
return "mix";
|
return "mix";
|
||||||
case sem::BuiltinType::kPack2x16float:
|
case sem::BuiltinType::kPack2x16float:
|
||||||
|
|
|
@ -239,14 +239,6 @@ class GeneratorImpl : public TextGenerator {
|
||||||
bool EmitFrexpCall(std::ostream& out,
|
bool EmitFrexpCall(std::ostream& out,
|
||||||
const ast::CallExpression* expr,
|
const ast::CallExpression* expr,
|
||||||
const sem::Builtin* builtin);
|
const sem::Builtin* builtin);
|
||||||
/// Handles generating a call to the `isNormal()` builtin
|
|
||||||
/// @param out the output of the expression stream
|
|
||||||
/// @param expr the call expression
|
|
||||||
/// @param builtin the semantic information for the builtin
|
|
||||||
/// @returns true if the call expression is emitted
|
|
||||||
bool EmitIsNormalCall(std::ostream& out,
|
|
||||||
const ast::CallExpression* expr,
|
|
||||||
const sem::Builtin* builtin);
|
|
||||||
/// Handles generating a call to the `degrees()` builtin
|
/// Handles generating a call to the `degrees()` builtin
|
||||||
/// @param out the output of the expression stream
|
/// @param out the output of the expression stream
|
||||||
/// @param expr the call expression
|
/// @param expr the call expression
|
||||||
|
|
|
@ -84,10 +84,6 @@ const ast::CallExpression* GenerateCall(BuiltinType builtin,
|
||||||
case BuiltinType::kFwidthCoarse:
|
case BuiltinType::kFwidthCoarse:
|
||||||
case BuiltinType::kFwidthFine:
|
case BuiltinType::kFwidthFine:
|
||||||
case BuiltinType::kInverseSqrt:
|
case BuiltinType::kInverseSqrt:
|
||||||
case BuiltinType::kIsFinite:
|
|
||||||
case BuiltinType::kIsInf:
|
|
||||||
case BuiltinType::kIsNan:
|
|
||||||
case BuiltinType::kIsNormal:
|
|
||||||
case BuiltinType::kLength:
|
case BuiltinType::kLength:
|
||||||
case BuiltinType::kLog:
|
case BuiltinType::kLog:
|
||||||
case BuiltinType::kLog2:
|
case BuiltinType::kLog2:
|
||||||
|
@ -219,9 +215,6 @@ INSTANTIATE_TEST_SUITE_P(
|
||||||
BuiltinData{BuiltinType::kFwidthCoarse, ParamType::kF32, "fwidth"},
|
BuiltinData{BuiltinType::kFwidthCoarse, ParamType::kF32, "fwidth"},
|
||||||
BuiltinData{BuiltinType::kFwidthFine, ParamType::kF32, "fwidth"},
|
BuiltinData{BuiltinType::kFwidthFine, ParamType::kF32, "fwidth"},
|
||||||
BuiltinData{BuiltinType::kInverseSqrt, ParamType::kF32, "inversesqrt"},
|
BuiltinData{BuiltinType::kInverseSqrt, ParamType::kF32, "inversesqrt"},
|
||||||
BuiltinData{BuiltinType::kIsFinite, ParamType::kF32, "isfinite"},
|
|
||||||
BuiltinData{BuiltinType::kIsInf, ParamType::kF32, "isinf"},
|
|
||||||
BuiltinData{BuiltinType::kIsNan, ParamType::kF32, "isnan"},
|
|
||||||
BuiltinData{BuiltinType::kLdexp, ParamType::kF32, "ldexp"},
|
BuiltinData{BuiltinType::kLdexp, ParamType::kF32, "ldexp"},
|
||||||
BuiltinData{BuiltinType::kLength, ParamType::kF32, "length"},
|
BuiltinData{BuiltinType::kLength, ParamType::kF32, "length"},
|
||||||
BuiltinData{BuiltinType::kLog, ParamType::kF32, "log"},
|
BuiltinData{BuiltinType::kLog, ParamType::kF32, "log"},
|
||||||
|
@ -248,10 +241,6 @@ INSTANTIATE_TEST_SUITE_P(
|
||||||
BuiltinData{BuiltinType::kTranspose, ParamType::kF32, "transpose"},
|
BuiltinData{BuiltinType::kTranspose, ParamType::kF32, "transpose"},
|
||||||
BuiltinData{BuiltinType::kTrunc, ParamType::kF32, "trunc"}));
|
BuiltinData{BuiltinType::kTrunc, ParamType::kF32, "trunc"}));
|
||||||
|
|
||||||
TEST_F(GlslGeneratorImplTest_Builtin, DISABLED_Builtin_IsNormal) {
|
|
||||||
FAIL();
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(GlslGeneratorImplTest_Builtin, Builtin_Call) {
|
TEST_F(GlslGeneratorImplTest_Builtin, Builtin_Call) {
|
||||||
auto* call = Call("dot", "param1", "param2");
|
auto* call = Call("dot", "param1", "param2");
|
||||||
|
|
||||||
|
@ -416,62 +405,6 @@ void main() {
|
||||||
)"));
|
)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(GlslGeneratorImplTest_Builtin, IsNormal_Scalar) {
|
|
||||||
auto* val = Var("val", ty.f32());
|
|
||||||
auto* call = Call("isNormal", val);
|
|
||||||
WrapInFunction(val, call);
|
|
||||||
|
|
||||||
GeneratorImpl& gen = SanitizeAndBuild();
|
|
||||||
|
|
||||||
ASSERT_TRUE(gen.Generate()) << gen.error();
|
|
||||||
EXPECT_THAT(gen.result(), HasSubstr(R"(ion 310 es
|
|
||||||
|
|
||||||
bool tint_isNormal(float param_0) {
|
|
||||||
uint exponent = floatBitsToUint(param_0) & 0x7f80000u;
|
|
||||||
uint clamped = clamp(exponent, 0x0080000u, 0x7f00000u);
|
|
||||||
return clamped == exponent;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void test_function() {
|
|
||||||
float val = 0.0f;
|
|
||||||
bool tint_symbol = tint_isNormal(val);
|
|
||||||
}
|
|
||||||
|
|
||||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
||||||
void main() {
|
|
||||||
test_function();
|
|
||||||
)"));
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(GlslGeneratorImplTest_Builtin, IsNormal_Vector) {
|
|
||||||
auto* val = Var("val", ty.vec3<f32>());
|
|
||||||
auto* call = Call("isNormal", val);
|
|
||||||
WrapInFunction(val, call);
|
|
||||||
|
|
||||||
GeneratorImpl& gen = SanitizeAndBuild();
|
|
||||||
|
|
||||||
ASSERT_TRUE(gen.Generate()) << gen.error();
|
|
||||||
EXPECT_THAT(gen.result(), HasSubstr(R"( 310 es
|
|
||||||
|
|
||||||
bvec3 tint_isNormal(vec3 param_0) {
|
|
||||||
uvec3 exponent = floatBitsToUint(param_0) & 0x7f80000u;
|
|
||||||
uvec3 clamped = clamp(exponent, 0x0080000u, 0x7f00000u);
|
|
||||||
return equal(clamped, exponent);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void test_function() {
|
|
||||||
vec3 val = vec3(0.0f, 0.0f, 0.0f);
|
|
||||||
bvec3 tint_symbol = tint_isNormal(val);
|
|
||||||
}
|
|
||||||
|
|
||||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
||||||
void main() {
|
|
||||||
test_function();
|
|
||||||
)"));
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(GlslGeneratorImplTest_Builtin, Degrees_Scalar) {
|
TEST_F(GlslGeneratorImplTest_Builtin, Degrees_Scalar) {
|
||||||
auto* val = Var("val", ty.f32());
|
auto* val = Var("val", ty.f32());
|
||||||
auto* call = Call("degrees", val);
|
auto* call = Call("degrees", val);
|
||||||
|
|
|
@ -1034,9 +1034,6 @@ bool GeneratorImpl::EmitBuiltinCall(std::ostream& out,
|
||||||
if (builtin->Type() == sem::BuiltinType::kFrexp) {
|
if (builtin->Type() == sem::BuiltinType::kFrexp) {
|
||||||
return EmitFrexpCall(out, expr, builtin);
|
return EmitFrexpCall(out, expr, builtin);
|
||||||
}
|
}
|
||||||
if (builtin->Type() == sem::BuiltinType::kIsNormal) {
|
|
||||||
return EmitIsNormalCall(out, expr, builtin);
|
|
||||||
}
|
|
||||||
if (builtin->Type() == sem::BuiltinType::kDegrees) {
|
if (builtin->Type() == sem::BuiltinType::kDegrees) {
|
||||||
return EmitDegreesCall(out, expr, builtin);
|
return EmitDegreesCall(out, expr, builtin);
|
||||||
}
|
}
|
||||||
|
@ -1922,34 +1919,6 @@ bool GeneratorImpl::EmitFrexpCall(std::ostream& out,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GeneratorImpl::EmitIsNormalCall(std::ostream& out,
|
|
||||||
const ast::CallExpression* expr,
|
|
||||||
const sem::Builtin* builtin) {
|
|
||||||
// HLSL doesn't have a isNormal builtin, we need to emulate
|
|
||||||
return CallBuiltinHelper(
|
|
||||||
out, expr, builtin,
|
|
||||||
[&](TextBuffer* b, const std::vector<std::string>& params) {
|
|
||||||
auto* input_ty = builtin->Parameters()[0]->Type();
|
|
||||||
|
|
||||||
std::string width;
|
|
||||||
if (auto* vec = input_ty->As<sem::Vector>()) {
|
|
||||||
width = std::to_string(vec->Width());
|
|
||||||
}
|
|
||||||
|
|
||||||
constexpr auto* kExponentMask = "0x7f80000";
|
|
||||||
constexpr auto* kMinNormalExponent = "0x0080000";
|
|
||||||
constexpr auto* kMaxNormalExponent = "0x7f00000";
|
|
||||||
|
|
||||||
line(b) << "uint" << width << " exponent = asuint(" << params[0]
|
|
||||||
<< ") & " << kExponentMask << ";";
|
|
||||||
line(b) << "uint" << width << " clamped = "
|
|
||||||
<< "clamp(exponent, " << kMinNormalExponent << ", "
|
|
||||||
<< kMaxNormalExponent << ");";
|
|
||||||
line(b) << "return clamped == exponent;";
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
bool GeneratorImpl::EmitDegreesCall(std::ostream& out,
|
bool GeneratorImpl::EmitDegreesCall(std::ostream& out,
|
||||||
const ast::CallExpression* expr,
|
const ast::CallExpression* expr,
|
||||||
const sem::Builtin* builtin) {
|
const sem::Builtin* builtin) {
|
||||||
|
@ -2571,12 +2540,6 @@ std::string GeneratorImpl::generate_builtin_name(const sem::Builtin* builtin) {
|
||||||
return "fwidth";
|
return "fwidth";
|
||||||
case sem::BuiltinType::kInverseSqrt:
|
case sem::BuiltinType::kInverseSqrt:
|
||||||
return "rsqrt";
|
return "rsqrt";
|
||||||
case sem::BuiltinType::kIsFinite:
|
|
||||||
return "isfinite";
|
|
||||||
case sem::BuiltinType::kIsInf:
|
|
||||||
return "isinf";
|
|
||||||
case sem::BuiltinType::kIsNan:
|
|
||||||
return "isnan";
|
|
||||||
case sem::BuiltinType::kMix:
|
case sem::BuiltinType::kMix:
|
||||||
return "lerp";
|
return "lerp";
|
||||||
case sem::BuiltinType::kReverseBits:
|
case sem::BuiltinType::kReverseBits:
|
||||||
|
|
|
@ -241,14 +241,6 @@ class GeneratorImpl : public TextGenerator {
|
||||||
bool EmitFrexpCall(std::ostream& out,
|
bool EmitFrexpCall(std::ostream& out,
|
||||||
const ast::CallExpression* expr,
|
const ast::CallExpression* expr,
|
||||||
const sem::Builtin* builtin);
|
const sem::Builtin* builtin);
|
||||||
/// Handles generating a call to the `isNormal()` builtin
|
|
||||||
/// @param out the output of the expression stream
|
|
||||||
/// @param expr the call expression
|
|
||||||
/// @param builtin the semantic information for the builtin
|
|
||||||
/// @returns true if the call expression is emitted
|
|
||||||
bool EmitIsNormalCall(std::ostream& out,
|
|
||||||
const ast::CallExpression* expr,
|
|
||||||
const sem::Builtin* builtin);
|
|
||||||
/// Handles generating a call to the `degrees()` builtin
|
/// Handles generating a call to the `degrees()` builtin
|
||||||
/// @param out the output of the expression stream
|
/// @param out the output of the expression stream
|
||||||
/// @param expr the call expression
|
/// @param expr the call expression
|
||||||
|
|
|
@ -84,10 +84,6 @@ const ast::CallExpression* GenerateCall(BuiltinType builtin,
|
||||||
case BuiltinType::kFwidthCoarse:
|
case BuiltinType::kFwidthCoarse:
|
||||||
case BuiltinType::kFwidthFine:
|
case BuiltinType::kFwidthFine:
|
||||||
case BuiltinType::kInverseSqrt:
|
case BuiltinType::kInverseSqrt:
|
||||||
case BuiltinType::kIsFinite:
|
|
||||||
case BuiltinType::kIsInf:
|
|
||||||
case BuiltinType::kIsNan:
|
|
||||||
case BuiltinType::kIsNormal:
|
|
||||||
case BuiltinType::kLength:
|
case BuiltinType::kLength:
|
||||||
case BuiltinType::kLog:
|
case BuiltinType::kLog:
|
||||||
case BuiltinType::kLog2:
|
case BuiltinType::kLog2:
|
||||||
|
@ -219,9 +215,6 @@ INSTANTIATE_TEST_SUITE_P(
|
||||||
BuiltinData{BuiltinType::kFwidthCoarse, ParamType::kF32, "fwidth"},
|
BuiltinData{BuiltinType::kFwidthCoarse, ParamType::kF32, "fwidth"},
|
||||||
BuiltinData{BuiltinType::kFwidthFine, ParamType::kF32, "fwidth"},
|
BuiltinData{BuiltinType::kFwidthFine, ParamType::kF32, "fwidth"},
|
||||||
BuiltinData{BuiltinType::kInverseSqrt, ParamType::kF32, "rsqrt"},
|
BuiltinData{BuiltinType::kInverseSqrt, ParamType::kF32, "rsqrt"},
|
||||||
BuiltinData{BuiltinType::kIsFinite, ParamType::kF32, "isfinite"},
|
|
||||||
BuiltinData{BuiltinType::kIsInf, ParamType::kF32, "isinf"},
|
|
||||||
BuiltinData{BuiltinType::kIsNan, ParamType::kF32, "isnan"},
|
|
||||||
BuiltinData{BuiltinType::kLdexp, ParamType::kF32, "ldexp"},
|
BuiltinData{BuiltinType::kLdexp, ParamType::kF32, "ldexp"},
|
||||||
BuiltinData{BuiltinType::kLength, ParamType::kF32, "length"},
|
BuiltinData{BuiltinType::kLength, ParamType::kF32, "length"},
|
||||||
BuiltinData{BuiltinType::kLog, ParamType::kF32, "log"},
|
BuiltinData{BuiltinType::kLog, ParamType::kF32, "log"},
|
||||||
|
@ -247,10 +240,6 @@ INSTANTIATE_TEST_SUITE_P(
|
||||||
BuiltinData{BuiltinType::kTranspose, ParamType::kF32, "transpose"},
|
BuiltinData{BuiltinType::kTranspose, ParamType::kF32, "transpose"},
|
||||||
BuiltinData{BuiltinType::kTrunc, ParamType::kF32, "trunc"}));
|
BuiltinData{BuiltinType::kTrunc, ParamType::kF32, "trunc"}));
|
||||||
|
|
||||||
TEST_F(HlslGeneratorImplTest_Builtin, DISABLED_Builtin_IsNormal) {
|
|
||||||
FAIL();
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(HlslGeneratorImplTest_Builtin, Builtin_Call) {
|
TEST_F(HlslGeneratorImplTest_Builtin, Builtin_Call) {
|
||||||
auto* call = Call("dot", "param1", "param2");
|
auto* call = Call("dot", "param1", "param2");
|
||||||
|
|
||||||
|
@ -394,52 +383,6 @@ void test_function() {
|
||||||
)");
|
)");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(HlslGeneratorImplTest_Builtin, IsNormal_Scalar) {
|
|
||||||
auto* val = Var("val", ty.f32());
|
|
||||||
auto* call = Call("isNormal", val);
|
|
||||||
WrapInFunction(val, call);
|
|
||||||
|
|
||||||
GeneratorImpl& gen = SanitizeAndBuild();
|
|
||||||
|
|
||||||
ASSERT_TRUE(gen.Generate()) << gen.error();
|
|
||||||
EXPECT_EQ(gen.result(), R"(bool tint_isNormal(float param_0) {
|
|
||||||
uint exponent = asuint(param_0) & 0x7f80000;
|
|
||||||
uint clamped = clamp(exponent, 0x0080000, 0x7f00000);
|
|
||||||
return clamped == exponent;
|
|
||||||
}
|
|
||||||
|
|
||||||
[numthreads(1, 1, 1)]
|
|
||||||
void test_function() {
|
|
||||||
float val = 0.0f;
|
|
||||||
const bool tint_symbol = tint_isNormal(val);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
)");
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(HlslGeneratorImplTest_Builtin, IsNormal_Vector) {
|
|
||||||
auto* val = Var("val", ty.vec3<f32>());
|
|
||||||
auto* call = Call("isNormal", val);
|
|
||||||
WrapInFunction(val, call);
|
|
||||||
|
|
||||||
GeneratorImpl& gen = SanitizeAndBuild();
|
|
||||||
|
|
||||||
ASSERT_TRUE(gen.Generate()) << gen.error();
|
|
||||||
EXPECT_EQ(gen.result(), R"(bool3 tint_isNormal(float3 param_0) {
|
|
||||||
uint3 exponent = asuint(param_0) & 0x7f80000;
|
|
||||||
uint3 clamped = clamp(exponent, 0x0080000, 0x7f00000);
|
|
||||||
return clamped == exponent;
|
|
||||||
}
|
|
||||||
|
|
||||||
[numthreads(1, 1, 1)]
|
|
||||||
void test_function() {
|
|
||||||
float3 val = float3(0.0f, 0.0f, 0.0f);
|
|
||||||
const bool3 tint_symbol = tint_isNormal(val);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
)");
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(HlslGeneratorImplTest_Builtin, Degrees_Scalar) {
|
TEST_F(HlslGeneratorImplTest_Builtin, Degrees_Scalar) {
|
||||||
auto* val = Var("val", ty.f32());
|
auto* val = Var("val", ty.f32());
|
||||||
auto* call = Call("degrees", val);
|
auto* call = Call("degrees", val);
|
||||||
|
|
|
@ -1385,18 +1385,6 @@ std::string GeneratorImpl::generate_builtin_name(const sem::Builtin* builtin) {
|
||||||
case sem::BuiltinType::kFwidthFine:
|
case sem::BuiltinType::kFwidthFine:
|
||||||
out += "fwidth";
|
out += "fwidth";
|
||||||
break;
|
break;
|
||||||
case sem::BuiltinType::kIsFinite:
|
|
||||||
out += "isfinite";
|
|
||||||
break;
|
|
||||||
case sem::BuiltinType::kIsInf:
|
|
||||||
out += "isinf";
|
|
||||||
break;
|
|
||||||
case sem::BuiltinType::kIsNan:
|
|
||||||
out += "isnan";
|
|
||||||
break;
|
|
||||||
case sem::BuiltinType::kIsNormal:
|
|
||||||
out += "isnormal";
|
|
||||||
break;
|
|
||||||
case sem::BuiltinType::kMax:
|
case sem::BuiltinType::kMax:
|
||||||
if (builtin->ReturnType()->is_float_scalar_or_vector()) {
|
if (builtin->ReturnType()->is_float_scalar_or_vector()) {
|
||||||
out += "fmax";
|
out += "fmax";
|
||||||
|
|
|
@ -80,10 +80,6 @@ const ast::CallExpression* GenerateCall(BuiltinType builtin,
|
||||||
case BuiltinType::kFwidthCoarse:
|
case BuiltinType::kFwidthCoarse:
|
||||||
case BuiltinType::kFwidthFine:
|
case BuiltinType::kFwidthFine:
|
||||||
case BuiltinType::kInverseSqrt:
|
case BuiltinType::kInverseSqrt:
|
||||||
case BuiltinType::kIsFinite:
|
|
||||||
case BuiltinType::kIsInf:
|
|
||||||
case BuiltinType::kIsNan:
|
|
||||||
case BuiltinType::kIsNormal:
|
|
||||||
case BuiltinType::kLength:
|
case BuiltinType::kLength:
|
||||||
case BuiltinType::kLog:
|
case BuiltinType::kLog:
|
||||||
case BuiltinType::kLog2:
|
case BuiltinType::kLog2:
|
||||||
|
@ -243,10 +239,6 @@ INSTANTIATE_TEST_SUITE_P(
|
||||||
BuiltinData{BuiltinType::kFwidthFine, ParamType::kF32, "fwidth"},
|
BuiltinData{BuiltinType::kFwidthFine, ParamType::kF32, "fwidth"},
|
||||||
BuiltinData{BuiltinType::kInsertBits, ParamType::kU32, "insert_bits"},
|
BuiltinData{BuiltinType::kInsertBits, ParamType::kU32, "insert_bits"},
|
||||||
BuiltinData{BuiltinType::kInverseSqrt, ParamType::kF32, "rsqrt"},
|
BuiltinData{BuiltinType::kInverseSqrt, ParamType::kF32, "rsqrt"},
|
||||||
BuiltinData{BuiltinType::kIsFinite, ParamType::kF32, "isfinite"},
|
|
||||||
BuiltinData{BuiltinType::kIsInf, ParamType::kF32, "isinf"},
|
|
||||||
BuiltinData{BuiltinType::kIsNan, ParamType::kF32, "isnan"},
|
|
||||||
BuiltinData{BuiltinType::kIsNormal, ParamType::kF32, "isnormal"},
|
|
||||||
BuiltinData{BuiltinType::kLdexp, ParamType::kF32, "ldexp"},
|
BuiltinData{BuiltinType::kLdexp, ParamType::kF32, "ldexp"},
|
||||||
BuiltinData{BuiltinType::kLength, ParamType::kF32, "length"},
|
BuiltinData{BuiltinType::kLength, ParamType::kF32, "length"},
|
||||||
BuiltinData{BuiltinType::kLog, ParamType::kF32, "log"},
|
BuiltinData{BuiltinType::kLog, ParamType::kF32, "log"},
|
||||||
|
|
|
@ -2527,116 +2527,6 @@ uint32_t Builder::GenerateBuiltinCall(const sem::Call* call,
|
||||||
case BuiltinType::kInsertBits:
|
case BuiltinType::kInsertBits:
|
||||||
op = spv::Op::OpBitFieldInsert;
|
op = spv::Op::OpBitFieldInsert;
|
||||||
break;
|
break;
|
||||||
case BuiltinType::kIsInf:
|
|
||||||
op = spv::Op::OpIsInf;
|
|
||||||
break;
|
|
||||||
case BuiltinType::kIsNan:
|
|
||||||
op = spv::Op::OpIsNan;
|
|
||||||
break;
|
|
||||||
case BuiltinType::kIsFinite: {
|
|
||||||
// Implemented as: not(IsInf or IsNan)
|
|
||||||
auto val_id = get_arg_as_value_id(0);
|
|
||||||
if (!val_id) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
auto inf_result = result_op();
|
|
||||||
auto nan_result = result_op();
|
|
||||||
auto or_result = result_op();
|
|
||||||
if (push_function_inst(spv::Op::OpIsInf,
|
|
||||||
{Operand::Int(result_type_id), inf_result,
|
|
||||||
Operand::Int(val_id)}) &&
|
|
||||||
push_function_inst(spv::Op::OpIsNan,
|
|
||||||
{Operand::Int(result_type_id), nan_result,
|
|
||||||
Operand::Int(val_id)}) &&
|
|
||||||
push_function_inst(spv::Op::OpLogicalOr,
|
|
||||||
{Operand::Int(result_type_id), or_result,
|
|
||||||
Operand::Int(inf_result.to_i()),
|
|
||||||
Operand::Int(nan_result.to_i())}) &&
|
|
||||||
push_function_inst(spv::Op::OpLogicalNot,
|
|
||||||
{Operand::Int(result_type_id), result,
|
|
||||||
Operand::Int(or_result.to_i())})) {
|
|
||||||
return result_id;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
case BuiltinType::kIsNormal: {
|
|
||||||
// A normal number is finite, non-zero, and not subnormal.
|
|
||||||
// Its exponent is neither of the extreme possible values.
|
|
||||||
// Implemented as:
|
|
||||||
// exponent_bits = bitcast<u32>(f);
|
|
||||||
// clamped = uclamp(1,254,exponent_bits);
|
|
||||||
// result = (clamped == exponent_bits);
|
|
||||||
//
|
|
||||||
auto val_id = get_arg_as_value_id(0);
|
|
||||||
if (!val_id) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// These parameters are valid for IEEE 754 binary32
|
|
||||||
const uint32_t kExponentMask = 0x7f80000;
|
|
||||||
const uint32_t kMinNormalExponent = 0x0080000;
|
|
||||||
const uint32_t kMaxNormalExponent = 0x7f00000;
|
|
||||||
|
|
||||||
auto set_id = GetGLSLstd450Import();
|
|
||||||
auto* u32 = builder_.create<sem::U32>();
|
|
||||||
|
|
||||||
auto unsigned_id = GenerateTypeIfNeeded(u32);
|
|
||||||
auto exponent_mask_id =
|
|
||||||
GenerateConstantIfNeeded(ScalarConstant::U32(kExponentMask));
|
|
||||||
auto min_exponent_id =
|
|
||||||
GenerateConstantIfNeeded(ScalarConstant::U32(kMinNormalExponent));
|
|
||||||
auto max_exponent_id =
|
|
||||||
GenerateConstantIfNeeded(ScalarConstant::U32(kMaxNormalExponent));
|
|
||||||
if (auto* fvec_ty = builtin->ReturnType()->As<sem::Vector>()) {
|
|
||||||
// In the vector case, update the unsigned type to a vector type of the
|
|
||||||
// same size, and create vector constants by replicating the scalars.
|
|
||||||
// I expect backend compilers to fold these into unique constants, so
|
|
||||||
// there is no loss of efficiency.
|
|
||||||
auto* uvec_ty = builder_.create<sem::Vector>(u32, fvec_ty->Width());
|
|
||||||
unsigned_id = GenerateTypeIfNeeded(uvec_ty);
|
|
||||||
auto splat = [&](uint32_t scalar_id) -> uint32_t {
|
|
||||||
auto splat_result = result_op();
|
|
||||||
OperandList splat_params{Operand::Int(unsigned_id), splat_result};
|
|
||||||
for (size_t i = 0; i < fvec_ty->Width(); i++) {
|
|
||||||
splat_params.emplace_back(Operand::Int(scalar_id));
|
|
||||||
}
|
|
||||||
if (!push_function_inst(spv::Op::OpCompositeConstruct,
|
|
||||||
std::move(splat_params))) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return splat_result.to_i();
|
|
||||||
};
|
|
||||||
exponent_mask_id = splat(exponent_mask_id);
|
|
||||||
min_exponent_id = splat(min_exponent_id);
|
|
||||||
max_exponent_id = splat(max_exponent_id);
|
|
||||||
}
|
|
||||||
auto cast_result = result_op();
|
|
||||||
auto exponent_bits_result = result_op();
|
|
||||||
auto clamp_result = result_op();
|
|
||||||
|
|
||||||
if (set_id && unsigned_id && exponent_mask_id && min_exponent_id &&
|
|
||||||
max_exponent_id &&
|
|
||||||
push_function_inst(
|
|
||||||
spv::Op::OpBitcast,
|
|
||||||
{Operand::Int(unsigned_id), cast_result, Operand::Int(val_id)}) &&
|
|
||||||
push_function_inst(spv::Op::OpBitwiseAnd,
|
|
||||||
{Operand::Int(unsigned_id), exponent_bits_result,
|
|
||||||
Operand::Int(cast_result.to_i()),
|
|
||||||
Operand::Int(exponent_mask_id)}) &&
|
|
||||||
push_function_inst(
|
|
||||||
spv::Op::OpExtInst,
|
|
||||||
{Operand::Int(unsigned_id), clamp_result, Operand::Int(set_id),
|
|
||||||
Operand::Int(GLSLstd450UClamp),
|
|
||||||
Operand::Int(exponent_bits_result.to_i()),
|
|
||||||
Operand::Int(min_exponent_id), Operand::Int(max_exponent_id)}) &&
|
|
||||||
push_function_inst(spv::Op::OpIEqual,
|
|
||||||
{Operand::Int(result_type_id), result,
|
|
||||||
Operand::Int(exponent_bits_result.to_i()),
|
|
||||||
Operand::Int(clamp_result.to_i())})) {
|
|
||||||
return result_id;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
case BuiltinType::kMix: {
|
case BuiltinType::kMix: {
|
||||||
auto std450 = Operand::Int(GetGLSLstd450Import());
|
auto std450 = Operand::Int(GetGLSLstd450Import());
|
||||||
|
|
||||||
|
|
|
@ -102,225 +102,6 @@ INSTANTIATE_TEST_SUITE_P(BuiltinBuilderTest,
|
||||||
testing::Values(BuiltinData{"any", "OpAny"},
|
testing::Values(BuiltinData{"any", "OpAny"},
|
||||||
BuiltinData{"all", "OpAll"}));
|
BuiltinData{"all", "OpAll"}));
|
||||||
|
|
||||||
using BuiltinFloatTest = BuiltinBuilderTestWithParam<BuiltinData>;
|
|
||||||
TEST_P(BuiltinFloatTest, Call_Float_Scalar) {
|
|
||||||
auto param = GetParam();
|
|
||||||
auto* var = Global("v", ty.f32(), ast::StorageClass::kPrivate);
|
|
||||||
auto* expr = Call(param.name, "v");
|
|
||||||
auto* func = Func("a_func", {}, ty.void_(),
|
|
||||||
{
|
|
||||||
Assign(Phony(), expr),
|
|
||||||
});
|
|
||||||
|
|
||||||
spirv::Builder& b = Build();
|
|
||||||
|
|
||||||
ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
|
|
||||||
ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
|
|
||||||
|
|
||||||
EXPECT_EQ(DumpInstructions(b.types()), R"(%3 = OpTypeFloat 32
|
|
||||||
%2 = OpTypePointer Private %3
|
|
||||||
%4 = OpConstantNull %3
|
|
||||||
%1 = OpVariable %2 Private %4
|
|
||||||
%6 = OpTypeVoid
|
|
||||||
%5 = OpTypeFunction %6
|
|
||||||
%10 = OpTypeBool
|
|
||||||
)");
|
|
||||||
|
|
||||||
auto expected = utils::ReplaceAll(R"(%11 = OpLoad %3 %1
|
|
||||||
%9 = ${op} %10 %11
|
|
||||||
OpReturn
|
|
||||||
)",
|
|
||||||
"${op}", param.op);
|
|
||||||
EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), expected);
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_P(BuiltinFloatTest, Call_Float_Vector) {
|
|
||||||
auto param = GetParam();
|
|
||||||
auto* var = Global("v", ty.vec3<f32>(), ast::StorageClass::kPrivate);
|
|
||||||
auto* expr = Call(param.name, "v");
|
|
||||||
auto* func = Func("a_func", {}, ty.void_(),
|
|
||||||
{
|
|
||||||
Assign(Phony(), expr),
|
|
||||||
});
|
|
||||||
|
|
||||||
spirv::Builder& b = Build();
|
|
||||||
|
|
||||||
ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
|
|
||||||
ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
|
|
||||||
|
|
||||||
EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeFloat 32
|
|
||||||
%3 = OpTypeVector %4 3
|
|
||||||
%2 = OpTypePointer Private %3
|
|
||||||
%5 = OpConstantNull %3
|
|
||||||
%1 = OpVariable %2 Private %5
|
|
||||||
%7 = OpTypeVoid
|
|
||||||
%6 = OpTypeFunction %7
|
|
||||||
%12 = OpTypeBool
|
|
||||||
%11 = OpTypeVector %12 3
|
|
||||||
)");
|
|
||||||
|
|
||||||
auto expected = utils::ReplaceAll(R"(%13 = OpLoad %3 %1
|
|
||||||
%10 = ${op} %11 %13
|
|
||||||
OpReturn
|
|
||||||
)",
|
|
||||||
"${op}", param.op);
|
|
||||||
EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), expected);
|
|
||||||
}
|
|
||||||
INSTANTIATE_TEST_SUITE_P(BuiltinBuilderTest,
|
|
||||||
BuiltinFloatTest,
|
|
||||||
testing::Values(BuiltinData{"isNan", "OpIsNan"},
|
|
||||||
BuiltinData{"isInf", "OpIsInf"}));
|
|
||||||
|
|
||||||
TEST_F(BuiltinBuilderTest, IsFinite_Scalar) {
|
|
||||||
auto* var = Global("v", ty.f32(), ast::StorageClass::kPrivate);
|
|
||||||
auto* expr = Call("isFinite", "v");
|
|
||||||
auto* func = Func("a_func", {}, ty.void_(),
|
|
||||||
{
|
|
||||||
Assign(Phony(), expr),
|
|
||||||
});
|
|
||||||
|
|
||||||
spirv::Builder& b = Build();
|
|
||||||
|
|
||||||
ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
|
|
||||||
ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
|
|
||||||
|
|
||||||
EXPECT_EQ(DumpInstructions(b.types()), R"(%3 = OpTypeFloat 32
|
|
||||||
%2 = OpTypePointer Private %3
|
|
||||||
%4 = OpConstantNull %3
|
|
||||||
%1 = OpVariable %2 Private %4
|
|
||||||
%6 = OpTypeVoid
|
|
||||||
%5 = OpTypeFunction %6
|
|
||||||
%10 = OpTypeBool
|
|
||||||
)");
|
|
||||||
EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()),
|
|
||||||
R"(%11 = OpLoad %3 %1
|
|
||||||
%12 = OpIsInf %10 %11
|
|
||||||
%13 = OpIsNan %10 %11
|
|
||||||
%14 = OpLogicalOr %10 %12 %13
|
|
||||||
%9 = OpLogicalNot %10 %14
|
|
||||||
OpReturn
|
|
||||||
)");
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(BuiltinBuilderTest, IsFinite_Vector) {
|
|
||||||
auto* var = Global("v", ty.vec3<f32>(), ast::StorageClass::kPrivate);
|
|
||||||
auto* expr = Call("isFinite", "v");
|
|
||||||
auto* func = Func("a_func", {}, ty.void_(),
|
|
||||||
{
|
|
||||||
Assign(Phony(), expr),
|
|
||||||
});
|
|
||||||
|
|
||||||
spirv::Builder& b = Build();
|
|
||||||
|
|
||||||
ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
|
|
||||||
ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
|
|
||||||
|
|
||||||
EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeFloat 32
|
|
||||||
%3 = OpTypeVector %4 3
|
|
||||||
%2 = OpTypePointer Private %3
|
|
||||||
%5 = OpConstantNull %3
|
|
||||||
%1 = OpVariable %2 Private %5
|
|
||||||
%7 = OpTypeVoid
|
|
||||||
%6 = OpTypeFunction %7
|
|
||||||
%12 = OpTypeBool
|
|
||||||
%11 = OpTypeVector %12 3
|
|
||||||
)");
|
|
||||||
EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()),
|
|
||||||
R"(%13 = OpLoad %3 %1
|
|
||||||
%14 = OpIsInf %11 %13
|
|
||||||
%15 = OpIsNan %11 %13
|
|
||||||
%16 = OpLogicalOr %11 %14 %15
|
|
||||||
%10 = OpLogicalNot %11 %16
|
|
||||||
OpReturn
|
|
||||||
)");
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(BuiltinBuilderTest, IsNormal_Scalar) {
|
|
||||||
auto* var = Global("v", ty.f32(), ast::StorageClass::kPrivate);
|
|
||||||
auto* expr = Call("isNormal", "v");
|
|
||||||
auto* func = Func("a_func", {}, ty.void_(),
|
|
||||||
{
|
|
||||||
Assign(Phony(), expr),
|
|
||||||
});
|
|
||||||
|
|
||||||
spirv::Builder& b = Build();
|
|
||||||
|
|
||||||
ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
|
|
||||||
ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
|
|
||||||
|
|
||||||
auto got = DumpBuilder(b);
|
|
||||||
EXPECT_EQ(got, R"(%12 = OpExtInstImport "GLSL.std.450"
|
|
||||||
OpName %1 "v"
|
|
||||||
OpName %7 "a_func"
|
|
||||||
%3 = OpTypeFloat 32
|
|
||||||
%2 = OpTypePointer Private %3
|
|
||||||
%4 = OpConstantNull %3
|
|
||||||
%1 = OpVariable %2 Private %4
|
|
||||||
%6 = OpTypeVoid
|
|
||||||
%5 = OpTypeFunction %6
|
|
||||||
%10 = OpTypeBool
|
|
||||||
%13 = OpTypeInt 32 0
|
|
||||||
%14 = OpConstant %13 133693440
|
|
||||||
%15 = OpConstant %13 524288
|
|
||||||
%16 = OpConstant %13 133169152
|
|
||||||
%7 = OpFunction %6 None %5
|
|
||||||
%8 = OpLabel
|
|
||||||
%11 = OpLoad %3 %1
|
|
||||||
%17 = OpBitcast %13 %11
|
|
||||||
%18 = OpBitwiseAnd %13 %17 %14
|
|
||||||
%19 = OpExtInst %13 %12 UClamp %18 %15 %16
|
|
||||||
%9 = OpIEqual %10 %18 %19
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
)");
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(BuiltinBuilderTest, IsNormal_Vector) {
|
|
||||||
auto* var = Global("v", ty.vec2<f32>(), ast::StorageClass::kPrivate);
|
|
||||||
auto* expr = Call("isNormal", "v");
|
|
||||||
auto* func = Func("a_func", {}, ty.void_(),
|
|
||||||
{
|
|
||||||
Assign(Phony(), expr),
|
|
||||||
});
|
|
||||||
|
|
||||||
spirv::Builder& b = Build();
|
|
||||||
|
|
||||||
ASSERT_TRUE(b.GenerateGlobalVariable(var)) << b.error();
|
|
||||||
ASSERT_TRUE(b.GenerateFunction(func)) << b.error();
|
|
||||||
|
|
||||||
auto got = DumpBuilder(b);
|
|
||||||
EXPECT_EQ(got, R"(%14 = OpExtInstImport "GLSL.std.450"
|
|
||||||
OpName %1 "v"
|
|
||||||
OpName %8 "a_func"
|
|
||||||
%4 = OpTypeFloat 32
|
|
||||||
%3 = OpTypeVector %4 2
|
|
||||||
%2 = OpTypePointer Private %3
|
|
||||||
%5 = OpConstantNull %3
|
|
||||||
%1 = OpVariable %2 Private %5
|
|
||||||
%7 = OpTypeVoid
|
|
||||||
%6 = OpTypeFunction %7
|
|
||||||
%12 = OpTypeBool
|
|
||||||
%11 = OpTypeVector %12 2
|
|
||||||
%15 = OpTypeInt 32 0
|
|
||||||
%16 = OpConstant %15 133693440
|
|
||||||
%17 = OpConstant %15 524288
|
|
||||||
%18 = OpConstant %15 133169152
|
|
||||||
%19 = OpTypeVector %15 2
|
|
||||||
%8 = OpFunction %7 None %6
|
|
||||||
%9 = OpLabel
|
|
||||||
%13 = OpLoad %3 %1
|
|
||||||
%20 = OpCompositeConstruct %19 %16 %16
|
|
||||||
%21 = OpCompositeConstruct %19 %17 %17
|
|
||||||
%22 = OpCompositeConstruct %19 %18 %18
|
|
||||||
%23 = OpBitcast %19 %13
|
|
||||||
%24 = OpBitwiseAnd %19 %23 %20
|
|
||||||
%25 = OpExtInst %19 %14 UClamp %24 %21 %22
|
|
||||||
%10 = OpIEqual %11 %24 %25
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
)");
|
|
||||||
}
|
|
||||||
|
|
||||||
using BuiltinIntTest = BuiltinBuilderTestWithParam<BuiltinData>;
|
using BuiltinIntTest = BuiltinBuilderTestWithParam<BuiltinData>;
|
||||||
TEST_P(BuiltinIntTest, Call_SInt_Scalar) {
|
TEST_P(BuiltinIntTest, Call_SInt_Scalar) {
|
||||||
auto param = GetParam();
|
auto param = GetParam();
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
// /fallthroUgh]
|
// /fallthroUgh]
|
||||||
fn marg8uintin() {
|
fn marg8uintin() {
|
||||||
_ = (0 );
|
_ = (0 );
|
||||||
_ = isNormal(4.);
|
|
||||||
_ = (vec4<f32>( 2.));
|
_ = (vec4<f32>( 2.));
|
||||||
|
|
||||||
isNormal(vec4<f32>());
|
|
||||||
_ = (vec4<f32>( 2.));
|
_ = (vec4<f32>( 2.));
|
||||||
|
|
||||||
isNormal(0.);
|
|
||||||
_ = isNormal(4.);
|
|
||||||
_ = isNormal(2.);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
struct Uniforms {
|
struct Uniforms {
|
||||||
|
|
|
@ -1,23 +1,3 @@
|
||||||
bug/chromium/1273230.wgsl:4:7 warning: use of deprecated builtin
|
|
||||||
_ = isNormal(4.);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
bug/chromium/1273230.wgsl:7:3 warning: use of deprecated builtin
|
|
||||||
isNormal(vec4<f32>());
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
bug/chromium/1273230.wgsl:10:6 warning: use of deprecated builtin
|
|
||||||
isNormal(0.);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
bug/chromium/1273230.wgsl:11:9 warning: use of deprecated builtin
|
|
||||||
_ = isNormal(4.);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
bug/chromium/1273230.wgsl:12:9 warning: use of deprecated builtin
|
|
||||||
_ = isNormal(2.);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
#version 310 es
|
#version 310 es
|
||||||
|
|
||||||
struct Uniforms {
|
struct Uniforms {
|
||||||
|
|
|
@ -1,35 +1,3 @@
|
||||||
bug/chromium/1273230.wgsl:4:7 warning: use of deprecated builtin
|
|
||||||
_ = isNormal(4.);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
bug/chromium/1273230.wgsl:7:3 warning: use of deprecated builtin
|
|
||||||
isNormal(vec4<f32>());
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
bug/chromium/1273230.wgsl:10:6 warning: use of deprecated builtin
|
|
||||||
isNormal(0.);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
bug/chromium/1273230.wgsl:11:9 warning: use of deprecated builtin
|
|
||||||
_ = isNormal(4.);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
bug/chromium/1273230.wgsl:12:9 warning: use of deprecated builtin
|
|
||||||
_ = isNormal(2.);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
bool tint_isNormal(float param_0) {
|
|
||||||
uint exponent = asuint(param_0) & 0x7f80000;
|
|
||||||
uint clamped = clamp(exponent, 0x0080000, 0x7f00000);
|
|
||||||
return clamped == exponent;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool4 tint_isNormal_1(float4 param_0) {
|
|
||||||
uint4 exponent = asuint(param_0) & 0x7f80000;
|
|
||||||
uint4 clamped = clamp(exponent, 0x0080000, 0x7f00000);
|
|
||||||
return clamped == exponent;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint value_or_one_if_zero_uint(uint value) {
|
uint value_or_one_if_zero_uint(uint value) {
|
||||||
return value == 0u ? 1u : value;
|
return value == 0u ? 1u : value;
|
||||||
}
|
}
|
||||||
|
@ -53,11 +21,6 @@ int atomicAdd_1(RWByteAddressBuffer buffer, uint offset, int value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void marg8uintin() {
|
void marg8uintin() {
|
||||||
tint_isNormal(4.0f);
|
|
||||||
tint_isNormal_1(float4(0.0f, 0.0f, 0.0f, 0.0f));
|
|
||||||
tint_isNormal(0.0f);
|
|
||||||
tint_isNormal(4.0f);
|
|
||||||
tint_isNormal(2.0f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cbuffer cbuffer_uniforms : register(b0, space0) {
|
cbuffer cbuffer_uniforms : register(b0, space0) {
|
||||||
|
|
|
@ -1,23 +1,3 @@
|
||||||
bug/chromium/1273230.wgsl:4:7 warning: use of deprecated builtin
|
|
||||||
_ = isNormal(4.);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
bug/chromium/1273230.wgsl:7:3 warning: use of deprecated builtin
|
|
||||||
isNormal(vec4<f32>());
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
bug/chromium/1273230.wgsl:10:6 warning: use of deprecated builtin
|
|
||||||
isNormal(0.);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
bug/chromium/1273230.wgsl:11:9 warning: use of deprecated builtin
|
|
||||||
_ = isNormal(4.);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
bug/chromium/1273230.wgsl:12:9 warning: use of deprecated builtin
|
|
||||||
_ = isNormal(2.);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
#include <metal_stdlib>
|
#include <metal_stdlib>
|
||||||
|
|
||||||
using namespace metal;
|
using namespace metal;
|
||||||
|
@ -33,11 +13,6 @@ inline vec<T, N> operator*(packed_vec<T, M> lhs, matrix<T, N, M> rhs) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void marg8uintin() {
|
void marg8uintin() {
|
||||||
isnormal(4.0f);
|
|
||||||
isnormal(float4());
|
|
||||||
isnormal(0.0f);
|
|
||||||
isnormal(4.0f);
|
|
||||||
isnormal(2.0f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Uniforms {
|
struct Uniforms {
|
||||||
|
|
|
@ -1,30 +1,10 @@
|
||||||
bug/chromium/1273230.wgsl:4:7 warning: use of deprecated builtin
|
|
||||||
_ = isNormal(4.);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
bug/chromium/1273230.wgsl:7:3 warning: use of deprecated builtin
|
|
||||||
isNormal(vec4<f32>());
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
bug/chromium/1273230.wgsl:10:6 warning: use of deprecated builtin
|
|
||||||
isNormal(0.);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
bug/chromium/1273230.wgsl:11:9 warning: use of deprecated builtin
|
|
||||||
_ = isNormal(4.);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
bug/chromium/1273230.wgsl:12:9 warning: use of deprecated builtin
|
|
||||||
_ = isNormal(2.);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
; SPIR-V
|
; SPIR-V
|
||||||
; Version: 1.3
|
; Version: 1.3
|
||||||
; Generator: Google Tint Compiler; 0
|
; Generator: Google Tint Compiler; 0
|
||||||
; Bound: 308
|
; Bound: 277
|
||||||
; Schema: 0
|
; Schema: 0
|
||||||
OpCapability Shader
|
OpCapability Shader
|
||||||
%38 = OpExtInstImport "GLSL.std.450"
|
%71 = OpExtInstImport "GLSL.std.450"
|
||||||
OpMemoryModel Logical GLSL450
|
OpMemoryModel Logical GLSL450
|
||||||
OpEntryPoint GLCompute %main_count "main_count" %GlobalInvocationID_1
|
OpEntryPoint GLCompute %main_count "main_count" %GlobalInvocationID_1
|
||||||
OpExecutionMode %main_count LocalSize 128 1 1
|
OpExecutionMode %main_count LocalSize 128 1 1
|
||||||
|
@ -186,323 +166,292 @@ bug/chromium/1273230.wgsl:12:9 warning: use of deprecated builtin
|
||||||
%void = OpTypeVoid
|
%void = OpTypeVoid
|
||||||
%30 = OpTypeFunction %void
|
%30 = OpTypeFunction %void
|
||||||
%int_0 = OpConstant %int 0
|
%int_0 = OpConstant %int 0
|
||||||
%bool = OpTypeBool
|
|
||||||
%float_4 = OpConstant %float 4
|
|
||||||
%uint_133693440 = OpConstant %uint 133693440
|
|
||||||
%uint_524288 = OpConstant %uint 524288
|
|
||||||
%uint_133169152 = OpConstant %uint 133169152
|
|
||||||
%v4float = OpTypeVector %float 4
|
%v4float = OpTypeVector %float 4
|
||||||
%float_2 = OpConstant %float 2
|
%float_2 = OpConstant %float 2
|
||||||
%47 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2
|
%37 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2
|
||||||
%v4bool = OpTypeVector %bool 4
|
%38 = OpTypeFunction %v3float %v3float
|
||||||
%50 = OpConstantNull %v4float
|
|
||||||
%v4uint = OpTypeVector %uint 4
|
|
||||||
%float_0 = OpConstant %float 0
|
|
||||||
%71 = OpTypeFunction %v3float %v3float
|
|
||||||
%uint_4 = OpConstant %uint 4
|
%uint_4 = OpConstant %uint 4
|
||||||
%uint_0 = OpConstant %uint 0
|
%uint_0 = OpConstant %uint 0
|
||||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||||
%uint_1 = OpConstant %uint 1
|
%uint_1 = OpConstant %uint 1
|
||||||
%uint_2 = OpConstant %uint 2
|
%uint_2 = OpConstant %uint 2
|
||||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||||
%89 = OpConstantNull %v3float
|
%56 = OpConstantNull %v3float
|
||||||
%uint_5 = OpConstant %uint 5
|
%uint_5 = OpConstant %uint 5
|
||||||
%_ptr_Function_float = OpTypePointer Function %float
|
%_ptr_Function_float = OpTypePointer Function %float
|
||||||
%113 = OpConstantNull %float
|
%81 = OpConstantNull %float
|
||||||
%_ptr_Uniform_uint = OpTypePointer Uniform %uint
|
%_ptr_Uniform_uint = OpTypePointer Uniform %uint
|
||||||
%150 = OpTypeFunction %uint %uint %v3float
|
%118 = OpTypeFunction %uint %uint %v3float
|
||||||
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
|
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
|
||||||
%158 = OpConstantNull %v3uint
|
%126 = OpConstantNull %v3uint
|
||||||
%_ptr_Function_uint = OpTypePointer Function %uint
|
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||||
%171 = OpTypeFunction %v3uint %uint %uint
|
%139 = OpTypeFunction %v3uint %uint %uint
|
||||||
%179 = OpConstantNull %uint
|
%147 = OpConstantNull %uint
|
||||||
%192 = OpTypeFunction %v3float %uint
|
%160 = OpTypeFunction %v3float %uint
|
||||||
%uint_3 = OpConstant %uint 3
|
%uint_3 = OpConstant %uint 3
|
||||||
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
|
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
|
||||||
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
|
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
|
||||||
%_ptr_StorageBuffer_uint_0 = OpTypePointer StorageBuffer %uint
|
%_ptr_StorageBuffer_uint_0 = OpTypePointer StorageBuffer %uint
|
||||||
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
||||||
%_ptr_Function_int = OpTypePointer Function %int
|
%_ptr_Function_int = OpTypePointer Function %int
|
||||||
%239 = OpConstantNull %int
|
%207 = OpConstantNull %int
|
||||||
%240 = OpTypeFunction %void %v3uint
|
%208 = OpTypeFunction %void %v3uint
|
||||||
|
%bool = OpTypeBool
|
||||||
%float_3 = OpConstant %float 3
|
%float_3 = OpConstant %float 3
|
||||||
%int_1 = OpConstant %int 1
|
%int_1 = OpConstant %int 1
|
||||||
%marg8uintin = OpFunction %void None %30
|
%marg8uintin = OpFunction %void None %30
|
||||||
%33 = OpLabel
|
%33 = OpLabel
|
||||||
%42 = OpBitcast %uint %float_4
|
|
||||||
%43 = OpBitwiseAnd %uint %42 %uint_133693440
|
|
||||||
%44 = OpExtInst %uint %38 UClamp %43 %uint_524288 %uint_133169152
|
|
||||||
%35 = OpIEqual %bool %43 %44
|
|
||||||
%52 = OpCompositeConstruct %v4uint %uint_133693440 %uint_133693440 %uint_133693440 %uint_133693440
|
|
||||||
%53 = OpCompositeConstruct %v4uint %uint_524288 %uint_524288 %uint_524288 %uint_524288
|
|
||||||
%54 = OpCompositeConstruct %v4uint %uint_133169152 %uint_133169152 %uint_133169152 %uint_133169152
|
|
||||||
%55 = OpBitcast %v4uint %50
|
|
||||||
%56 = OpBitwiseAnd %v4uint %55 %52
|
|
||||||
%57 = OpExtInst %v4uint %38 UClamp %56 %53 %54
|
|
||||||
%48 = OpIEqual %v4bool %56 %57
|
|
||||||
%60 = OpBitcast %uint %float_0
|
|
||||||
%61 = OpBitwiseAnd %uint %60 %uint_133693440
|
|
||||||
%62 = OpExtInst %uint %38 UClamp %61 %uint_524288 %uint_133169152
|
|
||||||
%58 = OpIEqual %bool %61 %62
|
|
||||||
%64 = OpBitcast %uint %float_4
|
|
||||||
%65 = OpBitwiseAnd %uint %64 %uint_133693440
|
|
||||||
%66 = OpExtInst %uint %38 UClamp %65 %uint_524288 %uint_133169152
|
|
||||||
%63 = OpIEqual %bool %65 %66
|
|
||||||
%68 = OpBitcast %uint %float_2
|
|
||||||
%69 = OpBitwiseAnd %uint %68 %uint_133693440
|
|
||||||
%70 = OpExtInst %uint %38 UClamp %69 %uint_524288 %uint_133169152
|
|
||||||
%67 = OpIEqual %bool %69 %70
|
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%toVoxelPos = OpFunction %v3float None %71
|
%toVoxelPos = OpFunction %v3float None %38
|
||||||
%position = OpFunctionParameter %v3float
|
%position = OpFunctionParameter %v3float
|
||||||
%74 = OpLabel
|
%41 = OpLabel
|
||||||
%bbMin = OpVariable %_ptr_Function_v3float Function %89
|
%bbMin = OpVariable %_ptr_Function_v3float Function %56
|
||||||
%bbMax = OpVariable %_ptr_Function_v3float Function %89
|
%bbMax = OpVariable %_ptr_Function_v3float Function %56
|
||||||
%bbSize = OpVariable %_ptr_Function_v3float Function %89
|
%bbSize = OpVariable %_ptr_Function_v3float Function %56
|
||||||
%cubeSize = OpVariable %_ptr_Function_float Function %113
|
%cubeSize = OpVariable %_ptr_Function_float Function %81
|
||||||
%gridSize = OpVariable %_ptr_Function_float Function %113
|
%gridSize = OpVariable %_ptr_Function_float Function %81
|
||||||
%gx = OpVariable %_ptr_Function_float Function %113
|
%gx = OpVariable %_ptr_Function_float Function %81
|
||||||
%gy = OpVariable %_ptr_Function_float Function %113
|
%gy = OpVariable %_ptr_Function_float Function %81
|
||||||
%gz = OpVariable %_ptr_Function_float Function %113
|
%gz = OpVariable %_ptr_Function_float Function %81
|
||||||
%78 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_4 %uint_0
|
%45 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_4 %uint_0
|
||||||
|
%46 = OpLoad %float %45
|
||||||
|
%48 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_4 %uint_1
|
||||||
|
%49 = OpLoad %float %48
|
||||||
|
%51 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_4 %uint_2
|
||||||
|
%52 = OpLoad %float %51
|
||||||
|
%53 = OpCompositeConstruct %v3float %46 %49 %52
|
||||||
|
OpStore %bbMin %53
|
||||||
|
%58 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_5 %uint_0
|
||||||
|
%59 = OpLoad %float %58
|
||||||
|
%60 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_5 %uint_1
|
||||||
|
%61 = OpLoad %float %60
|
||||||
|
%62 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_5 %uint_2
|
||||||
|
%63 = OpLoad %float %62
|
||||||
|
%64 = OpCompositeConstruct %v3float %59 %61 %63
|
||||||
|
OpStore %bbMax %64
|
||||||
|
%66 = OpLoad %v3float %bbMin
|
||||||
|
%67 = OpLoad %v3float %bbMin
|
||||||
|
%68 = OpFSub %v3float %66 %67
|
||||||
|
OpStore %bbSize %68
|
||||||
|
%74 = OpAccessChain %_ptr_Function_float %bbMax %uint_0
|
||||||
|
%75 = OpLoad %float %74
|
||||||
|
%76 = OpAccessChain %_ptr_Function_float %bbMax %uint_1
|
||||||
|
%77 = OpLoad %float %76
|
||||||
|
%72 = OpExtInst %float %71 NMax %75 %77
|
||||||
|
%78 = OpAccessChain %_ptr_Function_float %bbSize %uint_2
|
||||||
%79 = OpLoad %float %78
|
%79 = OpLoad %float %78
|
||||||
%81 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_4 %uint_1
|
%70 = OpExtInst %float %71 NMax %72 %79
|
||||||
%82 = OpLoad %float %81
|
OpStore %cubeSize %70
|
||||||
%84 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_4 %uint_2
|
%84 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_1
|
||||||
%85 = OpLoad %float %84
|
%85 = OpLoad %uint %84
|
||||||
%86 = OpCompositeConstruct %v3float %79 %82 %85
|
%82 = OpConvertUToF %float %85
|
||||||
OpStore %bbMin %86
|
OpStore %gridSize %82
|
||||||
%91 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_5 %uint_0
|
%87 = OpLoad %float %cubeSize
|
||||||
%92 = OpLoad %float %91
|
%88 = OpCompositeExtract %float %position 0
|
||||||
%93 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_5 %uint_1
|
%89 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_4 %uint_0
|
||||||
%94 = OpLoad %float %93
|
%90 = OpLoad %float %89
|
||||||
%95 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_5 %uint_2
|
%91 = OpFSub %float %88 %90
|
||||||
%96 = OpLoad %float %95
|
%92 = OpFMul %float %87 %91
|
||||||
%97 = OpCompositeConstruct %v3float %92 %94 %96
|
%93 = OpLoad %float %cubeSize
|
||||||
OpStore %bbMax %97
|
%94 = OpFDiv %float %92 %93
|
||||||
%99 = OpLoad %v3float %bbMin
|
OpStore %gx %94
|
||||||
%100 = OpLoad %v3float %bbMin
|
%96 = OpLoad %float %gx
|
||||||
%101 = OpFSub %v3float %99 %100
|
%97 = OpCompositeExtract %float %position 1
|
||||||
OpStore %bbSize %101
|
%98 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_4 %uint_1
|
||||||
%106 = OpAccessChain %_ptr_Function_float %bbMax %uint_0
|
%99 = OpLoad %float %98
|
||||||
%107 = OpLoad %float %106
|
%100 = OpFSub %float %97 %99
|
||||||
%108 = OpAccessChain %_ptr_Function_float %bbMax %uint_1
|
%101 = OpFMul %float %96 %100
|
||||||
%109 = OpLoad %float %108
|
%102 = OpLoad %float %gridSize
|
||||||
%104 = OpExtInst %float %38 NMax %107 %109
|
%103 = OpFDiv %float %101 %102
|
||||||
%110 = OpAccessChain %_ptr_Function_float %bbSize %uint_2
|
OpStore %gy %103
|
||||||
%111 = OpLoad %float %110
|
%105 = OpLoad %float %gridSize
|
||||||
%103 = OpExtInst %float %38 NMax %104 %111
|
%106 = OpCompositeExtract %float %position 2
|
||||||
OpStore %cubeSize %103
|
%107 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_4 %uint_2
|
||||||
%116 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_1
|
%108 = OpLoad %float %107
|
||||||
%117 = OpLoad %uint %116
|
%109 = OpFSub %float %106 %108
|
||||||
%114 = OpConvertUToF %float %117
|
%110 = OpFMul %float %105 %109
|
||||||
OpStore %gridSize %114
|
%111 = OpLoad %float %gridSize
|
||||||
%119 = OpLoad %float %cubeSize
|
%112 = OpFDiv %float %110 %111
|
||||||
%120 = OpCompositeExtract %float %position 0
|
OpStore %gz %112
|
||||||
%121 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_4 %uint_0
|
%114 = OpLoad %float %gz
|
||||||
%122 = OpLoad %float %121
|
%115 = OpLoad %float %gz
|
||||||
%123 = OpFSub %float %120 %122
|
%116 = OpLoad %float %gz
|
||||||
%124 = OpFMul %float %119 %123
|
%117 = OpCompositeConstruct %v3float %114 %115 %116
|
||||||
%125 = OpLoad %float %cubeSize
|
OpReturnValue %117
|
||||||
%126 = OpFDiv %float %124 %125
|
|
||||||
OpStore %gx %126
|
|
||||||
%128 = OpLoad %float %gx
|
|
||||||
%129 = OpCompositeExtract %float %position 1
|
|
||||||
%130 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_4 %uint_1
|
|
||||||
%131 = OpLoad %float %130
|
|
||||||
%132 = OpFSub %float %129 %131
|
|
||||||
%133 = OpFMul %float %128 %132
|
|
||||||
%134 = OpLoad %float %gridSize
|
|
||||||
%135 = OpFDiv %float %133 %134
|
|
||||||
OpStore %gy %135
|
|
||||||
%137 = OpLoad %float %gridSize
|
|
||||||
%138 = OpCompositeExtract %float %position 2
|
|
||||||
%139 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_4 %uint_2
|
|
||||||
%140 = OpLoad %float %139
|
|
||||||
%141 = OpFSub %float %138 %140
|
|
||||||
%142 = OpFMul %float %137 %141
|
|
||||||
%143 = OpLoad %float %gridSize
|
|
||||||
%144 = OpFDiv %float %142 %143
|
|
||||||
OpStore %gz %144
|
|
||||||
%146 = OpLoad %float %gz
|
|
||||||
%147 = OpLoad %float %gz
|
|
||||||
%148 = OpLoad %float %gz
|
|
||||||
%149 = OpCompositeConstruct %v3float %146 %147 %148
|
|
||||||
OpReturnValue %149
|
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%toIndex1D = OpFunction %uint None %150
|
%toIndex1D = OpFunction %uint None %118
|
||||||
%gridSize_0 = OpFunctionParameter %uint
|
%gridSize_0 = OpFunctionParameter %uint
|
||||||
%voxelPos = OpFunctionParameter %v3float
|
%voxelPos = OpFunctionParameter %v3float
|
||||||
%154 = OpLabel
|
%122 = OpLabel
|
||||||
%icoord = OpVariable %_ptr_Function_v3uint Function %158
|
%icoord = OpVariable %_ptr_Function_v3uint Function %126
|
||||||
%155 = OpConvertFToU %v3uint %voxelPos
|
%123 = OpConvertFToU %v3uint %voxelPos
|
||||||
OpStore %icoord %155
|
OpStore %icoord %123
|
||||||
%160 = OpAccessChain %_ptr_Function_uint %icoord %uint_0
|
%128 = OpAccessChain %_ptr_Function_uint %icoord %uint_0
|
||||||
%161 = OpLoad %uint %160
|
%129 = OpLoad %uint %128
|
||||||
%162 = OpAccessChain %_ptr_Function_uint %icoord %uint_1
|
%130 = OpAccessChain %_ptr_Function_uint %icoord %uint_1
|
||||||
%163 = OpLoad %uint %162
|
%131 = OpLoad %uint %130
|
||||||
%164 = OpIMul %uint %gridSize_0 %163
|
%132 = OpIMul %uint %gridSize_0 %131
|
||||||
%165 = OpIAdd %uint %161 %164
|
%133 = OpIAdd %uint %129 %132
|
||||||
%166 = OpIMul %uint %gridSize_0 %gridSize_0
|
%134 = OpIMul %uint %gridSize_0 %gridSize_0
|
||||||
%167 = OpAccessChain %_ptr_Function_uint %icoord %uint_2
|
%135 = OpAccessChain %_ptr_Function_uint %icoord %uint_2
|
||||||
%168 = OpLoad %uint %167
|
%136 = OpLoad %uint %135
|
||||||
%169 = OpIMul %uint %166 %168
|
%137 = OpIMul %uint %134 %136
|
||||||
%170 = OpIAdd %uint %165 %169
|
%138 = OpIAdd %uint %133 %137
|
||||||
OpReturnValue %170
|
OpReturnValue %138
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%toIndex4D = OpFunction %v3uint None %171
|
%toIndex4D = OpFunction %v3uint None %139
|
||||||
%gridSize_1 = OpFunctionParameter %uint
|
%gridSize_1 = OpFunctionParameter %uint
|
||||||
%index = OpFunctionParameter %uint
|
%index = OpFunctionParameter %uint
|
||||||
%175 = OpLabel
|
%143 = OpLabel
|
||||||
%z = OpVariable %_ptr_Function_uint Function %179
|
%z = OpVariable %_ptr_Function_uint Function %147
|
||||||
%y = OpVariable %_ptr_Function_uint Function %179
|
%y = OpVariable %_ptr_Function_uint Function %147
|
||||||
%x = OpVariable %_ptr_Function_uint Function %179
|
%x = OpVariable %_ptr_Function_uint Function %147
|
||||||
%176 = OpIMul %uint %index %index
|
%144 = OpIMul %uint %index %index
|
||||||
%177 = OpUDiv %uint %gridSize_1 %176
|
%145 = OpUDiv %uint %gridSize_1 %144
|
||||||
OpStore %z %177
|
OpStore %z %145
|
||||||
%180 = OpIMul %uint %gridSize_1 %gridSize_1
|
%148 = OpIMul %uint %gridSize_1 %gridSize_1
|
||||||
%181 = OpLoad %uint %z
|
%149 = OpLoad %uint %z
|
||||||
%182 = OpIMul %uint %180 %181
|
%150 = OpIMul %uint %148 %149
|
||||||
%183 = OpISub %uint %gridSize_1 %182
|
%151 = OpISub %uint %gridSize_1 %150
|
||||||
%184 = OpUDiv %uint %183 %gridSize_1
|
%152 = OpUDiv %uint %151 %gridSize_1
|
||||||
OpStore %y %184
|
OpStore %y %152
|
||||||
%186 = OpUMod %uint %index %gridSize_1
|
%154 = OpUMod %uint %index %gridSize_1
|
||||||
OpStore %x %186
|
OpStore %x %154
|
||||||
%188 = OpLoad %uint %z
|
%156 = OpLoad %uint %z
|
||||||
%189 = OpLoad %uint %y
|
%157 = OpLoad %uint %y
|
||||||
%190 = OpLoad %uint %y
|
%158 = OpLoad %uint %y
|
||||||
%191 = OpCompositeConstruct %v3uint %188 %189 %190
|
%159 = OpCompositeConstruct %v3uint %156 %157 %158
|
||||||
OpReturnValue %191
|
OpReturnValue %159
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%loadPosition = OpFunction %v3float None %192
|
%loadPosition = OpFunction %v3float None %160
|
||||||
%vertexIndex = OpFunctionParameter %uint
|
%vertexIndex = OpFunctionParameter %uint
|
||||||
%195 = OpLabel
|
%163 = OpLabel
|
||||||
%position_0 = OpVariable %_ptr_Function_v3float Function %89
|
%position_0 = OpVariable %_ptr_Function_v3float Function %56
|
||||||
%197 = OpIMul %uint %uint_3 %vertexIndex
|
%165 = OpIMul %uint %uint_3 %vertexIndex
|
||||||
%198 = OpIAdd %uint %197 %uint_0
|
%166 = OpIAdd %uint %165 %uint_0
|
||||||
%200 = OpAccessChain %_ptr_StorageBuffer_float %positions %uint_0 %198
|
%168 = OpAccessChain %_ptr_StorageBuffer_float %positions %uint_0 %166
|
||||||
%201 = OpLoad %float %200
|
%169 = OpLoad %float %168
|
||||||
%202 = OpIMul %uint %uint_3 %vertexIndex
|
%170 = OpIMul %uint %uint_3 %vertexIndex
|
||||||
%203 = OpIAdd %uint %202 %uint_1
|
%171 = OpIAdd %uint %170 %uint_1
|
||||||
%204 = OpAccessChain %_ptr_StorageBuffer_float %positions %uint_0 %203
|
%172 = OpAccessChain %_ptr_StorageBuffer_float %positions %uint_0 %171
|
||||||
%205 = OpLoad %float %204
|
%173 = OpLoad %float %172
|
||||||
%206 = OpIMul %uint %uint_3 %vertexIndex
|
%174 = OpIMul %uint %uint_3 %vertexIndex
|
||||||
%207 = OpIAdd %uint %206 %uint_2
|
%175 = OpIAdd %uint %174 %uint_2
|
||||||
%208 = OpAccessChain %_ptr_StorageBuffer_float %positions %uint_0 %207
|
%176 = OpAccessChain %_ptr_StorageBuffer_float %positions %uint_0 %175
|
||||||
%209 = OpLoad %float %208
|
%177 = OpLoad %float %176
|
||||||
%210 = OpCompositeConstruct %v3float %201 %205 %209
|
%178 = OpCompositeConstruct %v3float %169 %173 %177
|
||||||
OpStore %position_0 %210
|
OpStore %position_0 %178
|
||||||
%212 = OpLoad %v3float %position_0
|
%180 = OpLoad %v3float %position_0
|
||||||
OpReturnValue %212
|
OpReturnValue %180
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%doIgnore = OpFunction %void None %30
|
%doIgnore = OpFunction %void None %30
|
||||||
%214 = OpLabel
|
%182 = OpLabel
|
||||||
%g43 = OpVariable %_ptr_Function_uint Function %179
|
%g43 = OpVariable %_ptr_Function_uint Function %147
|
||||||
%kj6 = OpVariable %_ptr_Function_uint Function %179
|
%kj6 = OpVariable %_ptr_Function_uint Function %147
|
||||||
%b53 = OpVariable %_ptr_Function_uint Function %179
|
%b53 = OpVariable %_ptr_Function_uint Function %147
|
||||||
%rwg = OpVariable %_ptr_Function_uint Function %179
|
%rwg = OpVariable %_ptr_Function_uint Function %147
|
||||||
%rb5 = OpVariable %_ptr_Function_float Function %113
|
%rb5 = OpVariable %_ptr_Function_float Function %81
|
||||||
%g55 = OpVariable %_ptr_Function_int Function %239
|
%g55 = OpVariable %_ptr_Function_int Function %207
|
||||||
%215 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_0
|
%183 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_0
|
||||||
%216 = OpLoad %uint %215
|
%184 = OpLoad %uint %183
|
||||||
OpStore %g43 %216
|
OpStore %g43 %184
|
||||||
%219 = OpAccessChain %_ptr_StorageBuffer_uint %dbg %uint_5
|
%187 = OpAccessChain %_ptr_StorageBuffer_uint %dbg %uint_5
|
||||||
%220 = OpLoad %uint %219
|
%188 = OpLoad %uint %187
|
||||||
OpStore %kj6 %220
|
OpStore %kj6 %188
|
||||||
%225 = OpAccessChain %_ptr_StorageBuffer_uint_0 %counters %uint_0 %int_0
|
%193 = OpAccessChain %_ptr_StorageBuffer_uint_0 %counters %uint_0 %int_0
|
||||||
%222 = OpAtomicLoad %uint %225 %uint_1 %uint_0
|
%190 = OpAtomicLoad %uint %193 %uint_1 %uint_0
|
||||||
OpStore %b53 %222
|
OpStore %b53 %190
|
||||||
%227 = OpAccessChain %_ptr_StorageBuffer_uint %indices %uint_0 %int_0
|
%195 = OpAccessChain %_ptr_StorageBuffer_uint %indices %uint_0 %int_0
|
||||||
%228 = OpLoad %uint %227
|
%196 = OpLoad %uint %195
|
||||||
OpStore %rwg %228
|
OpStore %rwg %196
|
||||||
%230 = OpAccessChain %_ptr_StorageBuffer_float %positions %uint_0 %int_0
|
%198 = OpAccessChain %_ptr_StorageBuffer_float %positions %uint_0 %int_0
|
||||||
%231 = OpLoad %float %230
|
%199 = OpLoad %float %198
|
||||||
OpStore %rb5 %231
|
OpStore %rb5 %199
|
||||||
%236 = OpAccessChain %_ptr_StorageBuffer_int %LUT %uint_0 %int_0
|
%204 = OpAccessChain %_ptr_StorageBuffer_int %LUT %uint_0 %int_0
|
||||||
%233 = OpAtomicLoad %int %236 %uint_1 %uint_0
|
%201 = OpAtomicLoad %int %204 %uint_1 %uint_0
|
||||||
OpStore %g55 %233
|
OpStore %g55 %201
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%main_count_inner = OpFunction %void None %240
|
%main_count_inner = OpFunction %void None %208
|
||||||
%GlobalInvocationID = OpFunctionParameter %v3uint
|
%GlobalInvocationID = OpFunctionParameter %v3uint
|
||||||
%243 = OpLabel
|
%211 = OpLabel
|
||||||
%triangleIndex = OpVariable %_ptr_Function_uint Function %179
|
%triangleIndex = OpVariable %_ptr_Function_uint Function %147
|
||||||
%i0 = OpVariable %_ptr_Function_uint Function %179
|
%i0 = OpVariable %_ptr_Function_uint Function %147
|
||||||
%i1 = OpVariable %_ptr_Function_uint Function %179
|
%i1 = OpVariable %_ptr_Function_uint Function %147
|
||||||
%i2 = OpVariable %_ptr_Function_uint Function %179
|
%i2 = OpVariable %_ptr_Function_uint Function %147
|
||||||
%p0 = OpVariable %_ptr_Function_v3float Function %89
|
%p0 = OpVariable %_ptr_Function_v3float Function %56
|
||||||
%p1 = OpVariable %_ptr_Function_v3float Function %89
|
%p1 = OpVariable %_ptr_Function_v3float Function %56
|
||||||
%p2 = OpVariable %_ptr_Function_v3float Function %89
|
%p2 = OpVariable %_ptr_Function_v3float Function %56
|
||||||
%287 = OpVariable %_ptr_Function_v3float Function %89
|
%256 = OpVariable %_ptr_Function_v3float Function %56
|
||||||
%center = OpVariable %_ptr_Function_v3float Function %89
|
%center = OpVariable %_ptr_Function_v3float Function %56
|
||||||
%voxelPos_0 = OpVariable %_ptr_Function_v3float Function %89
|
%voxelPos_0 = OpVariable %_ptr_Function_v3float Function %56
|
||||||
%lIndex = OpVariable %_ptr_Function_uint Function %179
|
%lIndex = OpVariable %_ptr_Function_uint Function %147
|
||||||
%triangleOffset = OpVariable %_ptr_Function_int Function %239
|
%triangleOffset = OpVariable %_ptr_Function_int Function %207
|
||||||
%244 = OpCompositeExtract %uint %GlobalInvocationID 0
|
%212 = OpCompositeExtract %uint %GlobalInvocationID 0
|
||||||
OpStore %triangleIndex %244
|
OpStore %triangleIndex %212
|
||||||
%246 = OpLoad %uint %triangleIndex
|
%214 = OpLoad %uint %triangleIndex
|
||||||
%247 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_0
|
%215 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_0
|
||||||
%248 = OpLoad %uint %247
|
%216 = OpLoad %uint %215
|
||||||
%249 = OpUGreaterThanEqual %bool %246 %248
|
%217 = OpUGreaterThanEqual %bool %214 %216
|
||||||
OpSelectionMerge %250 None
|
OpSelectionMerge %219 None
|
||||||
OpBranchConditional %249 %251 %250
|
OpBranchConditional %217 %220 %219
|
||||||
%251 = OpLabel
|
%220 = OpLabel
|
||||||
OpReturn
|
OpReturn
|
||||||
%250 = OpLabel
|
%219 = OpLabel
|
||||||
%252 = OpFunctionCall %void %doIgnore
|
%221 = OpFunctionCall %void %doIgnore
|
||||||
%253 = OpLoad %uint %triangleIndex
|
%222 = OpLoad %uint %triangleIndex
|
||||||
%254 = OpIMul %uint %uint_3 %253
|
%223 = OpIMul %uint %uint_3 %222
|
||||||
%255 = OpIAdd %uint %254 %uint_0
|
%224 = OpIAdd %uint %223 %uint_0
|
||||||
%256 = OpAccessChain %_ptr_StorageBuffer_uint %indices %uint_0 %255
|
%225 = OpAccessChain %_ptr_StorageBuffer_uint %indices %uint_0 %224
|
||||||
%257 = OpLoad %uint %256
|
%226 = OpLoad %uint %225
|
||||||
OpStore %i0 %257
|
OpStore %i0 %226
|
||||||
%259 = OpLoad %uint %i0
|
%228 = OpLoad %uint %i0
|
||||||
%260 = OpIMul %uint %uint_3 %259
|
%229 = OpIMul %uint %uint_3 %228
|
||||||
%261 = OpIAdd %uint %260 %uint_1
|
%230 = OpIAdd %uint %229 %uint_1
|
||||||
%262 = OpAccessChain %_ptr_StorageBuffer_uint %indices %uint_0 %261
|
%231 = OpAccessChain %_ptr_StorageBuffer_uint %indices %uint_0 %230
|
||||||
%263 = OpLoad %uint %262
|
%232 = OpLoad %uint %231
|
||||||
OpStore %i1 %263
|
OpStore %i1 %232
|
||||||
%265 = OpLoad %uint %i0
|
%234 = OpLoad %uint %i0
|
||||||
%266 = OpIMul %uint %uint_3 %265
|
%235 = OpIMul %uint %uint_3 %234
|
||||||
%267 = OpIAdd %uint %266 %uint_2
|
%236 = OpIAdd %uint %235 %uint_2
|
||||||
%268 = OpAccessChain %_ptr_StorageBuffer_uint %indices %uint_0 %267
|
%237 = OpAccessChain %_ptr_StorageBuffer_uint %indices %uint_0 %236
|
||||||
%269 = OpLoad %uint %268
|
%238 = OpLoad %uint %237
|
||||||
OpStore %i2 %269
|
OpStore %i2 %238
|
||||||
%272 = OpLoad %uint %i0
|
%241 = OpLoad %uint %i0
|
||||||
%271 = OpFunctionCall %v3float %loadPosition %272
|
%240 = OpFunctionCall %v3float %loadPosition %241
|
||||||
OpStore %p0 %271
|
OpStore %p0 %240
|
||||||
%275 = OpLoad %uint %i0
|
%244 = OpLoad %uint %i0
|
||||||
%274 = OpFunctionCall %v3float %loadPosition %275
|
%243 = OpFunctionCall %v3float %loadPosition %244
|
||||||
OpStore %p1 %274
|
OpStore %p1 %243
|
||||||
%278 = OpLoad %uint %i2
|
%247 = OpLoad %uint %i2
|
||||||
%277 = OpFunctionCall %v3float %loadPosition %278
|
%246 = OpFunctionCall %v3float %loadPosition %247
|
||||||
OpStore %p2 %277
|
OpStore %p2 %246
|
||||||
%280 = OpLoad %v3float %p0
|
%249 = OpLoad %v3float %p0
|
||||||
%281 = OpLoad %v3float %p2
|
%250 = OpLoad %v3float %p2
|
||||||
%282 = OpFAdd %v3float %280 %281
|
%251 = OpFAdd %v3float %249 %250
|
||||||
%283 = OpLoad %v3float %p1
|
%252 = OpLoad %v3float %p1
|
||||||
%284 = OpFAdd %v3float %282 %283
|
%253 = OpFAdd %v3float %251 %252
|
||||||
%288 = OpCompositeConstruct %v3float %float_3 %float_3 %float_3
|
%257 = OpCompositeConstruct %v3float %float_3 %float_3 %float_3
|
||||||
%286 = OpFDiv %v3float %284 %288
|
%255 = OpFDiv %v3float %253 %257
|
||||||
OpStore %center %286
|
OpStore %center %255
|
||||||
%291 = OpLoad %v3float %p1
|
%260 = OpLoad %v3float %p1
|
||||||
%290 = OpFunctionCall %v3float %toVoxelPos %291
|
%259 = OpFunctionCall %v3float %toVoxelPos %260
|
||||||
OpStore %voxelPos_0 %290
|
OpStore %voxelPos_0 %259
|
||||||
%294 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_1
|
%263 = OpAccessChain %_ptr_Uniform_uint %uniforms %uint_1
|
||||||
%295 = OpLoad %uint %294
|
%264 = OpLoad %uint %263
|
||||||
%296 = OpLoad %v3float %p0
|
%265 = OpLoad %v3float %p0
|
||||||
%293 = OpFunctionCall %uint %toIndex1D %295 %296
|
%262 = OpFunctionCall %uint %toIndex1D %264 %265
|
||||||
OpStore %lIndex %293
|
OpStore %lIndex %262
|
||||||
%300 = OpLoad %uint %i1
|
%269 = OpLoad %uint %i1
|
||||||
%301 = OpAccessChain %_ptr_StorageBuffer_int %LUT %uint_0 %300
|
%270 = OpAccessChain %_ptr_StorageBuffer_int %LUT %uint_0 %269
|
||||||
%298 = OpAtomicIAdd %int %301 %uint_1 %uint_0 %int_1
|
%267 = OpAtomicIAdd %int %270 %uint_1 %uint_0 %int_1
|
||||||
OpStore %triangleOffset %298
|
OpStore %triangleOffset %267
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
%main_count = OpFunction %void None %30
|
%main_count = OpFunction %void None %30
|
||||||
%305 = OpLabel
|
%274 = OpLabel
|
||||||
%307 = OpLoad %v3uint %GlobalInvocationID_1
|
%276 = OpLoad %v3uint %GlobalInvocationID_1
|
||||||
%306 = OpFunctionCall %void %main_count_inner %307
|
%275 = OpFunctionCall %void %main_count_inner %276
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,32 +1,7 @@
|
||||||
bug/chromium/1273230.wgsl:4:7 warning: use of deprecated builtin
|
|
||||||
_ = isNormal(4.);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
bug/chromium/1273230.wgsl:7:3 warning: use of deprecated builtin
|
|
||||||
isNormal(vec4<f32>());
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
bug/chromium/1273230.wgsl:10:6 warning: use of deprecated builtin
|
|
||||||
isNormal(0.);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
bug/chromium/1273230.wgsl:11:9 warning: use of deprecated builtin
|
|
||||||
_ = isNormal(4.);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
bug/chromium/1273230.wgsl:12:9 warning: use of deprecated builtin
|
|
||||||
_ = isNormal(2.);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
fn marg8uintin() {
|
fn marg8uintin() {
|
||||||
_ = 0;
|
_ = 0;
|
||||||
_ = isNormal(4.0);
|
|
||||||
_ = vec4<f32>(2.0);
|
_ = vec4<f32>(2.0);
|
||||||
isNormal(vec4<f32>());
|
|
||||||
_ = vec4<f32>(2.0);
|
_ = vec4<f32>(2.0);
|
||||||
isNormal(0.0);
|
|
||||||
_ = isNormal(4.0);
|
|
||||||
_ = isNormal(2.0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Uniforms {
|
struct Uniforms {
|
||||||
|
|
|
@ -1,45 +0,0 @@
|
||||||
// Copyright 2021 The Tint Authors.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// File generated by tools/builtin-gen
|
|
||||||
// using the template:
|
|
||||||
// test/tint/builtins/builtins.wgsl.tmpl
|
|
||||||
// and the builtin defintion file:
|
|
||||||
// src/tint/builtins.def
|
|
||||||
//
|
|
||||||
// Do not modify this file directly
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
// fn isFinite(vec<2, f32>) -> vec<2, bool>
|
|
||||||
fn isFinite_34d32b() {
|
|
||||||
var res: vec2<bool> = isFinite(vec2<f32>());
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isFinite_34d32b();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isFinite_34d32b();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isFinite_34d32b();
|
|
||||||
}
|
|
|
@ -1,78 +0,0 @@
|
||||||
SKIP: FAILED
|
|
||||||
|
|
||||||
builtins/gen/isFinite/34d32b.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec2<bool> = isFinite(vec2<f32>());
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
void isFinite_34d32b() {
|
|
||||||
bvec2 res = isfinite(vec2(0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
vec4 vertex_main() {
|
|
||||||
isFinite_34d32b();
|
|
||||||
return vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
vec4 inner_result = vertex_main();
|
|
||||||
gl_Position = inner_result;
|
|
||||||
gl_Position.y = -(gl_Position.y);
|
|
||||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Error parsing GLSL shader:
|
|
||||||
ERROR: 0:4: 'isfinite' : no matching overloaded function found
|
|
||||||
ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp 2-component vector of bool'
|
|
||||||
ERROR: 0:4: '' : compilation terminated
|
|
||||||
ERROR: 3 compilation errors. No code generated.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#version 310 es
|
|
||||||
precision mediump float;
|
|
||||||
|
|
||||||
void isFinite_34d32b() {
|
|
||||||
bvec2 res = isfinite(vec2(0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isFinite_34d32b();
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
fragment_main();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Error parsing GLSL shader:
|
|
||||||
ERROR: 0:5: 'isfinite' : no matching overloaded function found
|
|
||||||
ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp 2-component vector of bool'
|
|
||||||
ERROR: 0:5: '' : compilation terminated
|
|
||||||
ERROR: 3 compilation errors. No code generated.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
void isFinite_34d32b() {
|
|
||||||
bvec2 res = isfinite(vec2(0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
void compute_main() {
|
|
||||||
isFinite_34d32b();
|
|
||||||
}
|
|
||||||
|
|
||||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
||||||
void main() {
|
|
||||||
compute_main();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Error parsing GLSL shader:
|
|
||||||
ERROR: 0:4: 'isfinite' : no matching overloaded function found
|
|
||||||
ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp 2-component vector of bool'
|
|
||||||
ERROR: 0:4: '' : compilation terminated
|
|
||||||
ERROR: 3 compilation errors. No code generated.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
builtins/gen/isFinite/34d32b.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec2<bool> = isFinite(vec2<f32>());
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
void isFinite_34d32b() {
|
|
||||||
bool2 res = isfinite(float2(0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tint_symbol {
|
|
||||||
float4 value : SV_Position;
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 vertex_main_inner() {
|
|
||||||
isFinite_34d32b();
|
|
||||||
return float4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
tint_symbol vertex_main() {
|
|
||||||
const float4 inner_result = vertex_main_inner();
|
|
||||||
tint_symbol wrapper_result = (tint_symbol)0;
|
|
||||||
wrapper_result.value = inner_result;
|
|
||||||
return wrapper_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isFinite_34d32b();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
[numthreads(1, 1, 1)]
|
|
||||||
void compute_main() {
|
|
||||||
isFinite_34d32b();
|
|
||||||
return;
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
builtins/gen/isFinite/34d32b.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec2<bool> = isFinite(vec2<f32>());
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
#include <metal_stdlib>
|
|
||||||
|
|
||||||
using namespace metal;
|
|
||||||
void isFinite_34d32b() {
|
|
||||||
bool2 res = isfinite(float2());
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tint_symbol {
|
|
||||||
float4 value [[position]];
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 vertex_main_inner() {
|
|
||||||
isFinite_34d32b();
|
|
||||||
return float4();
|
|
||||||
}
|
|
||||||
|
|
||||||
vertex tint_symbol vertex_main() {
|
|
||||||
float4 const inner_result = vertex_main_inner();
|
|
||||||
tint_symbol wrapper_result = {};
|
|
||||||
wrapper_result.value = inner_result;
|
|
||||||
return wrapper_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
fragment void fragment_main() {
|
|
||||||
isFinite_34d32b();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
kernel void compute_main() {
|
|
||||||
isFinite_34d32b();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,76 +0,0 @@
|
||||||
builtins/gen/isFinite/34d32b.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec2<bool> = isFinite(vec2<f32>());
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
; SPIR-V
|
|
||||||
; Version: 1.3
|
|
||||||
; Generator: Google Tint Compiler; 0
|
|
||||||
; Bound: 38
|
|
||||||
; Schema: 0
|
|
||||||
OpCapability Shader
|
|
||||||
OpMemoryModel Logical GLSL450
|
|
||||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
|
||||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
|
||||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
|
||||||
OpExecutionMode %fragment_main OriginUpperLeft
|
|
||||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
|
||||||
OpName %value "value"
|
|
||||||
OpName %vertex_point_size "vertex_point_size"
|
|
||||||
OpName %isFinite_34d32b "isFinite_34d32b"
|
|
||||||
OpName %res "res"
|
|
||||||
OpName %vertex_main_inner "vertex_main_inner"
|
|
||||||
OpName %vertex_main "vertex_main"
|
|
||||||
OpName %fragment_main "fragment_main"
|
|
||||||
OpName %compute_main "compute_main"
|
|
||||||
OpDecorate %value BuiltIn Position
|
|
||||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
|
||||||
%float = OpTypeFloat 32
|
|
||||||
%v4float = OpTypeVector %float 4
|
|
||||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
|
||||||
%5 = OpConstantNull %v4float
|
|
||||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
|
||||||
%_ptr_Output_float = OpTypePointer Output %float
|
|
||||||
%8 = OpConstantNull %float
|
|
||||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
|
||||||
%void = OpTypeVoid
|
|
||||||
%9 = OpTypeFunction %void
|
|
||||||
%bool = OpTypeBool
|
|
||||||
%v2bool = OpTypeVector %bool 2
|
|
||||||
%v2float = OpTypeVector %float 2
|
|
||||||
%17 = OpConstantNull %v2float
|
|
||||||
%_ptr_Function_v2bool = OpTypePointer Function %v2bool
|
|
||||||
%23 = OpConstantNull %v2bool
|
|
||||||
%24 = OpTypeFunction %v4float
|
|
||||||
%float_1 = OpConstant %float 1
|
|
||||||
%isFinite_34d32b = OpFunction %void None %9
|
|
||||||
%12 = OpLabel
|
|
||||||
%res = OpVariable %_ptr_Function_v2bool Function %23
|
|
||||||
%18 = OpIsInf %v2bool %17
|
|
||||||
%19 = OpIsNan %v2bool %17
|
|
||||||
%20 = OpLogicalOr %v2bool %18 %19
|
|
||||||
%13 = OpLogicalNot %v2bool %20
|
|
||||||
OpStore %res %13
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%vertex_main_inner = OpFunction %v4float None %24
|
|
||||||
%26 = OpLabel
|
|
||||||
%27 = OpFunctionCall %void %isFinite_34d32b
|
|
||||||
OpReturnValue %5
|
|
||||||
OpFunctionEnd
|
|
||||||
%vertex_main = OpFunction %void None %9
|
|
||||||
%29 = OpLabel
|
|
||||||
%30 = OpFunctionCall %v4float %vertex_main_inner
|
|
||||||
OpStore %value %30
|
|
||||||
OpStore %vertex_point_size %float_1
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%fragment_main = OpFunction %void None %9
|
|
||||||
%33 = OpLabel
|
|
||||||
%34 = OpFunctionCall %void %isFinite_34d32b
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%compute_main = OpFunction %void None %9
|
|
||||||
%36 = OpLabel
|
|
||||||
%37 = OpFunctionCall %void %isFinite_34d32b
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
|
@ -1,23 +0,0 @@
|
||||||
builtins/gen/isFinite/34d32b.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec2<bool> = isFinite(vec2<f32>());
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
fn isFinite_34d32b() {
|
|
||||||
var res : vec2<bool> = isFinite(vec2<f32>());
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isFinite_34d32b();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isFinite_34d32b();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isFinite_34d32b();
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
// Copyright 2021 The Tint Authors.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// File generated by tools/builtin-gen
|
|
||||||
// using the template:
|
|
||||||
// test/tint/builtins/builtins.wgsl.tmpl
|
|
||||||
// and the builtin defintion file:
|
|
||||||
// src/tint/builtins.def
|
|
||||||
//
|
|
||||||
// Do not modify this file directly
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
// fn isFinite(f32) -> bool
|
|
||||||
fn isFinite_426f9f() {
|
|
||||||
var res: bool = isFinite(1.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isFinite_426f9f();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isFinite_426f9f();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isFinite_426f9f();
|
|
||||||
}
|
|
|
@ -1,78 +0,0 @@
|
||||||
SKIP: FAILED
|
|
||||||
|
|
||||||
builtins/gen/isFinite/426f9f.wgsl:28:19 warning: use of deprecated builtin
|
|
||||||
var res: bool = isFinite(1.0);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
void isFinite_426f9f() {
|
|
||||||
bool res = isfinite(1.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
vec4 vertex_main() {
|
|
||||||
isFinite_426f9f();
|
|
||||||
return vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
vec4 inner_result = vertex_main();
|
|
||||||
gl_Position = inner_result;
|
|
||||||
gl_Position.y = -(gl_Position.y);
|
|
||||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Error parsing GLSL shader:
|
|
||||||
ERROR: 0:4: 'isfinite' : no matching overloaded function found
|
|
||||||
ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp bool'
|
|
||||||
ERROR: 0:4: '' : compilation terminated
|
|
||||||
ERROR: 3 compilation errors. No code generated.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#version 310 es
|
|
||||||
precision mediump float;
|
|
||||||
|
|
||||||
void isFinite_426f9f() {
|
|
||||||
bool res = isfinite(1.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isFinite_426f9f();
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
fragment_main();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Error parsing GLSL shader:
|
|
||||||
ERROR: 0:5: 'isfinite' : no matching overloaded function found
|
|
||||||
ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp bool'
|
|
||||||
ERROR: 0:5: '' : compilation terminated
|
|
||||||
ERROR: 3 compilation errors. No code generated.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
void isFinite_426f9f() {
|
|
||||||
bool res = isfinite(1.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
void compute_main() {
|
|
||||||
isFinite_426f9f();
|
|
||||||
}
|
|
||||||
|
|
||||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
||||||
void main() {
|
|
||||||
compute_main();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Error parsing GLSL shader:
|
|
||||||
ERROR: 0:4: 'isfinite' : no matching overloaded function found
|
|
||||||
ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp bool'
|
|
||||||
ERROR: 0:4: '' : compilation terminated
|
|
||||||
ERROR: 3 compilation errors. No code generated.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
builtins/gen/isFinite/426f9f.wgsl:28:19 warning: use of deprecated builtin
|
|
||||||
var res: bool = isFinite(1.0);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
void isFinite_426f9f() {
|
|
||||||
bool res = isfinite(1.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tint_symbol {
|
|
||||||
float4 value : SV_Position;
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 vertex_main_inner() {
|
|
||||||
isFinite_426f9f();
|
|
||||||
return float4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
tint_symbol vertex_main() {
|
|
||||||
const float4 inner_result = vertex_main_inner();
|
|
||||||
tint_symbol wrapper_result = (tint_symbol)0;
|
|
||||||
wrapper_result.value = inner_result;
|
|
||||||
return wrapper_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isFinite_426f9f();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
[numthreads(1, 1, 1)]
|
|
||||||
void compute_main() {
|
|
||||||
isFinite_426f9f();
|
|
||||||
return;
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
builtins/gen/isFinite/426f9f.wgsl:28:19 warning: use of deprecated builtin
|
|
||||||
var res: bool = isFinite(1.0);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
#include <metal_stdlib>
|
|
||||||
|
|
||||||
using namespace metal;
|
|
||||||
void isFinite_426f9f() {
|
|
||||||
bool res = isfinite(1.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tint_symbol {
|
|
||||||
float4 value [[position]];
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 vertex_main_inner() {
|
|
||||||
isFinite_426f9f();
|
|
||||||
return float4();
|
|
||||||
}
|
|
||||||
|
|
||||||
vertex tint_symbol vertex_main() {
|
|
||||||
float4 const inner_result = vertex_main_inner();
|
|
||||||
tint_symbol wrapper_result = {};
|
|
||||||
wrapper_result.value = inner_result;
|
|
||||||
return wrapper_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
fragment void fragment_main() {
|
|
||||||
isFinite_426f9f();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
kernel void compute_main() {
|
|
||||||
isFinite_426f9f();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,73 +0,0 @@
|
||||||
builtins/gen/isFinite/426f9f.wgsl:28:19 warning: use of deprecated builtin
|
|
||||||
var res: bool = isFinite(1.0);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
; SPIR-V
|
|
||||||
; Version: 1.3
|
|
||||||
; Generator: Google Tint Compiler; 0
|
|
||||||
; Bound: 35
|
|
||||||
; Schema: 0
|
|
||||||
OpCapability Shader
|
|
||||||
OpMemoryModel Logical GLSL450
|
|
||||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
|
||||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
|
||||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
|
||||||
OpExecutionMode %fragment_main OriginUpperLeft
|
|
||||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
|
||||||
OpName %value "value"
|
|
||||||
OpName %vertex_point_size "vertex_point_size"
|
|
||||||
OpName %isFinite_426f9f "isFinite_426f9f"
|
|
||||||
OpName %res "res"
|
|
||||||
OpName %vertex_main_inner "vertex_main_inner"
|
|
||||||
OpName %vertex_main "vertex_main"
|
|
||||||
OpName %fragment_main "fragment_main"
|
|
||||||
OpName %compute_main "compute_main"
|
|
||||||
OpDecorate %value BuiltIn Position
|
|
||||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
|
||||||
%float = OpTypeFloat 32
|
|
||||||
%v4float = OpTypeVector %float 4
|
|
||||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
|
||||||
%5 = OpConstantNull %v4float
|
|
||||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
|
||||||
%_ptr_Output_float = OpTypePointer Output %float
|
|
||||||
%8 = OpConstantNull %float
|
|
||||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
|
||||||
%void = OpTypeVoid
|
|
||||||
%9 = OpTypeFunction %void
|
|
||||||
%bool = OpTypeBool
|
|
||||||
%float_1 = OpConstant %float 1
|
|
||||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
|
||||||
%21 = OpConstantNull %bool
|
|
||||||
%22 = OpTypeFunction %v4float
|
|
||||||
%isFinite_426f9f = OpFunction %void None %9
|
|
||||||
%12 = OpLabel
|
|
||||||
%res = OpVariable %_ptr_Function_bool Function %21
|
|
||||||
%16 = OpIsInf %bool %float_1
|
|
||||||
%17 = OpIsNan %bool %float_1
|
|
||||||
%18 = OpLogicalOr %bool %16 %17
|
|
||||||
%13 = OpLogicalNot %bool %18
|
|
||||||
OpStore %res %13
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%vertex_main_inner = OpFunction %v4float None %22
|
|
||||||
%24 = OpLabel
|
|
||||||
%25 = OpFunctionCall %void %isFinite_426f9f
|
|
||||||
OpReturnValue %5
|
|
||||||
OpFunctionEnd
|
|
||||||
%vertex_main = OpFunction %void None %9
|
|
||||||
%27 = OpLabel
|
|
||||||
%28 = OpFunctionCall %v4float %vertex_main_inner
|
|
||||||
OpStore %value %28
|
|
||||||
OpStore %vertex_point_size %float_1
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%fragment_main = OpFunction %void None %9
|
|
||||||
%30 = OpLabel
|
|
||||||
%31 = OpFunctionCall %void %isFinite_426f9f
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%compute_main = OpFunction %void None %9
|
|
||||||
%33 = OpLabel
|
|
||||||
%34 = OpFunctionCall %void %isFinite_426f9f
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
|
@ -1,23 +0,0 @@
|
||||||
builtins/gen/isFinite/426f9f.wgsl:28:19 warning: use of deprecated builtin
|
|
||||||
var res: bool = isFinite(1.0);
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
fn isFinite_426f9f() {
|
|
||||||
var res : bool = isFinite(1.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isFinite_426f9f();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isFinite_426f9f();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isFinite_426f9f();
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
// Copyright 2021 The Tint Authors.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// File generated by tools/builtin-gen
|
|
||||||
// using the template:
|
|
||||||
// test/tint/builtins/builtins.wgsl.tmpl
|
|
||||||
// and the builtin defintion file:
|
|
||||||
// src/tint/builtins.def
|
|
||||||
//
|
|
||||||
// Do not modify this file directly
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
// fn isFinite(vec<3, f32>) -> vec<3, bool>
|
|
||||||
fn isFinite_8a23ad() {
|
|
||||||
var res: vec3<bool> = isFinite(vec3<f32>());
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isFinite_8a23ad();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isFinite_8a23ad();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isFinite_8a23ad();
|
|
||||||
}
|
|
|
@ -1,78 +0,0 @@
|
||||||
SKIP: FAILED
|
|
||||||
|
|
||||||
builtins/gen/isFinite/8a23ad.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec3<bool> = isFinite(vec3<f32>());
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
void isFinite_8a23ad() {
|
|
||||||
bvec3 res = isfinite(vec3(0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
vec4 vertex_main() {
|
|
||||||
isFinite_8a23ad();
|
|
||||||
return vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
vec4 inner_result = vertex_main();
|
|
||||||
gl_Position = inner_result;
|
|
||||||
gl_Position.y = -(gl_Position.y);
|
|
||||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Error parsing GLSL shader:
|
|
||||||
ERROR: 0:4: 'isfinite' : no matching overloaded function found
|
|
||||||
ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp 3-component vector of bool'
|
|
||||||
ERROR: 0:4: '' : compilation terminated
|
|
||||||
ERROR: 3 compilation errors. No code generated.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#version 310 es
|
|
||||||
precision mediump float;
|
|
||||||
|
|
||||||
void isFinite_8a23ad() {
|
|
||||||
bvec3 res = isfinite(vec3(0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isFinite_8a23ad();
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
fragment_main();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Error parsing GLSL shader:
|
|
||||||
ERROR: 0:5: 'isfinite' : no matching overloaded function found
|
|
||||||
ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp 3-component vector of bool'
|
|
||||||
ERROR: 0:5: '' : compilation terminated
|
|
||||||
ERROR: 3 compilation errors. No code generated.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
void isFinite_8a23ad() {
|
|
||||||
bvec3 res = isfinite(vec3(0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
void compute_main() {
|
|
||||||
isFinite_8a23ad();
|
|
||||||
}
|
|
||||||
|
|
||||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
||||||
void main() {
|
|
||||||
compute_main();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Error parsing GLSL shader:
|
|
||||||
ERROR: 0:4: 'isfinite' : no matching overloaded function found
|
|
||||||
ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp 3-component vector of bool'
|
|
||||||
ERROR: 0:4: '' : compilation terminated
|
|
||||||
ERROR: 3 compilation errors. No code generated.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
builtins/gen/isFinite/8a23ad.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec3<bool> = isFinite(vec3<f32>());
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
void isFinite_8a23ad() {
|
|
||||||
bool3 res = isfinite(float3(0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tint_symbol {
|
|
||||||
float4 value : SV_Position;
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 vertex_main_inner() {
|
|
||||||
isFinite_8a23ad();
|
|
||||||
return float4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
tint_symbol vertex_main() {
|
|
||||||
const float4 inner_result = vertex_main_inner();
|
|
||||||
tint_symbol wrapper_result = (tint_symbol)0;
|
|
||||||
wrapper_result.value = inner_result;
|
|
||||||
return wrapper_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isFinite_8a23ad();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
[numthreads(1, 1, 1)]
|
|
||||||
void compute_main() {
|
|
||||||
isFinite_8a23ad();
|
|
||||||
return;
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
builtins/gen/isFinite/8a23ad.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec3<bool> = isFinite(vec3<f32>());
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
#include <metal_stdlib>
|
|
||||||
|
|
||||||
using namespace metal;
|
|
||||||
void isFinite_8a23ad() {
|
|
||||||
bool3 res = isfinite(float3());
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tint_symbol {
|
|
||||||
float4 value [[position]];
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 vertex_main_inner() {
|
|
||||||
isFinite_8a23ad();
|
|
||||||
return float4();
|
|
||||||
}
|
|
||||||
|
|
||||||
vertex tint_symbol vertex_main() {
|
|
||||||
float4 const inner_result = vertex_main_inner();
|
|
||||||
tint_symbol wrapper_result = {};
|
|
||||||
wrapper_result.value = inner_result;
|
|
||||||
return wrapper_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
fragment void fragment_main() {
|
|
||||||
isFinite_8a23ad();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
kernel void compute_main() {
|
|
||||||
isFinite_8a23ad();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,76 +0,0 @@
|
||||||
builtins/gen/isFinite/8a23ad.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec3<bool> = isFinite(vec3<f32>());
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
; SPIR-V
|
|
||||||
; Version: 1.3
|
|
||||||
; Generator: Google Tint Compiler; 0
|
|
||||||
; Bound: 38
|
|
||||||
; Schema: 0
|
|
||||||
OpCapability Shader
|
|
||||||
OpMemoryModel Logical GLSL450
|
|
||||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
|
||||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
|
||||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
|
||||||
OpExecutionMode %fragment_main OriginUpperLeft
|
|
||||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
|
||||||
OpName %value "value"
|
|
||||||
OpName %vertex_point_size "vertex_point_size"
|
|
||||||
OpName %isFinite_8a23ad "isFinite_8a23ad"
|
|
||||||
OpName %res "res"
|
|
||||||
OpName %vertex_main_inner "vertex_main_inner"
|
|
||||||
OpName %vertex_main "vertex_main"
|
|
||||||
OpName %fragment_main "fragment_main"
|
|
||||||
OpName %compute_main "compute_main"
|
|
||||||
OpDecorate %value BuiltIn Position
|
|
||||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
|
||||||
%float = OpTypeFloat 32
|
|
||||||
%v4float = OpTypeVector %float 4
|
|
||||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
|
||||||
%5 = OpConstantNull %v4float
|
|
||||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
|
||||||
%_ptr_Output_float = OpTypePointer Output %float
|
|
||||||
%8 = OpConstantNull %float
|
|
||||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
|
||||||
%void = OpTypeVoid
|
|
||||||
%9 = OpTypeFunction %void
|
|
||||||
%bool = OpTypeBool
|
|
||||||
%v3bool = OpTypeVector %bool 3
|
|
||||||
%v3float = OpTypeVector %float 3
|
|
||||||
%17 = OpConstantNull %v3float
|
|
||||||
%_ptr_Function_v3bool = OpTypePointer Function %v3bool
|
|
||||||
%23 = OpConstantNull %v3bool
|
|
||||||
%24 = OpTypeFunction %v4float
|
|
||||||
%float_1 = OpConstant %float 1
|
|
||||||
%isFinite_8a23ad = OpFunction %void None %9
|
|
||||||
%12 = OpLabel
|
|
||||||
%res = OpVariable %_ptr_Function_v3bool Function %23
|
|
||||||
%18 = OpIsInf %v3bool %17
|
|
||||||
%19 = OpIsNan %v3bool %17
|
|
||||||
%20 = OpLogicalOr %v3bool %18 %19
|
|
||||||
%13 = OpLogicalNot %v3bool %20
|
|
||||||
OpStore %res %13
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%vertex_main_inner = OpFunction %v4float None %24
|
|
||||||
%26 = OpLabel
|
|
||||||
%27 = OpFunctionCall %void %isFinite_8a23ad
|
|
||||||
OpReturnValue %5
|
|
||||||
OpFunctionEnd
|
|
||||||
%vertex_main = OpFunction %void None %9
|
|
||||||
%29 = OpLabel
|
|
||||||
%30 = OpFunctionCall %v4float %vertex_main_inner
|
|
||||||
OpStore %value %30
|
|
||||||
OpStore %vertex_point_size %float_1
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%fragment_main = OpFunction %void None %9
|
|
||||||
%33 = OpLabel
|
|
||||||
%34 = OpFunctionCall %void %isFinite_8a23ad
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%compute_main = OpFunction %void None %9
|
|
||||||
%36 = OpLabel
|
|
||||||
%37 = OpFunctionCall %void %isFinite_8a23ad
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
|
@ -1,23 +0,0 @@
|
||||||
builtins/gen/isFinite/8a23ad.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec3<bool> = isFinite(vec3<f32>());
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
fn isFinite_8a23ad() {
|
|
||||||
var res : vec3<bool> = isFinite(vec3<f32>());
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isFinite_8a23ad();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isFinite_8a23ad();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isFinite_8a23ad();
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
// Copyright 2021 The Tint Authors.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// File generated by tools/builtin-gen
|
|
||||||
// using the template:
|
|
||||||
// test/tint/builtins/builtins.wgsl.tmpl
|
|
||||||
// and the builtin defintion file:
|
|
||||||
// src/tint/builtins.def
|
|
||||||
//
|
|
||||||
// Do not modify this file directly
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
// fn isFinite(vec<4, f32>) -> vec<4, bool>
|
|
||||||
fn isFinite_f31987() {
|
|
||||||
var res: vec4<bool> = isFinite(vec4<f32>());
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isFinite_f31987();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isFinite_f31987();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isFinite_f31987();
|
|
||||||
}
|
|
|
@ -1,78 +0,0 @@
|
||||||
SKIP: FAILED
|
|
||||||
|
|
||||||
builtins/gen/isFinite/f31987.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec4<bool> = isFinite(vec4<f32>());
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
void isFinite_f31987() {
|
|
||||||
bvec4 res = isfinite(vec4(0.0f, 0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
vec4 vertex_main() {
|
|
||||||
isFinite_f31987();
|
|
||||||
return vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
vec4 inner_result = vertex_main();
|
|
||||||
gl_Position = inner_result;
|
|
||||||
gl_Position.y = -(gl_Position.y);
|
|
||||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Error parsing GLSL shader:
|
|
||||||
ERROR: 0:4: 'isfinite' : no matching overloaded function found
|
|
||||||
ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp 4-component vector of bool'
|
|
||||||
ERROR: 0:4: '' : compilation terminated
|
|
||||||
ERROR: 3 compilation errors. No code generated.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#version 310 es
|
|
||||||
precision mediump float;
|
|
||||||
|
|
||||||
void isFinite_f31987() {
|
|
||||||
bvec4 res = isfinite(vec4(0.0f, 0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isFinite_f31987();
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
fragment_main();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Error parsing GLSL shader:
|
|
||||||
ERROR: 0:5: 'isfinite' : no matching overloaded function found
|
|
||||||
ERROR: 0:5: '=' : cannot convert from ' const float' to ' temp 4-component vector of bool'
|
|
||||||
ERROR: 0:5: '' : compilation terminated
|
|
||||||
ERROR: 3 compilation errors. No code generated.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
void isFinite_f31987() {
|
|
||||||
bvec4 res = isfinite(vec4(0.0f, 0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
void compute_main() {
|
|
||||||
isFinite_f31987();
|
|
||||||
}
|
|
||||||
|
|
||||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
||||||
void main() {
|
|
||||||
compute_main();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Error parsing GLSL shader:
|
|
||||||
ERROR: 0:4: 'isfinite' : no matching overloaded function found
|
|
||||||
ERROR: 0:4: '=' : cannot convert from ' const float' to ' temp 4-component vector of bool'
|
|
||||||
ERROR: 0:4: '' : compilation terminated
|
|
||||||
ERROR: 3 compilation errors. No code generated.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
builtins/gen/isFinite/f31987.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec4<bool> = isFinite(vec4<f32>());
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
void isFinite_f31987() {
|
|
||||||
bool4 res = isfinite(float4(0.0f, 0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tint_symbol {
|
|
||||||
float4 value : SV_Position;
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 vertex_main_inner() {
|
|
||||||
isFinite_f31987();
|
|
||||||
return float4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
tint_symbol vertex_main() {
|
|
||||||
const float4 inner_result = vertex_main_inner();
|
|
||||||
tint_symbol wrapper_result = (tint_symbol)0;
|
|
||||||
wrapper_result.value = inner_result;
|
|
||||||
return wrapper_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isFinite_f31987();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
[numthreads(1, 1, 1)]
|
|
||||||
void compute_main() {
|
|
||||||
isFinite_f31987();
|
|
||||||
return;
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
builtins/gen/isFinite/f31987.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec4<bool> = isFinite(vec4<f32>());
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
#include <metal_stdlib>
|
|
||||||
|
|
||||||
using namespace metal;
|
|
||||||
void isFinite_f31987() {
|
|
||||||
bool4 res = isfinite(float4());
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tint_symbol {
|
|
||||||
float4 value [[position]];
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 vertex_main_inner() {
|
|
||||||
isFinite_f31987();
|
|
||||||
return float4();
|
|
||||||
}
|
|
||||||
|
|
||||||
vertex tint_symbol vertex_main() {
|
|
||||||
float4 const inner_result = vertex_main_inner();
|
|
||||||
tint_symbol wrapper_result = {};
|
|
||||||
wrapper_result.value = inner_result;
|
|
||||||
return wrapper_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
fragment void fragment_main() {
|
|
||||||
isFinite_f31987();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
kernel void compute_main() {
|
|
||||||
isFinite_f31987();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,74 +0,0 @@
|
||||||
builtins/gen/isFinite/f31987.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec4<bool> = isFinite(vec4<f32>());
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
; SPIR-V
|
|
||||||
; Version: 1.3
|
|
||||||
; Generator: Google Tint Compiler; 0
|
|
||||||
; Bound: 36
|
|
||||||
; Schema: 0
|
|
||||||
OpCapability Shader
|
|
||||||
OpMemoryModel Logical GLSL450
|
|
||||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
|
||||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
|
||||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
|
||||||
OpExecutionMode %fragment_main OriginUpperLeft
|
|
||||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
|
||||||
OpName %value "value"
|
|
||||||
OpName %vertex_point_size "vertex_point_size"
|
|
||||||
OpName %isFinite_f31987 "isFinite_f31987"
|
|
||||||
OpName %res "res"
|
|
||||||
OpName %vertex_main_inner "vertex_main_inner"
|
|
||||||
OpName %vertex_main "vertex_main"
|
|
||||||
OpName %fragment_main "fragment_main"
|
|
||||||
OpName %compute_main "compute_main"
|
|
||||||
OpDecorate %value BuiltIn Position
|
|
||||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
|
||||||
%float = OpTypeFloat 32
|
|
||||||
%v4float = OpTypeVector %float 4
|
|
||||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
|
||||||
%5 = OpConstantNull %v4float
|
|
||||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
|
||||||
%_ptr_Output_float = OpTypePointer Output %float
|
|
||||||
%8 = OpConstantNull %float
|
|
||||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
|
||||||
%void = OpTypeVoid
|
|
||||||
%9 = OpTypeFunction %void
|
|
||||||
%bool = OpTypeBool
|
|
||||||
%v4bool = OpTypeVector %bool 4
|
|
||||||
%_ptr_Function_v4bool = OpTypePointer Function %v4bool
|
|
||||||
%21 = OpConstantNull %v4bool
|
|
||||||
%22 = OpTypeFunction %v4float
|
|
||||||
%float_1 = OpConstant %float 1
|
|
||||||
%isFinite_f31987 = OpFunction %void None %9
|
|
||||||
%12 = OpLabel
|
|
||||||
%res = OpVariable %_ptr_Function_v4bool Function %21
|
|
||||||
%16 = OpIsInf %v4bool %5
|
|
||||||
%17 = OpIsNan %v4bool %5
|
|
||||||
%18 = OpLogicalOr %v4bool %16 %17
|
|
||||||
%13 = OpLogicalNot %v4bool %18
|
|
||||||
OpStore %res %13
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%vertex_main_inner = OpFunction %v4float None %22
|
|
||||||
%24 = OpLabel
|
|
||||||
%25 = OpFunctionCall %void %isFinite_f31987
|
|
||||||
OpReturnValue %5
|
|
||||||
OpFunctionEnd
|
|
||||||
%vertex_main = OpFunction %void None %9
|
|
||||||
%27 = OpLabel
|
|
||||||
%28 = OpFunctionCall %v4float %vertex_main_inner
|
|
||||||
OpStore %value %28
|
|
||||||
OpStore %vertex_point_size %float_1
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%fragment_main = OpFunction %void None %9
|
|
||||||
%31 = OpLabel
|
|
||||||
%32 = OpFunctionCall %void %isFinite_f31987
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%compute_main = OpFunction %void None %9
|
|
||||||
%34 = OpLabel
|
|
||||||
%35 = OpFunctionCall %void %isFinite_f31987
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
|
@ -1,23 +0,0 @@
|
||||||
builtins/gen/isFinite/f31987.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec4<bool> = isFinite(vec4<f32>());
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
fn isFinite_f31987() {
|
|
||||||
var res : vec4<bool> = isFinite(vec4<f32>());
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isFinite_f31987();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isFinite_f31987();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isFinite_f31987();
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
// Copyright 2021 The Tint Authors.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// File generated by tools/builtin-gen
|
|
||||||
// using the template:
|
|
||||||
// test/tint/builtins/builtins.wgsl.tmpl
|
|
||||||
// and the builtin defintion file:
|
|
||||||
// src/tint/builtins.def
|
|
||||||
//
|
|
||||||
// Do not modify this file directly
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
// fn isInf(vec<3, f32>) -> vec<3, bool>
|
|
||||||
fn isInf_666f2a() {
|
|
||||||
var res: vec3<bool> = isInf(vec3<f32>());
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isInf_666f2a();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isInf_666f2a();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isInf_666f2a();
|
|
||||||
}
|
|
|
@ -1,52 +0,0 @@
|
||||||
builtins/gen/isInf/666f2a.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec3<bool> = isInf(vec3<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
void isInf_666f2a() {
|
|
||||||
bvec3 res = isinf(vec3(0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
vec4 vertex_main() {
|
|
||||||
isInf_666f2a();
|
|
||||||
return vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
vec4 inner_result = vertex_main();
|
|
||||||
gl_Position = inner_result;
|
|
||||||
gl_Position.y = -(gl_Position.y);
|
|
||||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#version 310 es
|
|
||||||
precision mediump float;
|
|
||||||
|
|
||||||
void isInf_666f2a() {
|
|
||||||
bvec3 res = isinf(vec3(0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isInf_666f2a();
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
fragment_main();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
void isInf_666f2a() {
|
|
||||||
bvec3 res = isinf(vec3(0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
void compute_main() {
|
|
||||||
isInf_666f2a();
|
|
||||||
}
|
|
||||||
|
|
||||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
||||||
void main() {
|
|
||||||
compute_main();
|
|
||||||
return;
|
|
||||||
}
|
|
|
@ -1,34 +0,0 @@
|
||||||
builtins/gen/isInf/666f2a.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec3<bool> = isInf(vec3<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
void isInf_666f2a() {
|
|
||||||
bool3 res = isinf(float3(0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tint_symbol {
|
|
||||||
float4 value : SV_Position;
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 vertex_main_inner() {
|
|
||||||
isInf_666f2a();
|
|
||||||
return float4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
tint_symbol vertex_main() {
|
|
||||||
const float4 inner_result = vertex_main_inner();
|
|
||||||
tint_symbol wrapper_result = (tint_symbol)0;
|
|
||||||
wrapper_result.value = inner_result;
|
|
||||||
return wrapper_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isInf_666f2a();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
[numthreads(1, 1, 1)]
|
|
||||||
void compute_main() {
|
|
||||||
isInf_666f2a();
|
|
||||||
return;
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
builtins/gen/isInf/666f2a.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec3<bool> = isInf(vec3<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
#include <metal_stdlib>
|
|
||||||
|
|
||||||
using namespace metal;
|
|
||||||
void isInf_666f2a() {
|
|
||||||
bool3 res = isinf(float3());
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tint_symbol {
|
|
||||||
float4 value [[position]];
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 vertex_main_inner() {
|
|
||||||
isInf_666f2a();
|
|
||||||
return float4();
|
|
||||||
}
|
|
||||||
|
|
||||||
vertex tint_symbol vertex_main() {
|
|
||||||
float4 const inner_result = vertex_main_inner();
|
|
||||||
tint_symbol wrapper_result = {};
|
|
||||||
wrapper_result.value = inner_result;
|
|
||||||
return wrapper_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
fragment void fragment_main() {
|
|
||||||
isInf_666f2a();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
kernel void compute_main() {
|
|
||||||
isInf_666f2a();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,73 +0,0 @@
|
||||||
builtins/gen/isInf/666f2a.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec3<bool> = isInf(vec3<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
; SPIR-V
|
|
||||||
; Version: 1.3
|
|
||||||
; Generator: Google Tint Compiler; 0
|
|
||||||
; Bound: 35
|
|
||||||
; Schema: 0
|
|
||||||
OpCapability Shader
|
|
||||||
OpMemoryModel Logical GLSL450
|
|
||||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
|
||||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
|
||||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
|
||||||
OpExecutionMode %fragment_main OriginUpperLeft
|
|
||||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
|
||||||
OpName %value "value"
|
|
||||||
OpName %vertex_point_size "vertex_point_size"
|
|
||||||
OpName %isInf_666f2a "isInf_666f2a"
|
|
||||||
OpName %res "res"
|
|
||||||
OpName %vertex_main_inner "vertex_main_inner"
|
|
||||||
OpName %vertex_main "vertex_main"
|
|
||||||
OpName %fragment_main "fragment_main"
|
|
||||||
OpName %compute_main "compute_main"
|
|
||||||
OpDecorate %value BuiltIn Position
|
|
||||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
|
||||||
%float = OpTypeFloat 32
|
|
||||||
%v4float = OpTypeVector %float 4
|
|
||||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
|
||||||
%5 = OpConstantNull %v4float
|
|
||||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
|
||||||
%_ptr_Output_float = OpTypePointer Output %float
|
|
||||||
%8 = OpConstantNull %float
|
|
||||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
|
||||||
%void = OpTypeVoid
|
|
||||||
%9 = OpTypeFunction %void
|
|
||||||
%bool = OpTypeBool
|
|
||||||
%v3bool = OpTypeVector %bool 3
|
|
||||||
%v3float = OpTypeVector %float 3
|
|
||||||
%17 = OpConstantNull %v3float
|
|
||||||
%_ptr_Function_v3bool = OpTypePointer Function %v3bool
|
|
||||||
%20 = OpConstantNull %v3bool
|
|
||||||
%21 = OpTypeFunction %v4float
|
|
||||||
%float_1 = OpConstant %float 1
|
|
||||||
%isInf_666f2a = OpFunction %void None %9
|
|
||||||
%12 = OpLabel
|
|
||||||
%res = OpVariable %_ptr_Function_v3bool Function %20
|
|
||||||
%13 = OpIsInf %v3bool %17
|
|
||||||
OpStore %res %13
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%vertex_main_inner = OpFunction %v4float None %21
|
|
||||||
%23 = OpLabel
|
|
||||||
%24 = OpFunctionCall %void %isInf_666f2a
|
|
||||||
OpReturnValue %5
|
|
||||||
OpFunctionEnd
|
|
||||||
%vertex_main = OpFunction %void None %9
|
|
||||||
%26 = OpLabel
|
|
||||||
%27 = OpFunctionCall %v4float %vertex_main_inner
|
|
||||||
OpStore %value %27
|
|
||||||
OpStore %vertex_point_size %float_1
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%fragment_main = OpFunction %void None %9
|
|
||||||
%30 = OpLabel
|
|
||||||
%31 = OpFunctionCall %void %isInf_666f2a
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%compute_main = OpFunction %void None %9
|
|
||||||
%33 = OpLabel
|
|
||||||
%34 = OpFunctionCall %void %isInf_666f2a
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
|
@ -1,23 +0,0 @@
|
||||||
builtins/gen/isInf/666f2a.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec3<bool> = isInf(vec3<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
fn isInf_666f2a() {
|
|
||||||
var res : vec3<bool> = isInf(vec3<f32>());
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isInf_666f2a();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isInf_666f2a();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isInf_666f2a();
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
// Copyright 2021 The Tint Authors.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// File generated by tools/builtin-gen
|
|
||||||
// using the template:
|
|
||||||
// test/tint/builtins/builtins.wgsl.tmpl
|
|
||||||
// and the builtin defintion file:
|
|
||||||
// src/tint/builtins.def
|
|
||||||
//
|
|
||||||
// Do not modify this file directly
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
// fn isInf(f32) -> bool
|
|
||||||
fn isInf_7bd98f() {
|
|
||||||
var res: bool = isInf(1.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isInf_7bd98f();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isInf_7bd98f();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isInf_7bd98f();
|
|
||||||
}
|
|
|
@ -1,52 +0,0 @@
|
||||||
builtins/gen/isInf/7bd98f.wgsl:28:19 warning: use of deprecated builtin
|
|
||||||
var res: bool = isInf(1.0);
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
void isInf_7bd98f() {
|
|
||||||
bool res = isinf(1.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
vec4 vertex_main() {
|
|
||||||
isInf_7bd98f();
|
|
||||||
return vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
vec4 inner_result = vertex_main();
|
|
||||||
gl_Position = inner_result;
|
|
||||||
gl_Position.y = -(gl_Position.y);
|
|
||||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#version 310 es
|
|
||||||
precision mediump float;
|
|
||||||
|
|
||||||
void isInf_7bd98f() {
|
|
||||||
bool res = isinf(1.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isInf_7bd98f();
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
fragment_main();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
void isInf_7bd98f() {
|
|
||||||
bool res = isinf(1.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
void compute_main() {
|
|
||||||
isInf_7bd98f();
|
|
||||||
}
|
|
||||||
|
|
||||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
||||||
void main() {
|
|
||||||
compute_main();
|
|
||||||
return;
|
|
||||||
}
|
|
|
@ -1,34 +0,0 @@
|
||||||
builtins/gen/isInf/7bd98f.wgsl:28:19 warning: use of deprecated builtin
|
|
||||||
var res: bool = isInf(1.0);
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
void isInf_7bd98f() {
|
|
||||||
bool res = isinf(1.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tint_symbol {
|
|
||||||
float4 value : SV_Position;
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 vertex_main_inner() {
|
|
||||||
isInf_7bd98f();
|
|
||||||
return float4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
tint_symbol vertex_main() {
|
|
||||||
const float4 inner_result = vertex_main_inner();
|
|
||||||
tint_symbol wrapper_result = (tint_symbol)0;
|
|
||||||
wrapper_result.value = inner_result;
|
|
||||||
return wrapper_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isInf_7bd98f();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
[numthreads(1, 1, 1)]
|
|
||||||
void compute_main() {
|
|
||||||
isInf_7bd98f();
|
|
||||||
return;
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
builtins/gen/isInf/7bd98f.wgsl:28:19 warning: use of deprecated builtin
|
|
||||||
var res: bool = isInf(1.0);
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
#include <metal_stdlib>
|
|
||||||
|
|
||||||
using namespace metal;
|
|
||||||
void isInf_7bd98f() {
|
|
||||||
bool res = isinf(1.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tint_symbol {
|
|
||||||
float4 value [[position]];
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 vertex_main_inner() {
|
|
||||||
isInf_7bd98f();
|
|
||||||
return float4();
|
|
||||||
}
|
|
||||||
|
|
||||||
vertex tint_symbol vertex_main() {
|
|
||||||
float4 const inner_result = vertex_main_inner();
|
|
||||||
tint_symbol wrapper_result = {};
|
|
||||||
wrapper_result.value = inner_result;
|
|
||||||
return wrapper_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
fragment void fragment_main() {
|
|
||||||
isInf_7bd98f();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
kernel void compute_main() {
|
|
||||||
isInf_7bd98f();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,70 +0,0 @@
|
||||||
builtins/gen/isInf/7bd98f.wgsl:28:19 warning: use of deprecated builtin
|
|
||||||
var res: bool = isInf(1.0);
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
; SPIR-V
|
|
||||||
; Version: 1.3
|
|
||||||
; Generator: Google Tint Compiler; 0
|
|
||||||
; Bound: 32
|
|
||||||
; Schema: 0
|
|
||||||
OpCapability Shader
|
|
||||||
OpMemoryModel Logical GLSL450
|
|
||||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
|
||||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
|
||||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
|
||||||
OpExecutionMode %fragment_main OriginUpperLeft
|
|
||||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
|
||||||
OpName %value "value"
|
|
||||||
OpName %vertex_point_size "vertex_point_size"
|
|
||||||
OpName %isInf_7bd98f "isInf_7bd98f"
|
|
||||||
OpName %res "res"
|
|
||||||
OpName %vertex_main_inner "vertex_main_inner"
|
|
||||||
OpName %vertex_main "vertex_main"
|
|
||||||
OpName %fragment_main "fragment_main"
|
|
||||||
OpName %compute_main "compute_main"
|
|
||||||
OpDecorate %value BuiltIn Position
|
|
||||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
|
||||||
%float = OpTypeFloat 32
|
|
||||||
%v4float = OpTypeVector %float 4
|
|
||||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
|
||||||
%5 = OpConstantNull %v4float
|
|
||||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
|
||||||
%_ptr_Output_float = OpTypePointer Output %float
|
|
||||||
%8 = OpConstantNull %float
|
|
||||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
|
||||||
%void = OpTypeVoid
|
|
||||||
%9 = OpTypeFunction %void
|
|
||||||
%bool = OpTypeBool
|
|
||||||
%float_1 = OpConstant %float 1
|
|
||||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
|
||||||
%18 = OpConstantNull %bool
|
|
||||||
%19 = OpTypeFunction %v4float
|
|
||||||
%isInf_7bd98f = OpFunction %void None %9
|
|
||||||
%12 = OpLabel
|
|
||||||
%res = OpVariable %_ptr_Function_bool Function %18
|
|
||||||
%13 = OpIsInf %bool %float_1
|
|
||||||
OpStore %res %13
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%vertex_main_inner = OpFunction %v4float None %19
|
|
||||||
%21 = OpLabel
|
|
||||||
%22 = OpFunctionCall %void %isInf_7bd98f
|
|
||||||
OpReturnValue %5
|
|
||||||
OpFunctionEnd
|
|
||||||
%vertex_main = OpFunction %void None %9
|
|
||||||
%24 = OpLabel
|
|
||||||
%25 = OpFunctionCall %v4float %vertex_main_inner
|
|
||||||
OpStore %value %25
|
|
||||||
OpStore %vertex_point_size %float_1
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%fragment_main = OpFunction %void None %9
|
|
||||||
%27 = OpLabel
|
|
||||||
%28 = OpFunctionCall %void %isInf_7bd98f
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%compute_main = OpFunction %void None %9
|
|
||||||
%30 = OpLabel
|
|
||||||
%31 = OpFunctionCall %void %isInf_7bd98f
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
|
@ -1,23 +0,0 @@
|
||||||
builtins/gen/isInf/7bd98f.wgsl:28:19 warning: use of deprecated builtin
|
|
||||||
var res: bool = isInf(1.0);
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
fn isInf_7bd98f() {
|
|
||||||
var res : bool = isInf(1.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isInf_7bd98f();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isInf_7bd98f();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isInf_7bd98f();
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
// Copyright 2021 The Tint Authors.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// File generated by tools/builtin-gen
|
|
||||||
// using the template:
|
|
||||||
// test/tint/builtins/builtins.wgsl.tmpl
|
|
||||||
// and the builtin defintion file:
|
|
||||||
// src/tint/builtins.def
|
|
||||||
//
|
|
||||||
// Do not modify this file directly
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
// fn isInf(vec<4, f32>) -> vec<4, bool>
|
|
||||||
fn isInf_7e81b5() {
|
|
||||||
var res: vec4<bool> = isInf(vec4<f32>());
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isInf_7e81b5();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isInf_7e81b5();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isInf_7e81b5();
|
|
||||||
}
|
|
|
@ -1,52 +0,0 @@
|
||||||
builtins/gen/isInf/7e81b5.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec4<bool> = isInf(vec4<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
void isInf_7e81b5() {
|
|
||||||
bvec4 res = isinf(vec4(0.0f, 0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
vec4 vertex_main() {
|
|
||||||
isInf_7e81b5();
|
|
||||||
return vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
vec4 inner_result = vertex_main();
|
|
||||||
gl_Position = inner_result;
|
|
||||||
gl_Position.y = -(gl_Position.y);
|
|
||||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#version 310 es
|
|
||||||
precision mediump float;
|
|
||||||
|
|
||||||
void isInf_7e81b5() {
|
|
||||||
bvec4 res = isinf(vec4(0.0f, 0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isInf_7e81b5();
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
fragment_main();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
void isInf_7e81b5() {
|
|
||||||
bvec4 res = isinf(vec4(0.0f, 0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
void compute_main() {
|
|
||||||
isInf_7e81b5();
|
|
||||||
}
|
|
||||||
|
|
||||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
||||||
void main() {
|
|
||||||
compute_main();
|
|
||||||
return;
|
|
||||||
}
|
|
|
@ -1,34 +0,0 @@
|
||||||
builtins/gen/isInf/7e81b5.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec4<bool> = isInf(vec4<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
void isInf_7e81b5() {
|
|
||||||
bool4 res = isinf(float4(0.0f, 0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tint_symbol {
|
|
||||||
float4 value : SV_Position;
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 vertex_main_inner() {
|
|
||||||
isInf_7e81b5();
|
|
||||||
return float4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
tint_symbol vertex_main() {
|
|
||||||
const float4 inner_result = vertex_main_inner();
|
|
||||||
tint_symbol wrapper_result = (tint_symbol)0;
|
|
||||||
wrapper_result.value = inner_result;
|
|
||||||
return wrapper_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isInf_7e81b5();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
[numthreads(1, 1, 1)]
|
|
||||||
void compute_main() {
|
|
||||||
isInf_7e81b5();
|
|
||||||
return;
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
builtins/gen/isInf/7e81b5.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec4<bool> = isInf(vec4<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
#include <metal_stdlib>
|
|
||||||
|
|
||||||
using namespace metal;
|
|
||||||
void isInf_7e81b5() {
|
|
||||||
bool4 res = isinf(float4());
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tint_symbol {
|
|
||||||
float4 value [[position]];
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 vertex_main_inner() {
|
|
||||||
isInf_7e81b5();
|
|
||||||
return float4();
|
|
||||||
}
|
|
||||||
|
|
||||||
vertex tint_symbol vertex_main() {
|
|
||||||
float4 const inner_result = vertex_main_inner();
|
|
||||||
tint_symbol wrapper_result = {};
|
|
||||||
wrapper_result.value = inner_result;
|
|
||||||
return wrapper_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
fragment void fragment_main() {
|
|
||||||
isInf_7e81b5();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
kernel void compute_main() {
|
|
||||||
isInf_7e81b5();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,71 +0,0 @@
|
||||||
builtins/gen/isInf/7e81b5.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec4<bool> = isInf(vec4<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
; SPIR-V
|
|
||||||
; Version: 1.3
|
|
||||||
; Generator: Google Tint Compiler; 0
|
|
||||||
; Bound: 33
|
|
||||||
; Schema: 0
|
|
||||||
OpCapability Shader
|
|
||||||
OpMemoryModel Logical GLSL450
|
|
||||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
|
||||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
|
||||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
|
||||||
OpExecutionMode %fragment_main OriginUpperLeft
|
|
||||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
|
||||||
OpName %value "value"
|
|
||||||
OpName %vertex_point_size "vertex_point_size"
|
|
||||||
OpName %isInf_7e81b5 "isInf_7e81b5"
|
|
||||||
OpName %res "res"
|
|
||||||
OpName %vertex_main_inner "vertex_main_inner"
|
|
||||||
OpName %vertex_main "vertex_main"
|
|
||||||
OpName %fragment_main "fragment_main"
|
|
||||||
OpName %compute_main "compute_main"
|
|
||||||
OpDecorate %value BuiltIn Position
|
|
||||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
|
||||||
%float = OpTypeFloat 32
|
|
||||||
%v4float = OpTypeVector %float 4
|
|
||||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
|
||||||
%5 = OpConstantNull %v4float
|
|
||||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
|
||||||
%_ptr_Output_float = OpTypePointer Output %float
|
|
||||||
%8 = OpConstantNull %float
|
|
||||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
|
||||||
%void = OpTypeVoid
|
|
||||||
%9 = OpTypeFunction %void
|
|
||||||
%bool = OpTypeBool
|
|
||||||
%v4bool = OpTypeVector %bool 4
|
|
||||||
%_ptr_Function_v4bool = OpTypePointer Function %v4bool
|
|
||||||
%18 = OpConstantNull %v4bool
|
|
||||||
%19 = OpTypeFunction %v4float
|
|
||||||
%float_1 = OpConstant %float 1
|
|
||||||
%isInf_7e81b5 = OpFunction %void None %9
|
|
||||||
%12 = OpLabel
|
|
||||||
%res = OpVariable %_ptr_Function_v4bool Function %18
|
|
||||||
%13 = OpIsInf %v4bool %5
|
|
||||||
OpStore %res %13
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%vertex_main_inner = OpFunction %v4float None %19
|
|
||||||
%21 = OpLabel
|
|
||||||
%22 = OpFunctionCall %void %isInf_7e81b5
|
|
||||||
OpReturnValue %5
|
|
||||||
OpFunctionEnd
|
|
||||||
%vertex_main = OpFunction %void None %9
|
|
||||||
%24 = OpLabel
|
|
||||||
%25 = OpFunctionCall %v4float %vertex_main_inner
|
|
||||||
OpStore %value %25
|
|
||||||
OpStore %vertex_point_size %float_1
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%fragment_main = OpFunction %void None %9
|
|
||||||
%28 = OpLabel
|
|
||||||
%29 = OpFunctionCall %void %isInf_7e81b5
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%compute_main = OpFunction %void None %9
|
|
||||||
%31 = OpLabel
|
|
||||||
%32 = OpFunctionCall %void %isInf_7e81b5
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
|
@ -1,23 +0,0 @@
|
||||||
builtins/gen/isInf/7e81b5.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec4<bool> = isInf(vec4<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
fn isInf_7e81b5() {
|
|
||||||
var res : vec4<bool> = isInf(vec4<f32>());
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isInf_7e81b5();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isInf_7e81b5();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isInf_7e81b5();
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
// Copyright 2021 The Tint Authors.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// File generated by tools/builtin-gen
|
|
||||||
// using the template:
|
|
||||||
// test/tint/builtins/builtins.wgsl.tmpl
|
|
||||||
// and the builtin defintion file:
|
|
||||||
// src/tint/builtins.def
|
|
||||||
//
|
|
||||||
// Do not modify this file directly
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
// fn isInf(vec<2, f32>) -> vec<2, bool>
|
|
||||||
fn isInf_a46d6f() {
|
|
||||||
var res: vec2<bool> = isInf(vec2<f32>());
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isInf_a46d6f();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isInf_a46d6f();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isInf_a46d6f();
|
|
||||||
}
|
|
|
@ -1,52 +0,0 @@
|
||||||
builtins/gen/isInf/a46d6f.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec2<bool> = isInf(vec2<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
void isInf_a46d6f() {
|
|
||||||
bvec2 res = isinf(vec2(0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
vec4 vertex_main() {
|
|
||||||
isInf_a46d6f();
|
|
||||||
return vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
vec4 inner_result = vertex_main();
|
|
||||||
gl_Position = inner_result;
|
|
||||||
gl_Position.y = -(gl_Position.y);
|
|
||||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#version 310 es
|
|
||||||
precision mediump float;
|
|
||||||
|
|
||||||
void isInf_a46d6f() {
|
|
||||||
bvec2 res = isinf(vec2(0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isInf_a46d6f();
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
fragment_main();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
void isInf_a46d6f() {
|
|
||||||
bvec2 res = isinf(vec2(0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
void compute_main() {
|
|
||||||
isInf_a46d6f();
|
|
||||||
}
|
|
||||||
|
|
||||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
||||||
void main() {
|
|
||||||
compute_main();
|
|
||||||
return;
|
|
||||||
}
|
|
|
@ -1,34 +0,0 @@
|
||||||
builtins/gen/isInf/a46d6f.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec2<bool> = isInf(vec2<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
void isInf_a46d6f() {
|
|
||||||
bool2 res = isinf(float2(0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tint_symbol {
|
|
||||||
float4 value : SV_Position;
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 vertex_main_inner() {
|
|
||||||
isInf_a46d6f();
|
|
||||||
return float4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
tint_symbol vertex_main() {
|
|
||||||
const float4 inner_result = vertex_main_inner();
|
|
||||||
tint_symbol wrapper_result = (tint_symbol)0;
|
|
||||||
wrapper_result.value = inner_result;
|
|
||||||
return wrapper_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isInf_a46d6f();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
[numthreads(1, 1, 1)]
|
|
||||||
void compute_main() {
|
|
||||||
isInf_a46d6f();
|
|
||||||
return;
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
builtins/gen/isInf/a46d6f.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec2<bool> = isInf(vec2<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
#include <metal_stdlib>
|
|
||||||
|
|
||||||
using namespace metal;
|
|
||||||
void isInf_a46d6f() {
|
|
||||||
bool2 res = isinf(float2());
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tint_symbol {
|
|
||||||
float4 value [[position]];
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 vertex_main_inner() {
|
|
||||||
isInf_a46d6f();
|
|
||||||
return float4();
|
|
||||||
}
|
|
||||||
|
|
||||||
vertex tint_symbol vertex_main() {
|
|
||||||
float4 const inner_result = vertex_main_inner();
|
|
||||||
tint_symbol wrapper_result = {};
|
|
||||||
wrapper_result.value = inner_result;
|
|
||||||
return wrapper_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
fragment void fragment_main() {
|
|
||||||
isInf_a46d6f();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
kernel void compute_main() {
|
|
||||||
isInf_a46d6f();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,73 +0,0 @@
|
||||||
builtins/gen/isInf/a46d6f.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec2<bool> = isInf(vec2<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
; SPIR-V
|
|
||||||
; Version: 1.3
|
|
||||||
; Generator: Google Tint Compiler; 0
|
|
||||||
; Bound: 35
|
|
||||||
; Schema: 0
|
|
||||||
OpCapability Shader
|
|
||||||
OpMemoryModel Logical GLSL450
|
|
||||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
|
||||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
|
||||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
|
||||||
OpExecutionMode %fragment_main OriginUpperLeft
|
|
||||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
|
||||||
OpName %value "value"
|
|
||||||
OpName %vertex_point_size "vertex_point_size"
|
|
||||||
OpName %isInf_a46d6f "isInf_a46d6f"
|
|
||||||
OpName %res "res"
|
|
||||||
OpName %vertex_main_inner "vertex_main_inner"
|
|
||||||
OpName %vertex_main "vertex_main"
|
|
||||||
OpName %fragment_main "fragment_main"
|
|
||||||
OpName %compute_main "compute_main"
|
|
||||||
OpDecorate %value BuiltIn Position
|
|
||||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
|
||||||
%float = OpTypeFloat 32
|
|
||||||
%v4float = OpTypeVector %float 4
|
|
||||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
|
||||||
%5 = OpConstantNull %v4float
|
|
||||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
|
||||||
%_ptr_Output_float = OpTypePointer Output %float
|
|
||||||
%8 = OpConstantNull %float
|
|
||||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
|
||||||
%void = OpTypeVoid
|
|
||||||
%9 = OpTypeFunction %void
|
|
||||||
%bool = OpTypeBool
|
|
||||||
%v2bool = OpTypeVector %bool 2
|
|
||||||
%v2float = OpTypeVector %float 2
|
|
||||||
%17 = OpConstantNull %v2float
|
|
||||||
%_ptr_Function_v2bool = OpTypePointer Function %v2bool
|
|
||||||
%20 = OpConstantNull %v2bool
|
|
||||||
%21 = OpTypeFunction %v4float
|
|
||||||
%float_1 = OpConstant %float 1
|
|
||||||
%isInf_a46d6f = OpFunction %void None %9
|
|
||||||
%12 = OpLabel
|
|
||||||
%res = OpVariable %_ptr_Function_v2bool Function %20
|
|
||||||
%13 = OpIsInf %v2bool %17
|
|
||||||
OpStore %res %13
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%vertex_main_inner = OpFunction %v4float None %21
|
|
||||||
%23 = OpLabel
|
|
||||||
%24 = OpFunctionCall %void %isInf_a46d6f
|
|
||||||
OpReturnValue %5
|
|
||||||
OpFunctionEnd
|
|
||||||
%vertex_main = OpFunction %void None %9
|
|
||||||
%26 = OpLabel
|
|
||||||
%27 = OpFunctionCall %v4float %vertex_main_inner
|
|
||||||
OpStore %value %27
|
|
||||||
OpStore %vertex_point_size %float_1
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%fragment_main = OpFunction %void None %9
|
|
||||||
%30 = OpLabel
|
|
||||||
%31 = OpFunctionCall %void %isInf_a46d6f
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%compute_main = OpFunction %void None %9
|
|
||||||
%33 = OpLabel
|
|
||||||
%34 = OpFunctionCall %void %isInf_a46d6f
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
|
@ -1,23 +0,0 @@
|
||||||
builtins/gen/isInf/a46d6f.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec2<bool> = isInf(vec2<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
fn isInf_a46d6f() {
|
|
||||||
var res : vec2<bool> = isInf(vec2<f32>());
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isInf_a46d6f();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isInf_a46d6f();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isInf_a46d6f();
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
// Copyright 2021 The Tint Authors.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// File generated by tools/builtin-gen
|
|
||||||
// using the template:
|
|
||||||
// test/tint/builtins/builtins.wgsl.tmpl
|
|
||||||
// and the builtin defintion file:
|
|
||||||
// src/tint/builtins.def
|
|
||||||
//
|
|
||||||
// Do not modify this file directly
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
// fn isNan(vec<3, f32>) -> vec<3, bool>
|
|
||||||
fn isNan_1280ab() {
|
|
||||||
var res: vec3<bool> = isNan(vec3<f32>());
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isNan_1280ab();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isNan_1280ab();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isNan_1280ab();
|
|
||||||
}
|
|
|
@ -1,52 +0,0 @@
|
||||||
builtins/gen/isNan/1280ab.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec3<bool> = isNan(vec3<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
void isNan_1280ab() {
|
|
||||||
bvec3 res = isnan(vec3(0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
vec4 vertex_main() {
|
|
||||||
isNan_1280ab();
|
|
||||||
return vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
vec4 inner_result = vertex_main();
|
|
||||||
gl_Position = inner_result;
|
|
||||||
gl_Position.y = -(gl_Position.y);
|
|
||||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#version 310 es
|
|
||||||
precision mediump float;
|
|
||||||
|
|
||||||
void isNan_1280ab() {
|
|
||||||
bvec3 res = isnan(vec3(0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isNan_1280ab();
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
fragment_main();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
void isNan_1280ab() {
|
|
||||||
bvec3 res = isnan(vec3(0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
void compute_main() {
|
|
||||||
isNan_1280ab();
|
|
||||||
}
|
|
||||||
|
|
||||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
||||||
void main() {
|
|
||||||
compute_main();
|
|
||||||
return;
|
|
||||||
}
|
|
|
@ -1,34 +0,0 @@
|
||||||
builtins/gen/isNan/1280ab.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec3<bool> = isNan(vec3<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
void isNan_1280ab() {
|
|
||||||
bool3 res = isnan(float3(0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tint_symbol {
|
|
||||||
float4 value : SV_Position;
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 vertex_main_inner() {
|
|
||||||
isNan_1280ab();
|
|
||||||
return float4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
tint_symbol vertex_main() {
|
|
||||||
const float4 inner_result = vertex_main_inner();
|
|
||||||
tint_symbol wrapper_result = (tint_symbol)0;
|
|
||||||
wrapper_result.value = inner_result;
|
|
||||||
return wrapper_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isNan_1280ab();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
[numthreads(1, 1, 1)]
|
|
||||||
void compute_main() {
|
|
||||||
isNan_1280ab();
|
|
||||||
return;
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
builtins/gen/isNan/1280ab.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec3<bool> = isNan(vec3<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
#include <metal_stdlib>
|
|
||||||
|
|
||||||
using namespace metal;
|
|
||||||
void isNan_1280ab() {
|
|
||||||
bool3 res = isnan(float3());
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tint_symbol {
|
|
||||||
float4 value [[position]];
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 vertex_main_inner() {
|
|
||||||
isNan_1280ab();
|
|
||||||
return float4();
|
|
||||||
}
|
|
||||||
|
|
||||||
vertex tint_symbol vertex_main() {
|
|
||||||
float4 const inner_result = vertex_main_inner();
|
|
||||||
tint_symbol wrapper_result = {};
|
|
||||||
wrapper_result.value = inner_result;
|
|
||||||
return wrapper_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
fragment void fragment_main() {
|
|
||||||
isNan_1280ab();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
kernel void compute_main() {
|
|
||||||
isNan_1280ab();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,73 +0,0 @@
|
||||||
builtins/gen/isNan/1280ab.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec3<bool> = isNan(vec3<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
; SPIR-V
|
|
||||||
; Version: 1.3
|
|
||||||
; Generator: Google Tint Compiler; 0
|
|
||||||
; Bound: 35
|
|
||||||
; Schema: 0
|
|
||||||
OpCapability Shader
|
|
||||||
OpMemoryModel Logical GLSL450
|
|
||||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
|
||||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
|
||||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
|
||||||
OpExecutionMode %fragment_main OriginUpperLeft
|
|
||||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
|
||||||
OpName %value "value"
|
|
||||||
OpName %vertex_point_size "vertex_point_size"
|
|
||||||
OpName %isNan_1280ab "isNan_1280ab"
|
|
||||||
OpName %res "res"
|
|
||||||
OpName %vertex_main_inner "vertex_main_inner"
|
|
||||||
OpName %vertex_main "vertex_main"
|
|
||||||
OpName %fragment_main "fragment_main"
|
|
||||||
OpName %compute_main "compute_main"
|
|
||||||
OpDecorate %value BuiltIn Position
|
|
||||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
|
||||||
%float = OpTypeFloat 32
|
|
||||||
%v4float = OpTypeVector %float 4
|
|
||||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
|
||||||
%5 = OpConstantNull %v4float
|
|
||||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
|
||||||
%_ptr_Output_float = OpTypePointer Output %float
|
|
||||||
%8 = OpConstantNull %float
|
|
||||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
|
||||||
%void = OpTypeVoid
|
|
||||||
%9 = OpTypeFunction %void
|
|
||||||
%bool = OpTypeBool
|
|
||||||
%v3bool = OpTypeVector %bool 3
|
|
||||||
%v3float = OpTypeVector %float 3
|
|
||||||
%17 = OpConstantNull %v3float
|
|
||||||
%_ptr_Function_v3bool = OpTypePointer Function %v3bool
|
|
||||||
%20 = OpConstantNull %v3bool
|
|
||||||
%21 = OpTypeFunction %v4float
|
|
||||||
%float_1 = OpConstant %float 1
|
|
||||||
%isNan_1280ab = OpFunction %void None %9
|
|
||||||
%12 = OpLabel
|
|
||||||
%res = OpVariable %_ptr_Function_v3bool Function %20
|
|
||||||
%13 = OpIsNan %v3bool %17
|
|
||||||
OpStore %res %13
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%vertex_main_inner = OpFunction %v4float None %21
|
|
||||||
%23 = OpLabel
|
|
||||||
%24 = OpFunctionCall %void %isNan_1280ab
|
|
||||||
OpReturnValue %5
|
|
||||||
OpFunctionEnd
|
|
||||||
%vertex_main = OpFunction %void None %9
|
|
||||||
%26 = OpLabel
|
|
||||||
%27 = OpFunctionCall %v4float %vertex_main_inner
|
|
||||||
OpStore %value %27
|
|
||||||
OpStore %vertex_point_size %float_1
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%fragment_main = OpFunction %void None %9
|
|
||||||
%30 = OpLabel
|
|
||||||
%31 = OpFunctionCall %void %isNan_1280ab
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%compute_main = OpFunction %void None %9
|
|
||||||
%33 = OpLabel
|
|
||||||
%34 = OpFunctionCall %void %isNan_1280ab
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
|
@ -1,23 +0,0 @@
|
||||||
builtins/gen/isNan/1280ab.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec3<bool> = isNan(vec3<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
fn isNan_1280ab() {
|
|
||||||
var res : vec3<bool> = isNan(vec3<f32>());
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isNan_1280ab();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isNan_1280ab();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isNan_1280ab();
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
// Copyright 2021 The Tint Authors.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// File generated by tools/builtin-gen
|
|
||||||
// using the template:
|
|
||||||
// test/tint/builtins/builtins.wgsl.tmpl
|
|
||||||
// and the builtin defintion file:
|
|
||||||
// src/tint/builtins.def
|
|
||||||
//
|
|
||||||
// Do not modify this file directly
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
// fn isNan(vec<4, f32>) -> vec<4, bool>
|
|
||||||
fn isNan_4d280d() {
|
|
||||||
var res: vec4<bool> = isNan(vec4<f32>());
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isNan_4d280d();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isNan_4d280d();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isNan_4d280d();
|
|
||||||
}
|
|
|
@ -1,52 +0,0 @@
|
||||||
builtins/gen/isNan/4d280d.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec4<bool> = isNan(vec4<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
void isNan_4d280d() {
|
|
||||||
bvec4 res = isnan(vec4(0.0f, 0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
vec4 vertex_main() {
|
|
||||||
isNan_4d280d();
|
|
||||||
return vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
vec4 inner_result = vertex_main();
|
|
||||||
gl_Position = inner_result;
|
|
||||||
gl_Position.y = -(gl_Position.y);
|
|
||||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#version 310 es
|
|
||||||
precision mediump float;
|
|
||||||
|
|
||||||
void isNan_4d280d() {
|
|
||||||
bvec4 res = isnan(vec4(0.0f, 0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isNan_4d280d();
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
fragment_main();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
void isNan_4d280d() {
|
|
||||||
bvec4 res = isnan(vec4(0.0f, 0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
void compute_main() {
|
|
||||||
isNan_4d280d();
|
|
||||||
}
|
|
||||||
|
|
||||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
||||||
void main() {
|
|
||||||
compute_main();
|
|
||||||
return;
|
|
||||||
}
|
|
|
@ -1,34 +0,0 @@
|
||||||
builtins/gen/isNan/4d280d.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec4<bool> = isNan(vec4<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
void isNan_4d280d() {
|
|
||||||
bool4 res = isnan(float4(0.0f, 0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tint_symbol {
|
|
||||||
float4 value : SV_Position;
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 vertex_main_inner() {
|
|
||||||
isNan_4d280d();
|
|
||||||
return float4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
tint_symbol vertex_main() {
|
|
||||||
const float4 inner_result = vertex_main_inner();
|
|
||||||
tint_symbol wrapper_result = (tint_symbol)0;
|
|
||||||
wrapper_result.value = inner_result;
|
|
||||||
return wrapper_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isNan_4d280d();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
[numthreads(1, 1, 1)]
|
|
||||||
void compute_main() {
|
|
||||||
isNan_4d280d();
|
|
||||||
return;
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
builtins/gen/isNan/4d280d.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec4<bool> = isNan(vec4<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
#include <metal_stdlib>
|
|
||||||
|
|
||||||
using namespace metal;
|
|
||||||
void isNan_4d280d() {
|
|
||||||
bool4 res = isnan(float4());
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tint_symbol {
|
|
||||||
float4 value [[position]];
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 vertex_main_inner() {
|
|
||||||
isNan_4d280d();
|
|
||||||
return float4();
|
|
||||||
}
|
|
||||||
|
|
||||||
vertex tint_symbol vertex_main() {
|
|
||||||
float4 const inner_result = vertex_main_inner();
|
|
||||||
tint_symbol wrapper_result = {};
|
|
||||||
wrapper_result.value = inner_result;
|
|
||||||
return wrapper_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
fragment void fragment_main() {
|
|
||||||
isNan_4d280d();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
kernel void compute_main() {
|
|
||||||
isNan_4d280d();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,71 +0,0 @@
|
||||||
builtins/gen/isNan/4d280d.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec4<bool> = isNan(vec4<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
; SPIR-V
|
|
||||||
; Version: 1.3
|
|
||||||
; Generator: Google Tint Compiler; 0
|
|
||||||
; Bound: 33
|
|
||||||
; Schema: 0
|
|
||||||
OpCapability Shader
|
|
||||||
OpMemoryModel Logical GLSL450
|
|
||||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
|
||||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
|
||||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
|
||||||
OpExecutionMode %fragment_main OriginUpperLeft
|
|
||||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
|
||||||
OpName %value "value"
|
|
||||||
OpName %vertex_point_size "vertex_point_size"
|
|
||||||
OpName %isNan_4d280d "isNan_4d280d"
|
|
||||||
OpName %res "res"
|
|
||||||
OpName %vertex_main_inner "vertex_main_inner"
|
|
||||||
OpName %vertex_main "vertex_main"
|
|
||||||
OpName %fragment_main "fragment_main"
|
|
||||||
OpName %compute_main "compute_main"
|
|
||||||
OpDecorate %value BuiltIn Position
|
|
||||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
|
||||||
%float = OpTypeFloat 32
|
|
||||||
%v4float = OpTypeVector %float 4
|
|
||||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
|
||||||
%5 = OpConstantNull %v4float
|
|
||||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
|
||||||
%_ptr_Output_float = OpTypePointer Output %float
|
|
||||||
%8 = OpConstantNull %float
|
|
||||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
|
||||||
%void = OpTypeVoid
|
|
||||||
%9 = OpTypeFunction %void
|
|
||||||
%bool = OpTypeBool
|
|
||||||
%v4bool = OpTypeVector %bool 4
|
|
||||||
%_ptr_Function_v4bool = OpTypePointer Function %v4bool
|
|
||||||
%18 = OpConstantNull %v4bool
|
|
||||||
%19 = OpTypeFunction %v4float
|
|
||||||
%float_1 = OpConstant %float 1
|
|
||||||
%isNan_4d280d = OpFunction %void None %9
|
|
||||||
%12 = OpLabel
|
|
||||||
%res = OpVariable %_ptr_Function_v4bool Function %18
|
|
||||||
%13 = OpIsNan %v4bool %5
|
|
||||||
OpStore %res %13
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%vertex_main_inner = OpFunction %v4float None %19
|
|
||||||
%21 = OpLabel
|
|
||||||
%22 = OpFunctionCall %void %isNan_4d280d
|
|
||||||
OpReturnValue %5
|
|
||||||
OpFunctionEnd
|
|
||||||
%vertex_main = OpFunction %void None %9
|
|
||||||
%24 = OpLabel
|
|
||||||
%25 = OpFunctionCall %v4float %vertex_main_inner
|
|
||||||
OpStore %value %25
|
|
||||||
OpStore %vertex_point_size %float_1
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%fragment_main = OpFunction %void None %9
|
|
||||||
%28 = OpLabel
|
|
||||||
%29 = OpFunctionCall %void %isNan_4d280d
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%compute_main = OpFunction %void None %9
|
|
||||||
%31 = OpLabel
|
|
||||||
%32 = OpFunctionCall %void %isNan_4d280d
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
|
@ -1,23 +0,0 @@
|
||||||
builtins/gen/isNan/4d280d.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec4<bool> = isNan(vec4<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
fn isNan_4d280d() {
|
|
||||||
var res : vec4<bool> = isNan(vec4<f32>());
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isNan_4d280d();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isNan_4d280d();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isNan_4d280d();
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
// Copyright 2021 The Tint Authors.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// File generated by tools/builtin-gen
|
|
||||||
// using the template:
|
|
||||||
// test/tint/builtins/builtins.wgsl.tmpl
|
|
||||||
// and the builtin defintion file:
|
|
||||||
// src/tint/builtins.def
|
|
||||||
//
|
|
||||||
// Do not modify this file directly
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
// fn isNan(vec<2, f32>) -> vec<2, bool>
|
|
||||||
fn isNan_67ecd3() {
|
|
||||||
var res: vec2<bool> = isNan(vec2<f32>());
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isNan_67ecd3();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isNan_67ecd3();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isNan_67ecd3();
|
|
||||||
}
|
|
|
@ -1,52 +0,0 @@
|
||||||
builtins/gen/isNan/67ecd3.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec2<bool> = isNan(vec2<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
void isNan_67ecd3() {
|
|
||||||
bvec2 res = isnan(vec2(0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
vec4 vertex_main() {
|
|
||||||
isNan_67ecd3();
|
|
||||||
return vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
vec4 inner_result = vertex_main();
|
|
||||||
gl_Position = inner_result;
|
|
||||||
gl_Position.y = -(gl_Position.y);
|
|
||||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#version 310 es
|
|
||||||
precision mediump float;
|
|
||||||
|
|
||||||
void isNan_67ecd3() {
|
|
||||||
bvec2 res = isnan(vec2(0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isNan_67ecd3();
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
fragment_main();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
void isNan_67ecd3() {
|
|
||||||
bvec2 res = isnan(vec2(0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
void compute_main() {
|
|
||||||
isNan_67ecd3();
|
|
||||||
}
|
|
||||||
|
|
||||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
||||||
void main() {
|
|
||||||
compute_main();
|
|
||||||
return;
|
|
||||||
}
|
|
|
@ -1,34 +0,0 @@
|
||||||
builtins/gen/isNan/67ecd3.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec2<bool> = isNan(vec2<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
void isNan_67ecd3() {
|
|
||||||
bool2 res = isnan(float2(0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tint_symbol {
|
|
||||||
float4 value : SV_Position;
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 vertex_main_inner() {
|
|
||||||
isNan_67ecd3();
|
|
||||||
return float4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
tint_symbol vertex_main() {
|
|
||||||
const float4 inner_result = vertex_main_inner();
|
|
||||||
tint_symbol wrapper_result = (tint_symbol)0;
|
|
||||||
wrapper_result.value = inner_result;
|
|
||||||
return wrapper_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isNan_67ecd3();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
[numthreads(1, 1, 1)]
|
|
||||||
void compute_main() {
|
|
||||||
isNan_67ecd3();
|
|
||||||
return;
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
builtins/gen/isNan/67ecd3.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec2<bool> = isNan(vec2<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
#include <metal_stdlib>
|
|
||||||
|
|
||||||
using namespace metal;
|
|
||||||
void isNan_67ecd3() {
|
|
||||||
bool2 res = isnan(float2());
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tint_symbol {
|
|
||||||
float4 value [[position]];
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 vertex_main_inner() {
|
|
||||||
isNan_67ecd3();
|
|
||||||
return float4();
|
|
||||||
}
|
|
||||||
|
|
||||||
vertex tint_symbol vertex_main() {
|
|
||||||
float4 const inner_result = vertex_main_inner();
|
|
||||||
tint_symbol wrapper_result = {};
|
|
||||||
wrapper_result.value = inner_result;
|
|
||||||
return wrapper_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
fragment void fragment_main() {
|
|
||||||
isNan_67ecd3();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
kernel void compute_main() {
|
|
||||||
isNan_67ecd3();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,73 +0,0 @@
|
||||||
builtins/gen/isNan/67ecd3.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec2<bool> = isNan(vec2<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
; SPIR-V
|
|
||||||
; Version: 1.3
|
|
||||||
; Generator: Google Tint Compiler; 0
|
|
||||||
; Bound: 35
|
|
||||||
; Schema: 0
|
|
||||||
OpCapability Shader
|
|
||||||
OpMemoryModel Logical GLSL450
|
|
||||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
|
||||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
|
||||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
|
||||||
OpExecutionMode %fragment_main OriginUpperLeft
|
|
||||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
|
||||||
OpName %value "value"
|
|
||||||
OpName %vertex_point_size "vertex_point_size"
|
|
||||||
OpName %isNan_67ecd3 "isNan_67ecd3"
|
|
||||||
OpName %res "res"
|
|
||||||
OpName %vertex_main_inner "vertex_main_inner"
|
|
||||||
OpName %vertex_main "vertex_main"
|
|
||||||
OpName %fragment_main "fragment_main"
|
|
||||||
OpName %compute_main "compute_main"
|
|
||||||
OpDecorate %value BuiltIn Position
|
|
||||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
|
||||||
%float = OpTypeFloat 32
|
|
||||||
%v4float = OpTypeVector %float 4
|
|
||||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
|
||||||
%5 = OpConstantNull %v4float
|
|
||||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
|
||||||
%_ptr_Output_float = OpTypePointer Output %float
|
|
||||||
%8 = OpConstantNull %float
|
|
||||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
|
||||||
%void = OpTypeVoid
|
|
||||||
%9 = OpTypeFunction %void
|
|
||||||
%bool = OpTypeBool
|
|
||||||
%v2bool = OpTypeVector %bool 2
|
|
||||||
%v2float = OpTypeVector %float 2
|
|
||||||
%17 = OpConstantNull %v2float
|
|
||||||
%_ptr_Function_v2bool = OpTypePointer Function %v2bool
|
|
||||||
%20 = OpConstantNull %v2bool
|
|
||||||
%21 = OpTypeFunction %v4float
|
|
||||||
%float_1 = OpConstant %float 1
|
|
||||||
%isNan_67ecd3 = OpFunction %void None %9
|
|
||||||
%12 = OpLabel
|
|
||||||
%res = OpVariable %_ptr_Function_v2bool Function %20
|
|
||||||
%13 = OpIsNan %v2bool %17
|
|
||||||
OpStore %res %13
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%vertex_main_inner = OpFunction %v4float None %21
|
|
||||||
%23 = OpLabel
|
|
||||||
%24 = OpFunctionCall %void %isNan_67ecd3
|
|
||||||
OpReturnValue %5
|
|
||||||
OpFunctionEnd
|
|
||||||
%vertex_main = OpFunction %void None %9
|
|
||||||
%26 = OpLabel
|
|
||||||
%27 = OpFunctionCall %v4float %vertex_main_inner
|
|
||||||
OpStore %value %27
|
|
||||||
OpStore %vertex_point_size %float_1
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%fragment_main = OpFunction %void None %9
|
|
||||||
%30 = OpLabel
|
|
||||||
%31 = OpFunctionCall %void %isNan_67ecd3
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%compute_main = OpFunction %void None %9
|
|
||||||
%33 = OpLabel
|
|
||||||
%34 = OpFunctionCall %void %isNan_67ecd3
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
|
@ -1,23 +0,0 @@
|
||||||
builtins/gen/isNan/67ecd3.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec2<bool> = isNan(vec2<f32>());
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
fn isNan_67ecd3() {
|
|
||||||
var res : vec2<bool> = isNan(vec2<f32>());
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isNan_67ecd3();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isNan_67ecd3();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isNan_67ecd3();
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
// Copyright 2021 The Tint Authors.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// File generated by tools/builtin-gen
|
|
||||||
// using the template:
|
|
||||||
// test/tint/builtins/builtins.wgsl.tmpl
|
|
||||||
// and the builtin defintion file:
|
|
||||||
// src/tint/builtins.def
|
|
||||||
//
|
|
||||||
// Do not modify this file directly
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
// fn isNan(f32) -> bool
|
|
||||||
fn isNan_e4978e() {
|
|
||||||
var res: bool = isNan(1.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isNan_e4978e();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isNan_e4978e();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isNan_e4978e();
|
|
||||||
}
|
|
|
@ -1,52 +0,0 @@
|
||||||
builtins/gen/isNan/e4978e.wgsl:28:19 warning: use of deprecated builtin
|
|
||||||
var res: bool = isNan(1.0);
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
void isNan_e4978e() {
|
|
||||||
bool res = isnan(1.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
vec4 vertex_main() {
|
|
||||||
isNan_e4978e();
|
|
||||||
return vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
vec4 inner_result = vertex_main();
|
|
||||||
gl_Position = inner_result;
|
|
||||||
gl_Position.y = -(gl_Position.y);
|
|
||||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#version 310 es
|
|
||||||
precision mediump float;
|
|
||||||
|
|
||||||
void isNan_e4978e() {
|
|
||||||
bool res = isnan(1.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isNan_e4978e();
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
fragment_main();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
void isNan_e4978e() {
|
|
||||||
bool res = isnan(1.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
void compute_main() {
|
|
||||||
isNan_e4978e();
|
|
||||||
}
|
|
||||||
|
|
||||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
||||||
void main() {
|
|
||||||
compute_main();
|
|
||||||
return;
|
|
||||||
}
|
|
|
@ -1,34 +0,0 @@
|
||||||
builtins/gen/isNan/e4978e.wgsl:28:19 warning: use of deprecated builtin
|
|
||||||
var res: bool = isNan(1.0);
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
void isNan_e4978e() {
|
|
||||||
bool res = isnan(1.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tint_symbol {
|
|
||||||
float4 value : SV_Position;
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 vertex_main_inner() {
|
|
||||||
isNan_e4978e();
|
|
||||||
return float4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
tint_symbol vertex_main() {
|
|
||||||
const float4 inner_result = vertex_main_inner();
|
|
||||||
tint_symbol wrapper_result = (tint_symbol)0;
|
|
||||||
wrapper_result.value = inner_result;
|
|
||||||
return wrapper_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isNan_e4978e();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
[numthreads(1, 1, 1)]
|
|
||||||
void compute_main() {
|
|
||||||
isNan_e4978e();
|
|
||||||
return;
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
builtins/gen/isNan/e4978e.wgsl:28:19 warning: use of deprecated builtin
|
|
||||||
var res: bool = isNan(1.0);
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
#include <metal_stdlib>
|
|
||||||
|
|
||||||
using namespace metal;
|
|
||||||
void isNan_e4978e() {
|
|
||||||
bool res = isnan(1.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
struct tint_symbol {
|
|
||||||
float4 value [[position]];
|
|
||||||
};
|
|
||||||
|
|
||||||
float4 vertex_main_inner() {
|
|
||||||
isNan_e4978e();
|
|
||||||
return float4();
|
|
||||||
}
|
|
||||||
|
|
||||||
vertex tint_symbol vertex_main() {
|
|
||||||
float4 const inner_result = vertex_main_inner();
|
|
||||||
tint_symbol wrapper_result = {};
|
|
||||||
wrapper_result.value = inner_result;
|
|
||||||
return wrapper_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
fragment void fragment_main() {
|
|
||||||
isNan_e4978e();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
kernel void compute_main() {
|
|
||||||
isNan_e4978e();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,70 +0,0 @@
|
||||||
builtins/gen/isNan/e4978e.wgsl:28:19 warning: use of deprecated builtin
|
|
||||||
var res: bool = isNan(1.0);
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
; SPIR-V
|
|
||||||
; Version: 1.3
|
|
||||||
; Generator: Google Tint Compiler; 0
|
|
||||||
; Bound: 32
|
|
||||||
; Schema: 0
|
|
||||||
OpCapability Shader
|
|
||||||
OpMemoryModel Logical GLSL450
|
|
||||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
|
||||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
|
||||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
|
||||||
OpExecutionMode %fragment_main OriginUpperLeft
|
|
||||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
|
||||||
OpName %value "value"
|
|
||||||
OpName %vertex_point_size "vertex_point_size"
|
|
||||||
OpName %isNan_e4978e "isNan_e4978e"
|
|
||||||
OpName %res "res"
|
|
||||||
OpName %vertex_main_inner "vertex_main_inner"
|
|
||||||
OpName %vertex_main "vertex_main"
|
|
||||||
OpName %fragment_main "fragment_main"
|
|
||||||
OpName %compute_main "compute_main"
|
|
||||||
OpDecorate %value BuiltIn Position
|
|
||||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
|
||||||
%float = OpTypeFloat 32
|
|
||||||
%v4float = OpTypeVector %float 4
|
|
||||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
|
||||||
%5 = OpConstantNull %v4float
|
|
||||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
|
||||||
%_ptr_Output_float = OpTypePointer Output %float
|
|
||||||
%8 = OpConstantNull %float
|
|
||||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
|
||||||
%void = OpTypeVoid
|
|
||||||
%9 = OpTypeFunction %void
|
|
||||||
%bool = OpTypeBool
|
|
||||||
%float_1 = OpConstant %float 1
|
|
||||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
|
||||||
%18 = OpConstantNull %bool
|
|
||||||
%19 = OpTypeFunction %v4float
|
|
||||||
%isNan_e4978e = OpFunction %void None %9
|
|
||||||
%12 = OpLabel
|
|
||||||
%res = OpVariable %_ptr_Function_bool Function %18
|
|
||||||
%13 = OpIsNan %bool %float_1
|
|
||||||
OpStore %res %13
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%vertex_main_inner = OpFunction %v4float None %19
|
|
||||||
%21 = OpLabel
|
|
||||||
%22 = OpFunctionCall %void %isNan_e4978e
|
|
||||||
OpReturnValue %5
|
|
||||||
OpFunctionEnd
|
|
||||||
%vertex_main = OpFunction %void None %9
|
|
||||||
%24 = OpLabel
|
|
||||||
%25 = OpFunctionCall %v4float %vertex_main_inner
|
|
||||||
OpStore %value %25
|
|
||||||
OpStore %vertex_point_size %float_1
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%fragment_main = OpFunction %void None %9
|
|
||||||
%27 = OpLabel
|
|
||||||
%28 = OpFunctionCall %void %isNan_e4978e
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
||||||
%compute_main = OpFunction %void None %9
|
|
||||||
%30 = OpLabel
|
|
||||||
%31 = OpFunctionCall %void %isNan_e4978e
|
|
||||||
OpReturn
|
|
||||||
OpFunctionEnd
|
|
|
@ -1,23 +0,0 @@
|
||||||
builtins/gen/isNan/e4978e.wgsl:28:19 warning: use of deprecated builtin
|
|
||||||
var res: bool = isNan(1.0);
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
fn isNan_e4978e() {
|
|
||||||
var res : bool = isNan(1.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isNan_e4978e();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isNan_e4978e();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isNan_e4978e();
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
// Copyright 2021 The Tint Authors.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// File generated by tools/builtin-gen
|
|
||||||
// using the template:
|
|
||||||
// test/tint/builtins/builtins.wgsl.tmpl
|
|
||||||
// and the builtin defintion file:
|
|
||||||
// src/tint/builtins.def
|
|
||||||
//
|
|
||||||
// Do not modify this file directly
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
// fn isNormal(vec<4, f32>) -> vec<4, bool>
|
|
||||||
fn isNormal_863dcd() {
|
|
||||||
var res: vec4<bool> = isNormal(vec4<f32>());
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(vertex)
|
|
||||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
||||||
isNormal_863dcd();
|
|
||||||
return vec4<f32>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(fragment)
|
|
||||||
fn fragment_main() {
|
|
||||||
isNormal_863dcd();
|
|
||||||
}
|
|
||||||
|
|
||||||
@stage(compute) @workgroup_size(1)
|
|
||||||
fn compute_main() {
|
|
||||||
isNormal_863dcd();
|
|
||||||
}
|
|
|
@ -1,73 +0,0 @@
|
||||||
builtins/gen/isNormal/863dcd.wgsl:28:25 warning: use of deprecated builtin
|
|
||||||
var res: vec4<bool> = isNormal(vec4<f32>());
|
|
||||||
^^^^^^^^
|
|
||||||
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
bvec4 tint_isNormal(vec4 param_0) {
|
|
||||||
uvec4 exponent = floatBitsToUint(param_0) & 0x7f80000u;
|
|
||||||
uvec4 clamped = clamp(exponent, 0x0080000u, 0x7f00000u);
|
|
||||||
return equal(clamped, exponent);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void isNormal_863dcd() {
|
|
||||||
bvec4 res = tint_isNormal(vec4(0.0f, 0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
vec4 vertex_main() {
|
|
||||||
isNormal_863dcd();
|
|
||||||
return vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
vec4 inner_result = vertex_main();
|
|
||||||
gl_Position = inner_result;
|
|
||||||
gl_Position.y = -(gl_Position.y);
|
|
||||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#version 310 es
|
|
||||||
precision mediump float;
|
|
||||||
|
|
||||||
bvec4 tint_isNormal(vec4 param_0) {
|
|
||||||
uvec4 exponent = floatBitsToUint(param_0) & 0x7f80000u;
|
|
||||||
uvec4 clamped = clamp(exponent, 0x0080000u, 0x7f00000u);
|
|
||||||
return equal(clamped, exponent);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void isNormal_863dcd() {
|
|
||||||
bvec4 res = tint_isNormal(vec4(0.0f, 0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
void fragment_main() {
|
|
||||||
isNormal_863dcd();
|
|
||||||
}
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
fragment_main();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#version 310 es
|
|
||||||
|
|
||||||
bvec4 tint_isNormal(vec4 param_0) {
|
|
||||||
uvec4 exponent = floatBitsToUint(param_0) & 0x7f80000u;
|
|
||||||
uvec4 clamped = clamp(exponent, 0x0080000u, 0x7f00000u);
|
|
||||||
return equal(clamped, exponent);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void isNormal_863dcd() {
|
|
||||||
bvec4 res = tint_isNormal(vec4(0.0f, 0.0f, 0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
void compute_main() {
|
|
||||||
isNormal_863dcd();
|
|
||||||
}
|
|
||||||
|
|
||||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
||||||
void main() {
|
|
||||||
compute_main();
|
|
||||||
return;
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue