Const eval for `inverseSqrt`
This CL adds const-eval for the `inverseSqrt` builtin. Bug: tint:1581 Change-Id: Ieef063416a8033b5fac9396e30c76c20b3360a90 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111581 Reviewed-by: Antonio Maiorano <amaiorano@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
parent
a6670833cd
commit
7736153c15
|
@ -487,8 +487,8 @@ fn fract<N: num, T: f32_f16>(vec<N, T>) -> vec<N, T>
|
|||
@stage("fragment") fn fwidthFine<N: num>(vec<N, f32>) -> vec<N, f32>
|
||||
@const fn insertBits<T: iu32>(T, T, u32, u32) -> T
|
||||
@const fn insertBits<N: num, T: iu32>(vec<N, T>, vec<N, T>, u32, u32) -> vec<N, T>
|
||||
fn inverseSqrt<T: f32_f16>(T) -> T
|
||||
fn inverseSqrt<N: num, T: f32_f16>(vec<N, T>) -> vec<N, T>
|
||||
@const fn inverseSqrt<T: fa_f32_f16>(T) -> T
|
||||
@const fn inverseSqrt<N: num, T: fa_f32_f16>(vec<N, T>) -> vec<N, T>
|
||||
fn ldexp<T: f32_f16>(T, i32) -> T
|
||||
fn ldexp<N: num, T: f32_f16>(vec<N, T>, vec<N, i32>) -> vec<N, T>
|
||||
@const fn length<T: fa_f32_f16>(@test_value(0.0) T) -> T
|
||||
|
|
|
@ -2529,6 +2529,40 @@ ConstEval::Result ConstEval::insertBits(const sem::Type* ty,
|
|||
return TransformElements(builder, ty, transform, args[0], args[1]);
|
||||
}
|
||||
|
||||
ConstEval::Result ConstEval::inverseSqrt(const sem::Type* ty,
|
||||
utils::VectorRef<const sem::Constant*> args,
|
||||
const Source& source) {
|
||||
auto transform = [&](const sem::Constant* c0) {
|
||||
auto create = [&](auto e) -> ImplResult {
|
||||
using NumberT = decltype(e);
|
||||
|
||||
if (e <= NumberT(0)) {
|
||||
AddError("inverseSqrt must be called with a value > 0", source);
|
||||
return utils::Failure;
|
||||
}
|
||||
|
||||
auto err = [&] {
|
||||
AddNote("when calculating inverseSqrt", source);
|
||||
return utils::Failure;
|
||||
};
|
||||
|
||||
auto s = Sqrt(source, e);
|
||||
if (!s) {
|
||||
return err();
|
||||
}
|
||||
auto div = Div(source, NumberT(1), s.Get());
|
||||
if (!div) {
|
||||
return err();
|
||||
}
|
||||
|
||||
return CreateElement(builder, source, c0->Type(), div.Get());
|
||||
};
|
||||
return Dispatch_fa_f32_f16(create, c0);
|
||||
};
|
||||
|
||||
return TransformElements(builder, ty, transform, args[0]);
|
||||
}
|
||||
|
||||
ConstEval::Result ConstEval::length(const sem::Type* ty,
|
||||
utils::VectorRef<const sem::Constant*> args,
|
||||
const Source& source) {
|
||||
|
|
|
@ -638,6 +638,15 @@ class ConstEval {
|
|||
utils::VectorRef<const sem::Constant*> args,
|
||||
const Source& source);
|
||||
|
||||
/// inverseSqrt builtin
|
||||
/// @param ty the expression type
|
||||
/// @param args the input arguments
|
||||
/// @param source the source location
|
||||
/// @return the result value, or null if the value cannot be calculated
|
||||
Result inverseSqrt(const sem::Type* ty,
|
||||
utils::VectorRef<const sem::Constant*> args,
|
||||
const Source& source);
|
||||
|
||||
/// length builtin
|
||||
/// @param ty the expression type
|
||||
/// @param args the input arguments
|
||||
|
|
|
@ -1183,6 +1183,28 @@ INSTANTIATE_TEST_SUITE_P( //
|
|||
testing::ValuesIn(Concat(InsertBitsCases<i32>(), //
|
||||
InsertBitsCases<u32>()))));
|
||||
|
||||
template <typename T>
|
||||
std::vector<Case> InverseSqrtCases() {
|
||||
std::vector<Case> cases = {
|
||||
C({T(25)}, T(.2)),
|
||||
|
||||
// Vector tests
|
||||
C({Vec(T(25), T(100))}, Vec(T(.2), T(.1))),
|
||||
|
||||
E({T(0)}, "12:34 error: inverseSqrt must be called with a value > 0"),
|
||||
E({-T(0)}, "12:34 error: inverseSqrt must be called with a value > 0"),
|
||||
E({-T(25)}, "12:34 error: inverseSqrt must be called with a value > 0"),
|
||||
};
|
||||
return cases;
|
||||
}
|
||||
INSTANTIATE_TEST_SUITE_P( //
|
||||
InverseSqrt,
|
||||
ResolverConstEvalBuiltinTest,
|
||||
testing::Combine(testing::Values(sem::BuiltinType::kInverseSqrt),
|
||||
testing::ValuesIn(Concat(InverseSqrtCases<AFloat>(), //
|
||||
InverseSqrtCases<f32>(),
|
||||
InverseSqrtCases<f16>()))));
|
||||
|
||||
template <typename T>
|
||||
std::vector<Case> DegreesAFloatCases() {
|
||||
return std::vector<Case>{
|
||||
|
|
|
@ -12678,24 +12678,24 @@ constexpr OverloadInfo kOverloads[] = {
|
|||
/* num parameters */ 1,
|
||||
/* num template types */ 1,
|
||||
/* num template numbers */ 0,
|
||||
/* template types */ &kTemplateTypes[26],
|
||||
/* template types */ &kTemplateTypes[23],
|
||||
/* template numbers */ &kTemplateNumbers[10],
|
||||
/* parameters */ &kParameters[870],
|
||||
/* return matcher indices */ &kMatcherIndices[3],
|
||||
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
|
||||
/* const eval */ nullptr,
|
||||
/* const eval */ &ConstEval::inverseSqrt,
|
||||
},
|
||||
{
|
||||
/* [364] */
|
||||
/* num parameters */ 1,
|
||||
/* num template types */ 1,
|
||||
/* num template numbers */ 1,
|
||||
/* template types */ &kTemplateTypes[26],
|
||||
/* template types */ &kTemplateTypes[23],
|
||||
/* template numbers */ &kTemplateNumbers[4],
|
||||
/* parameters */ &kParameters[871],
|
||||
/* return matcher indices */ &kMatcherIndices[30],
|
||||
/* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
|
||||
/* const eval */ nullptr,
|
||||
/* const eval */ &ConstEval::inverseSqrt,
|
||||
},
|
||||
{
|
||||
/* [365] */
|
||||
|
@ -14294,8 +14294,8 @@ constexpr IntrinsicInfo kBuiltins[] = {
|
|||
},
|
||||
{
|
||||
/* [45] */
|
||||
/* fn inverseSqrt<T : f32_f16>(T) -> T */
|
||||
/* fn inverseSqrt<N : num, T : f32_f16>(vec<N, T>) -> vec<N, T> */
|
||||
/* fn inverseSqrt<T : fa_f32_f16>(T) -> T */
|
||||
/* fn inverseSqrt<N : num, T : fa_f32_f16>(vec<N, T>) -> vec<N, T> */
|
||||
/* num overloads */ 2,
|
||||
/* overloads */ &kOverloads[363],
|
||||
},
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
// Copyright 2022 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/src/cmd/gen
|
||||
// using the template:
|
||||
// test/tint/builtins/gen/gen.wgsl.tmpl
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// fn inverseSqrt(vec<4, fa>) -> vec<4, fa>
|
||||
fn inverseSqrt_07a6fe() {
|
||||
var res = inverseSqrt(vec4(1.));
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
inverseSqrt_07a6fe();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void inverseSqrt_07a6fe() {
|
||||
float4 res = (1.0f).xxxx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
inverseSqrt_07a6fe();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void inverseSqrt_07a6fe() {
|
||||
float4 res = (1.0f).xxxx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
inverseSqrt_07a6fe();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
#version 310 es
|
||||
|
||||
void inverseSqrt_07a6fe() {
|
||||
vec4 res = vec4(1.0f);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
return vec4(0.0f);
|
||||
}
|
||||
|
||||
void main() {
|
||||
gl_PointSize = 1.0;
|
||||
vec4 inner_result = vertex_main();
|
||||
gl_Position = inner_result;
|
||||
gl_Position.y = -(gl_Position.y);
|
||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
void inverseSqrt_07a6fe() {
|
||||
vec4 res = vec4(1.0f);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
|
||||
void inverseSqrt_07a6fe() {
|
||||
vec4 res = vec4(1.0f);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void main() {
|
||||
compute_main();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
void inverseSqrt_07a6fe() {
|
||||
float4 res = float4(1.0f);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
inverseSqrt_07a6fe();
|
||||
return float4(0.0f);
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
float4 const inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = {};
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
fragment void fragment_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 30
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %inverseSqrt_07a6fe "inverseSqrt_07a6fe"
|
||||
OpName %res "res"
|
||||
OpName %vertex_main_inner "vertex_main_inner"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %value BuiltIn Position
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%8 = OpConstantNull %float
|
||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%float_1 = OpConstant %float 1
|
||||
%14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%17 = OpTypeFunction %v4float
|
||||
%inverseSqrt_07a6fe = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v4float Function %5
|
||||
OpStore %res %14
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %17
|
||||
%19 = OpLabel
|
||||
%20 = OpFunctionCall %void %inverseSqrt_07a6fe
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%22 = OpLabel
|
||||
%23 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %23
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%25 = OpLabel
|
||||
%26 = OpFunctionCall %void %inverseSqrt_07a6fe
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%28 = OpLabel
|
||||
%29 = OpFunctionCall %void %inverseSqrt_07a6fe
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,19 @@
|
|||
fn inverseSqrt_07a6fe() {
|
||||
var res = inverseSqrt(vec4(1.0));
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
inverseSqrt_07a6fe();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
void inverseSqrt_440300() {
|
||||
float16_t res = rsqrt(float16_t(1.0h));
|
||||
float16_t res = float16_t(1.0h);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void inverseSqrt_440300() {
|
||||
float16_t res = inversesqrt(1.0hf);
|
||||
float16_t res = 1.0hf;
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
|
@ -23,7 +23,7 @@ void main() {
|
|||
precision mediump float;
|
||||
|
||||
void inverseSqrt_440300() {
|
||||
float16_t res = inversesqrt(1.0hf);
|
||||
float16_t res = 1.0hf;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
|
@ -38,7 +38,7 @@ void main() {
|
|||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void inverseSqrt_440300() {
|
||||
float16_t res = inversesqrt(1.0hf);
|
||||
float16_t res = 1.0hf;
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
using namespace metal;
|
||||
void inverseSqrt_440300() {
|
||||
half res = rsqrt(1.0h);
|
||||
half res = 1.0h;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 34
|
||||
; Bound: 32
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpCapability Float16
|
||||
OpCapability UniformAndStorageBuffer16BitAccess
|
||||
OpCapability StorageBuffer16BitAccess
|
||||
OpCapability StorageInputOutput16
|
||||
%15 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
|
@ -38,35 +37,34 @@
|
|||
%half = OpTypeFloat 16
|
||||
%half_0x1p_0 = OpConstant %half 0x1p+0
|
||||
%_ptr_Function_half = OpTypePointer Function %half
|
||||
%19 = OpConstantNull %half
|
||||
%20 = OpTypeFunction %v4float
|
||||
%17 = OpConstantNull %half
|
||||
%18 = OpTypeFunction %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%inverseSqrt_440300 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_half Function %19
|
||||
%13 = OpExtInst %half %15 InverseSqrt %half_0x1p_0
|
||||
OpStore %res %13
|
||||
%res = OpVariable %_ptr_Function_half Function %17
|
||||
OpStore %res %half_0x1p_0
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %20
|
||||
%22 = OpLabel
|
||||
%23 = OpFunctionCall %void %inverseSqrt_440300
|
||||
%vertex_main_inner = OpFunction %v4float None %18
|
||||
%20 = OpLabel
|
||||
%21 = OpFunctionCall %void %inverseSqrt_440300
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%25 = OpLabel
|
||||
%26 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %26
|
||||
%23 = OpLabel
|
||||
%24 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %24
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%29 = OpLabel
|
||||
%30 = OpFunctionCall %void %inverseSqrt_440300
|
||||
%27 = OpLabel
|
||||
%28 = OpFunctionCall %void %inverseSqrt_440300
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%32 = OpLabel
|
||||
%33 = OpFunctionCall %void %inverseSqrt_440300
|
||||
%30 = OpLabel
|
||||
%31 = OpFunctionCall %void %inverseSqrt_440300
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
// Copyright 2022 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/src/cmd/gen
|
||||
// using the template:
|
||||
// test/tint/builtins/gen/gen.wgsl.tmpl
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// fn inverseSqrt(fa) -> fa
|
||||
fn inverseSqrt_4ca6d6() {
|
||||
var res = inverseSqrt(1.);
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
inverseSqrt_4ca6d6();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
inverseSqrt_4ca6d6();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
inverseSqrt_4ca6d6();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void inverseSqrt_4ca6d6() {
|
||||
float res = 1.0f;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
inverseSqrt_4ca6d6();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
inverseSqrt_4ca6d6();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
inverseSqrt_4ca6d6();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void inverseSqrt_4ca6d6() {
|
||||
float res = 1.0f;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
inverseSqrt_4ca6d6();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
inverseSqrt_4ca6d6();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
inverseSqrt_4ca6d6();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
#version 310 es
|
||||
|
||||
void inverseSqrt_4ca6d6() {
|
||||
float res = 1.0f;
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
inverseSqrt_4ca6d6();
|
||||
return vec4(0.0f);
|
||||
}
|
||||
|
||||
void main() {
|
||||
gl_PointSize = 1.0;
|
||||
vec4 inner_result = vertex_main();
|
||||
gl_Position = inner_result;
|
||||
gl_Position.y = -(gl_Position.y);
|
||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
void inverseSqrt_4ca6d6() {
|
||||
float res = 1.0f;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
inverseSqrt_4ca6d6();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
|
||||
void inverseSqrt_4ca6d6() {
|
||||
float res = 1.0f;
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
inverseSqrt_4ca6d6();
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void main() {
|
||||
compute_main();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
void inverseSqrt_4ca6d6() {
|
||||
float res = 1.0f;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
inverseSqrt_4ca6d6();
|
||||
return float4(0.0f);
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
float4 const inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = {};
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
fragment void fragment_main() {
|
||||
inverseSqrt_4ca6d6();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
inverseSqrt_4ca6d6();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 29
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %inverseSqrt_4ca6d6 "inverseSqrt_4ca6d6"
|
||||
OpName %res "res"
|
||||
OpName %vertex_main_inner "vertex_main_inner"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %value BuiltIn Position
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%8 = OpConstantNull %float
|
||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%float_1 = OpConstant %float 1
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%16 = OpTypeFunction %v4float
|
||||
%inverseSqrt_4ca6d6 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_float Function %8
|
||||
OpStore %res %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %16
|
||||
%18 = OpLabel
|
||||
%19 = OpFunctionCall %void %inverseSqrt_4ca6d6
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%21 = OpLabel
|
||||
%22 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %22
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%24 = OpLabel
|
||||
%25 = OpFunctionCall %void %inverseSqrt_4ca6d6
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%27 = OpLabel
|
||||
%28 = OpFunctionCall %void %inverseSqrt_4ca6d6
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,19 @@
|
|||
fn inverseSqrt_4ca6d6() {
|
||||
var res = inverseSqrt(1.0);
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
inverseSqrt_4ca6d6();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
inverseSqrt_4ca6d6();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
inverseSqrt_4ca6d6();
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
void inverseSqrt_5f51f8() {
|
||||
vector<float16_t, 2> res = rsqrt((float16_t(1.0h)).xx);
|
||||
vector<float16_t, 2> res = (float16_t(1.0h)).xx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void inverseSqrt_5f51f8() {
|
||||
f16vec2 res = inversesqrt(f16vec2(1.0hf));
|
||||
f16vec2 res = f16vec2(1.0hf);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
|
@ -23,7 +23,7 @@ void main() {
|
|||
precision mediump float;
|
||||
|
||||
void inverseSqrt_5f51f8() {
|
||||
f16vec2 res = inversesqrt(f16vec2(1.0hf));
|
||||
f16vec2 res = f16vec2(1.0hf);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
|
@ -38,7 +38,7 @@ void main() {
|
|||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void inverseSqrt_5f51f8() {
|
||||
f16vec2 res = inversesqrt(f16vec2(1.0hf));
|
||||
f16vec2 res = f16vec2(1.0hf);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
using namespace metal;
|
||||
void inverseSqrt_5f51f8() {
|
||||
half2 res = rsqrt(half2(1.0h));
|
||||
half2 res = half2(1.0h);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 36
|
||||
; Bound: 34
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpCapability Float16
|
||||
OpCapability UniformAndStorageBuffer16BitAccess
|
||||
OpCapability StorageBuffer16BitAccess
|
||||
OpCapability StorageInputOutput16
|
||||
%16 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
|
@ -38,37 +37,36 @@
|
|||
%half = OpTypeFloat 16
|
||||
%v2half = OpTypeVector %half 2
|
||||
%half_0x1p_0 = OpConstant %half 0x1p+0
|
||||
%18 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0
|
||||
%16 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0
|
||||
%_ptr_Function_v2half = OpTypePointer Function %v2half
|
||||
%21 = OpConstantNull %v2half
|
||||
%22 = OpTypeFunction %v4float
|
||||
%19 = OpConstantNull %v2half
|
||||
%20 = OpTypeFunction %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%inverseSqrt_5f51f8 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v2half Function %21
|
||||
%13 = OpExtInst %v2half %16 InverseSqrt %18
|
||||
OpStore %res %13
|
||||
%res = OpVariable %_ptr_Function_v2half Function %19
|
||||
OpStore %res %16
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %22
|
||||
%24 = OpLabel
|
||||
%25 = OpFunctionCall %void %inverseSqrt_5f51f8
|
||||
%vertex_main_inner = OpFunction %v4float None %20
|
||||
%22 = OpLabel
|
||||
%23 = OpFunctionCall %void %inverseSqrt_5f51f8
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%27 = OpLabel
|
||||
%28 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %28
|
||||
%25 = OpLabel
|
||||
%26 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %26
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%31 = OpLabel
|
||||
%32 = OpFunctionCall %void %inverseSqrt_5f51f8
|
||||
%29 = OpLabel
|
||||
%30 = OpFunctionCall %void %inverseSqrt_5f51f8
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%34 = OpLabel
|
||||
%35 = OpFunctionCall %void %inverseSqrt_5f51f8
|
||||
%32 = OpLabel
|
||||
%33 = OpFunctionCall %void %inverseSqrt_5f51f8
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
// Copyright 2022 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/src/cmd/gen
|
||||
// using the template:
|
||||
// test/tint/builtins/gen/gen.wgsl.tmpl
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// fn inverseSqrt(vec<3, fa>) -> vec<3, fa>
|
||||
fn inverseSqrt_6d0783() {
|
||||
var res = inverseSqrt(vec3(1.));
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
inverseSqrt_6d0783();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
inverseSqrt_6d0783();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
inverseSqrt_6d0783();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void inverseSqrt_6d0783() {
|
||||
float3 res = (1.0f).xxx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
inverseSqrt_6d0783();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
inverseSqrt_6d0783();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
inverseSqrt_6d0783();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void inverseSqrt_6d0783() {
|
||||
float3 res = (1.0f).xxx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
inverseSqrt_6d0783();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
inverseSqrt_6d0783();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
inverseSqrt_6d0783();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
#version 310 es
|
||||
|
||||
void inverseSqrt_6d0783() {
|
||||
vec3 res = vec3(1.0f);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
inverseSqrt_6d0783();
|
||||
return vec4(0.0f);
|
||||
}
|
||||
|
||||
void main() {
|
||||
gl_PointSize = 1.0;
|
||||
vec4 inner_result = vertex_main();
|
||||
gl_Position = inner_result;
|
||||
gl_Position.y = -(gl_Position.y);
|
||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
void inverseSqrt_6d0783() {
|
||||
vec3 res = vec3(1.0f);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
inverseSqrt_6d0783();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
|
||||
void inverseSqrt_6d0783() {
|
||||
vec3 res = vec3(1.0f);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
inverseSqrt_6d0783();
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void main() {
|
||||
compute_main();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
void inverseSqrt_6d0783() {
|
||||
float3 res = float3(1.0f);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
inverseSqrt_6d0783();
|
||||
return float4(0.0f);
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
float4 const inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = {};
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
fragment void fragment_main() {
|
||||
inverseSqrt_6d0783();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
inverseSqrt_6d0783();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 32
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %inverseSqrt_6d0783 "inverseSqrt_6d0783"
|
||||
OpName %res "res"
|
||||
OpName %vertex_main_inner "vertex_main_inner"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %value BuiltIn Position
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%8 = OpConstantNull %float
|
||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%v3float = OpTypeVector %float 3
|
||||
%float_1 = OpConstant %float 1
|
||||
%15 = OpConstantComposite %v3float %float_1 %float_1 %float_1
|
||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||
%18 = OpConstantNull %v3float
|
||||
%19 = OpTypeFunction %v4float
|
||||
%inverseSqrt_6d0783 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v3float Function %18
|
||||
OpStore %res %15
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %19
|
||||
%21 = OpLabel
|
||||
%22 = OpFunctionCall %void %inverseSqrt_6d0783
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%24 = OpLabel
|
||||
%25 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %25
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%27 = OpLabel
|
||||
%28 = OpFunctionCall %void %inverseSqrt_6d0783
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%30 = OpLabel
|
||||
%31 = OpFunctionCall %void %inverseSqrt_6d0783
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,19 @@
|
|||
fn inverseSqrt_6d0783() {
|
||||
var res = inverseSqrt(vec3(1.0));
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
inverseSqrt_6d0783();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
inverseSqrt_6d0783();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
inverseSqrt_6d0783();
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
void inverseSqrt_84407e() {
|
||||
float res = rsqrt(1.0f);
|
||||
float res = 1.0f;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
void inverseSqrt_84407e() {
|
||||
float res = rsqrt(1.0f);
|
||||
float res = 1.0f;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#version 310 es
|
||||
|
||||
void inverseSqrt_84407e() {
|
||||
float res = inversesqrt(1.0f);
|
||||
float res = 1.0f;
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
|
@ -21,7 +21,7 @@ void main() {
|
|||
precision mediump float;
|
||||
|
||||
void inverseSqrt_84407e() {
|
||||
float res = inversesqrt(1.0f);
|
||||
float res = 1.0f;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
|
@ -35,7 +35,7 @@ void main() {
|
|||
#version 310 es
|
||||
|
||||
void inverseSqrt_84407e() {
|
||||
float res = inversesqrt(1.0f);
|
||||
float res = 1.0f;
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
using namespace metal;
|
||||
void inverseSqrt_84407e() {
|
||||
float res = rsqrt(1.0f);
|
||||
float res = 1.0f;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 31
|
||||
; Bound: 29
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%14 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
|
@ -33,33 +32,32 @@
|
|||
%9 = OpTypeFunction %void
|
||||
%float_1 = OpConstant %float 1
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%18 = OpTypeFunction %v4float
|
||||
%16 = OpTypeFunction %v4float
|
||||
%inverseSqrt_84407e = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_float Function %8
|
||||
%13 = OpExtInst %float %14 InverseSqrt %float_1
|
||||
OpStore %res %13
|
||||
OpStore %res %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %18
|
||||
%20 = OpLabel
|
||||
%21 = OpFunctionCall %void %inverseSqrt_84407e
|
||||
%vertex_main_inner = OpFunction %v4float None %16
|
||||
%18 = OpLabel
|
||||
%19 = OpFunctionCall %void %inverseSqrt_84407e
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%23 = OpLabel
|
||||
%24 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %24
|
||||
%21 = OpLabel
|
||||
%22 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %22
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%26 = OpLabel
|
||||
%27 = OpFunctionCall %void %inverseSqrt_84407e
|
||||
%24 = OpLabel
|
||||
%25 = OpFunctionCall %void %inverseSqrt_84407e
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%29 = OpLabel
|
||||
%30 = OpFunctionCall %void %inverseSqrt_84407e
|
||||
%27 = OpLabel
|
||||
%28 = OpFunctionCall %void %inverseSqrt_84407e
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
void inverseSqrt_8f2bd2() {
|
||||
float2 res = rsqrt((1.0f).xx);
|
||||
float2 res = (1.0f).xx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
void inverseSqrt_8f2bd2() {
|
||||
float2 res = rsqrt((1.0f).xx);
|
||||
float2 res = (1.0f).xx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#version 310 es
|
||||
|
||||
void inverseSqrt_8f2bd2() {
|
||||
vec2 res = inversesqrt(vec2(1.0f));
|
||||
vec2 res = vec2(1.0f);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
|
@ -21,7 +21,7 @@ void main() {
|
|||
precision mediump float;
|
||||
|
||||
void inverseSqrt_8f2bd2() {
|
||||
vec2 res = inversesqrt(vec2(1.0f));
|
||||
vec2 res = vec2(1.0f);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
|
@ -35,7 +35,7 @@ void main() {
|
|||
#version 310 es
|
||||
|
||||
void inverseSqrt_8f2bd2() {
|
||||
vec2 res = inversesqrt(vec2(1.0f));
|
||||
vec2 res = vec2(1.0f);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
using namespace metal;
|
||||
void inverseSqrt_8f2bd2() {
|
||||
float2 res = rsqrt(float2(1.0f));
|
||||
float2 res = float2(1.0f);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 34
|
||||
; Bound: 32
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%15 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
|
@ -33,36 +32,35 @@
|
|||
%9 = OpTypeFunction %void
|
||||
%v2float = OpTypeVector %float 2
|
||||
%float_1 = OpConstant %float 1
|
||||
%17 = OpConstantComposite %v2float %float_1 %float_1
|
||||
%15 = OpConstantComposite %v2float %float_1 %float_1
|
||||
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
||||
%20 = OpConstantNull %v2float
|
||||
%21 = OpTypeFunction %v4float
|
||||
%18 = OpConstantNull %v2float
|
||||
%19 = OpTypeFunction %v4float
|
||||
%inverseSqrt_8f2bd2 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v2float Function %20
|
||||
%13 = OpExtInst %v2float %15 InverseSqrt %17
|
||||
OpStore %res %13
|
||||
%res = OpVariable %_ptr_Function_v2float Function %18
|
||||
OpStore %res %15
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %21
|
||||
%23 = OpLabel
|
||||
%24 = OpFunctionCall %void %inverseSqrt_8f2bd2
|
||||
%vertex_main_inner = OpFunction %v4float None %19
|
||||
%21 = OpLabel
|
||||
%22 = OpFunctionCall %void %inverseSqrt_8f2bd2
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%26 = OpLabel
|
||||
%27 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %27
|
||||
%24 = OpLabel
|
||||
%25 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %25
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%29 = OpLabel
|
||||
%30 = OpFunctionCall %void %inverseSqrt_8f2bd2
|
||||
%27 = OpLabel
|
||||
%28 = OpFunctionCall %void %inverseSqrt_8f2bd2
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%32 = OpLabel
|
||||
%33 = OpFunctionCall %void %inverseSqrt_8f2bd2
|
||||
%30 = OpLabel
|
||||
%31 = OpFunctionCall %void %inverseSqrt_8f2bd2
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
void inverseSqrt_b197b1() {
|
||||
float3 res = rsqrt((1.0f).xxx);
|
||||
float3 res = (1.0f).xxx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
void inverseSqrt_b197b1() {
|
||||
float3 res = rsqrt((1.0f).xxx);
|
||||
float3 res = (1.0f).xxx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#version 310 es
|
||||
|
||||
void inverseSqrt_b197b1() {
|
||||
vec3 res = inversesqrt(vec3(1.0f));
|
||||
vec3 res = vec3(1.0f);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
|
@ -21,7 +21,7 @@ void main() {
|
|||
precision mediump float;
|
||||
|
||||
void inverseSqrt_b197b1() {
|
||||
vec3 res = inversesqrt(vec3(1.0f));
|
||||
vec3 res = vec3(1.0f);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
|
@ -35,7 +35,7 @@ void main() {
|
|||
#version 310 es
|
||||
|
||||
void inverseSqrt_b197b1() {
|
||||
vec3 res = inversesqrt(vec3(1.0f));
|
||||
vec3 res = vec3(1.0f);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
using namespace metal;
|
||||
void inverseSqrt_b197b1() {
|
||||
float3 res = rsqrt(float3(1.0f));
|
||||
float3 res = float3(1.0f);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 34
|
||||
; Bound: 32
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%15 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
|
@ -33,36 +32,35 @@
|
|||
%9 = OpTypeFunction %void
|
||||
%v3float = OpTypeVector %float 3
|
||||
%float_1 = OpConstant %float 1
|
||||
%17 = OpConstantComposite %v3float %float_1 %float_1 %float_1
|
||||
%15 = OpConstantComposite %v3float %float_1 %float_1 %float_1
|
||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||
%20 = OpConstantNull %v3float
|
||||
%21 = OpTypeFunction %v4float
|
||||
%18 = OpConstantNull %v3float
|
||||
%19 = OpTypeFunction %v4float
|
||||
%inverseSqrt_b197b1 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v3float Function %20
|
||||
%13 = OpExtInst %v3float %15 InverseSqrt %17
|
||||
OpStore %res %13
|
||||
%res = OpVariable %_ptr_Function_v3float Function %18
|
||||
OpStore %res %15
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %21
|
||||
%23 = OpLabel
|
||||
%24 = OpFunctionCall %void %inverseSqrt_b197b1
|
||||
%vertex_main_inner = OpFunction %v4float None %19
|
||||
%21 = OpLabel
|
||||
%22 = OpFunctionCall %void %inverseSqrt_b197b1
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%26 = OpLabel
|
||||
%27 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %27
|
||||
%24 = OpLabel
|
||||
%25 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %25
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%29 = OpLabel
|
||||
%30 = OpFunctionCall %void %inverseSqrt_b197b1
|
||||
%27 = OpLabel
|
||||
%28 = OpFunctionCall %void %inverseSqrt_b197b1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%32 = OpLabel
|
||||
%33 = OpFunctionCall %void %inverseSqrt_b197b1
|
||||
%30 = OpLabel
|
||||
%31 = OpFunctionCall %void %inverseSqrt_b197b1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
void inverseSqrt_b85ebd() {
|
||||
vector<float16_t, 3> res = rsqrt((float16_t(1.0h)).xxx);
|
||||
vector<float16_t, 3> res = (float16_t(1.0h)).xxx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void inverseSqrt_b85ebd() {
|
||||
f16vec3 res = inversesqrt(f16vec3(1.0hf));
|
||||
f16vec3 res = f16vec3(1.0hf);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
|
@ -23,7 +23,7 @@ void main() {
|
|||
precision mediump float;
|
||||
|
||||
void inverseSqrt_b85ebd() {
|
||||
f16vec3 res = inversesqrt(f16vec3(1.0hf));
|
||||
f16vec3 res = f16vec3(1.0hf);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
|
@ -38,7 +38,7 @@ void main() {
|
|||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void inverseSqrt_b85ebd() {
|
||||
f16vec3 res = inversesqrt(f16vec3(1.0hf));
|
||||
f16vec3 res = f16vec3(1.0hf);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
using namespace metal;
|
||||
void inverseSqrt_b85ebd() {
|
||||
half3 res = rsqrt(half3(1.0h));
|
||||
half3 res = half3(1.0h);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 36
|
||||
; Bound: 34
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpCapability Float16
|
||||
OpCapability UniformAndStorageBuffer16BitAccess
|
||||
OpCapability StorageBuffer16BitAccess
|
||||
OpCapability StorageInputOutput16
|
||||
%16 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
|
@ -38,37 +37,36 @@
|
|||
%half = OpTypeFloat 16
|
||||
%v3half = OpTypeVector %half 3
|
||||
%half_0x1p_0 = OpConstant %half 0x1p+0
|
||||
%18 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
|
||||
%16 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
|
||||
%_ptr_Function_v3half = OpTypePointer Function %v3half
|
||||
%21 = OpConstantNull %v3half
|
||||
%22 = OpTypeFunction %v4float
|
||||
%19 = OpConstantNull %v3half
|
||||
%20 = OpTypeFunction %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%inverseSqrt_b85ebd = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v3half Function %21
|
||||
%13 = OpExtInst %v3half %16 InverseSqrt %18
|
||||
OpStore %res %13
|
||||
%res = OpVariable %_ptr_Function_v3half Function %19
|
||||
OpStore %res %16
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %22
|
||||
%24 = OpLabel
|
||||
%25 = OpFunctionCall %void %inverseSqrt_b85ebd
|
||||
%vertex_main_inner = OpFunction %v4float None %20
|
||||
%22 = OpLabel
|
||||
%23 = OpFunctionCall %void %inverseSqrt_b85ebd
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%27 = OpLabel
|
||||
%28 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %28
|
||||
%25 = OpLabel
|
||||
%26 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %26
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%31 = OpLabel
|
||||
%32 = OpFunctionCall %void %inverseSqrt_b85ebd
|
||||
%29 = OpLabel
|
||||
%30 = OpFunctionCall %void %inverseSqrt_b85ebd
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%34 = OpLabel
|
||||
%35 = OpFunctionCall %void %inverseSqrt_b85ebd
|
||||
%32 = OpLabel
|
||||
%33 = OpFunctionCall %void %inverseSqrt_b85ebd
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
void inverseSqrt_c22347() {
|
||||
float4 res = rsqrt((1.0f).xxxx);
|
||||
float4 res = (1.0f).xxxx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
void inverseSqrt_c22347() {
|
||||
float4 res = rsqrt((1.0f).xxxx);
|
||||
float4 res = (1.0f).xxxx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#version 310 es
|
||||
|
||||
void inverseSqrt_c22347() {
|
||||
vec4 res = inversesqrt(vec4(1.0f));
|
||||
vec4 res = vec4(1.0f);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
|
@ -21,7 +21,7 @@ void main() {
|
|||
precision mediump float;
|
||||
|
||||
void inverseSqrt_c22347() {
|
||||
vec4 res = inversesqrt(vec4(1.0f));
|
||||
vec4 res = vec4(1.0f);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
|
@ -35,7 +35,7 @@ void main() {
|
|||
#version 310 es
|
||||
|
||||
void inverseSqrt_c22347() {
|
||||
vec4 res = inversesqrt(vec4(1.0f));
|
||||
vec4 res = vec4(1.0f);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
using namespace metal;
|
||||
void inverseSqrt_c22347() {
|
||||
float4 res = rsqrt(float4(1.0f));
|
||||
float4 res = float4(1.0f);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 32
|
||||
; Bound: 30
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%14 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
|
@ -32,35 +31,34 @@
|
|||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%float_1 = OpConstant %float 1
|
||||
%16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
|
||||
%14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%19 = OpTypeFunction %v4float
|
||||
%17 = OpTypeFunction %v4float
|
||||
%inverseSqrt_c22347 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v4float Function %5
|
||||
%13 = OpExtInst %v4float %14 InverseSqrt %16
|
||||
OpStore %res %13
|
||||
OpStore %res %14
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %19
|
||||
%21 = OpLabel
|
||||
%22 = OpFunctionCall %void %inverseSqrt_c22347
|
||||
%vertex_main_inner = OpFunction %v4float None %17
|
||||
%19 = OpLabel
|
||||
%20 = OpFunctionCall %void %inverseSqrt_c22347
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%24 = OpLabel
|
||||
%25 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %25
|
||||
%22 = OpLabel
|
||||
%23 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %23
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%27 = OpLabel
|
||||
%28 = OpFunctionCall %void %inverseSqrt_c22347
|
||||
%25 = OpLabel
|
||||
%26 = OpFunctionCall %void %inverseSqrt_c22347
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%30 = OpLabel
|
||||
%31 = OpFunctionCall %void %inverseSqrt_c22347
|
||||
%28 = OpLabel
|
||||
%29 = OpFunctionCall %void %inverseSqrt_c22347
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
void inverseSqrt_cbdc70() {
|
||||
vector<float16_t, 4> res = rsqrt((float16_t(1.0h)).xxxx);
|
||||
vector<float16_t, 4> res = (float16_t(1.0h)).xxxx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void inverseSqrt_cbdc70() {
|
||||
f16vec4 res = inversesqrt(f16vec4(1.0hf));
|
||||
f16vec4 res = f16vec4(1.0hf);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
|
@ -23,7 +23,7 @@ void main() {
|
|||
precision mediump float;
|
||||
|
||||
void inverseSqrt_cbdc70() {
|
||||
f16vec4 res = inversesqrt(f16vec4(1.0hf));
|
||||
f16vec4 res = f16vec4(1.0hf);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
|
@ -38,7 +38,7 @@ void main() {
|
|||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void inverseSqrt_cbdc70() {
|
||||
f16vec4 res = inversesqrt(f16vec4(1.0hf));
|
||||
f16vec4 res = f16vec4(1.0hf);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
using namespace metal;
|
||||
void inverseSqrt_cbdc70() {
|
||||
half4 res = rsqrt(half4(1.0h));
|
||||
half4 res = half4(1.0h);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 36
|
||||
; Bound: 34
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpCapability Float16
|
||||
OpCapability UniformAndStorageBuffer16BitAccess
|
||||
OpCapability StorageBuffer16BitAccess
|
||||
OpCapability StorageInputOutput16
|
||||
%16 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
|
@ -38,37 +37,36 @@
|
|||
%half = OpTypeFloat 16
|
||||
%v4half = OpTypeVector %half 4
|
||||
%half_0x1p_0 = OpConstant %half 0x1p+0
|
||||
%18 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
|
||||
%16 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
|
||||
%_ptr_Function_v4half = OpTypePointer Function %v4half
|
||||
%21 = OpConstantNull %v4half
|
||||
%22 = OpTypeFunction %v4float
|
||||
%19 = OpConstantNull %v4half
|
||||
%20 = OpTypeFunction %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%inverseSqrt_cbdc70 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v4half Function %21
|
||||
%13 = OpExtInst %v4half %16 InverseSqrt %18
|
||||
OpStore %res %13
|
||||
%res = OpVariable %_ptr_Function_v4half Function %19
|
||||
OpStore %res %16
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %22
|
||||
%24 = OpLabel
|
||||
%25 = OpFunctionCall %void %inverseSqrt_cbdc70
|
||||
%vertex_main_inner = OpFunction %v4float None %20
|
||||
%22 = OpLabel
|
||||
%23 = OpFunctionCall %void %inverseSqrt_cbdc70
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%27 = OpLabel
|
||||
%28 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %28
|
||||
%25 = OpLabel
|
||||
%26 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %26
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%31 = OpLabel
|
||||
%32 = OpFunctionCall %void %inverseSqrt_cbdc70
|
||||
%29 = OpLabel
|
||||
%30 = OpFunctionCall %void %inverseSqrt_cbdc70
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%34 = OpLabel
|
||||
%35 = OpFunctionCall %void %inverseSqrt_cbdc70
|
||||
%32 = OpLabel
|
||||
%33 = OpFunctionCall %void %inverseSqrt_cbdc70
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
// Copyright 2022 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/src/cmd/gen
|
||||
// using the template:
|
||||
// test/tint/builtins/gen/gen.wgsl.tmpl
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// fn inverseSqrt(vec<2, fa>) -> vec<2, fa>
|
||||
fn inverseSqrt_f60c1c() {
|
||||
var res = inverseSqrt(vec2(1.));
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
inverseSqrt_f60c1c();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
inverseSqrt_f60c1c();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
inverseSqrt_f60c1c();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void inverseSqrt_f60c1c() {
|
||||
float2 res = (1.0f).xx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
inverseSqrt_f60c1c();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
inverseSqrt_f60c1c();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
inverseSqrt_f60c1c();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void inverseSqrt_f60c1c() {
|
||||
float2 res = (1.0f).xx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
inverseSqrt_f60c1c();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
inverseSqrt_f60c1c();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
inverseSqrt_f60c1c();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
#version 310 es
|
||||
|
||||
void inverseSqrt_f60c1c() {
|
||||
vec2 res = vec2(1.0f);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
inverseSqrt_f60c1c();
|
||||
return vec4(0.0f);
|
||||
}
|
||||
|
||||
void main() {
|
||||
gl_PointSize = 1.0;
|
||||
vec4 inner_result = vertex_main();
|
||||
gl_Position = inner_result;
|
||||
gl_Position.y = -(gl_Position.y);
|
||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
void inverseSqrt_f60c1c() {
|
||||
vec2 res = vec2(1.0f);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
inverseSqrt_f60c1c();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
|
||||
void inverseSqrt_f60c1c() {
|
||||
vec2 res = vec2(1.0f);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
inverseSqrt_f60c1c();
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void main() {
|
||||
compute_main();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
void inverseSqrt_f60c1c() {
|
||||
float2 res = float2(1.0f);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
inverseSqrt_f60c1c();
|
||||
return float4(0.0f);
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
float4 const inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = {};
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
fragment void fragment_main() {
|
||||
inverseSqrt_f60c1c();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
inverseSqrt_f60c1c();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 32
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %inverseSqrt_f60c1c "inverseSqrt_f60c1c"
|
||||
OpName %res "res"
|
||||
OpName %vertex_main_inner "vertex_main_inner"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %value BuiltIn Position
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%8 = OpConstantNull %float
|
||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%v2float = OpTypeVector %float 2
|
||||
%float_1 = OpConstant %float 1
|
||||
%15 = OpConstantComposite %v2float %float_1 %float_1
|
||||
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
||||
%18 = OpConstantNull %v2float
|
||||
%19 = OpTypeFunction %v4float
|
||||
%inverseSqrt_f60c1c = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v2float Function %18
|
||||
OpStore %res %15
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %19
|
||||
%21 = OpLabel
|
||||
%22 = OpFunctionCall %void %inverseSqrt_f60c1c
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%24 = OpLabel
|
||||
%25 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %25
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%27 = OpLabel
|
||||
%28 = OpFunctionCall %void %inverseSqrt_f60c1c
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%30 = OpLabel
|
||||
%31 = OpFunctionCall %void %inverseSqrt_f60c1c
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,19 @@
|
|||
fn inverseSqrt_f60c1c() {
|
||||
var res = inverseSqrt(vec2(1.0));
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
inverseSqrt_f60c1c();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
inverseSqrt_f60c1c();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
inverseSqrt_f60c1c();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void determinant_1bf6e7() {
|
||||
float res = 0.0f;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
determinant_1bf6e7();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
determinant_1bf6e7();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
determinant_1bf6e7();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void determinant_1bf6e7() {
|
||||
float res = 0.0f;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
determinant_1bf6e7();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
determinant_1bf6e7();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
determinant_1bf6e7();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
#version 310 es
|
||||
|
||||
void determinant_1bf6e7() {
|
||||
float res = 0.0f;
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
determinant_1bf6e7();
|
||||
return vec4(0.0f);
|
||||
}
|
||||
|
||||
void main() {
|
||||
gl_PointSize = 1.0;
|
||||
vec4 inner_result = vertex_main();
|
||||
gl_Position = inner_result;
|
||||
gl_Position.y = -(gl_Position.y);
|
||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
void determinant_1bf6e7() {
|
||||
float res = 0.0f;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
determinant_1bf6e7();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
|
||||
void determinant_1bf6e7() {
|
||||
float res = 0.0f;
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
determinant_1bf6e7();
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void main() {
|
||||
compute_main();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
void determinant_1bf6e7() {
|
||||
float res = 0.0f;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
determinant_1bf6e7();
|
||||
return float4(0.0f);
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
float4 const inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = {};
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
fragment void fragment_main() {
|
||||
determinant_1bf6e7();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
determinant_1bf6e7();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 29
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %determinant_1bf6e7 "determinant_1bf6e7"
|
||||
OpName %res "res"
|
||||
OpName %vertex_main_inner "vertex_main_inner"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %value BuiltIn Position
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%8 = OpConstantNull %float
|
||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%15 = OpTypeFunction %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%determinant_1bf6e7 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_float Function %8
|
||||
OpStore %res %8
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %15
|
||||
%17 = OpLabel
|
||||
%18 = OpFunctionCall %void %determinant_1bf6e7
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%20 = OpLabel
|
||||
%21 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %21
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%24 = OpLabel
|
||||
%25 = OpFunctionCall %void %determinant_1bf6e7
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%27 = OpLabel
|
||||
%28 = OpFunctionCall %void %determinant_1bf6e7
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,20 @@
|
|||
fn determinant_1bf6e7() {
|
||||
const arg_0 = mat2x2(1.0, 1.0, 1.0, 1.0);
|
||||
var res = determinant(arg_0);
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
determinant_1bf6e7();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
determinant_1bf6e7();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
determinant_1bf6e7();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void determinant_c8251d() {
|
||||
float res = 0.0f;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
determinant_c8251d();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
determinant_c8251d();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
determinant_c8251d();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void determinant_c8251d() {
|
||||
float res = 0.0f;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
determinant_c8251d();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
determinant_c8251d();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
determinant_c8251d();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
#version 310 es
|
||||
|
||||
void determinant_c8251d() {
|
||||
float res = 0.0f;
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
determinant_c8251d();
|
||||
return vec4(0.0f);
|
||||
}
|
||||
|
||||
void main() {
|
||||
gl_PointSize = 1.0;
|
||||
vec4 inner_result = vertex_main();
|
||||
gl_Position = inner_result;
|
||||
gl_Position.y = -(gl_Position.y);
|
||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
void determinant_c8251d() {
|
||||
float res = 0.0f;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
determinant_c8251d();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
|
||||
void determinant_c8251d() {
|
||||
float res = 0.0f;
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
determinant_c8251d();
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void main() {
|
||||
compute_main();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
void determinant_c8251d() {
|
||||
float res = 0.0f;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
determinant_c8251d();
|
||||
return float4(0.0f);
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
float4 const inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = {};
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
fragment void fragment_main() {
|
||||
determinant_c8251d();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
determinant_c8251d();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 29
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %determinant_c8251d "determinant_c8251d"
|
||||
OpName %res "res"
|
||||
OpName %vertex_main_inner "vertex_main_inner"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %value BuiltIn Position
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%8 = OpConstantNull %float
|
||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%15 = OpTypeFunction %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%determinant_c8251d = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_float Function %8
|
||||
OpStore %res %8
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %15
|
||||
%17 = OpLabel
|
||||
%18 = OpFunctionCall %void %determinant_c8251d
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%20 = OpLabel
|
||||
%21 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %21
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%24 = OpLabel
|
||||
%25 = OpFunctionCall %void %determinant_c8251d
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%27 = OpLabel
|
||||
%28 = OpFunctionCall %void %determinant_c8251d
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,20 @@
|
|||
fn determinant_c8251d() {
|
||||
const arg_0 = mat3x3(1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0);
|
||||
var res = determinant(arg_0);
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
determinant_c8251d();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
determinant_c8251d();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
determinant_c8251d();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void determinant_cefdf3() {
|
||||
float res = 0.0f;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
determinant_cefdf3();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
determinant_cefdf3();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
determinant_cefdf3();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void determinant_cefdf3() {
|
||||
float res = 0.0f;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
determinant_cefdf3();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
determinant_cefdf3();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
determinant_cefdf3();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
#version 310 es
|
||||
|
||||
void determinant_cefdf3() {
|
||||
float res = 0.0f;
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
determinant_cefdf3();
|
||||
return vec4(0.0f);
|
||||
}
|
||||
|
||||
void main() {
|
||||
gl_PointSize = 1.0;
|
||||
vec4 inner_result = vertex_main();
|
||||
gl_Position = inner_result;
|
||||
gl_Position.y = -(gl_Position.y);
|
||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
void determinant_cefdf3() {
|
||||
float res = 0.0f;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
determinant_cefdf3();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
|
||||
void determinant_cefdf3() {
|
||||
float res = 0.0f;
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
determinant_cefdf3();
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void main() {
|
||||
compute_main();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
void determinant_cefdf3() {
|
||||
float res = 0.0f;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
determinant_cefdf3();
|
||||
return float4(0.0f);
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
float4 const inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = {};
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
fragment void fragment_main() {
|
||||
determinant_cefdf3();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
determinant_cefdf3();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 29
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %determinant_cefdf3 "determinant_cefdf3"
|
||||
OpName %res "res"
|
||||
OpName %vertex_main_inner "vertex_main_inner"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %value BuiltIn Position
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%8 = OpConstantNull %float
|
||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%15 = OpTypeFunction %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%determinant_cefdf3 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_float Function %8
|
||||
OpStore %res %8
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %15
|
||||
%17 = OpLabel
|
||||
%18 = OpFunctionCall %void %determinant_cefdf3
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%20 = OpLabel
|
||||
%21 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %21
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%24 = OpLabel
|
||||
%25 = OpFunctionCall %void %determinant_cefdf3
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%27 = OpLabel
|
||||
%28 = OpFunctionCall %void %determinant_cefdf3
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,20 @@
|
|||
fn determinant_cefdf3() {
|
||||
const arg_0 = mat4x4(1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0);
|
||||
var res = determinant(arg_0);
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
determinant_cefdf3();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
determinant_cefdf3();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
determinant_cefdf3();
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
// Copyright 2022 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/src/cmd/gen
|
||||
// using the template:
|
||||
// test/tint/builtins/gen/gen.wgsl.tmpl
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// fn inverseSqrt(vec<4, fa>) -> vec<4, fa>
|
||||
fn inverseSqrt_07a6fe() {
|
||||
const arg_0 = vec4(1.);
|
||||
var res = inverseSqrt(arg_0);
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
inverseSqrt_07a6fe();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void inverseSqrt_07a6fe() {
|
||||
float4 res = (1.0f).xxxx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
inverseSqrt_07a6fe();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void inverseSqrt_07a6fe() {
|
||||
float4 res = (1.0f).xxxx;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
inverseSqrt_07a6fe();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
#version 310 es
|
||||
|
||||
void inverseSqrt_07a6fe() {
|
||||
vec4 res = vec4(1.0f);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
return vec4(0.0f);
|
||||
}
|
||||
|
||||
void main() {
|
||||
gl_PointSize = 1.0;
|
||||
vec4 inner_result = vertex_main();
|
||||
gl_Position = inner_result;
|
||||
gl_Position.y = -(gl_Position.y);
|
||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
void inverseSqrt_07a6fe() {
|
||||
vec4 res = vec4(1.0f);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
|
||||
void inverseSqrt_07a6fe() {
|
||||
vec4 res = vec4(1.0f);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void main() {
|
||||
compute_main();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
void inverseSqrt_07a6fe() {
|
||||
float4 res = float4(1.0f);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
inverseSqrt_07a6fe();
|
||||
return float4(0.0f);
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
float4 const inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = {};
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
fragment void fragment_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 30
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %inverseSqrt_07a6fe "inverseSqrt_07a6fe"
|
||||
OpName %res "res"
|
||||
OpName %vertex_main_inner "vertex_main_inner"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %value BuiltIn Position
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%8 = OpConstantNull %float
|
||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%float_1 = OpConstant %float 1
|
||||
%14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%17 = OpTypeFunction %v4float
|
||||
%inverseSqrt_07a6fe = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v4float Function %5
|
||||
OpStore %res %14
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %17
|
||||
%19 = OpLabel
|
||||
%20 = OpFunctionCall %void %inverseSqrt_07a6fe
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%22 = OpLabel
|
||||
%23 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %23
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%25 = OpLabel
|
||||
%26 = OpFunctionCall %void %inverseSqrt_07a6fe
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%28 = OpLabel
|
||||
%29 = OpFunctionCall %void %inverseSqrt_07a6fe
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,20 @@
|
|||
fn inverseSqrt_07a6fe() {
|
||||
const arg_0 = vec4(1.0);
|
||||
var res = inverseSqrt(arg_0);
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
inverseSqrt_07a6fe();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
inverseSqrt_07a6fe();
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
// Copyright 2022 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/src/cmd/gen
|
||||
// using the template:
|
||||
// test/tint/builtins/gen/gen.wgsl.tmpl
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// fn inverseSqrt(fa) -> fa
|
||||
fn inverseSqrt_4ca6d6() {
|
||||
const arg_0 = 1.;
|
||||
var res = inverseSqrt(arg_0);
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
inverseSqrt_4ca6d6();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
inverseSqrt_4ca6d6();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
inverseSqrt_4ca6d6();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void inverseSqrt_4ca6d6() {
|
||||
float res = 1.0f;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
inverseSqrt_4ca6d6();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
inverseSqrt_4ca6d6();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
inverseSqrt_4ca6d6();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void inverseSqrt_4ca6d6() {
|
||||
float res = 1.0f;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
inverseSqrt_4ca6d6();
|
||||
return (0.0f).xxxx;
|
||||
}
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
const float4 inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
inverseSqrt_4ca6d6();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
inverseSqrt_4ca6d6();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
#version 310 es
|
||||
|
||||
void inverseSqrt_4ca6d6() {
|
||||
float res = 1.0f;
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
inverseSqrt_4ca6d6();
|
||||
return vec4(0.0f);
|
||||
}
|
||||
|
||||
void main() {
|
||||
gl_PointSize = 1.0;
|
||||
vec4 inner_result = vertex_main();
|
||||
gl_Position = inner_result;
|
||||
gl_Position.y = -(gl_Position.y);
|
||||
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
void inverseSqrt_4ca6d6() {
|
||||
float res = 1.0f;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
inverseSqrt_4ca6d6();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
|
||||
void inverseSqrt_4ca6d6() {
|
||||
float res = 1.0f;
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
inverseSqrt_4ca6d6();
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void main() {
|
||||
compute_main();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
void inverseSqrt_4ca6d6() {
|
||||
float res = 1.0f;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
inverseSqrt_4ca6d6();
|
||||
return float4(0.0f);
|
||||
}
|
||||
|
||||
vertex tint_symbol vertex_main() {
|
||||
float4 const inner_result = vertex_main_inner();
|
||||
tint_symbol wrapper_result = {};
|
||||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
|
||||
fragment void fragment_main() {
|
||||
inverseSqrt_4ca6d6();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
inverseSqrt_4ca6d6();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 29
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %value "value"
|
||||
OpName %vertex_point_size "vertex_point_size"
|
||||
OpName %inverseSqrt_4ca6d6 "inverseSqrt_4ca6d6"
|
||||
OpName %res "res"
|
||||
OpName %vertex_main_inner "vertex_main_inner"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %value BuiltIn Position
|
||||
OpDecorate %vertex_point_size BuiltIn PointSize
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%8 = OpConstantNull %float
|
||||
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%float_1 = OpConstant %float 1
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%16 = OpTypeFunction %v4float
|
||||
%inverseSqrt_4ca6d6 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_float Function %8
|
||||
OpStore %res %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %16
|
||||
%18 = OpLabel
|
||||
%19 = OpFunctionCall %void %inverseSqrt_4ca6d6
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%21 = OpLabel
|
||||
%22 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %22
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%24 = OpLabel
|
||||
%25 = OpFunctionCall %void %inverseSqrt_4ca6d6
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%27 = OpLabel
|
||||
%28 = OpFunctionCall %void %inverseSqrt_4ca6d6
|
||||
OpReturn
|
||||
OpFunctionEnd
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue