tint/transform/builtin_polyfill: Don't polyfill @const builtins

We don't want to replace builtins that are constant-expression
evaluated, as the replacement cannot be used as a constant expression.

Fixed: tint:1667
Change-Id: I554d9884fc41890247ee64b47a70621be5fcdbe5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/107680
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
Ben Clayton 2022-10-28 20:46:07 +00:00 committed by Dawn LUCI CQ
parent 23945c5d27
commit 46de10299f
66 changed files with 793 additions and 1088 deletions

View File

@ -569,6 +569,9 @@ bool BuiltinPolyfill::ShouldRun(const Program* program, const DataMap& data) con
for (auto* node : program->ASTNodes().Objects()) {
if (auto* call = sem.Get<sem::Call>(node)) {
if (auto* builtin = call->Target()->As<sem::Builtin>()) {
if (call->Stage() == sem::EvaluationStage::kConstant) {
continue; // Don't polyfill @const expressions
}
switch (builtin->Type()) {
case sem::BuiltinType::kAcosh:
if (builtins.acosh != Level::kNone) {
@ -653,6 +656,9 @@ void BuiltinPolyfill::Run(CloneContext& ctx, const DataMap& data, DataMap&) cons
State s{ctx, builtins};
if (auto* call = s.sem.Get<sem::Call>(expr)) {
if (auto* builtin = call->Target()->As<sem::Builtin>()) {
if (call->Stage() == sem::EvaluationStage::kConstant) {
return nullptr; // Don't polyfill @const expressions
}
Symbol polyfill;
switch (builtin->Type()) {
case sem::BuiltinType::kAcosh:

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,5 @@
float tint_sinh(float x) {
return log((x + sqrt(((x * x) + 1.0f))));
}
void asinh_157447() {
float res = tint_sinh(1.0f);
float res = 0.881373584f;
}
struct tint_symbol {

View File

@ -1,9 +1,5 @@
float tint_sinh(float x) {
return log((x + sqrt(((x * x) + 1.0f))));
}
void asinh_157447() {
float res = tint_sinh(1.0f);
float res = 0.881373584f;
}
struct tint_symbol {

View File

@ -1,9 +1,5 @@
float3 tint_sinh(float3 x) {
return log((x + sqrt(((x * x) + 1.0f))));
}
void asinh_2265ee() {
float3 res = tint_sinh((1.0f).xxx);
float3 res = (0.881373584f).xxx;
}
struct tint_symbol {

View File

@ -1,9 +1,5 @@
float3 tint_sinh(float3 x) {
return log((x + sqrt(((x * x) + 1.0f))));
}
void asinh_2265ee() {
float3 res = tint_sinh((1.0f).xxx);
float3 res = (0.881373584f).xxx;
}
struct tint_symbol {

View File

@ -1,9 +1,5 @@
float16_t tint_sinh(float16_t x) {
return log((x + sqrt(((x * x) + float16_t(1.0h)))));
}
void asinh_468a48() {
float16_t res = tint_sinh(float16_t(0.0h));
float16_t res = float16_t(0.0h);
}
struct tint_symbol {

View File

@ -1,9 +1,5 @@
float2 tint_sinh(float2 x) {
return log((x + sqrt(((x * x) + 1.0f))));
}
void asinh_4a2226() {
float2 res = tint_sinh((1.0f).xx);
float2 res = (0.881373584f).xx;
}
struct tint_symbol {

View File

@ -1,9 +1,5 @@
float2 tint_sinh(float2 x) {
return log((x + sqrt(((x * x) + 1.0f))));
}
void asinh_4a2226() {
float2 res = tint_sinh((1.0f).xx);
float2 res = (0.881373584f).xx;
}
struct tint_symbol {

View File

@ -1,9 +1,5 @@
float4 tint_sinh(float4 x) {
return log((x + sqrt(((x * x) + 1.0f))));
}
void asinh_8d2e51() {
float4 res = tint_sinh((1.0f).xxxx);
float4 res = (0.881373584f).xxxx;
}
struct tint_symbol {

View File

@ -1,9 +1,5 @@
float4 tint_sinh(float4 x) {
return log((x + sqrt(((x * x) + 1.0f))));
}
void asinh_8d2e51() {
float4 res = tint_sinh((1.0f).xxxx);
float4 res = (0.881373584f).xxxx;
}
struct tint_symbol {

View File

@ -1,9 +1,5 @@
vector<float16_t, 4> tint_sinh(vector<float16_t, 4> x) {
return log((x + sqrt(((x * x) + float16_t(1.0h)))));
}
void asinh_95ab2b() {
vector<float16_t, 4> res = tint_sinh((float16_t(0.0h)).xxxx);
vector<float16_t, 4> res = (float16_t(0.0h)).xxxx;
}
struct tint_symbol {

View File

@ -1,9 +1,5 @@
vector<float16_t, 2> tint_sinh(vector<float16_t, 2> x) {
return log((x + sqrt(((x * x) + float16_t(1.0h)))));
}
void asinh_ad8f8b() {
vector<float16_t, 2> res = tint_sinh((float16_t(0.0h)).xx);
vector<float16_t, 2> res = (float16_t(0.0h)).xx;
}
struct tint_symbol {

View File

@ -1,9 +1,5 @@
vector<float16_t, 3> tint_sinh(vector<float16_t, 3> x) {
return log((x + sqrt(((x * x) + float16_t(1.0h)))));
}
void asinh_fb5e8c() {
vector<float16_t, 3> res = tint_sinh((float16_t(0.0h)).xxx);
vector<float16_t, 3> res = (float16_t(0.0h)).xxx;
}
struct tint_symbol {

View File

@ -1,9 +1,5 @@
float3 tint_atanh(float3 x) {
return (log(((1.0f + x) / (1.0f - x))) * 0.5f);
}
void atanh_440cca() {
float3 res = tint_atanh((0.5f).xxx);
float3 res = (0.549306154f).xxx;
}
struct tint_symbol {

View File

@ -1,9 +1,5 @@
float3 tint_atanh(float3 x) {
return (log(((1.0f + x) / (1.0f - x))) * 0.5f);
}
void atanh_440cca() {
float3 res = tint_atanh((0.5f).xxx);
float3 res = (0.549306154f).xxx;
}
struct tint_symbol {

View File

@ -1,11 +1,7 @@
#version 310 es
vec3 tint_atanh(vec3 x) {
return mix(atanh(x), vec3(0.0f), greaterThanEqual(x, vec3(1.0f)));
}
void atanh_440cca() {
vec3 res = tint_atanh(vec3(0.5f));
vec3 res = vec3(0.549306154f);
}
vec4 vertex_main() {
@ -24,12 +20,8 @@ void main() {
#version 310 es
precision mediump float;
vec3 tint_atanh(vec3 x) {
return mix(atanh(x), vec3(0.0f), greaterThanEqual(x, vec3(1.0f)));
}
void atanh_440cca() {
vec3 res = tint_atanh(vec3(0.5f));
vec3 res = vec3(0.549306154f);
}
void fragment_main() {
@ -42,12 +34,8 @@ void main() {
}
#version 310 es
vec3 tint_atanh(vec3 x) {
return mix(atanh(x), vec3(0.0f), greaterThanEqual(x, vec3(1.0f)));
}
void atanh_440cca() {
vec3 res = tint_atanh(vec3(0.5f));
vec3 res = vec3(0.549306154f);
}
void compute_main() {

View File

@ -1,12 +1,8 @@
#include <metal_stdlib>
using namespace metal;
float3 tint_atanh(float3 x) {
return select(atanh(x), float3(0.0f), (x >= float3(1.0f)));
}
void atanh_440cca() {
float3 res = tint_atanh(float3(0.5f));
float3 res = float3(0.549306154f);
}
struct tint_symbol {

View File

@ -1,10 +1,9 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 45
; Bound: 33
; Schema: 0
OpCapability Shader
%22 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
@ -13,8 +12,6 @@
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %tint_atanh "tint_atanh"
OpName %x "x"
OpName %atanh_440cca "atanh_440cca"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
@ -31,53 +28,40 @@
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%v3float = OpTypeVector %float 3
%9 = OpTypeFunction %v3float %v3float
%float_1 = OpConstant %float 1
%16 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%bool = OpTypeBool
%v3bool = OpTypeVector %bool 3
%20 = OpConstantNull %v3float
%void = OpTypeVoid
%23 = OpTypeFunction %void
%float_0_5 = OpConstant %float 0.5
%29 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5
%9 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
%float_0_549306154 = OpConstant %float 0.549306154
%15 = OpConstantComposite %v3float %float_0_549306154 %float_0_549306154 %float_0_549306154
%_ptr_Function_v3float = OpTypePointer Function %v3float
%32 = OpTypeFunction %v4float
%tint_atanh = OpFunction %v3float None %9
%x = OpFunctionParameter %v3float
%13 = OpLabel
%17 = OpFOrdGreaterThanEqual %v3bool %x %16
%21 = OpExtInst %v3float %22 Atanh %x
%14 = OpSelect %v3float %17 %20 %21
OpReturnValue %14
OpFunctionEnd
%atanh_440cca = OpFunction %void None %23
%26 = OpLabel
%res = OpVariable %_ptr_Function_v3float Function %20
%27 = OpFunctionCall %v3float %tint_atanh %29
OpStore %res %27
%18 = OpConstantNull %v3float
%19 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%atanh_440cca = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v3float Function %18
OpStore %res %15
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %32
%34 = OpLabel
%35 = OpFunctionCall %void %atanh_440cca
%vertex_main_inner = OpFunction %v4float None %19
%21 = OpLabel
%22 = OpFunctionCall %void %atanh_440cca
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %23
%37 = OpLabel
%38 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %38
%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 %23
%40 = OpLabel
%41 = OpFunctionCall %void %atanh_440cca
%fragment_main = OpFunction %void None %9
%28 = OpLabel
%29 = OpFunctionCall %void %atanh_440cca
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %23
%43 = OpLabel
%44 = OpFunctionCall %void %atanh_440cca
%compute_main = OpFunction %void None %9
%31 = OpLabel
%32 = OpFunctionCall %void %atanh_440cca
OpReturn
OpFunctionEnd

View File

@ -1,9 +1,5 @@
vector<float16_t, 2> tint_atanh(vector<float16_t, 2> x) {
return (log(((float16_t(1.0h) + x) / (float16_t(1.0h) - x))) * float16_t(0.5h));
}
void atanh_5bf88d() {
vector<float16_t, 2> res = tint_atanh((float16_t(0.0h)).xx);
vector<float16_t, 2> res = (float16_t(0.0h)).xx;
}
struct tint_symbol {

View File

@ -1,12 +1,8 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
f16vec2 tint_atanh(f16vec2 x) {
return mix(atanh(x), f16vec2(0.0hf), greaterThanEqual(x, f16vec2(1.0hf)));
}
void atanh_5bf88d() {
f16vec2 res = tint_atanh(f16vec2(0.0hf));
f16vec2 res = f16vec2(0.0hf);
}
vec4 vertex_main() {
@ -26,12 +22,8 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require
precision mediump float;
f16vec2 tint_atanh(f16vec2 x) {
return mix(atanh(x), f16vec2(0.0hf), greaterThanEqual(x, f16vec2(1.0hf)));
}
void atanh_5bf88d() {
f16vec2 res = tint_atanh(f16vec2(0.0hf));
f16vec2 res = f16vec2(0.0hf);
}
void fragment_main() {
@ -45,12 +37,8 @@ void main() {
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
f16vec2 tint_atanh(f16vec2 x) {
return mix(atanh(x), f16vec2(0.0hf), greaterThanEqual(x, f16vec2(1.0hf)));
}
void atanh_5bf88d() {
f16vec2 res = tint_atanh(f16vec2(0.0hf));
f16vec2 res = f16vec2(0.0hf);
}
void compute_main() {

View File

@ -1,12 +1,8 @@
#include <metal_stdlib>
using namespace metal;
half2 tint_atanh(half2 x) {
return select(atanh(x), half2(0.0h), (x >= half2(1.0h)));
}
void atanh_5bf88d() {
half2 res = tint_atanh(half2(0.0h));
half2 res = half2(0.0h);
}
struct tint_symbol {

View File

@ -1,14 +1,13 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 45
; Bound: 32
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
OpCapability StorageInputOutput16
%23 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
@ -17,8 +16,6 @@
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %tint_atanh "tint_atanh"
OpName %x "x"
OpName %atanh_5bf88d "atanh_5bf88d"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
@ -35,53 +32,39 @@
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%half = OpTypeFloat 16
%v2half = OpTypeVector %half 2
%9 = OpTypeFunction %v2half %v2half
%half_0x1p_0 = OpConstant %half 0x1p+0
%17 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0
%bool = OpTypeBool
%v2bool = OpTypeVector %bool 2
%21 = OpConstantNull %v2half
%void = OpTypeVoid
%24 = OpTypeFunction %void
%15 = OpConstantNull %v2half
%_ptr_Function_v2half = OpTypePointer Function %v2half
%31 = OpTypeFunction %v4float
%18 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%tint_atanh = OpFunction %v2half None %9
%x = OpFunctionParameter %v2half
%14 = OpLabel
%18 = OpFOrdGreaterThanEqual %v2bool %x %17
%22 = OpExtInst %v2half %23 Atanh %x
%15 = OpSelect %v2half %18 %21 %22
OpReturnValue %15
OpFunctionEnd
%atanh_5bf88d = OpFunction %void None %24
%27 = OpLabel
%res = OpVariable %_ptr_Function_v2half Function %21
%28 = OpFunctionCall %v2half %tint_atanh %21
OpStore %res %28
%atanh_5bf88d = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v2half Function %15
OpStore %res %15
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %31
%33 = OpLabel
%34 = OpFunctionCall %void %atanh_5bf88d
%vertex_main_inner = OpFunction %v4float None %18
%20 = OpLabel
%21 = OpFunctionCall %void %atanh_5bf88d
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %24
%36 = OpLabel
%37 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %37
%vertex_main = OpFunction %void None %9
%23 = OpLabel
%24 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %24
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %24
%40 = OpLabel
%41 = OpFunctionCall %void %atanh_5bf88d
%fragment_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %void %atanh_5bf88d
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %24
%43 = OpLabel
%44 = OpFunctionCall %void %atanh_5bf88d
%compute_main = OpFunction %void None %9
%30 = OpLabel
%31 = OpFunctionCall %void %atanh_5bf88d
OpReturn
OpFunctionEnd

View File

@ -1,9 +1,5 @@
float tint_atanh(float x) {
return (log(((1.0f + x) / (1.0f - x))) * 0.5f);
}
void atanh_7997d8() {
float res = tint_atanh(0.5f);
float res = 0.549306154f;
}
struct tint_symbol {

View File

@ -1,9 +1,5 @@
float tint_atanh(float x) {
return (log(((1.0f + x) / (1.0f - x))) * 0.5f);
}
void atanh_7997d8() {
float res = tint_atanh(0.5f);
float res = 0.549306154f;
}
struct tint_symbol {

View File

@ -1,11 +1,7 @@
#version 310 es
float tint_atanh(float x) {
return ((x >= 1.0f) ? 0.0f : atanh(x));
}
void atanh_7997d8() {
float res = tint_atanh(0.5f);
float res = 0.549306154f;
}
vec4 vertex_main() {
@ -24,12 +20,8 @@ void main() {
#version 310 es
precision mediump float;
float tint_atanh(float x) {
return ((x >= 1.0f) ? 0.0f : atanh(x));
}
void atanh_7997d8() {
float res = tint_atanh(0.5f);
float res = 0.549306154f;
}
void fragment_main() {
@ -42,12 +34,8 @@ void main() {
}
#version 310 es
float tint_atanh(float x) {
return ((x >= 1.0f) ? 0.0f : atanh(x));
}
void atanh_7997d8() {
float res = tint_atanh(0.5f);
float res = 0.549306154f;
}
void compute_main() {

View File

@ -1,12 +1,8 @@
#include <metal_stdlib>
using namespace metal;
float tint_atanh(float x) {
return select(atanh(x), 0.0f, (x >= 1.0f));
}
void atanh_7997d8() {
float res = tint_atanh(0.5f);
float res = 0.549306154f;
}
struct tint_symbol {

View File

@ -1,10 +1,9 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 40
; Bound: 30
; Schema: 0
OpCapability Shader
%18 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
@ -13,8 +12,6 @@
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %tint_atanh "tint_atanh"
OpName %x "x"
OpName %atanh_7997d8 "atanh_7997d8"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
@ -31,48 +28,37 @@
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%9 = OpTypeFunction %float %float
%float_1 = OpConstant %float 1
%bool = OpTypeBool
%void = OpTypeVoid
%19 = OpTypeFunction %void
%float_0_5 = OpConstant %float 0.5
%9 = OpTypeFunction %void
%float_0_549306154 = OpConstant %float 0.549306154
%_ptr_Function_float = OpTypePointer Function %float
%27 = OpTypeFunction %v4float
%tint_atanh = OpFunction %float None %9
%x = OpFunctionParameter %float
%16 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%atanh_7997d8 = OpFunction %void None %9
%12 = OpLabel
%15 = OpFOrdGreaterThanEqual %bool %x %float_1
%17 = OpExtInst %float %18 Atanh %x
%13 = OpSelect %float %15 %8 %17
OpReturnValue %13
OpFunctionEnd
%atanh_7997d8 = OpFunction %void None %19
%22 = OpLabel
%res = OpVariable %_ptr_Function_float Function %8
%23 = OpFunctionCall %float %tint_atanh %float_0_5
OpStore %res %23
OpStore %res %float_0_549306154
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %27
%29 = OpLabel
%30 = OpFunctionCall %void %atanh_7997d8
%vertex_main_inner = OpFunction %v4float None %16
%18 = OpLabel
%19 = OpFunctionCall %void %atanh_7997d8
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %19
%32 = OpLabel
%33 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %33
%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 %19
%35 = OpLabel
%36 = OpFunctionCall %void %atanh_7997d8
%fragment_main = OpFunction %void None %9
%25 = OpLabel
%26 = OpFunctionCall %void %atanh_7997d8
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %19
%38 = OpLabel
%39 = OpFunctionCall %void %atanh_7997d8
%compute_main = OpFunction %void None %9
%28 = OpLabel
%29 = OpFunctionCall %void %atanh_7997d8
OpReturn
OpFunctionEnd

View File

@ -1,9 +1,5 @@
float2 tint_atanh(float2 x) {
return (log(((1.0f + x) / (1.0f - x))) * 0.5f);
}
void atanh_c0e634() {
float2 res = tint_atanh((0.5f).xx);
float2 res = (0.549306154f).xx;
}
struct tint_symbol {

View File

@ -1,9 +1,5 @@
float2 tint_atanh(float2 x) {
return (log(((1.0f + x) / (1.0f - x))) * 0.5f);
}
void atanh_c0e634() {
float2 res = tint_atanh((0.5f).xx);
float2 res = (0.549306154f).xx;
}
struct tint_symbol {

View File

@ -1,11 +1,7 @@
#version 310 es
vec2 tint_atanh(vec2 x) {
return mix(atanh(x), vec2(0.0f), greaterThanEqual(x, vec2(1.0f)));
}
void atanh_c0e634() {
vec2 res = tint_atanh(vec2(0.5f));
vec2 res = vec2(0.549306154f);
}
vec4 vertex_main() {
@ -24,12 +20,8 @@ void main() {
#version 310 es
precision mediump float;
vec2 tint_atanh(vec2 x) {
return mix(atanh(x), vec2(0.0f), greaterThanEqual(x, vec2(1.0f)));
}
void atanh_c0e634() {
vec2 res = tint_atanh(vec2(0.5f));
vec2 res = vec2(0.549306154f);
}
void fragment_main() {
@ -42,12 +34,8 @@ void main() {
}
#version 310 es
vec2 tint_atanh(vec2 x) {
return mix(atanh(x), vec2(0.0f), greaterThanEqual(x, vec2(1.0f)));
}
void atanh_c0e634() {
vec2 res = tint_atanh(vec2(0.5f));
vec2 res = vec2(0.549306154f);
}
void compute_main() {

View File

@ -1,12 +1,8 @@
#include <metal_stdlib>
using namespace metal;
float2 tint_atanh(float2 x) {
return select(atanh(x), float2(0.0f), (x >= float2(1.0f)));
}
void atanh_c0e634() {
float2 res = tint_atanh(float2(0.5f));
float2 res = float2(0.549306154f);
}
struct tint_symbol {

View File

@ -1,10 +1,9 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 45
; Bound: 33
; Schema: 0
OpCapability Shader
%22 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
@ -13,8 +12,6 @@
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %tint_atanh "tint_atanh"
OpName %x "x"
OpName %atanh_c0e634 "atanh_c0e634"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
@ -31,53 +28,40 @@
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%v2float = OpTypeVector %float 2
%9 = OpTypeFunction %v2float %v2float
%float_1 = OpConstant %float 1
%16 = OpConstantComposite %v2float %float_1 %float_1
%bool = OpTypeBool
%v2bool = OpTypeVector %bool 2
%20 = OpConstantNull %v2float
%void = OpTypeVoid
%23 = OpTypeFunction %void
%float_0_5 = OpConstant %float 0.5
%29 = OpConstantComposite %v2float %float_0_5 %float_0_5
%9 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
%float_0_549306154 = OpConstant %float 0.549306154
%15 = OpConstantComposite %v2float %float_0_549306154 %float_0_549306154
%_ptr_Function_v2float = OpTypePointer Function %v2float
%32 = OpTypeFunction %v4float
%tint_atanh = OpFunction %v2float None %9
%x = OpFunctionParameter %v2float
%13 = OpLabel
%17 = OpFOrdGreaterThanEqual %v2bool %x %16
%21 = OpExtInst %v2float %22 Atanh %x
%14 = OpSelect %v2float %17 %20 %21
OpReturnValue %14
OpFunctionEnd
%atanh_c0e634 = OpFunction %void None %23
%26 = OpLabel
%res = OpVariable %_ptr_Function_v2float Function %20
%27 = OpFunctionCall %v2float %tint_atanh %29
OpStore %res %27
%18 = OpConstantNull %v2float
%19 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%atanh_c0e634 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v2float Function %18
OpStore %res %15
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %32
%34 = OpLabel
%35 = OpFunctionCall %void %atanh_c0e634
%vertex_main_inner = OpFunction %v4float None %19
%21 = OpLabel
%22 = OpFunctionCall %void %atanh_c0e634
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %23
%37 = OpLabel
%38 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %38
%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 %23
%40 = OpLabel
%41 = OpFunctionCall %void %atanh_c0e634
%fragment_main = OpFunction %void None %9
%28 = OpLabel
%29 = OpFunctionCall %void %atanh_c0e634
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %23
%43 = OpLabel
%44 = OpFunctionCall %void %atanh_c0e634
%compute_main = OpFunction %void None %9
%31 = OpLabel
%32 = OpFunctionCall %void %atanh_c0e634
OpReturn
OpFunctionEnd

View File

@ -1,9 +1,5 @@
float16_t tint_atanh(float16_t x) {
return (log(((float16_t(1.0h) + x) / (float16_t(1.0h) - x))) * float16_t(0.5h));
}
void atanh_d2d8cd() {
float16_t res = tint_atanh(float16_t(0.0h));
float16_t res = float16_t(0.0h);
}
struct tint_symbol {

View File

@ -1,12 +1,8 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
float16_t tint_atanh(float16_t x) {
return ((x >= 1.0hf) ? 0.0hf : atanh(x));
}
void atanh_d2d8cd() {
float16_t res = tint_atanh(0.0hf);
float16_t res = 0.0hf;
}
vec4 vertex_main() {
@ -26,12 +22,8 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require
precision mediump float;
float16_t tint_atanh(float16_t x) {
return ((x >= 1.0hf) ? 0.0hf : atanh(x));
}
void atanh_d2d8cd() {
float16_t res = tint_atanh(0.0hf);
float16_t res = 0.0hf;
}
void fragment_main() {
@ -45,12 +37,8 @@ void main() {
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
float16_t tint_atanh(float16_t x) {
return ((x >= 1.0hf) ? 0.0hf : atanh(x));
}
void atanh_d2d8cd() {
float16_t res = tint_atanh(0.0hf);
float16_t res = 0.0hf;
}
void compute_main() {

View File

@ -1,12 +1,8 @@
#include <metal_stdlib>
using namespace metal;
half tint_atanh(half x) {
return select(atanh(x), 0.0h, (x >= 1.0h));
}
void atanh_d2d8cd() {
half res = tint_atanh(0.0h);
half res = 0.0h;
}
struct tint_symbol {

View File

@ -1,14 +1,13 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 42
; Bound: 31
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
OpCapability StorageInputOutput16
%20 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
@ -17,8 +16,6 @@
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %tint_atanh "tint_atanh"
OpName %x "x"
OpName %atanh_d2d8cd "atanh_d2d8cd"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
@ -35,50 +32,38 @@
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%half = OpTypeFloat 16
%9 = OpTypeFunction %half %half
%half_0x1p_0 = OpConstant %half 0x1p+0
%bool = OpTypeBool
%18 = OpConstantNull %half
%void = OpTypeVoid
%21 = OpTypeFunction %void
%9 = OpTypeFunction %void
%half = OpTypeFloat 16
%14 = OpConstantNull %half
%_ptr_Function_half = OpTypePointer Function %half
%28 = OpTypeFunction %v4float
%17 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%tint_atanh = OpFunction %half None %9
%x = OpFunctionParameter %half
%13 = OpLabel
%16 = OpFOrdGreaterThanEqual %bool %x %half_0x1p_0
%19 = OpExtInst %half %20 Atanh %x
%14 = OpSelect %half %16 %18 %19
OpReturnValue %14
OpFunctionEnd
%atanh_d2d8cd = OpFunction %void None %21
%24 = OpLabel
%res = OpVariable %_ptr_Function_half Function %18
%25 = OpFunctionCall %half %tint_atanh %18
OpStore %res %25
%atanh_d2d8cd = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_half Function %14
OpStore %res %14
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %28
%30 = OpLabel
%31 = OpFunctionCall %void %atanh_d2d8cd
%vertex_main_inner = OpFunction %v4float None %17
%19 = OpLabel
%20 = OpFunctionCall %void %atanh_d2d8cd
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %21
%33 = OpLabel
%34 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %34
%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 %21
%37 = OpLabel
%38 = OpFunctionCall %void %atanh_d2d8cd
%fragment_main = OpFunction %void None %9
%26 = OpLabel
%27 = OpFunctionCall %void %atanh_d2d8cd
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %21
%40 = OpLabel
%41 = OpFunctionCall %void %atanh_d2d8cd
%compute_main = OpFunction %void None %9
%29 = OpLabel
%30 = OpFunctionCall %void %atanh_d2d8cd
OpReturn
OpFunctionEnd

View File

@ -1,9 +1,5 @@
vector<float16_t, 4> tint_atanh(vector<float16_t, 4> x) {
return (log(((float16_t(1.0h) + x) / (float16_t(1.0h) - x))) * float16_t(0.5h));
}
void atanh_e3b450() {
vector<float16_t, 4> res = tint_atanh((float16_t(0.0h)).xxxx);
vector<float16_t, 4> res = (float16_t(0.0h)).xxxx;
}
struct tint_symbol {

View File

@ -1,12 +1,8 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
f16vec4 tint_atanh(f16vec4 x) {
return mix(atanh(x), f16vec4(0.0hf), greaterThanEqual(x, f16vec4(1.0hf)));
}
void atanh_e3b450() {
f16vec4 res = tint_atanh(f16vec4(0.0hf));
f16vec4 res = f16vec4(0.0hf);
}
vec4 vertex_main() {
@ -26,12 +22,8 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require
precision mediump float;
f16vec4 tint_atanh(f16vec4 x) {
return mix(atanh(x), f16vec4(0.0hf), greaterThanEqual(x, f16vec4(1.0hf)));
}
void atanh_e3b450() {
f16vec4 res = tint_atanh(f16vec4(0.0hf));
f16vec4 res = f16vec4(0.0hf);
}
void fragment_main() {
@ -45,12 +37,8 @@ void main() {
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
f16vec4 tint_atanh(f16vec4 x) {
return mix(atanh(x), f16vec4(0.0hf), greaterThanEqual(x, f16vec4(1.0hf)));
}
void atanh_e3b450() {
f16vec4 res = tint_atanh(f16vec4(0.0hf));
f16vec4 res = f16vec4(0.0hf);
}
void compute_main() {

View File

@ -1,12 +1,8 @@
#include <metal_stdlib>
using namespace metal;
half4 tint_atanh(half4 x) {
return select(atanh(x), half4(0.0h), (x >= half4(1.0h)));
}
void atanh_e3b450() {
half4 res = tint_atanh(half4(0.0h));
half4 res = half4(0.0h);
}
struct tint_symbol {

View File

@ -1,14 +1,13 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 45
; Bound: 32
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
OpCapability StorageInputOutput16
%23 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
@ -17,8 +16,6 @@
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %tint_atanh "tint_atanh"
OpName %x "x"
OpName %atanh_e3b450 "atanh_e3b450"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
@ -35,53 +32,39 @@
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%half = OpTypeFloat 16
%v4half = OpTypeVector %half 4
%9 = OpTypeFunction %v4half %v4half
%half_0x1p_0 = OpConstant %half 0x1p+0
%17 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
%bool = OpTypeBool
%v4bool = OpTypeVector %bool 4
%21 = OpConstantNull %v4half
%void = OpTypeVoid
%24 = OpTypeFunction %void
%15 = OpConstantNull %v4half
%_ptr_Function_v4half = OpTypePointer Function %v4half
%31 = OpTypeFunction %v4float
%18 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%tint_atanh = OpFunction %v4half None %9
%x = OpFunctionParameter %v4half
%14 = OpLabel
%18 = OpFOrdGreaterThanEqual %v4bool %x %17
%22 = OpExtInst %v4half %23 Atanh %x
%15 = OpSelect %v4half %18 %21 %22
OpReturnValue %15
OpFunctionEnd
%atanh_e3b450 = OpFunction %void None %24
%27 = OpLabel
%res = OpVariable %_ptr_Function_v4half Function %21
%28 = OpFunctionCall %v4half %tint_atanh %21
OpStore %res %28
%atanh_e3b450 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v4half Function %15
OpStore %res %15
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %31
%33 = OpLabel
%34 = OpFunctionCall %void %atanh_e3b450
%vertex_main_inner = OpFunction %v4float None %18
%20 = OpLabel
%21 = OpFunctionCall %void %atanh_e3b450
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %24
%36 = OpLabel
%37 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %37
%vertex_main = OpFunction %void None %9
%23 = OpLabel
%24 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %24
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %24
%40 = OpLabel
%41 = OpFunctionCall %void %atanh_e3b450
%fragment_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %void %atanh_e3b450
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %24
%43 = OpLabel
%44 = OpFunctionCall %void %atanh_e3b450
%compute_main = OpFunction %void None %9
%30 = OpLabel
%31 = OpFunctionCall %void %atanh_e3b450
OpReturn
OpFunctionEnd

View File

@ -1,9 +1,5 @@
vector<float16_t, 3> tint_atanh(vector<float16_t, 3> x) {
return (log(((float16_t(1.0h) + x) / (float16_t(1.0h) - x))) * float16_t(0.5h));
}
void atanh_ec4b06() {
vector<float16_t, 3> res = tint_atanh((float16_t(0.0h)).xxx);
vector<float16_t, 3> res = (float16_t(0.0h)).xxx;
}
struct tint_symbol {

View File

@ -1,12 +1,8 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
f16vec3 tint_atanh(f16vec3 x) {
return mix(atanh(x), f16vec3(0.0hf), greaterThanEqual(x, f16vec3(1.0hf)));
}
void atanh_ec4b06() {
f16vec3 res = tint_atanh(f16vec3(0.0hf));
f16vec3 res = f16vec3(0.0hf);
}
vec4 vertex_main() {
@ -26,12 +22,8 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require
precision mediump float;
f16vec3 tint_atanh(f16vec3 x) {
return mix(atanh(x), f16vec3(0.0hf), greaterThanEqual(x, f16vec3(1.0hf)));
}
void atanh_ec4b06() {
f16vec3 res = tint_atanh(f16vec3(0.0hf));
f16vec3 res = f16vec3(0.0hf);
}
void fragment_main() {
@ -45,12 +37,8 @@ void main() {
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
f16vec3 tint_atanh(f16vec3 x) {
return mix(atanh(x), f16vec3(0.0hf), greaterThanEqual(x, f16vec3(1.0hf)));
}
void atanh_ec4b06() {
f16vec3 res = tint_atanh(f16vec3(0.0hf));
f16vec3 res = f16vec3(0.0hf);
}
void compute_main() {

View File

@ -1,12 +1,8 @@
#include <metal_stdlib>
using namespace metal;
half3 tint_atanh(half3 x) {
return select(atanh(x), half3(0.0h), (x >= half3(1.0h)));
}
void atanh_ec4b06() {
half3 res = tint_atanh(half3(0.0h));
half3 res = half3(0.0h);
}
struct tint_symbol {

View File

@ -1,14 +1,13 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 45
; Bound: 32
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
OpCapability StorageInputOutput16
%23 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
@ -17,8 +16,6 @@
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %tint_atanh "tint_atanh"
OpName %x "x"
OpName %atanh_ec4b06 "atanh_ec4b06"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
@ -35,53 +32,39 @@
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%half = OpTypeFloat 16
%v3half = OpTypeVector %half 3
%9 = OpTypeFunction %v3half %v3half
%half_0x1p_0 = OpConstant %half 0x1p+0
%17 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
%bool = OpTypeBool
%v3bool = OpTypeVector %bool 3
%21 = OpConstantNull %v3half
%void = OpTypeVoid
%24 = OpTypeFunction %void
%15 = OpConstantNull %v3half
%_ptr_Function_v3half = OpTypePointer Function %v3half
%31 = OpTypeFunction %v4float
%18 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%tint_atanh = OpFunction %v3half None %9
%x = OpFunctionParameter %v3half
%14 = OpLabel
%18 = OpFOrdGreaterThanEqual %v3bool %x %17
%22 = OpExtInst %v3half %23 Atanh %x
%15 = OpSelect %v3half %18 %21 %22
OpReturnValue %15
OpFunctionEnd
%atanh_ec4b06 = OpFunction %void None %24
%27 = OpLabel
%res = OpVariable %_ptr_Function_v3half Function %21
%28 = OpFunctionCall %v3half %tint_atanh %21
OpStore %res %28
%atanh_ec4b06 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v3half Function %15
OpStore %res %15
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %31
%33 = OpLabel
%34 = OpFunctionCall %void %atanh_ec4b06
%vertex_main_inner = OpFunction %v4float None %18
%20 = OpLabel
%21 = OpFunctionCall %void %atanh_ec4b06
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %24
%36 = OpLabel
%37 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %37
%vertex_main = OpFunction %void None %9
%23 = OpLabel
%24 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %24
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %24
%40 = OpLabel
%41 = OpFunctionCall %void %atanh_ec4b06
%fragment_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %void %atanh_ec4b06
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %24
%43 = OpLabel
%44 = OpFunctionCall %void %atanh_ec4b06
%compute_main = OpFunction %void None %9
%30 = OpLabel
%31 = OpFunctionCall %void %atanh_ec4b06
OpReturn
OpFunctionEnd

View File

@ -1,9 +1,5 @@
float4 tint_atanh(float4 x) {
return (log(((1.0f + x) / (1.0f - x))) * 0.5f);
}
void atanh_f3e01b() {
float4 res = tint_atanh((0.5f).xxxx);
float4 res = (0.549306154f).xxxx;
}
struct tint_symbol {

View File

@ -1,9 +1,5 @@
float4 tint_atanh(float4 x) {
return (log(((1.0f + x) / (1.0f - x))) * 0.5f);
}
void atanh_f3e01b() {
float4 res = tint_atanh((0.5f).xxxx);
float4 res = (0.549306154f).xxxx;
}
struct tint_symbol {

View File

@ -1,11 +1,7 @@
#version 310 es
vec4 tint_atanh(vec4 x) {
return mix(atanh(x), vec4(0.0f), greaterThanEqual(x, vec4(1.0f)));
}
void atanh_f3e01b() {
vec4 res = tint_atanh(vec4(0.5f));
vec4 res = vec4(0.549306154f);
}
vec4 vertex_main() {
@ -24,12 +20,8 @@ void main() {
#version 310 es
precision mediump float;
vec4 tint_atanh(vec4 x) {
return mix(atanh(x), vec4(0.0f), greaterThanEqual(x, vec4(1.0f)));
}
void atanh_f3e01b() {
vec4 res = tint_atanh(vec4(0.5f));
vec4 res = vec4(0.549306154f);
}
void fragment_main() {
@ -42,12 +34,8 @@ void main() {
}
#version 310 es
vec4 tint_atanh(vec4 x) {
return mix(atanh(x), vec4(0.0f), greaterThanEqual(x, vec4(1.0f)));
}
void atanh_f3e01b() {
vec4 res = tint_atanh(vec4(0.5f));
vec4 res = vec4(0.549306154f);
}
void compute_main() {

View File

@ -1,12 +1,8 @@
#include <metal_stdlib>
using namespace metal;
float4 tint_atanh(float4 x) {
return select(atanh(x), float4(0.0f), (x >= float4(1.0f)));
}
void atanh_f3e01b() {
float4 res = tint_atanh(float4(0.5f));
float4 res = float4(0.549306154f);
}
struct tint_symbol {

View File

@ -1,10 +1,9 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 43
; Bound: 31
; Schema: 0
OpCapability Shader
%20 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
@ -13,8 +12,6 @@
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %tint_atanh "tint_atanh"
OpName %x "x"
OpName %atanh_f3e01b "atanh_f3e01b"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
@ -31,51 +28,38 @@
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%9 = OpTypeFunction %v4float %v4float
%float_1 = OpConstant %float 1
%15 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%bool = OpTypeBool
%v4bool = OpTypeVector %bool 4
%void = OpTypeVoid
%21 = OpTypeFunction %void
%float_0_5 = OpConstant %float 0.5
%27 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_5 %float_0_5
%9 = OpTypeFunction %void
%float_0_549306154 = OpConstant %float 0.549306154
%14 = OpConstantComposite %v4float %float_0_549306154 %float_0_549306154 %float_0_549306154 %float_0_549306154
%_ptr_Function_v4float = OpTypePointer Function %v4float
%30 = OpTypeFunction %v4float
%tint_atanh = OpFunction %v4float None %9
%x = OpFunctionParameter %v4float
%17 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%atanh_f3e01b = OpFunction %void None %9
%12 = OpLabel
%16 = OpFOrdGreaterThanEqual %v4bool %x %15
%19 = OpExtInst %v4float %20 Atanh %x
%13 = OpSelect %v4float %16 %5 %19
OpReturnValue %13
OpFunctionEnd
%atanh_f3e01b = OpFunction %void None %21
%24 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %5
%25 = OpFunctionCall %v4float %tint_atanh %27
OpStore %res %25
OpStore %res %14
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %30
%32 = OpLabel
%33 = OpFunctionCall %void %atanh_f3e01b
%vertex_main_inner = OpFunction %v4float None %17
%19 = OpLabel
%20 = OpFunctionCall %void %atanh_f3e01b
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %21
%35 = OpLabel
%36 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %36
%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 %21
%38 = OpLabel
%39 = OpFunctionCall %void %atanh_f3e01b
%fragment_main = OpFunction %void None %9
%26 = OpLabel
%27 = OpFunctionCall %void %atanh_f3e01b
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %21
%41 = OpLabel
%42 = OpFunctionCall %void %atanh_f3e01b
%compute_main = OpFunction %void None %9
%29 = OpLabel
%30 = OpFunctionCall %void %atanh_f3e01b
OpReturn
OpFunctionEnd

View File

@ -1,11 +1,7 @@
#version 310 es
float tint_saturate(float v) {
return clamp(v, 0.0f, 1.0f);
}
void saturate_270da5() {
float res = tint_saturate(2.0f);
float res = 1.0f;
}
vec4 vertex_main() {
@ -24,12 +20,8 @@ void main() {
#version 310 es
precision mediump float;
float tint_saturate(float v) {
return clamp(v, 0.0f, 1.0f);
}
void saturate_270da5() {
float res = tint_saturate(2.0f);
float res = 1.0f;
}
void fragment_main() {
@ -42,12 +34,8 @@ void main() {
}
#version 310 es
float tint_saturate(float v) {
return clamp(v, 0.0f, 1.0f);
}
void saturate_270da5() {
float res = tint_saturate(2.0f);
float res = 1.0f;
}
void compute_main() {

View File

@ -1,10 +1,9 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 37
; 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"
@ -13,8 +12,6 @@
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %tint_saturate "tint_saturate"
OpName %v "v"
OpName %saturate_270da5 "saturate_270da5"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
@ -31,45 +28,36 @@
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%9 = OpTypeFunction %float %float
%float_1 = OpConstant %float 1
%void = OpTypeVoid
%16 = OpTypeFunction %void
%float_2 = OpConstant %float 2
%9 = OpTypeFunction %void
%float_1 = OpConstant %float 1
%_ptr_Function_float = OpTypePointer Function %float
%24 = OpTypeFunction %v4float
%tint_saturate = OpFunction %float None %9
%v = OpFunctionParameter %float
%16 = OpTypeFunction %v4float
%saturate_270da5 = OpFunction %void None %9
%12 = OpLabel
%13 = OpExtInst %float %14 NClamp %v %8 %float_1
OpReturnValue %13
OpFunctionEnd
%saturate_270da5 = OpFunction %void None %16
%19 = OpLabel
%res = OpVariable %_ptr_Function_float Function %8
%20 = OpFunctionCall %float %tint_saturate %float_2
OpStore %res %20
OpStore %res %float_1
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %24
%26 = OpLabel
%27 = OpFunctionCall %void %saturate_270da5
%vertex_main_inner = OpFunction %v4float None %16
%18 = OpLabel
%19 = OpFunctionCall %void %saturate_270da5
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
%29 = OpLabel
%30 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %30
%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 %16
%32 = OpLabel
%33 = OpFunctionCall %void %saturate_270da5
%fragment_main = OpFunction %void None %9
%24 = OpLabel
%25 = OpFunctionCall %void %saturate_270da5
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
%35 = OpLabel
%36 = OpFunctionCall %void %saturate_270da5
%compute_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %void %saturate_270da5
OpReturn
OpFunctionEnd

View File

@ -1,12 +1,8 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
f16vec3 tint_saturate(f16vec3 v) {
return clamp(v, f16vec3(0.0hf), f16vec3(1.0hf));
}
void saturate_462535() {
f16vec3 res = tint_saturate(f16vec3(0.0hf));
f16vec3 res = f16vec3(0.0hf);
}
vec4 vertex_main() {
@ -26,12 +22,8 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require
precision mediump float;
f16vec3 tint_saturate(f16vec3 v) {
return clamp(v, f16vec3(0.0hf), f16vec3(1.0hf));
}
void saturate_462535() {
f16vec3 res = tint_saturate(f16vec3(0.0hf));
f16vec3 res = f16vec3(0.0hf);
}
void fragment_main() {
@ -45,12 +37,8 @@ void main() {
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
f16vec3 tint_saturate(f16vec3 v) {
return clamp(v, f16vec3(0.0hf), f16vec3(1.0hf));
}
void saturate_462535() {
f16vec3 res = tint_saturate(f16vec3(0.0hf));
f16vec3 res = f16vec3(0.0hf);
}
void compute_main() {

View File

@ -1,14 +1,13 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 41
; Bound: 32
; 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"
@ -17,8 +16,6 @@
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %tint_saturate "tint_saturate"
OpName %v "v"
OpName %saturate_462535 "saturate_462535"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
@ -35,49 +32,39 @@
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%half = OpTypeFloat 16
%v3half = OpTypeVector %half 3
%9 = OpTypeFunction %v3half %v3half
%17 = OpConstantNull %v3half
%half_0x1p_0 = OpConstant %half 0x1p+0
%19 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
%void = OpTypeVoid
%20 = OpTypeFunction %void
%15 = OpConstantNull %v3half
%_ptr_Function_v3half = OpTypePointer Function %v3half
%27 = OpTypeFunction %v4float
%18 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%tint_saturate = OpFunction %v3half None %9
%v = OpFunctionParameter %v3half
%14 = OpLabel
%15 = OpExtInst %v3half %16 NClamp %v %17 %19
OpReturnValue %15
OpFunctionEnd
%saturate_462535 = OpFunction %void None %20
%23 = OpLabel
%res = OpVariable %_ptr_Function_v3half Function %17
%24 = OpFunctionCall %v3half %tint_saturate %17
OpStore %res %24
%saturate_462535 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v3half Function %15
OpStore %res %15
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %27
%29 = OpLabel
%30 = OpFunctionCall %void %saturate_462535
%vertex_main_inner = OpFunction %v4float None %18
%20 = OpLabel
%21 = OpFunctionCall %void %saturate_462535
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %20
%32 = OpLabel
%33 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %33
%vertex_main = OpFunction %void None %9
%23 = OpLabel
%24 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %24
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %20
%36 = OpLabel
%37 = OpFunctionCall %void %saturate_462535
%fragment_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %void %saturate_462535
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %20
%39 = OpLabel
%40 = OpFunctionCall %void %saturate_462535
%compute_main = OpFunction %void None %9
%30 = OpLabel
%31 = OpFunctionCall %void %saturate_462535
OpReturn
OpFunctionEnd

View File

@ -1,11 +1,7 @@
#version 310 es
vec2 tint_saturate(vec2 v) {
return clamp(v, vec2(0.0f), vec2(1.0f));
}
void saturate_51567f() {
vec2 res = tint_saturate(vec2(2.0f));
vec2 res = vec2(1.0f);
}
vec4 vertex_main() {
@ -24,12 +20,8 @@ void main() {
#version 310 es
precision mediump float;
vec2 tint_saturate(vec2 v) {
return clamp(v, vec2(0.0f), vec2(1.0f));
}
void saturate_51567f() {
vec2 res = tint_saturate(vec2(2.0f));
vec2 res = vec2(1.0f);
}
void fragment_main() {
@ -42,12 +34,8 @@ void main() {
}
#version 310 es
vec2 tint_saturate(vec2 v) {
return clamp(v, vec2(0.0f), vec2(1.0f));
}
void saturate_51567f() {
vec2 res = tint_saturate(vec2(2.0f));
vec2 res = vec2(1.0f);
}
void compute_main() {

View File

@ -1,10 +1,9 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 41
; 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"
@ -13,8 +12,6 @@
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %tint_saturate "tint_saturate"
OpName %v "v"
OpName %saturate_51567f "saturate_51567f"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
@ -31,49 +28,39 @@
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%v2float = OpTypeVector %float 2
%9 = OpTypeFunction %v2float %v2float
%16 = OpConstantNull %v2float
%float_1 = OpConstant %float 1
%18 = OpConstantComposite %v2float %float_1 %float_1
%void = OpTypeVoid
%19 = OpTypeFunction %void
%float_2 = OpConstant %float 2
%25 = OpConstantComposite %v2float %float_2 %float_2
%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
%28 = OpTypeFunction %v4float
%tint_saturate = OpFunction %v2float None %9
%v = OpFunctionParameter %v2float
%13 = OpLabel
%14 = OpExtInst %v2float %15 NClamp %v %16 %18
OpReturnValue %14
OpFunctionEnd
%saturate_51567f = OpFunction %void None %19
%22 = OpLabel
%res = OpVariable %_ptr_Function_v2float Function %16
%23 = OpFunctionCall %v2float %tint_saturate %25
OpStore %res %23
%18 = OpConstantNull %v2float
%19 = OpTypeFunction %v4float
%saturate_51567f = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v2float Function %18
OpStore %res %15
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %28
%30 = OpLabel
%31 = OpFunctionCall %void %saturate_51567f
%vertex_main_inner = OpFunction %v4float None %19
%21 = OpLabel
%22 = OpFunctionCall %void %saturate_51567f
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %19
%33 = OpLabel
%34 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %34
%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 %19
%36 = OpLabel
%37 = OpFunctionCall %void %saturate_51567f
%fragment_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %void %saturate_51567f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %19
%39 = OpLabel
%40 = OpFunctionCall %void %saturate_51567f
%compute_main = OpFunction %void None %9
%30 = OpLabel
%31 = OpFunctionCall %void %saturate_51567f
OpReturn
OpFunctionEnd

View File

@ -1,11 +1,7 @@
#version 310 es
vec3 tint_saturate(vec3 v) {
return clamp(v, vec3(0.0f), vec3(1.0f));
}
void saturate_6bcddf() {
vec3 res = tint_saturate(vec3(2.0f));
vec3 res = vec3(1.0f);
}
vec4 vertex_main() {
@ -24,12 +20,8 @@ void main() {
#version 310 es
precision mediump float;
vec3 tint_saturate(vec3 v) {
return clamp(v, vec3(0.0f), vec3(1.0f));
}
void saturate_6bcddf() {
vec3 res = tint_saturate(vec3(2.0f));
vec3 res = vec3(1.0f);
}
void fragment_main() {
@ -42,12 +34,8 @@ void main() {
}
#version 310 es
vec3 tint_saturate(vec3 v) {
return clamp(v, vec3(0.0f), vec3(1.0f));
}
void saturate_6bcddf() {
vec3 res = tint_saturate(vec3(2.0f));
vec3 res = vec3(1.0f);
}
void compute_main() {

View File

@ -1,10 +1,9 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 41
; 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"
@ -13,8 +12,6 @@
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %tint_saturate "tint_saturate"
OpName %v "v"
OpName %saturate_6bcddf "saturate_6bcddf"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
@ -31,49 +28,39 @@
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%v3float = OpTypeVector %float 3
%9 = OpTypeFunction %v3float %v3float
%16 = OpConstantNull %v3float
%float_1 = OpConstant %float 1
%18 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%void = OpTypeVoid
%19 = OpTypeFunction %void
%float_2 = OpConstant %float 2
%25 = OpConstantComposite %v3float %float_2 %float_2 %float_2
%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
%28 = OpTypeFunction %v4float
%tint_saturate = OpFunction %v3float None %9
%v = OpFunctionParameter %v3float
%13 = OpLabel
%14 = OpExtInst %v3float %15 NClamp %v %16 %18
OpReturnValue %14
OpFunctionEnd
%saturate_6bcddf = OpFunction %void None %19
%22 = OpLabel
%res = OpVariable %_ptr_Function_v3float Function %16
%23 = OpFunctionCall %v3float %tint_saturate %25
OpStore %res %23
%18 = OpConstantNull %v3float
%19 = OpTypeFunction %v4float
%saturate_6bcddf = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v3float Function %18
OpStore %res %15
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %28
%30 = OpLabel
%31 = OpFunctionCall %void %saturate_6bcddf
%vertex_main_inner = OpFunction %v4float None %19
%21 = OpLabel
%22 = OpFunctionCall %void %saturate_6bcddf
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %19
%33 = OpLabel
%34 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %34
%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 %19
%36 = OpLabel
%37 = OpFunctionCall %void %saturate_6bcddf
%fragment_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %void %saturate_6bcddf
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %19
%39 = OpLabel
%40 = OpFunctionCall %void %saturate_6bcddf
%compute_main = OpFunction %void None %9
%30 = OpLabel
%31 = OpFunctionCall %void %saturate_6bcddf
OpReturn
OpFunctionEnd

View File

@ -1,11 +1,7 @@
#version 310 es
vec4 tint_saturate(vec4 v) {
return clamp(v, vec4(0.0f), vec4(1.0f));
}
void saturate_a5b571() {
vec4 res = tint_saturate(vec4(2.0f));
vec4 res = vec4(1.0f);
}
vec4 vertex_main() {
@ -24,12 +20,8 @@ void main() {
#version 310 es
precision mediump float;
vec4 tint_saturate(vec4 v) {
return clamp(v, vec4(0.0f), vec4(1.0f));
}
void saturate_a5b571() {
vec4 res = tint_saturate(vec4(2.0f));
vec4 res = vec4(1.0f);
}
void fragment_main() {
@ -42,12 +34,8 @@ void main() {
}
#version 310 es
vec4 tint_saturate(vec4 v) {
return clamp(v, vec4(0.0f), vec4(1.0f));
}
void saturate_a5b571() {
vec4 res = tint_saturate(vec4(2.0f));
vec4 res = vec4(1.0f);
}
void compute_main() {

View File

@ -1,10 +1,9 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 39
; 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"
@ -13,8 +12,6 @@
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %tint_saturate "tint_saturate"
OpName %v "v"
OpName %saturate_a5b571 "saturate_a5b571"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
@ -31,47 +28,37 @@
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%9 = OpTypeFunction %v4float %v4float
%float_1 = OpConstant %float 1
%16 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%void = OpTypeVoid
%17 = OpTypeFunction %void
%float_2 = OpConstant %float 2
%23 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2
%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
%26 = OpTypeFunction %v4float
%tint_saturate = OpFunction %v4float None %9
%v = OpFunctionParameter %v4float
%17 = OpTypeFunction %v4float
%saturate_a5b571 = OpFunction %void None %9
%12 = OpLabel
%13 = OpExtInst %v4float %14 NClamp %v %5 %16
OpReturnValue %13
OpFunctionEnd
%saturate_a5b571 = OpFunction %void None %17
%20 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %5
%21 = OpFunctionCall %v4float %tint_saturate %23
OpStore %res %21
OpStore %res %14
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %26
%28 = OpLabel
%29 = OpFunctionCall %void %saturate_a5b571
%vertex_main_inner = OpFunction %v4float None %17
%19 = OpLabel
%20 = OpFunctionCall %void %saturate_a5b571
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %17
%31 = OpLabel
%32 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %32
%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 %17
%34 = OpLabel
%35 = OpFunctionCall %void %saturate_a5b571
%fragment_main = OpFunction %void None %9
%25 = OpLabel
%26 = OpFunctionCall %void %saturate_a5b571
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %17
%37 = OpLabel
%38 = OpFunctionCall %void %saturate_a5b571
%compute_main = OpFunction %void None %9
%28 = OpLabel
%29 = OpFunctionCall %void %saturate_a5b571
OpReturn
OpFunctionEnd

View File

@ -1,12 +1,8 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
f16vec2 tint_saturate(f16vec2 v) {
return clamp(v, f16vec2(0.0hf), f16vec2(1.0hf));
}
void saturate_cd2028() {
f16vec2 res = tint_saturate(f16vec2(0.0hf));
f16vec2 res = f16vec2(0.0hf);
}
vec4 vertex_main() {
@ -26,12 +22,8 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require
precision mediump float;
f16vec2 tint_saturate(f16vec2 v) {
return clamp(v, f16vec2(0.0hf), f16vec2(1.0hf));
}
void saturate_cd2028() {
f16vec2 res = tint_saturate(f16vec2(0.0hf));
f16vec2 res = f16vec2(0.0hf);
}
void fragment_main() {
@ -45,12 +37,8 @@ void main() {
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
f16vec2 tint_saturate(f16vec2 v) {
return clamp(v, f16vec2(0.0hf), f16vec2(1.0hf));
}
void saturate_cd2028() {
f16vec2 res = tint_saturate(f16vec2(0.0hf));
f16vec2 res = f16vec2(0.0hf);
}
void compute_main() {

View File

@ -1,14 +1,13 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 41
; Bound: 32
; 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"
@ -17,8 +16,6 @@
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %tint_saturate "tint_saturate"
OpName %v "v"
OpName %saturate_cd2028 "saturate_cd2028"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
@ -35,49 +32,39 @@
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%half = OpTypeFloat 16
%v2half = OpTypeVector %half 2
%9 = OpTypeFunction %v2half %v2half
%17 = OpConstantNull %v2half
%half_0x1p_0 = OpConstant %half 0x1p+0
%19 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0
%void = OpTypeVoid
%20 = OpTypeFunction %void
%15 = OpConstantNull %v2half
%_ptr_Function_v2half = OpTypePointer Function %v2half
%27 = OpTypeFunction %v4float
%18 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%tint_saturate = OpFunction %v2half None %9
%v = OpFunctionParameter %v2half
%14 = OpLabel
%15 = OpExtInst %v2half %16 NClamp %v %17 %19
OpReturnValue %15
OpFunctionEnd
%saturate_cd2028 = OpFunction %void None %20
%23 = OpLabel
%res = OpVariable %_ptr_Function_v2half Function %17
%24 = OpFunctionCall %v2half %tint_saturate %17
OpStore %res %24
%saturate_cd2028 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v2half Function %15
OpStore %res %15
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %27
%29 = OpLabel
%30 = OpFunctionCall %void %saturate_cd2028
%vertex_main_inner = OpFunction %v4float None %18
%20 = OpLabel
%21 = OpFunctionCall %void %saturate_cd2028
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %20
%32 = OpLabel
%33 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %33
%vertex_main = OpFunction %void None %9
%23 = OpLabel
%24 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %24
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %20
%36 = OpLabel
%37 = OpFunctionCall %void %saturate_cd2028
%fragment_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %void %saturate_cd2028
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %20
%39 = OpLabel
%40 = OpFunctionCall %void %saturate_cd2028
%compute_main = OpFunction %void None %9
%30 = OpLabel
%31 = OpFunctionCall %void %saturate_cd2028
OpReturn
OpFunctionEnd

View File

@ -1,12 +1,8 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
f16vec4 tint_saturate(f16vec4 v) {
return clamp(v, f16vec4(0.0hf), f16vec4(1.0hf));
}
void saturate_dcde71() {
f16vec4 res = tint_saturate(f16vec4(0.0hf));
f16vec4 res = f16vec4(0.0hf);
}
vec4 vertex_main() {
@ -26,12 +22,8 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require
precision mediump float;
f16vec4 tint_saturate(f16vec4 v) {
return clamp(v, f16vec4(0.0hf), f16vec4(1.0hf));
}
void saturate_dcde71() {
f16vec4 res = tint_saturate(f16vec4(0.0hf));
f16vec4 res = f16vec4(0.0hf);
}
void fragment_main() {
@ -45,12 +37,8 @@ void main() {
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
f16vec4 tint_saturate(f16vec4 v) {
return clamp(v, f16vec4(0.0hf), f16vec4(1.0hf));
}
void saturate_dcde71() {
f16vec4 res = tint_saturate(f16vec4(0.0hf));
f16vec4 res = f16vec4(0.0hf);
}
void compute_main() {

View File

@ -1,14 +1,13 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 41
; Bound: 32
; 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"
@ -17,8 +16,6 @@
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %tint_saturate "tint_saturate"
OpName %v "v"
OpName %saturate_dcde71 "saturate_dcde71"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
@ -35,49 +32,39 @@
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
%half = OpTypeFloat 16
%v4half = OpTypeVector %half 4
%9 = OpTypeFunction %v4half %v4half
%17 = OpConstantNull %v4half
%half_0x1p_0 = OpConstant %half 0x1p+0
%19 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
%void = OpTypeVoid
%20 = OpTypeFunction %void
%15 = OpConstantNull %v4half
%_ptr_Function_v4half = OpTypePointer Function %v4half
%27 = OpTypeFunction %v4float
%18 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%tint_saturate = OpFunction %v4half None %9
%v = OpFunctionParameter %v4half
%14 = OpLabel
%15 = OpExtInst %v4half %16 NClamp %v %17 %19
OpReturnValue %15
OpFunctionEnd
%saturate_dcde71 = OpFunction %void None %20
%23 = OpLabel
%res = OpVariable %_ptr_Function_v4half Function %17
%24 = OpFunctionCall %v4half %tint_saturate %17
OpStore %res %24
%saturate_dcde71 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_v4half Function %15
OpStore %res %15
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %27
%29 = OpLabel
%30 = OpFunctionCall %void %saturate_dcde71
%vertex_main_inner = OpFunction %v4float None %18
%20 = OpLabel
%21 = OpFunctionCall %void %saturate_dcde71
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %20
%32 = OpLabel
%33 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %33
%vertex_main = OpFunction %void None %9
%23 = OpLabel
%24 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %24
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %20
%36 = OpLabel
%37 = OpFunctionCall %void %saturate_dcde71
%fragment_main = OpFunction %void None %9
%27 = OpLabel
%28 = OpFunctionCall %void %saturate_dcde71
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %20
%39 = OpLabel
%40 = OpFunctionCall %void %saturate_dcde71
%compute_main = OpFunction %void None %9
%30 = OpLabel
%31 = OpFunctionCall %void %saturate_dcde71
OpReturn
OpFunctionEnd

View File

@ -1,12 +1,8 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
float16_t tint_saturate(float16_t v) {
return clamp(v, 0.0hf, 1.0hf);
}
void saturate_e8df56() {
float16_t res = tint_saturate(0.0hf);
float16_t res = 0.0hf;
}
vec4 vertex_main() {
@ -26,12 +22,8 @@ void main() {
#extension GL_AMD_gpu_shader_half_float : require
precision mediump float;
float16_t tint_saturate(float16_t v) {
return clamp(v, 0.0hf, 1.0hf);
}
void saturate_e8df56() {
float16_t res = tint_saturate(0.0hf);
float16_t res = 0.0hf;
}
void fragment_main() {
@ -45,12 +37,8 @@ void main() {
#version 310 es
#extension GL_AMD_gpu_shader_half_float : require
float16_t tint_saturate(float16_t v) {
return clamp(v, 0.0hf, 1.0hf);
}
void saturate_e8df56() {
float16_t res = tint_saturate(0.0hf);
float16_t res = 0.0hf;
}
void compute_main() {

View File

@ -1,14 +1,13 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 39
; Bound: 31
; 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"
@ -17,8 +16,6 @@
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %value "value"
OpName %vertex_point_size "vertex_point_size"
OpName %tint_saturate "tint_saturate"
OpName %v "v"
OpName %saturate_e8df56 "saturate_e8df56"
OpName %res "res"
OpName %vertex_main_inner "vertex_main_inner"
@ -35,47 +32,38 @@
%_ptr_Output_float = OpTypePointer Output %float
%8 = OpConstantNull %float
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%half = OpTypeFloat 16
%9 = OpTypeFunction %half %half
%16 = OpConstantNull %half
%half_0x1p_0 = OpConstant %half 0x1p+0
%void = OpTypeVoid
%18 = OpTypeFunction %void
%9 = OpTypeFunction %void
%half = OpTypeFloat 16
%14 = OpConstantNull %half
%_ptr_Function_half = OpTypePointer Function %half
%25 = OpTypeFunction %v4float
%17 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%tint_saturate = OpFunction %half None %9
%v = OpFunctionParameter %half
%13 = OpLabel
%14 = OpExtInst %half %15 NClamp %v %16 %half_0x1p_0
OpReturnValue %14
OpFunctionEnd
%saturate_e8df56 = OpFunction %void None %18
%21 = OpLabel
%res = OpVariable %_ptr_Function_half Function %16
%22 = OpFunctionCall %half %tint_saturate %16
OpStore %res %22
%saturate_e8df56 = OpFunction %void None %9
%12 = OpLabel
%res = OpVariable %_ptr_Function_half Function %14
OpStore %res %14
OpReturn
OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %25
%27 = OpLabel
%28 = OpFunctionCall %void %saturate_e8df56
%vertex_main_inner = OpFunction %v4float None %17
%19 = OpLabel
%20 = OpFunctionCall %void %saturate_e8df56
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %18
%30 = OpLabel
%31 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %31
%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 %18
%34 = OpLabel
%35 = OpFunctionCall %void %saturate_e8df56
%fragment_main = OpFunction %void None %9
%26 = OpLabel
%27 = OpFunctionCall %void %saturate_e8df56
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %18
%37 = OpLabel
%38 = OpFunctionCall %void %saturate_e8df56
%compute_main = OpFunction %void None %9
%29 = OpLabel
%30 = OpFunctionCall %void %saturate_e8df56
OpReturn
OpFunctionEnd