[writer/msl]: Implement modf and frexp
And remove the u32 overload of frexp (it's not in the spec). Brings the number of failing tint end to end tests for MSL down to 19/1098. The WG still haven't found consensus on reworking these two intrinsics. It's very likely that their signature will change so that they return a structure instead of returning a value and outputing another as a pointer. Until the WG makes a decision, let's implement these according to the current spec. Some overloads are still failing due to MSL missing overloads of the pointer parameter being in the `threadgroup` address space. I'm holding off fixing these until we know what's happening with these intrinsics. See also: https://github.com/gpuweb/gpuweb/issues/1480 https://github.com/gpuweb/gpuweb/issues/1846 Change-Id: Ib6764e6659d840db41bc65fed2b8b283d1056c3d Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/57421 Commit-Queue: Ben Clayton <bclayton@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Ben Clayton <bclayton@google.com> Reviewed-by: James Price <jrprice@google.com>
This commit is contained in:
parent
e4fd4a2ecd
commit
03c8393213
File diff suppressed because it is too large
Load Diff
|
@ -308,8 +308,8 @@ fn fma(f32, f32, f32) -> f32
|
|||
fn fma<N: num>(vec<N, f32>, vec<N, f32>, vec<N, f32>) -> vec<N, f32>
|
||||
fn fract(f32) -> f32
|
||||
fn fract<N: num>(vec<N, f32>) -> vec<N, f32>
|
||||
fn frexp<T: iu32, S: function_private_workgroup, A: access>(f32, ptr<S, T, A>) -> f32
|
||||
fn frexp<N: num, T: iu32, S: function_private_workgroup, A: access>(vec<N, f32>, ptr<S, vec<N, T>, A>) -> vec<N, f32>
|
||||
fn frexp<S: function_private_workgroup, A: access>(f32, ptr<S, i32, A>) -> f32
|
||||
fn frexp<N: num, S: function_private_workgroup, A: access>(vec<N, f32>, ptr<S, vec<N, i32>, A>) -> vec<N, f32>
|
||||
[[stage("fragment")]] fn fwidth(f32) -> f32
|
||||
[[stage("fragment")]] fn fwidth<N: num>(vec<N, f32>) -> vec<N, f32>
|
||||
[[stage("fragment")]] fn fwidthCoarse(f32) -> f32
|
||||
|
|
|
@ -863,8 +863,8 @@ TEST_F(ResolverIntrinsicDataTest, Frexp_Error_FirstParamInt) {
|
|||
R"(error: no matching call to frexp(i32, ptr<workgroup, i32, read_write>)
|
||||
|
||||
2 candidate functions:
|
||||
frexp(f32, ptr<S, T, A>) -> f32 where: T is i32 or u32, S is function, private or workgroup
|
||||
frexp(vecN<f32>, ptr<S, vecN<T>, A>) -> vecN<f32> where: T is i32 or u32, S is function, private or workgroup
|
||||
frexp(f32, ptr<S, i32, A>) -> f32 where: S is function, private or workgroup
|
||||
frexp(vecN<f32>, ptr<S, vecN<i32>, A>) -> vecN<f32> where: S is function, private or workgroup
|
||||
)");
|
||||
}
|
||||
|
||||
|
@ -880,8 +880,8 @@ TEST_F(ResolverIntrinsicDataTest, Frexp_Error_SecondParamFloatPtr) {
|
|||
R"(error: no matching call to frexp(f32, ptr<workgroup, f32, read_write>)
|
||||
|
||||
2 candidate functions:
|
||||
frexp(f32, ptr<S, T, A>) -> f32 where: T is i32 or u32, S is function, private or workgroup
|
||||
frexp(vecN<f32>, ptr<S, vecN<T>, A>) -> vecN<f32> where: T is i32 or u32, S is function, private or workgroup
|
||||
frexp(f32, ptr<S, i32, A>) -> f32 where: S is function, private or workgroup
|
||||
frexp(vecN<f32>, ptr<S, vecN<i32>, A>) -> vecN<f32> where: S is function, private or workgroup
|
||||
)");
|
||||
}
|
||||
|
||||
|
@ -894,8 +894,8 @@ TEST_F(ResolverIntrinsicDataTest, Frexp_Error_SecondParamNotAPointer) {
|
|||
EXPECT_EQ(r()->error(), R"(error: no matching call to frexp(f32, i32)
|
||||
|
||||
2 candidate functions:
|
||||
frexp(f32, ptr<S, T, A>) -> f32 where: T is i32 or u32, S is function, private or workgroup
|
||||
frexp(vecN<f32>, ptr<S, vecN<T>, A>) -> vecN<f32> where: T is i32 or u32, S is function, private or workgroup
|
||||
frexp(f32, ptr<S, i32, A>) -> f32 where: S is function, private or workgroup
|
||||
frexp(vecN<f32>, ptr<S, vecN<i32>, A>) -> vecN<f32> where: S is function, private or workgroup
|
||||
)");
|
||||
}
|
||||
|
||||
|
@ -911,8 +911,8 @@ TEST_F(ResolverIntrinsicDataTest, Frexp_Error_VectorSizesDontMatch) {
|
|||
R"(error: no matching call to frexp(vec2<f32>, ptr<workgroup, vec4<i32>, read_write>)
|
||||
|
||||
2 candidate functions:
|
||||
frexp(f32, ptr<S, T, A>) -> f32 where: T is i32 or u32, S is function, private or workgroup
|
||||
frexp(vecN<f32>, ptr<S, vecN<T>, A>) -> vecN<f32> where: T is i32 or u32, S is function, private or workgroup
|
||||
frexp(vecN<f32>, ptr<S, vecN<i32>, A>) -> vecN<f32> where: S is function, private or workgroup
|
||||
frexp(f32, ptr<S, i32, A>) -> f32 where: S is function, private or workgroup
|
||||
)");
|
||||
}
|
||||
|
||||
|
|
|
@ -367,6 +367,8 @@ bool GeneratorImpl::EmitIntrinsicCall(std::ostream& out,
|
|||
return EmitTextureCall(out, expr, intrinsic);
|
||||
}
|
||||
|
||||
auto name = generate_builtin_name(intrinsic);
|
||||
|
||||
switch (intrinsic->Type()) {
|
||||
case sem::IntrinsicType::kPack2x16float:
|
||||
case sem::IntrinsicType::kUnpack2x16float: {
|
||||
|
@ -398,11 +400,33 @@ bool GeneratorImpl::EmitIntrinsicCall(std::ostream& out,
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
case sem::IntrinsicType::kFrexp:
|
||||
case sem::IntrinsicType::kModf: {
|
||||
// TODO(bclayton): These intrinsics are likely to change signature.
|
||||
// See: crbug.com/tint/54 and https://github.com/gpuweb/gpuweb/issues/1480
|
||||
out << name;
|
||||
ScopedParen sp(out);
|
||||
if (!EmitExpression(out, expr->params()[0])) {
|
||||
return false;
|
||||
}
|
||||
out << ", ";
|
||||
{
|
||||
// MSL has a reference for the second parameter, but WGSL has a pointer.
|
||||
// Dereference the argument.
|
||||
out << "*";
|
||||
ScopedParen sp2(out);
|
||||
if (!EmitExpression(out, expr->params()[1])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
auto name = generate_builtin_name(intrinsic);
|
||||
if (name.empty()) {
|
||||
return false;
|
||||
}
|
||||
|
@ -825,11 +849,13 @@ std::string GeneratorImpl::generate_builtin_name(
|
|||
case sem::IntrinsicType::kFloor:
|
||||
case sem::IntrinsicType::kFma:
|
||||
case sem::IntrinsicType::kFract:
|
||||
case sem::IntrinsicType::kFrexp:
|
||||
case sem::IntrinsicType::kLength:
|
||||
case sem::IntrinsicType::kLdexp:
|
||||
case sem::IntrinsicType::kLog:
|
||||
case sem::IntrinsicType::kLog2:
|
||||
case sem::IntrinsicType::kMix:
|
||||
case sem::IntrinsicType::kModf:
|
||||
case sem::IntrinsicType::kNormalize:
|
||||
case sem::IntrinsicType::kPow:
|
||||
case sem::IntrinsicType::kReflect:
|
||||
|
|
|
@ -1 +1,9 @@
|
|||
SKIP: Failed to generate: error: Unknown import method: frexp
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
kernel void tint_symbol() {
|
||||
int exponent = 0;
|
||||
float const significand = frexp(1.230000019f, *(&(exponent)));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,31 +1,28 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_013caa() {
|
||||
var arg_1 : vec4<i32>;
|
||||
var res : vec4<f32> = frexp(vec4<f32>(), &(arg_1));
|
||||
}
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
void frexp_013caa() {
|
||||
int4 arg_1 = 0;
|
||||
float4 res = frexp(float4(), *(&(arg_1)));
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
frexp_013caa();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
fragment void fragment_main() {
|
||||
frexp_013caa();
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
kernel void compute_main() {
|
||||
frexp_013caa();
|
||||
return;
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
||||
|
|
|
@ -1,33 +1,60 @@
|
|||
SKIP: FAILED
|
||||
|
||||
#include <metal_stdlib>
|
||||
|
||||
fn frexp_0da285(tint_symbol_2 : ptr<workgroup, i32>) {
|
||||
var res : f32 = frexp(1.0, &(*(tint_symbol_2)));
|
||||
using namespace metal;
|
||||
void frexp_0da285(threadgroup int* const tint_symbol_1) {
|
||||
float res = frexp(1.0f, *(&(*(tint_symbol_1))));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_3 : i32;
|
||||
frexp_0da285(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
|
||||
threadgroup int tint_symbol_2;
|
||||
if ((local_invocation_index == 0u)) {
|
||||
tint_symbol_2 = int();
|
||||
}
|
||||
threadgroup_barrier(mem_flags::mem_threadgroup);
|
||||
frexp_0da285(&(tint_symbol_2));
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_4 : i32;
|
||||
frexp_0da285(&(tint_symbol_4));
|
||||
}
|
||||
Compilation failed:
|
||||
|
||||
program_source:5:15: error: no matching function for call to 'frexp'
|
||||
float res = frexp(1.0f, *(&(*(tint_symbol_1))));
|
||||
^~~~~
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:4560:18: note: candidate function not viable: address space mismatch in 2nd argument ('threadgroup int'), parameter type must be 'int &'
|
||||
METAL_FUNC float frexp(float x, thread int &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:3092:17: note: candidate function not viable: address space mismatch in 2nd argument ('threadgroup int'), parameter type must be 'int &'
|
||||
METAL_FUNC half frexp(half x, thread int &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:3336:18: note: candidate function not viable: no known conversion from 'threadgroup int' to 'metal::int2 &' (aka 'int2 &') for 2nd argument
|
||||
METAL_FUNC half2 frexp(half2 x, thread int2 &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:3580:18: note: candidate function not viable: no known conversion from 'threadgroup int' to 'metal::int3 &' (aka 'int3 &') for 2nd argument
|
||||
METAL_FUNC half3 frexp(half3 x, thread int3 &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:3824:18: note: candidate function not viable: no known conversion from 'threadgroup int' to 'metal::int4 &' (aka 'int4 &') for 2nd argument
|
||||
METAL_FUNC half4 frexp(half4 x, thread int4 &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:4804:19: note: candidate function not viable: no known conversion from 'threadgroup int' to 'metal::int2 &' (aka 'int2 &') for 2nd argument
|
||||
METAL_FUNC float2 frexp(float2 x, thread int2 &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:5048:19: note: candidate function not viable: no known conversion from 'threadgroup int' to 'metal::int3 &' (aka 'int3 &') for 2nd argument
|
||||
METAL_FUNC float3 frexp(float3 x, thread int3 &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:5292:19: note: candidate function not viable: no known conversion from 'threadgroup int' to 'metal::int4 &' (aka 'int4 &') for 2nd argument
|
||||
METAL_FUNC float4 frexp(float4 x, thread int4 &exp)
|
||||
^
|
||||
program_source:10:31: warning: equality comparison with extraneous parentheses
|
||||
if ((local_invocation_index == 0u)) {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~^~~~~
|
||||
program_source:10:31: note: remove extraneous parentheses around the comparison to silence this warning
|
||||
if ((local_invocation_index == 0u)) {
|
||||
~ ^ ~
|
||||
program_source:10:31: note: use '=' to turn this equality comparison into an assignment
|
||||
if ((local_invocation_index == 0u)) {
|
||||
^~
|
||||
=
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_5 : i32;
|
||||
frexp_0da285(&(tint_symbol_5));
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
||||
|
|
|
@ -1,31 +1,28 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_15edf3() {
|
||||
var arg_1 : vec2<i32>;
|
||||
var res : vec2<f32> = frexp(vec2<f32>(), &(arg_1));
|
||||
}
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
void frexp_15edf3() {
|
||||
int2 arg_1 = 0;
|
||||
float2 res = frexp(float2(), *(&(arg_1)));
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
frexp_15edf3();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
fragment void fragment_main() {
|
||||
frexp_15edf3();
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
kernel void compute_main() {
|
||||
frexp_15edf3();
|
||||
return;
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
||||
|
|
|
@ -1,31 +1,28 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_19ab15() {
|
||||
var arg_1 : vec4<i32>;
|
||||
var res : vec4<f32> = frexp(vec4<f32>(), &(arg_1));
|
||||
}
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
void frexp_19ab15() {
|
||||
int4 arg_1 = 0;
|
||||
float4 res = frexp(float4(), *(&(arg_1)));
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
frexp_19ab15();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
fragment void fragment_main() {
|
||||
frexp_19ab15();
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
kernel void compute_main() {
|
||||
frexp_19ab15();
|
||||
return;
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
||||
|
|
|
@ -1,31 +1,28 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_2052e9() {
|
||||
var arg_1 : vec4<i32>;
|
||||
var res : vec4<f32> = frexp(vec4<f32>(), &(arg_1));
|
||||
}
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
void frexp_2052e9() {
|
||||
int4 arg_1 = 0;
|
||||
float4 res = frexp(float4(), *(&(arg_1)));
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
frexp_2052e9();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
fragment void fragment_main() {
|
||||
frexp_2052e9();
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
kernel void compute_main() {
|
||||
frexp_2052e9();
|
||||
return;
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
||||
|
|
|
@ -1,46 +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/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// fn frexp(vec<4, f32>, ptr<function, vec<4, u32>, read_write>) -> vec<4, f32>
|
||||
fn frexp_234f02() {
|
||||
var arg_1: vec4<u32>;
|
||||
var res: vec4<f32> = frexp(vec4<f32>(), &arg_1);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_234f02();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_234f02();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_234f02();
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
void frexp_234f02() {
|
||||
uint4 arg_1 = uint4(0u, 0u, 0u, 0u);
|
||||
float4 tint_tmp;
|
||||
float4 tint_tmp_1 = frexp(float4(0.0f, 0.0f, 0.0f, 0.0f), tint_tmp);
|
||||
arg_1 = uint4(tint_tmp);
|
||||
float4 res = tint_tmp_1;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
frexp_234f02();
|
||||
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
frexp_234f02();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
frexp_234f02();
|
||||
return;
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_234f02() {
|
||||
var arg_1 : vec4<u32>;
|
||||
var res : vec4<f32> = frexp(vec4<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
frexp_234f02();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_234f02();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_234f02();
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -1,73 +0,0 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 38
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%19 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %frexp_234f02 "frexp_234f02"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%8 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%uint = OpTypeInt 32 0
|
||||
%v4uint = OpTypeVector %uint 4
|
||||
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
|
||||
%17 = OpConstantNull %v4uint
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%23 = OpTypeFunction %void %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%frexp_234f02 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%arg_1 = OpVariable %_ptr_Function_v4uint Function %17
|
||||
%res = OpVariable %_ptr_Function_v4float Function %8
|
||||
%18 = OpExtInst %v4float %19 Frexp %8 %arg_1
|
||||
OpStore %res %18
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %23
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%26 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%28 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%30 = OpFunctionCall %void %frexp_234f02
|
||||
%31 = OpFunctionCall %void %tint_symbol_2 %8
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%33 = OpLabel
|
||||
%34 = OpFunctionCall %void %frexp_234f02
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%36 = OpLabel
|
||||
%37 = OpFunctionCall %void %frexp_234f02
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -1,20 +0,0 @@
|
|||
fn frexp_234f02() {
|
||||
var arg_1 : vec4<u32>;
|
||||
var res : vec4<f32> = frexp(vec4<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_234f02();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_234f02();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_234f02();
|
||||
}
|
|
@ -1,46 +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/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// fn frexp(vec<2, f32>, ptr<function, vec<2, u32>, read_write>) -> vec<2, f32>
|
||||
fn frexp_2945dc() {
|
||||
var arg_1: vec2<u32>;
|
||||
var res: vec2<f32> = frexp(vec2<f32>(), &arg_1);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_2945dc();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_2945dc();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_2945dc();
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
void frexp_2945dc() {
|
||||
uint2 arg_1 = uint2(0u, 0u);
|
||||
float2 tint_tmp;
|
||||
float2 tint_tmp_1 = frexp(float2(0.0f, 0.0f), tint_tmp);
|
||||
arg_1 = uint2(tint_tmp);
|
||||
float2 res = tint_tmp_1;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
frexp_2945dc();
|
||||
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
frexp_2945dc();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
frexp_2945dc();
|
||||
return;
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_2945dc() {
|
||||
var arg_1 : vec2<u32>;
|
||||
var res : vec2<f32> = frexp(vec2<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
frexp_2945dc();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_2945dc();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_2945dc();
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -1,75 +0,0 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 40
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%20 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %frexp_2945dc "frexp_2945dc"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%8 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%uint = OpTypeInt 32 0
|
||||
%v2uint = OpTypeVector %uint 2
|
||||
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
|
||||
%17 = OpConstantNull %v2uint
|
||||
%v2float = OpTypeVector %float 2
|
||||
%21 = OpConstantNull %v2float
|
||||
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
||||
%25 = OpTypeFunction %void %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%frexp_2945dc = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%arg_1 = OpVariable %_ptr_Function_v2uint Function %17
|
||||
%res = OpVariable %_ptr_Function_v2float Function %21
|
||||
%18 = OpExtInst %v2float %20 Frexp %21 %arg_1
|
||||
OpStore %res %18
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %25
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%28 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%30 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%32 = OpFunctionCall %void %frexp_2945dc
|
||||
%33 = OpFunctionCall %void %tint_symbol_2 %8
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%35 = OpLabel
|
||||
%36 = OpFunctionCall %void %frexp_2945dc
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%38 = OpLabel
|
||||
%39 = OpFunctionCall %void %frexp_2945dc
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -1,20 +0,0 @@
|
|||
fn frexp_2945dc() {
|
||||
var arg_1 : vec2<u32>;
|
||||
var res : vec2<f32> = frexp(vec2<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_2945dc();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_2945dc();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_2945dc();
|
||||
}
|
|
@ -1,33 +1,60 @@
|
|||
SKIP: FAILED
|
||||
|
||||
#include <metal_stdlib>
|
||||
|
||||
fn frexp_40fc9b(tint_symbol_2 : ptr<workgroup, vec3<i32>>) {
|
||||
var res : vec3<f32> = frexp(vec3<f32>(), &(*(tint_symbol_2)));
|
||||
using namespace metal;
|
||||
void frexp_40fc9b(threadgroup int3* const tint_symbol_1) {
|
||||
float3 res = frexp(float3(), *(&(*(tint_symbol_1))));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_3 : vec3<i32>;
|
||||
frexp_40fc9b(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
|
||||
threadgroup int3 tint_symbol_2;
|
||||
if ((local_invocation_index == 0u)) {
|
||||
tint_symbol_2 = int3();
|
||||
}
|
||||
threadgroup_barrier(mem_flags::mem_threadgroup);
|
||||
frexp_40fc9b(&(tint_symbol_2));
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_4 : vec3<i32>;
|
||||
frexp_40fc9b(&(tint_symbol_4));
|
||||
}
|
||||
Compilation failed:
|
||||
|
||||
program_source:5:16: error: no matching function for call to 'frexp'
|
||||
float3 res = frexp(float3(), *(&(*(tint_symbol_1))));
|
||||
^~~~~
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:5048:19: note: candidate function not viable: address space mismatch in 2nd argument ('threadgroup int3' (vector of 3 'int' values)), parameter type must be 'metal::int3 &' (aka 'int3 &')
|
||||
METAL_FUNC float3 frexp(float3 x, thread int3 &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:3092:17: note: candidate function not viable: no known conversion from 'float3' (vector of 3 'float' values) to 'half' for 1st argument
|
||||
METAL_FUNC half frexp(half x, thread int &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:3336:18: note: candidate function not viable: no known conversion from 'float3' (vector of 3 'float' values) to 'metal::half2' (aka 'half2') for 1st argument
|
||||
METAL_FUNC half2 frexp(half2 x, thread int2 &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:3580:18: note: candidate function not viable: no known conversion from 'float3' (vector of 3 'float' values) to 'metal::half3' (aka 'half3') for 1st argument
|
||||
METAL_FUNC half3 frexp(half3 x, thread int3 &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:3824:18: note: candidate function not viable: no known conversion from 'float3' (vector of 3 'float' values) to 'metal::half4' (aka 'half4') for 1st argument
|
||||
METAL_FUNC half4 frexp(half4 x, thread int4 &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:4560:18: note: candidate function not viable: no known conversion from 'float3' (vector of 3 'float' values) to 'float' for 1st argument
|
||||
METAL_FUNC float frexp(float x, thread int &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:4804:19: note: candidate function not viable: no known conversion from 'float3' (vector of 3 'float' values) to 'metal::float2' (aka 'float2') for 1st argument
|
||||
METAL_FUNC float2 frexp(float2 x, thread int2 &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:5292:19: note: candidate function not viable: no known conversion from 'float3' (vector of 3 'float' values) to 'metal::float4' (aka 'float4') for 1st argument
|
||||
METAL_FUNC float4 frexp(float4 x, thread int4 &exp)
|
||||
^
|
||||
program_source:10:31: warning: equality comparison with extraneous parentheses
|
||||
if ((local_invocation_index == 0u)) {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~^~~~~
|
||||
program_source:10:31: note: remove extraneous parentheses around the comparison to silence this warning
|
||||
if ((local_invocation_index == 0u)) {
|
||||
~ ^ ~
|
||||
program_source:10:31: note: use '=' to turn this equality comparison into an assignment
|
||||
if ((local_invocation_index == 0u)) {
|
||||
^~
|
||||
=
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_5 : vec3<i32>;
|
||||
frexp_40fc9b(&(tint_symbol_5));
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
||||
|
|
|
@ -1,31 +1,28 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_41e931() {
|
||||
var arg_1 : i32;
|
||||
var res : f32 = frexp(1.0, &(arg_1));
|
||||
}
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
void frexp_41e931() {
|
||||
int arg_1 = 0;
|
||||
float res = frexp(1.0f, *(&(arg_1)));
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
frexp_41e931();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
fragment void fragment_main() {
|
||||
frexp_41e931();
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
kernel void compute_main() {
|
||||
frexp_41e931();
|
||||
return;
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
||||
|
|
|
@ -1,31 +1,28 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_481e59() {
|
||||
var arg_1 : i32;
|
||||
var res : f32 = frexp(1.0, &(arg_1));
|
||||
}
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
void frexp_481e59() {
|
||||
int arg_1 = 0;
|
||||
float res = frexp(1.0f, *(&(arg_1)));
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
frexp_481e59();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
fragment void fragment_main() {
|
||||
frexp_481e59();
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
kernel void compute_main() {
|
||||
frexp_481e59();
|
||||
return;
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
||||
|
|
|
@ -1,46 +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/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var<private> arg_1: vec3<u32>;
|
||||
|
||||
// fn frexp(vec<3, f32>, ptr<private, vec<3, u32>, read_write>) -> vec<3, f32>
|
||||
fn frexp_53d417() {
|
||||
var res: vec3<f32> = frexp(vec3<f32>(), &arg_1);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_53d417();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_53d417();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_53d417();
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
static uint3 arg_1 = uint3(0u, 0u, 0u);
|
||||
|
||||
void frexp_53d417() {
|
||||
float3 tint_tmp;
|
||||
float3 tint_tmp_1 = frexp(float3(0.0f, 0.0f, 0.0f), tint_tmp);
|
||||
arg_1 = uint3(tint_tmp);
|
||||
float3 res = tint_tmp_1;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
frexp_53d417();
|
||||
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
frexp_53d417();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
frexp_53d417();
|
||||
return;
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_53d417(tint_symbol_2 : ptr<private, vec3<u32>>) {
|
||||
var res : vec3<f32> = frexp(vec3<f32>(), &(*(tint_symbol_2)));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_3 : vec3<u32>;
|
||||
frexp_53d417(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_4 : vec3<u32>;
|
||||
frexp_53d417(&(tint_symbol_4));
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_5 : vec3<u32>;
|
||||
frexp_53d417(&(tint_symbol_5));
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -1,75 +0,0 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 40
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%20 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %frexp_53d417 "frexp_53d417"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%uint = OpTypeInt 32 0
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%_ptr_Private_v3uint = OpTypePointer Private %v3uint
|
||||
%9 = OpConstantNull %v3uint
|
||||
%arg_1 = OpVariable %_ptr_Private_v3uint Private %9
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%13 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %13
|
||||
%void = OpTypeVoid
|
||||
%14 = OpTypeFunction %void
|
||||
%v3float = OpTypeVector %float 3
|
||||
%21 = OpConstantNull %v3float
|
||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||
%25 = OpTypeFunction %void %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%frexp_53d417 = OpFunction %void None %14
|
||||
%17 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v3float Function %21
|
||||
%18 = OpExtInst %v3float %20 Frexp %21 %arg_1
|
||||
OpStore %res %18
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %25
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%28 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %14
|
||||
%30 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%32 = OpFunctionCall %void %frexp_53d417
|
||||
%33 = OpFunctionCall %void %tint_symbol_2 %13
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %14
|
||||
%35 = OpLabel
|
||||
%36 = OpFunctionCall %void %frexp_53d417
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %14
|
||||
%38 = OpLabel
|
||||
%39 = OpFunctionCall %void %frexp_53d417
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -1,21 +0,0 @@
|
|||
var<private> arg_1 : vec3<u32>;
|
||||
|
||||
fn frexp_53d417() {
|
||||
var res : vec3<f32> = frexp(vec3<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_53d417();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_53d417();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_53d417();
|
||||
}
|
|
@ -1,31 +1,28 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_5a141e() {
|
||||
var arg_1 : vec3<i32>;
|
||||
var res : vec3<f32> = frexp(vec3<f32>(), &(arg_1));
|
||||
}
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
void frexp_5a141e() {
|
||||
int3 arg_1 = 0;
|
||||
float3 res = frexp(float3(), *(&(arg_1)));
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
frexp_5a141e();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
fragment void fragment_main() {
|
||||
frexp_5a141e();
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
kernel void compute_main() {
|
||||
frexp_5a141e();
|
||||
return;
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
||||
|
|
|
@ -1,46 +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/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// fn frexp(vec<3, f32>, ptr<function, vec<3, u32>, read>) -> vec<3, f32>
|
||||
fn frexp_64e816() {
|
||||
var arg_1: vec3<u32>;
|
||||
var res: vec3<f32> = frexp(vec3<f32>(), &arg_1);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_64e816();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_64e816();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_64e816();
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
void frexp_64e816() {
|
||||
uint3 arg_1 = uint3(0u, 0u, 0u);
|
||||
float3 tint_tmp;
|
||||
float3 tint_tmp_1 = frexp(float3(0.0f, 0.0f, 0.0f), tint_tmp);
|
||||
arg_1 = uint3(tint_tmp);
|
||||
float3 res = tint_tmp_1;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
frexp_64e816();
|
||||
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
frexp_64e816();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
frexp_64e816();
|
||||
return;
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_64e816() {
|
||||
var arg_1 : vec3<u32>;
|
||||
var res : vec3<f32> = frexp(vec3<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
frexp_64e816();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_64e816();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_64e816();
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -1,75 +0,0 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 40
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%20 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %frexp_64e816 "frexp_64e816"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%8 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%uint = OpTypeInt 32 0
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
|
||||
%17 = OpConstantNull %v3uint
|
||||
%v3float = OpTypeVector %float 3
|
||||
%21 = OpConstantNull %v3float
|
||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||
%25 = OpTypeFunction %void %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%frexp_64e816 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%arg_1 = OpVariable %_ptr_Function_v3uint Function %17
|
||||
%res = OpVariable %_ptr_Function_v3float Function %21
|
||||
%18 = OpExtInst %v3float %20 Frexp %21 %arg_1
|
||||
OpStore %res %18
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %25
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%28 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%30 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%32 = OpFunctionCall %void %frexp_64e816
|
||||
%33 = OpFunctionCall %void %tint_symbol_2 %8
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%35 = OpLabel
|
||||
%36 = OpFunctionCall %void %frexp_64e816
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%38 = OpLabel
|
||||
%39 = OpFunctionCall %void %frexp_64e816
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -1,20 +0,0 @@
|
|||
fn frexp_64e816() {
|
||||
var arg_1 : vec3<u32>;
|
||||
var res : vec3<f32> = frexp(vec3<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_64e816();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_64e816();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_64e816();
|
||||
}
|
|
@ -1,46 +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/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// fn frexp(vec<4, f32>, ptr<function, vec<4, u32>, write>) -> vec<4, f32>
|
||||
fn frexp_68fc89() {
|
||||
var arg_1: vec4<u32>;
|
||||
var res: vec4<f32> = frexp(vec4<f32>(), &arg_1);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_68fc89();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_68fc89();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_68fc89();
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
void frexp_68fc89() {
|
||||
uint4 arg_1 = uint4(0u, 0u, 0u, 0u);
|
||||
float4 tint_tmp;
|
||||
float4 tint_tmp_1 = frexp(float4(0.0f, 0.0f, 0.0f, 0.0f), tint_tmp);
|
||||
arg_1 = uint4(tint_tmp);
|
||||
float4 res = tint_tmp_1;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
frexp_68fc89();
|
||||
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
frexp_68fc89();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
frexp_68fc89();
|
||||
return;
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_68fc89() {
|
||||
var arg_1 : vec4<u32>;
|
||||
var res : vec4<f32> = frexp(vec4<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
frexp_68fc89();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_68fc89();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_68fc89();
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -1,73 +0,0 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 38
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%19 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %frexp_68fc89 "frexp_68fc89"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%8 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%uint = OpTypeInt 32 0
|
||||
%v4uint = OpTypeVector %uint 4
|
||||
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
|
||||
%17 = OpConstantNull %v4uint
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%23 = OpTypeFunction %void %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%frexp_68fc89 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%arg_1 = OpVariable %_ptr_Function_v4uint Function %17
|
||||
%res = OpVariable %_ptr_Function_v4float Function %8
|
||||
%18 = OpExtInst %v4float %19 Frexp %8 %arg_1
|
||||
OpStore %res %18
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %23
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%26 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%28 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%30 = OpFunctionCall %void %frexp_68fc89
|
||||
%31 = OpFunctionCall %void %tint_symbol_2 %8
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%33 = OpLabel
|
||||
%34 = OpFunctionCall %void %frexp_68fc89
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%36 = OpLabel
|
||||
%37 = OpFunctionCall %void %frexp_68fc89
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -1,20 +0,0 @@
|
|||
fn frexp_68fc89() {
|
||||
var arg_1 : vec4<u32>;
|
||||
var res : vec4<f32> = frexp(vec4<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_68fc89();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_68fc89();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_68fc89();
|
||||
}
|
|
@ -1,35 +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/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var<workgroup> arg_1: vec3<u32>;
|
||||
|
||||
// fn frexp(vec<3, f32>, ptr<workgroup, vec<3, u32>, read_write>) -> vec<3, f32>
|
||||
fn frexp_6be229() {
|
||||
var res: vec3<f32> = frexp(vec3<f32>(), &arg_1);
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_6be229();
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
groupshared uint3 arg_1;
|
||||
|
||||
void frexp_6be229() {
|
||||
float3 tint_tmp;
|
||||
float3 tint_tmp_1 = frexp(float3(0.0f, 0.0f, 0.0f), tint_tmp);
|
||||
arg_1 = uint3(tint_tmp);
|
||||
float3 res = tint_tmp_1;
|
||||
}
|
||||
|
||||
struct tint_symbol_1 {
|
||||
uint local_invocation_index : SV_GroupIndex;
|
||||
};
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main(tint_symbol_1 tint_symbol) {
|
||||
const uint local_invocation_index = tint_symbol.local_invocation_index;
|
||||
if ((local_invocation_index == 0u)) {
|
||||
arg_1 = uint3(0u, 0u, 0u);
|
||||
}
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
frexp_6be229();
|
||||
return;
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_6be229(tint_symbol_2 : ptr<workgroup, vec3<u32>>) {
|
||||
var res : vec3<f32> = frexp(vec3<f32>(), &(*(tint_symbol_2)));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_3 : vec3<u32>;
|
||||
frexp_6be229(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_4 : vec3<u32>;
|
||||
frexp_6be229(&(tint_symbol_4));
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_5 : vec3<u32>;
|
||||
frexp_6be229(&(tint_symbol_5));
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -1,54 +0,0 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 32
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%14 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %compute_main "compute_main" %tint_symbol
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %frexp_6be229 "frexp_6be229"
|
||||
OpName %res "res"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_symbol BuiltIn LocalInvocationIndex
|
||||
%uint = OpTypeInt 32 0
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%_ptr_Workgroup_v3uint = OpTypePointer Workgroup %v3uint
|
||||
%arg_1 = OpVariable %_ptr_Workgroup_v3uint Workgroup
|
||||
%_ptr_Input_uint = OpTypePointer Input %uint
|
||||
%tint_symbol = OpVariable %_ptr_Input_uint Input
|
||||
%void = OpTypeVoid
|
||||
%7 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%v3float = OpTypeVector %float 3
|
||||
%15 = OpConstantNull %v3float
|
||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%bool = OpTypeBool
|
||||
%27 = OpConstantNull %v3uint
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%uint_264 = OpConstant %uint 264
|
||||
%frexp_6be229 = OpFunction %void None %7
|
||||
%10 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v3float Function %15
|
||||
%11 = OpExtInst %v3float %14 Frexp %15 %arg_1
|
||||
OpStore %res %11
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %7
|
||||
%20 = OpLabel
|
||||
%21 = OpLoad %uint %tint_symbol
|
||||
%23 = OpIEqual %bool %21 %uint_0
|
||||
OpSelectionMerge %25 None
|
||||
OpBranchConditional %23 %26 %25
|
||||
%26 = OpLabel
|
||||
OpStore %arg_1 %27
|
||||
OpBranch %25
|
||||
%25 = OpLabel
|
||||
OpControlBarrier %uint_2 %uint_2 %uint_264
|
||||
%31 = OpFunctionCall %void %frexp_6be229
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -1,10 +0,0 @@
|
|||
var<workgroup> arg_1 : vec3<u32>;
|
||||
|
||||
fn frexp_6be229() {
|
||||
var res : vec3<f32> = frexp(vec3<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_6be229();
|
||||
}
|
|
@ -1,31 +1,28 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_6d0058() {
|
||||
var arg_1 : vec3<i32>;
|
||||
var res : vec3<f32> = frexp(vec3<f32>(), &(arg_1));
|
||||
}
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
void frexp_6d0058() {
|
||||
int3 arg_1 = 0;
|
||||
float3 res = frexp(float3(), *(&(arg_1)));
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
frexp_6d0058();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
fragment void fragment_main() {
|
||||
frexp_6d0058();
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
kernel void compute_main() {
|
||||
frexp_6d0058();
|
||||
return;
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
||||
|
|
|
@ -1,33 +1,30 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_6efa09(tint_symbol_2 : ptr<private, vec3<i32>>) {
|
||||
var res : vec3<f32> = frexp(vec3<f32>(), &(*(tint_symbol_2)));
|
||||
}
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_3 : vec3<i32>;
|
||||
void frexp_6efa09(thread int3* const tint_symbol_2) {
|
||||
float3 res = frexp(float3(), *(&(*(tint_symbol_2))));
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
thread int3 tint_symbol_3 = 0;
|
||||
frexp_6efa09(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_4 : vec3<i32>;
|
||||
fragment void fragment_main() {
|
||||
thread int3 tint_symbol_4 = 0;
|
||||
frexp_6efa09(&(tint_symbol_4));
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_5 : vec3<i32>;
|
||||
kernel void compute_main() {
|
||||
thread int3 tint_symbol_5 = 0;
|
||||
frexp_6efa09(&(tint_symbol_5));
|
||||
return;
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
||||
|
|
|
@ -1,46 +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/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// fn frexp(vec<4, f32>, ptr<function, vec<4, u32>, read>) -> vec<4, f32>
|
||||
fn frexp_6f0e62() {
|
||||
var arg_1: vec4<u32>;
|
||||
var res: vec4<f32> = frexp(vec4<f32>(), &arg_1);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_6f0e62();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_6f0e62();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_6f0e62();
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
void frexp_6f0e62() {
|
||||
uint4 arg_1 = uint4(0u, 0u, 0u, 0u);
|
||||
float4 tint_tmp;
|
||||
float4 tint_tmp_1 = frexp(float4(0.0f, 0.0f, 0.0f, 0.0f), tint_tmp);
|
||||
arg_1 = uint4(tint_tmp);
|
||||
float4 res = tint_tmp_1;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
frexp_6f0e62();
|
||||
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
frexp_6f0e62();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
frexp_6f0e62();
|
||||
return;
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_6f0e62() {
|
||||
var arg_1 : vec4<u32>;
|
||||
var res : vec4<f32> = frexp(vec4<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
frexp_6f0e62();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_6f0e62();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_6f0e62();
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -1,73 +0,0 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 38
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%19 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %frexp_6f0e62 "frexp_6f0e62"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%8 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%uint = OpTypeInt 32 0
|
||||
%v4uint = OpTypeVector %uint 4
|
||||
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
|
||||
%17 = OpConstantNull %v4uint
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%23 = OpTypeFunction %void %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%frexp_6f0e62 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%arg_1 = OpVariable %_ptr_Function_v4uint Function %17
|
||||
%res = OpVariable %_ptr_Function_v4float Function %8
|
||||
%18 = OpExtInst %v4float %19 Frexp %8 %arg_1
|
||||
OpStore %res %18
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %23
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%26 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%28 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%30 = OpFunctionCall %void %frexp_6f0e62
|
||||
%31 = OpFunctionCall %void %tint_symbol_2 %8
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%33 = OpLabel
|
||||
%34 = OpFunctionCall %void %frexp_6f0e62
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%36 = OpLabel
|
||||
%37 = OpFunctionCall %void %frexp_6f0e62
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -1,20 +0,0 @@
|
|||
fn frexp_6f0e62() {
|
||||
var arg_1 : vec4<u32>;
|
||||
var res : vec4<f32> = frexp(vec4<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_6f0e62();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_6f0e62();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_6f0e62();
|
||||
}
|
|
@ -1,46 +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/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// fn frexp(f32, ptr<function, u32, write>) -> f32
|
||||
fn frexp_790800() {
|
||||
var arg_1: u32;
|
||||
var res: f32 = frexp(1.0, &arg_1);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_790800();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_790800();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_790800();
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
void frexp_790800() {
|
||||
uint arg_1 = 0u;
|
||||
float tint_tmp;
|
||||
float tint_tmp_1 = frexp(1.0f, tint_tmp);
|
||||
arg_1 = uint(tint_tmp);
|
||||
float res = tint_tmp_1;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
frexp_790800();
|
||||
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
frexp_790800();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
frexp_790800();
|
||||
return;
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_790800() {
|
||||
var arg_1 : u32;
|
||||
var res : f32 = frexp(1.0, &(arg_1));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
frexp_790800();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_790800();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_790800();
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -1,72 +0,0 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 37
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%18 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %frexp_790800 "frexp_790800"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%8 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||
%16 = OpConstantNull %uint
|
||||
%float_1 = OpConstant %float 1
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%23 = OpTypeFunction %void %v4float
|
||||
%frexp_790800 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%arg_1 = OpVariable %_ptr_Function_uint Function %16
|
||||
%res = OpVariable %_ptr_Function_float Function %4
|
||||
%17 = OpExtInst %float %18 Frexp %float_1 %arg_1
|
||||
OpStore %res %17
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %23
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%26 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%28 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%29 = OpFunctionCall %void %frexp_790800
|
||||
%30 = OpFunctionCall %void %tint_symbol_2 %8
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%32 = OpLabel
|
||||
%33 = OpFunctionCall %void %frexp_790800
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%35 = OpLabel
|
||||
%36 = OpFunctionCall %void %frexp_790800
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -1,20 +0,0 @@
|
|||
fn frexp_790800() {
|
||||
var arg_1 : u32;
|
||||
var res : f32 = frexp(1.0, &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_790800();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_790800();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_790800();
|
||||
}
|
|
@ -1,35 +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/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var<workgroup> arg_1: vec4<u32>;
|
||||
|
||||
// fn frexp(vec<4, f32>, ptr<workgroup, vec<4, u32>, read_write>) -> vec<4, f32>
|
||||
fn frexp_841515() {
|
||||
var res: vec4<f32> = frexp(vec4<f32>(), &arg_1);
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_841515();
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
groupshared uint4 arg_1;
|
||||
|
||||
void frexp_841515() {
|
||||
float4 tint_tmp;
|
||||
float4 tint_tmp_1 = frexp(float4(0.0f, 0.0f, 0.0f, 0.0f), tint_tmp);
|
||||
arg_1 = uint4(tint_tmp);
|
||||
float4 res = tint_tmp_1;
|
||||
}
|
||||
|
||||
struct tint_symbol_1 {
|
||||
uint local_invocation_index : SV_GroupIndex;
|
||||
};
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main(tint_symbol_1 tint_symbol) {
|
||||
const uint local_invocation_index = tint_symbol.local_invocation_index;
|
||||
if ((local_invocation_index == 0u)) {
|
||||
arg_1 = uint4(0u, 0u, 0u, 0u);
|
||||
}
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
frexp_841515();
|
||||
return;
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_841515(tint_symbol_2 : ptr<workgroup, vec4<u32>>) {
|
||||
var res : vec4<f32> = frexp(vec4<f32>(), &(*(tint_symbol_2)));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_3 : vec4<u32>;
|
||||
frexp_841515(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_4 : vec4<u32>;
|
||||
frexp_841515(&(tint_symbol_4));
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_5 : vec4<u32>;
|
||||
frexp_841515(&(tint_symbol_5));
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -1,54 +0,0 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 32
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%14 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %compute_main "compute_main" %tint_symbol
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %frexp_841515 "frexp_841515"
|
||||
OpName %res "res"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_symbol BuiltIn LocalInvocationIndex
|
||||
%uint = OpTypeInt 32 0
|
||||
%v4uint = OpTypeVector %uint 4
|
||||
%_ptr_Workgroup_v4uint = OpTypePointer Workgroup %v4uint
|
||||
%arg_1 = OpVariable %_ptr_Workgroup_v4uint Workgroup
|
||||
%_ptr_Input_uint = OpTypePointer Input %uint
|
||||
%tint_symbol = OpVariable %_ptr_Input_uint Input
|
||||
%void = OpTypeVoid
|
||||
%7 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%15 = OpConstantNull %v4float
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%bool = OpTypeBool
|
||||
%27 = OpConstantNull %v4uint
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%uint_264 = OpConstant %uint 264
|
||||
%frexp_841515 = OpFunction %void None %7
|
||||
%10 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v4float Function %15
|
||||
%11 = OpExtInst %v4float %14 Frexp %15 %arg_1
|
||||
OpStore %res %11
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %7
|
||||
%20 = OpLabel
|
||||
%21 = OpLoad %uint %tint_symbol
|
||||
%23 = OpIEqual %bool %21 %uint_0
|
||||
OpSelectionMerge %25 None
|
||||
OpBranchConditional %23 %26 %25
|
||||
%26 = OpLabel
|
||||
OpStore %arg_1 %27
|
||||
OpBranch %25
|
||||
%25 = OpLabel
|
||||
OpControlBarrier %uint_2 %uint_2 %uint_264
|
||||
%31 = OpFunctionCall %void %frexp_841515
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -1,10 +0,0 @@
|
|||
var<workgroup> arg_1 : vec4<u32>;
|
||||
|
||||
fn frexp_841515() {
|
||||
var res : vec4<f32> = frexp(vec4<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_841515();
|
||||
}
|
|
@ -1,35 +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/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var<workgroup> arg_1: u32;
|
||||
|
||||
// fn frexp(f32, ptr<workgroup, u32, read_write>) -> f32
|
||||
fn frexp_8b3191() {
|
||||
var res: f32 = frexp(1.0, &arg_1);
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_8b3191();
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
groupshared uint arg_1;
|
||||
|
||||
void frexp_8b3191() {
|
||||
float tint_tmp;
|
||||
float tint_tmp_1 = frexp(1.0f, tint_tmp);
|
||||
arg_1 = uint(tint_tmp);
|
||||
float res = tint_tmp_1;
|
||||
}
|
||||
|
||||
struct tint_symbol_1 {
|
||||
uint local_invocation_index : SV_GroupIndex;
|
||||
};
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main(tint_symbol_1 tint_symbol) {
|
||||
const uint local_invocation_index = tint_symbol.local_invocation_index;
|
||||
if ((local_invocation_index == 0u)) {
|
||||
arg_1 = 0u;
|
||||
}
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
frexp_8b3191();
|
||||
return;
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_8b3191(tint_symbol_2 : ptr<workgroup, u32>) {
|
||||
var res : f32 = frexp(1.0, &(*(tint_symbol_2)));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_3 : u32;
|
||||
frexp_8b3191(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_4 : u32;
|
||||
frexp_8b3191(&(tint_symbol_4));
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_5 : u32;
|
||||
frexp_8b3191(&(tint_symbol_5));
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -1,53 +0,0 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 31
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%12 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %compute_main "compute_main" %tint_symbol
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %frexp_8b3191 "frexp_8b3191"
|
||||
OpName %res "res"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_symbol BuiltIn LocalInvocationIndex
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
|
||||
%arg_1 = OpVariable %_ptr_Workgroup_uint Workgroup
|
||||
%_ptr_Input_uint = OpTypePointer Input %uint
|
||||
%tint_symbol = OpVariable %_ptr_Input_uint Input
|
||||
%void = OpTypeVoid
|
||||
%6 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%float_1 = OpConstant %float 1
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%17 = OpConstantNull %float
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%bool = OpTypeBool
|
||||
%26 = OpConstantNull %uint
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%uint_264 = OpConstant %uint 264
|
||||
%frexp_8b3191 = OpFunction %void None %6
|
||||
%9 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_float Function %17
|
||||
%10 = OpExtInst %float %12 Frexp %float_1 %arg_1
|
||||
OpStore %res %10
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %6
|
||||
%19 = OpLabel
|
||||
%20 = OpLoad %uint %tint_symbol
|
||||
%22 = OpIEqual %bool %20 %uint_0
|
||||
OpSelectionMerge %24 None
|
||||
OpBranchConditional %22 %25 %24
|
||||
%25 = OpLabel
|
||||
OpStore %arg_1 %26
|
||||
OpBranch %24
|
||||
%24 = OpLabel
|
||||
OpControlBarrier %uint_2 %uint_2 %uint_264
|
||||
%30 = OpFunctionCall %void %frexp_8b3191
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -1,10 +0,0 @@
|
|||
var<workgroup> arg_1 : u32;
|
||||
|
||||
fn frexp_8b3191() {
|
||||
var res : f32 = frexp(1.0, &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_8b3191();
|
||||
}
|
|
@ -1,33 +1,30 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_a2a617(tint_symbol_2 : ptr<private, i32>) {
|
||||
var res : f32 = frexp(1.0, &(*(tint_symbol_2)));
|
||||
}
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_3 : i32;
|
||||
void frexp_a2a617(thread int* const tint_symbol_2) {
|
||||
float res = frexp(1.0f, *(&(*(tint_symbol_2))));
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
thread int tint_symbol_3 = 0;
|
||||
frexp_a2a617(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_4 : i32;
|
||||
fragment void fragment_main() {
|
||||
thread int tint_symbol_4 = 0;
|
||||
frexp_a2a617(&(tint_symbol_4));
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_5 : i32;
|
||||
kernel void compute_main() {
|
||||
thread int tint_symbol_5 = 0;
|
||||
frexp_a2a617(&(tint_symbol_5));
|
||||
return;
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
||||
|
|
|
@ -1,33 +1,60 @@
|
|||
SKIP: FAILED
|
||||
|
||||
#include <metal_stdlib>
|
||||
|
||||
fn frexp_a3f940(tint_symbol_2 : ptr<workgroup, vec2<i32>>) {
|
||||
var res : vec2<f32> = frexp(vec2<f32>(), &(*(tint_symbol_2)));
|
||||
using namespace metal;
|
||||
void frexp_a3f940(threadgroup int2* const tint_symbol_1) {
|
||||
float2 res = frexp(float2(), *(&(*(tint_symbol_1))));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_3 : vec2<i32>;
|
||||
frexp_a3f940(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
|
||||
threadgroup int2 tint_symbol_2;
|
||||
if ((local_invocation_index == 0u)) {
|
||||
tint_symbol_2 = int2();
|
||||
}
|
||||
threadgroup_barrier(mem_flags::mem_threadgroup);
|
||||
frexp_a3f940(&(tint_symbol_2));
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_4 : vec2<i32>;
|
||||
frexp_a3f940(&(tint_symbol_4));
|
||||
}
|
||||
Compilation failed:
|
||||
|
||||
program_source:5:16: error: no matching function for call to 'frexp'
|
||||
float2 res = frexp(float2(), *(&(*(tint_symbol_1))));
|
||||
^~~~~
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:4804:19: note: candidate function not viable: address space mismatch in 2nd argument ('threadgroup int2' (vector of 2 'int' values)), parameter type must be 'metal::int2 &' (aka 'int2 &')
|
||||
METAL_FUNC float2 frexp(float2 x, thread int2 &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:3092:17: note: candidate function not viable: no known conversion from 'float2' (vector of 2 'float' values) to 'half' for 1st argument
|
||||
METAL_FUNC half frexp(half x, thread int &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:3336:18: note: candidate function not viable: no known conversion from 'float2' (vector of 2 'float' values) to 'metal::half2' (aka 'half2') for 1st argument
|
||||
METAL_FUNC half2 frexp(half2 x, thread int2 &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:3580:18: note: candidate function not viable: no known conversion from 'float2' (vector of 2 'float' values) to 'metal::half3' (aka 'half3') for 1st argument
|
||||
METAL_FUNC half3 frexp(half3 x, thread int3 &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:3824:18: note: candidate function not viable: no known conversion from 'float2' (vector of 2 'float' values) to 'metal::half4' (aka 'half4') for 1st argument
|
||||
METAL_FUNC half4 frexp(half4 x, thread int4 &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:4560:18: note: candidate function not viable: no known conversion from 'float2' (vector of 2 'float' values) to 'float' for 1st argument
|
||||
METAL_FUNC float frexp(float x, thread int &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:5048:19: note: candidate function not viable: no known conversion from 'float2' (vector of 2 'float' values) to 'metal::float3' (aka 'float3') for 1st argument
|
||||
METAL_FUNC float3 frexp(float3 x, thread int3 &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:5292:19: note: candidate function not viable: no known conversion from 'float2' (vector of 2 'float' values) to 'metal::float4' (aka 'float4') for 1st argument
|
||||
METAL_FUNC float4 frexp(float4 x, thread int4 &exp)
|
||||
^
|
||||
program_source:10:31: warning: equality comparison with extraneous parentheses
|
||||
if ((local_invocation_index == 0u)) {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~^~~~~
|
||||
program_source:10:31: note: remove extraneous parentheses around the comparison to silence this warning
|
||||
if ((local_invocation_index == 0u)) {
|
||||
~ ^ ~
|
||||
program_source:10:31: note: use '=' to turn this equality comparison into an assignment
|
||||
if ((local_invocation_index == 0u)) {
|
||||
^~
|
||||
=
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_5 : vec2<i32>;
|
||||
frexp_a3f940(&(tint_symbol_5));
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
||||
|
|
|
@ -1,31 +1,28 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_a951b5() {
|
||||
var arg_1 : vec2<i32>;
|
||||
var res : vec2<f32> = frexp(vec2<f32>(), &(arg_1));
|
||||
}
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
void frexp_a951b5() {
|
||||
int2 arg_1 = 0;
|
||||
float2 res = frexp(float2(), *(&(arg_1)));
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
frexp_a951b5();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
fragment void fragment_main() {
|
||||
frexp_a951b5();
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
kernel void compute_main() {
|
||||
frexp_a951b5();
|
||||
return;
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
||||
|
|
|
@ -1,46 +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/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// fn frexp(f32, ptr<function, u32, read_write>) -> f32
|
||||
fn frexp_b2f24a() {
|
||||
var arg_1: u32;
|
||||
var res: f32 = frexp(1.0, &arg_1);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_b2f24a();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_b2f24a();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_b2f24a();
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
void frexp_b2f24a() {
|
||||
uint arg_1 = 0u;
|
||||
float tint_tmp;
|
||||
float tint_tmp_1 = frexp(1.0f, tint_tmp);
|
||||
arg_1 = uint(tint_tmp);
|
||||
float res = tint_tmp_1;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
frexp_b2f24a();
|
||||
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
frexp_b2f24a();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
frexp_b2f24a();
|
||||
return;
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_b2f24a() {
|
||||
var arg_1 : u32;
|
||||
var res : f32 = frexp(1.0, &(arg_1));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
frexp_b2f24a();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_b2f24a();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_b2f24a();
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -1,72 +0,0 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 37
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%18 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %frexp_b2f24a "frexp_b2f24a"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%8 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||
%16 = OpConstantNull %uint
|
||||
%float_1 = OpConstant %float 1
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%23 = OpTypeFunction %void %v4float
|
||||
%frexp_b2f24a = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%arg_1 = OpVariable %_ptr_Function_uint Function %16
|
||||
%res = OpVariable %_ptr_Function_float Function %4
|
||||
%17 = OpExtInst %float %18 Frexp %float_1 %arg_1
|
||||
OpStore %res %17
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %23
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%26 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%28 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%29 = OpFunctionCall %void %frexp_b2f24a
|
||||
%30 = OpFunctionCall %void %tint_symbol_2 %8
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%32 = OpLabel
|
||||
%33 = OpFunctionCall %void %frexp_b2f24a
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%35 = OpLabel
|
||||
%36 = OpFunctionCall %void %frexp_b2f24a
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -1,20 +0,0 @@
|
|||
fn frexp_b2f24a() {
|
||||
var arg_1 : u32;
|
||||
var res : f32 = frexp(1.0, &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_b2f24a();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_b2f24a();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_b2f24a();
|
||||
}
|
|
@ -1,33 +1,30 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_b45525(tint_symbol_2 : ptr<private, vec4<i32>>) {
|
||||
var res : vec4<f32> = frexp(vec4<f32>(), &(*(tint_symbol_2)));
|
||||
}
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_3 : vec4<i32>;
|
||||
void frexp_b45525(thread int4* const tint_symbol_2) {
|
||||
float4 res = frexp(float4(), *(&(*(tint_symbol_2))));
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
thread int4 tint_symbol_3 = 0;
|
||||
frexp_b45525(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_4 : vec4<i32>;
|
||||
fragment void fragment_main() {
|
||||
thread int4 tint_symbol_4 = 0;
|
||||
frexp_b45525(&(tint_symbol_4));
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_5 : vec4<i32>;
|
||||
kernel void compute_main() {
|
||||
thread int4 tint_symbol_5 = 0;
|
||||
frexp_b45525(&(tint_symbol_5));
|
||||
return;
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
||||
|
|
|
@ -1,46 +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/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var<private> arg_1: u32;
|
||||
|
||||
// fn frexp(f32, ptr<private, u32, read_write>) -> f32
|
||||
fn frexp_b7bcbb() {
|
||||
var res: f32 = frexp(1.0, &arg_1);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_b7bcbb();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_b7bcbb();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_b7bcbb();
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
static uint arg_1 = 0u;
|
||||
|
||||
void frexp_b7bcbb() {
|
||||
float tint_tmp;
|
||||
float tint_tmp_1 = frexp(1.0f, tint_tmp);
|
||||
arg_1 = uint(tint_tmp);
|
||||
float res = tint_tmp_1;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
frexp_b7bcbb();
|
||||
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
frexp_b7bcbb();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
frexp_b7bcbb();
|
||||
return;
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_b7bcbb(tint_symbol_2 : ptr<private, u32>) {
|
||||
var res : f32 = frexp(1.0, &(*(tint_symbol_2)));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_3 : u32;
|
||||
frexp_b7bcbb(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_4 : u32;
|
||||
frexp_b7bcbb(&(tint_symbol_4));
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_5 : u32;
|
||||
frexp_b7bcbb(&(tint_symbol_5));
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -1,72 +0,0 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 37
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%18 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %frexp_b7bcbb "frexp_b7bcbb"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Private_uint = OpTypePointer Private %uint
|
||||
%8 = OpConstantNull %uint
|
||||
%arg_1 = OpVariable %_ptr_Private_uint Private %8
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%12 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %12
|
||||
%void = OpTypeVoid
|
||||
%13 = OpTypeFunction %void
|
||||
%float_1 = OpConstant %float 1
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%23 = OpTypeFunction %void %v4float
|
||||
%frexp_b7bcbb = OpFunction %void None %13
|
||||
%16 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_float Function %4
|
||||
%17 = OpExtInst %float %18 Frexp %float_1 %arg_1
|
||||
OpStore %res %17
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %23
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%26 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %13
|
||||
%28 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%29 = OpFunctionCall %void %frexp_b7bcbb
|
||||
%30 = OpFunctionCall %void %tint_symbol_2 %12
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %13
|
||||
%32 = OpLabel
|
||||
%33 = OpFunctionCall %void %frexp_b7bcbb
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %13
|
||||
%35 = OpLabel
|
||||
%36 = OpFunctionCall %void %frexp_b7bcbb
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -1,21 +0,0 @@
|
|||
var<private> arg_1 : u32;
|
||||
|
||||
fn frexp_b7bcbb() {
|
||||
var res : f32 = frexp(1.0, &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_b7bcbb();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_b7bcbb();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_b7bcbb();
|
||||
}
|
|
@ -1,33 +1,60 @@
|
|||
SKIP: FAILED
|
||||
|
||||
#include <metal_stdlib>
|
||||
|
||||
fn frexp_b87f4e(tint_symbol_2 : ptr<workgroup, vec4<i32>>) {
|
||||
var res : vec4<f32> = frexp(vec4<f32>(), &(*(tint_symbol_2)));
|
||||
using namespace metal;
|
||||
void frexp_b87f4e(threadgroup int4* const tint_symbol_1) {
|
||||
float4 res = frexp(float4(), *(&(*(tint_symbol_1))));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_3 : vec4<i32>;
|
||||
frexp_b87f4e(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
kernel void compute_main(uint local_invocation_index [[thread_index_in_threadgroup]]) {
|
||||
threadgroup int4 tint_symbol_2;
|
||||
if ((local_invocation_index == 0u)) {
|
||||
tint_symbol_2 = int4();
|
||||
}
|
||||
threadgroup_barrier(mem_flags::mem_threadgroup);
|
||||
frexp_b87f4e(&(tint_symbol_2));
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_4 : vec4<i32>;
|
||||
frexp_b87f4e(&(tint_symbol_4));
|
||||
}
|
||||
Compilation failed:
|
||||
|
||||
program_source:5:16: error: no matching function for call to 'frexp'
|
||||
float4 res = frexp(float4(), *(&(*(tint_symbol_1))));
|
||||
^~~~~
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:5292:19: note: candidate function not viable: address space mismatch in 2nd argument ('threadgroup int4' (vector of 4 'int' values)), parameter type must be 'metal::int4 &' (aka 'int4 &')
|
||||
METAL_FUNC float4 frexp(float4 x, thread int4 &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:3092:17: note: candidate function not viable: no known conversion from 'float4' (vector of 4 'float' values) to 'half' for 1st argument
|
||||
METAL_FUNC half frexp(half x, thread int &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:3336:18: note: candidate function not viable: no known conversion from 'float4' (vector of 4 'float' values) to 'metal::half2' (aka 'half2') for 1st argument
|
||||
METAL_FUNC half2 frexp(half2 x, thread int2 &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:3580:18: note: candidate function not viable: no known conversion from 'float4' (vector of 4 'float' values) to 'metal::half3' (aka 'half3') for 1st argument
|
||||
METAL_FUNC half3 frexp(half3 x, thread int3 &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:3824:18: note: candidate function not viable: no known conversion from 'float4' (vector of 4 'float' values) to 'metal::half4' (aka 'half4') for 1st argument
|
||||
METAL_FUNC half4 frexp(half4 x, thread int4 &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:4560:18: note: candidate function not viable: no known conversion from 'float4' (vector of 4 'float' values) to 'float' for 1st argument
|
||||
METAL_FUNC float frexp(float x, thread int &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:4804:19: note: candidate function not viable: no known conversion from 'float4' (vector of 4 'float' values) to 'metal::float2' (aka 'float2') for 1st argument
|
||||
METAL_FUNC float2 frexp(float2 x, thread int2 &exp)
|
||||
^
|
||||
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_math:5048:19: note: candidate function not viable: no known conversion from 'float4' (vector of 4 'float' values) to 'metal::float3' (aka 'float3') for 1st argument
|
||||
METAL_FUNC float3 frexp(float3 x, thread int3 &exp)
|
||||
^
|
||||
program_source:10:31: warning: equality comparison with extraneous parentheses
|
||||
if ((local_invocation_index == 0u)) {
|
||||
~~~~~~~~~~~~~~~~~~~~~~~^~~~~
|
||||
program_source:10:31: note: remove extraneous parentheses around the comparison to silence this warning
|
||||
if ((local_invocation_index == 0u)) {
|
||||
~ ^ ~
|
||||
program_source:10:31: note: use '=' to turn this equality comparison into an assignment
|
||||
if ((local_invocation_index == 0u)) {
|
||||
^~
|
||||
=
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_5 : vec4<i32>;
|
||||
frexp_b87f4e(&(tint_symbol_5));
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
||||
|
|
|
@ -1,31 +1,28 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_b9e4de() {
|
||||
var arg_1 : vec3<i32>;
|
||||
var res : vec3<f32> = frexp(vec3<f32>(), &(arg_1));
|
||||
}
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
void frexp_b9e4de() {
|
||||
int3 arg_1 = 0;
|
||||
float3 res = frexp(float3(), *(&(arg_1)));
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
frexp_b9e4de();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
fragment void fragment_main() {
|
||||
frexp_b9e4de();
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
kernel void compute_main() {
|
||||
frexp_b9e4de();
|
||||
return;
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
||||
|
|
|
@ -1,33 +1,30 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_c084e3(tint_symbol_2 : ptr<private, vec2<i32>>) {
|
||||
var res : vec2<f32> = frexp(vec2<f32>(), &(*(tint_symbol_2)));
|
||||
}
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_3 : vec2<i32>;
|
||||
void frexp_c084e3(thread int2* const tint_symbol_2) {
|
||||
float2 res = frexp(float2(), *(&(*(tint_symbol_2))));
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
thread int2 tint_symbol_3 = 0;
|
||||
frexp_c084e3(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_4 : vec2<i32>;
|
||||
fragment void fragment_main() {
|
||||
thread int2 tint_symbol_4 = 0;
|
||||
frexp_c084e3(&(tint_symbol_4));
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_5 : vec2<i32>;
|
||||
kernel void compute_main() {
|
||||
thread int2 tint_symbol_5 = 0;
|
||||
frexp_c084e3(&(tint_symbol_5));
|
||||
return;
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
||||
|
|
|
@ -1,46 +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/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// fn frexp(vec<3, f32>, ptr<function, vec<3, u32>, write>) -> vec<3, f32>
|
||||
fn frexp_c51019() {
|
||||
var arg_1: vec3<u32>;
|
||||
var res: vec3<f32> = frexp(vec3<f32>(), &arg_1);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_c51019();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_c51019();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_c51019();
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
void frexp_c51019() {
|
||||
uint3 arg_1 = uint3(0u, 0u, 0u);
|
||||
float3 tint_tmp;
|
||||
float3 tint_tmp_1 = frexp(float3(0.0f, 0.0f, 0.0f), tint_tmp);
|
||||
arg_1 = uint3(tint_tmp);
|
||||
float3 res = tint_tmp_1;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
frexp_c51019();
|
||||
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
frexp_c51019();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
frexp_c51019();
|
||||
return;
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_c51019() {
|
||||
var arg_1 : vec3<u32>;
|
||||
var res : vec3<f32> = frexp(vec3<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
frexp_c51019();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_c51019();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_c51019();
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -1,75 +0,0 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 40
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%20 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %frexp_c51019 "frexp_c51019"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%8 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%uint = OpTypeInt 32 0
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
|
||||
%17 = OpConstantNull %v3uint
|
||||
%v3float = OpTypeVector %float 3
|
||||
%21 = OpConstantNull %v3float
|
||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||
%25 = OpTypeFunction %void %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%frexp_c51019 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%arg_1 = OpVariable %_ptr_Function_v3uint Function %17
|
||||
%res = OpVariable %_ptr_Function_v3float Function %21
|
||||
%18 = OpExtInst %v3float %20 Frexp %21 %arg_1
|
||||
OpStore %res %18
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %25
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%28 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%30 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%32 = OpFunctionCall %void %frexp_c51019
|
||||
%33 = OpFunctionCall %void %tint_symbol_2 %8
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%35 = OpLabel
|
||||
%36 = OpFunctionCall %void %frexp_c51019
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%38 = OpLabel
|
||||
%39 = OpFunctionCall %void %frexp_c51019
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -1,20 +0,0 @@
|
|||
fn frexp_c51019() {
|
||||
var arg_1 : vec3<u32>;
|
||||
var res : vec3<f32> = frexp(vec3<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_c51019();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_c51019();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_c51019();
|
||||
}
|
|
@ -1,31 +1,28 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_d06c2c() {
|
||||
var arg_1 : vec2<i32>;
|
||||
var res : vec2<f32> = frexp(vec2<f32>(), &(arg_1));
|
||||
}
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
void frexp_d06c2c() {
|
||||
int2 arg_1 = 0;
|
||||
float2 res = frexp(float2(), *(&(arg_1)));
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
frexp_d06c2c();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
fragment void fragment_main() {
|
||||
frexp_d06c2c();
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
kernel void compute_main() {
|
||||
frexp_d06c2c();
|
||||
return;
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
||||
|
|
|
@ -1,46 +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/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var<private> arg_1: vec4<u32>;
|
||||
|
||||
// fn frexp(vec<4, f32>, ptr<private, vec<4, u32>, read_write>) -> vec<4, f32>
|
||||
fn frexp_d14b16() {
|
||||
var res: vec4<f32> = frexp(vec4<f32>(), &arg_1);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_d14b16();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_d14b16();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_d14b16();
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
static uint4 arg_1 = uint4(0u, 0u, 0u, 0u);
|
||||
|
||||
void frexp_d14b16() {
|
||||
float4 tint_tmp;
|
||||
float4 tint_tmp_1 = frexp(float4(0.0f, 0.0f, 0.0f, 0.0f), tint_tmp);
|
||||
arg_1 = uint4(tint_tmp);
|
||||
float4 res = tint_tmp_1;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
frexp_d14b16();
|
||||
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
frexp_d14b16();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
frexp_d14b16();
|
||||
return;
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_d14b16(tint_symbol_2 : ptr<private, vec4<u32>>) {
|
||||
var res : vec4<f32> = frexp(vec4<f32>(), &(*(tint_symbol_2)));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_3 : vec4<u32>;
|
||||
frexp_d14b16(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_4 : vec4<u32>;
|
||||
frexp_d14b16(&(tint_symbol_4));
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_5 : vec4<u32>;
|
||||
frexp_d14b16(&(tint_symbol_5));
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -1,73 +0,0 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 38
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%19 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %frexp_d14b16 "frexp_d14b16"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%uint = OpTypeInt 32 0
|
||||
%v4uint = OpTypeVector %uint 4
|
||||
%_ptr_Private_v4uint = OpTypePointer Private %v4uint
|
||||
%9 = OpConstantNull %v4uint
|
||||
%arg_1 = OpVariable %_ptr_Private_v4uint Private %9
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%13 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %13
|
||||
%void = OpTypeVoid
|
||||
%14 = OpTypeFunction %void
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%23 = OpTypeFunction %void %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%frexp_d14b16 = OpFunction %void None %14
|
||||
%17 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v4float Function %13
|
||||
%18 = OpExtInst %v4float %19 Frexp %13 %arg_1
|
||||
OpStore %res %18
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %23
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%26 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %14
|
||||
%28 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%30 = OpFunctionCall %void %frexp_d14b16
|
||||
%31 = OpFunctionCall %void %tint_symbol_2 %13
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %14
|
||||
%33 = OpLabel
|
||||
%34 = OpFunctionCall %void %frexp_d14b16
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %14
|
||||
%36 = OpLabel
|
||||
%37 = OpFunctionCall %void %frexp_d14b16
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -1,21 +0,0 @@
|
|||
var<private> arg_1 : vec4<u32>;
|
||||
|
||||
fn frexp_d14b16() {
|
||||
var res : vec4<f32> = frexp(vec4<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_d14b16();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_d14b16();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_d14b16();
|
||||
}
|
|
@ -1,46 +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/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// fn frexp(vec<2, f32>, ptr<function, vec<2, u32>, write>) -> vec<2, f32>
|
||||
fn frexp_d68011() {
|
||||
var arg_1: vec2<u32>;
|
||||
var res: vec2<f32> = frexp(vec2<f32>(), &arg_1);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_d68011();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_d68011();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_d68011();
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
void frexp_d68011() {
|
||||
uint2 arg_1 = uint2(0u, 0u);
|
||||
float2 tint_tmp;
|
||||
float2 tint_tmp_1 = frexp(float2(0.0f, 0.0f), tint_tmp);
|
||||
arg_1 = uint2(tint_tmp);
|
||||
float2 res = tint_tmp_1;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
frexp_d68011();
|
||||
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
frexp_d68011();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
frexp_d68011();
|
||||
return;
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_d68011() {
|
||||
var arg_1 : vec2<u32>;
|
||||
var res : vec2<f32> = frexp(vec2<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
frexp_d68011();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_d68011();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_d68011();
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -1,75 +0,0 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 40
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%20 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %frexp_d68011 "frexp_d68011"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%8 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%uint = OpTypeInt 32 0
|
||||
%v2uint = OpTypeVector %uint 2
|
||||
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
|
||||
%17 = OpConstantNull %v2uint
|
||||
%v2float = OpTypeVector %float 2
|
||||
%21 = OpConstantNull %v2float
|
||||
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
||||
%25 = OpTypeFunction %void %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%frexp_d68011 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%arg_1 = OpVariable %_ptr_Function_v2uint Function %17
|
||||
%res = OpVariable %_ptr_Function_v2float Function %21
|
||||
%18 = OpExtInst %v2float %20 Frexp %21 %arg_1
|
||||
OpStore %res %18
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %25
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%28 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%30 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%32 = OpFunctionCall %void %frexp_d68011
|
||||
%33 = OpFunctionCall %void %tint_symbol_2 %8
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%35 = OpLabel
|
||||
%36 = OpFunctionCall %void %frexp_d68011
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%38 = OpLabel
|
||||
%39 = OpFunctionCall %void %frexp_d68011
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -1,20 +0,0 @@
|
|||
fn frexp_d68011() {
|
||||
var arg_1 : vec2<u32>;
|
||||
var res : vec2<f32> = frexp(vec2<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_d68011();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_d68011();
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
frexp_d68011();
|
||||
}
|
|
@ -1,31 +1,28 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_e061dd() {
|
||||
var arg_1 : i32;
|
||||
var res : f32 = frexp(1.0, &(arg_1));
|
||||
}
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
void frexp_e061dd() {
|
||||
int arg_1 = 0;
|
||||
float res = frexp(1.0f, *(&(arg_1)));
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
frexp_e061dd();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
tint_symbol const tint_symbol_1 = {.value=float4()};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
fragment void fragment_main() {
|
||||
frexp_e061dd();
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1)]]
|
||||
fn compute_main() {
|
||||
kernel void compute_main() {
|
||||
frexp_e061dd();
|
||||
return;
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue