tint: End-to-end tests for f16 built-in
This patch add Tint end-to-end tests for built-ins using f16 types. Bug: tint:1473, tint:1502 Change-Id: I09db6e0b7e90541fb246e11d475e27be96a6d07e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97340 Reviewed-by: Antonio Maiorano <amaiorano@google.com> Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
This commit is contained in:
parent
20cddbf04c
commit
9443cebd53
|
@ -13,20 +13,16 @@ See:
|
|||
{{- range Sem.Builtins -}}
|
||||
{{- range .Overloads -}}
|
||||
{{- range Permute . -}}
|
||||
{{- /* TODO(crbug.com/tint/1502): Remove the bodge below and emit "enable f16;" after
|
||||
getting ready for F16 end-to-end tests. */ -}}
|
||||
{{- if not (OverloadUsesF16 .Overload) -}}
|
||||
{{- /* Generate a ./literal/<function>/<permuataion-hash>.wgsl file using
|
||||
the Permutation macro defined below */ -}}
|
||||
{{- $file := printf "./literal/%v/%v.wgsl" .Intrinsic.Name .Hash -}}
|
||||
{{- $content := Eval "Permutation" "Overload" . "Mode" "literal" -}}
|
||||
{{- WriteFile $file $content -}}
|
||||
{{- /* Generate a ./var/<function>/<permuataion-hash>.wgsl file using
|
||||
the Permutation macro defined below */ -}}
|
||||
{{- $file := printf "./var/%v/%v.wgsl" .Intrinsic.Name .Hash -}}
|
||||
{{- $content := Eval "Permutation" "Overload" . "Mode" "var" -}}
|
||||
{{- WriteFile $file $content -}}
|
||||
{{- end }}
|
||||
{{- /* Generate a ./literal/<function>/<permuataion-hash>.wgsl file using
|
||||
the Permutation macro defined below */ -}}
|
||||
{{- $file := printf "./literal/%v/%v.wgsl" .Intrinsic.Name .Hash -}}
|
||||
{{- $content := Eval "Permutation" "Overload" . "Mode" "literal" -}}
|
||||
{{- WriteFile $file $content -}}
|
||||
{{- /* Generate a ./var/<function>/<permuataion-hash>.wgsl file using
|
||||
the Permutation macro defined below */ -}}
|
||||
{{- $file := printf "./var/%v/%v.wgsl" .Intrinsic.Name .Hash -}}
|
||||
{{- $content := Eval "Permutation" "Overload" . "Mode" "var" -}}
|
||||
{{- WriteFile $file $content -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
@ -178,14 +174,20 @@ fn compute_main() {
|
|||
{{- define "EnableDirectives" -}}
|
||||
{{- /* Emits the required enable directives for a given overload */ -}}
|
||||
{{- /* ------------------------------------------------------------------ */ -}}
|
||||
{{- $overload := . -}}
|
||||
{{- $builtin_name := $overload.Intrinsic.Name -}}
|
||||
{{- $permutation := . -}}
|
||||
{{- $overload := $permutation.Overload -}}
|
||||
{{- $builtin_name := $permutation.Intrinsic.Name -}}
|
||||
|
||||
{{- /* Check and emit chromium_experimental_dp4a */ -}}
|
||||
{{- if or (eq "dot4I8Packed" $builtin_name) (eq "dot4U8Packed" $builtin_name)}}
|
||||
enable chromium_experimental_dp4a;
|
||||
{{ end -}}
|
||||
|
||||
{{- /* Check and emit f16 */ -}}
|
||||
{{- if OverloadUsesF16 $overload}}
|
||||
enable f16;
|
||||
{{ end -}}
|
||||
|
||||
{{- end -}}
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
// 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
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
enable f16;
|
||||
|
||||
// fn abs(vec<3, f16>) -> vec<3, f16>
|
||||
fn abs_421ca3() {
|
||||
var res: vec3<f16> = abs(vec3<f16>(f16()));
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
abs_421ca3();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
abs_421ca3();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
abs_421ca3();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void abs_421ca3() {
|
||||
vector<float16_t, 3> res = abs((float16_t(0.0h)).xxx);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
abs_421ca3();
|
||||
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() {
|
||||
abs_421ca3();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
abs_421ca3();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
SKIP: FAILED
|
||||
|
||||
void abs_421ca3() {
|
||||
vector<float16_t, 3> res = abs((float16_t(0.0h)).xxx);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
abs_421ca3();
|
||||
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() {
|
||||
abs_421ca3();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
abs_421ca3();
|
||||
return;
|
||||
}
|
||||
FXC validation failure:
|
||||
D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D461B57CF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
#version 310 es
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void abs_421ca3() {
|
||||
f16vec3 res = abs(f16vec3(0.0hf));
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
abs_421ca3();
|
||||
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
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
precision mediump float;
|
||||
|
||||
void abs_421ca3() {
|
||||
f16vec3 res = abs(f16vec3(0.0hf));
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
abs_421ca3();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void abs_421ca3() {
|
||||
f16vec3 res = abs(f16vec3(0.0hf));
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
abs_421ca3();
|
||||
}
|
||||
|
||||
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 abs_421ca3() {
|
||||
half3 res = fabs(half3(0.0h));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
abs_421ca3();
|
||||
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() {
|
||||
abs_421ca3();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
abs_421ca3();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; 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"
|
||||
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 %abs_421ca3 "abs_421ca3"
|
||||
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
|
||||
%half = OpTypeFloat 16
|
||||
%v3half = OpTypeVector %half 3
|
||||
%17 = OpConstantNull %v3half
|
||||
%_ptr_Function_v3half = OpTypePointer Function %v3half
|
||||
%20 = OpTypeFunction %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%abs_421ca3 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v3half Function %17
|
||||
%13 = OpExtInst %v3half %16 FAbs %17
|
||||
OpStore %res %13
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %20
|
||||
%22 = OpLabel
|
||||
%23 = OpFunctionCall %void %abs_421ca3
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%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
|
||||
%29 = OpLabel
|
||||
%30 = OpFunctionCall %void %abs_421ca3
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%32 = OpLabel
|
||||
%33 = OpFunctionCall %void %abs_421ca3
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,21 @@
|
|||
enable f16;
|
||||
|
||||
fn abs_421ca3() {
|
||||
var res : vec3<f16> = abs(vec3<f16>(f16()));
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
abs_421ca3();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
abs_421ca3();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
abs_421ca3();
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
// 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
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
enable f16;
|
||||
|
||||
// fn abs(vec<4, f16>) -> vec<4, f16>
|
||||
fn abs_538d29() {
|
||||
var res: vec4<f16> = abs(vec4<f16>(f16()));
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
abs_538d29();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
abs_538d29();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
abs_538d29();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void abs_538d29() {
|
||||
vector<float16_t, 4> res = abs((float16_t(0.0h)).xxxx);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
abs_538d29();
|
||||
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() {
|
||||
abs_538d29();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
abs_538d29();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
SKIP: FAILED
|
||||
|
||||
void abs_538d29() {
|
||||
vector<float16_t, 4> res = abs((float16_t(0.0h)).xxxx);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
abs_538d29();
|
||||
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() {
|
||||
abs_538d29();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
abs_538d29();
|
||||
return;
|
||||
}
|
||||
FXC validation failure:
|
||||
D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C4B2837D80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
#version 310 es
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void abs_538d29() {
|
||||
f16vec4 res = abs(f16vec4(0.0hf));
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
abs_538d29();
|
||||
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
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
precision mediump float;
|
||||
|
||||
void abs_538d29() {
|
||||
f16vec4 res = abs(f16vec4(0.0hf));
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
abs_538d29();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void abs_538d29() {
|
||||
f16vec4 res = abs(f16vec4(0.0hf));
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
abs_538d29();
|
||||
}
|
||||
|
||||
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 abs_538d29() {
|
||||
half4 res = fabs(half4(0.0h));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
abs_538d29();
|
||||
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() {
|
||||
abs_538d29();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
abs_538d29();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; 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"
|
||||
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 %abs_538d29 "abs_538d29"
|
||||
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
|
||||
%half = OpTypeFloat 16
|
||||
%v4half = OpTypeVector %half 4
|
||||
%17 = OpConstantNull %v4half
|
||||
%_ptr_Function_v4half = OpTypePointer Function %v4half
|
||||
%20 = OpTypeFunction %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%abs_538d29 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v4half Function %17
|
||||
%13 = OpExtInst %v4half %16 FAbs %17
|
||||
OpStore %res %13
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %20
|
||||
%22 = OpLabel
|
||||
%23 = OpFunctionCall %void %abs_538d29
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%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
|
||||
%29 = OpLabel
|
||||
%30 = OpFunctionCall %void %abs_538d29
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%32 = OpLabel
|
||||
%33 = OpFunctionCall %void %abs_538d29
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,21 @@
|
|||
enable f16;
|
||||
|
||||
fn abs_538d29() {
|
||||
var res : vec4<f16> = abs(vec4<f16>(f16()));
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
abs_538d29();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
abs_538d29();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
abs_538d29();
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
// 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
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
enable f16;
|
||||
|
||||
// fn abs(vec<2, f16>) -> vec<2, f16>
|
||||
fn abs_5ae4fe() {
|
||||
var res: vec2<f16> = abs(vec2<f16>(f16()));
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
abs_5ae4fe();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
abs_5ae4fe();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
abs_5ae4fe();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void abs_5ae4fe() {
|
||||
vector<float16_t, 2> res = abs((float16_t(0.0h)).xx);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
abs_5ae4fe();
|
||||
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() {
|
||||
abs_5ae4fe();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
abs_5ae4fe();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
SKIP: FAILED
|
||||
|
||||
void abs_5ae4fe() {
|
||||
vector<float16_t, 2> res = abs((float16_t(0.0h)).xx);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
abs_5ae4fe();
|
||||
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() {
|
||||
abs_5ae4fe();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
abs_5ae4fe();
|
||||
return;
|
||||
}
|
||||
FXC validation failure:
|
||||
D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026FB61B87E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
#version 310 es
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void abs_5ae4fe() {
|
||||
f16vec2 res = abs(f16vec2(0.0hf));
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
abs_5ae4fe();
|
||||
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
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
precision mediump float;
|
||||
|
||||
void abs_5ae4fe() {
|
||||
f16vec2 res = abs(f16vec2(0.0hf));
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
abs_5ae4fe();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void abs_5ae4fe() {
|
||||
f16vec2 res = abs(f16vec2(0.0hf));
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
abs_5ae4fe();
|
||||
}
|
||||
|
||||
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 abs_5ae4fe() {
|
||||
half2 res = fabs(half2(0.0h));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
abs_5ae4fe();
|
||||
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() {
|
||||
abs_5ae4fe();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
abs_5ae4fe();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; 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"
|
||||
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 %abs_5ae4fe "abs_5ae4fe"
|
||||
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
|
||||
%half = OpTypeFloat 16
|
||||
%v2half = OpTypeVector %half 2
|
||||
%17 = OpConstantNull %v2half
|
||||
%_ptr_Function_v2half = OpTypePointer Function %v2half
|
||||
%20 = OpTypeFunction %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%abs_5ae4fe = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v2half Function %17
|
||||
%13 = OpExtInst %v2half %16 FAbs %17
|
||||
OpStore %res %13
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %20
|
||||
%22 = OpLabel
|
||||
%23 = OpFunctionCall %void %abs_5ae4fe
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%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
|
||||
%29 = OpLabel
|
||||
%30 = OpFunctionCall %void %abs_5ae4fe
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%32 = OpLabel
|
||||
%33 = OpFunctionCall %void %abs_5ae4fe
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,21 @@
|
|||
enable f16;
|
||||
|
||||
fn abs_5ae4fe() {
|
||||
var res : vec2<f16> = abs(vec2<f16>(f16()));
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
abs_5ae4fe();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
abs_5ae4fe();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
abs_5ae4fe();
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
// 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
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
enable f16;
|
||||
|
||||
// fn abs(f16) -> f16
|
||||
fn abs_fd247f() {
|
||||
var res: f16 = abs(f16());
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
abs_fd247f();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
abs_fd247f();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
abs_fd247f();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void abs_fd247f() {
|
||||
float16_t res = abs(float16_t(0.0h));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
abs_fd247f();
|
||||
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() {
|
||||
abs_fd247f();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
abs_fd247f();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
SKIP: FAILED
|
||||
|
||||
void abs_fd247f() {
|
||||
float16_t res = abs(float16_t(0.0h));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
abs_fd247f();
|
||||
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() {
|
||||
abs_fd247f();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
abs_fd247f();
|
||||
return;
|
||||
}
|
||||
FXC validation failure:
|
||||
D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C7205F8830(2,3-11): error X3000: unrecognized identifier 'float16_t'
|
||||
D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C7205F8830(2,13-15): error X3000: unrecognized identifier 'res'
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
#version 310 es
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void abs_fd247f() {
|
||||
float16_t res = abs(0.0hf);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
abs_fd247f();
|
||||
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
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
precision mediump float;
|
||||
|
||||
void abs_fd247f() {
|
||||
float16_t res = abs(0.0hf);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
abs_fd247f();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void abs_fd247f() {
|
||||
float16_t res = abs(0.0hf);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
abs_fd247f();
|
||||
}
|
||||
|
||||
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 abs_fd247f() {
|
||||
half res = fabs(0.0h);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
abs_fd247f();
|
||||
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() {
|
||||
abs_fd247f();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
abs_fd247f();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 33
|
||||
; 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"
|
||||
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 %abs_fd247f "abs_fd247f"
|
||||
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
|
||||
%half = OpTypeFloat 16
|
||||
%16 = OpConstantNull %half
|
||||
%_ptr_Function_half = OpTypePointer Function %half
|
||||
%19 = OpTypeFunction %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%abs_fd247f = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_half Function %16
|
||||
%13 = OpExtInst %half %15 FAbs %16
|
||||
OpStore %res %13
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %19
|
||||
%21 = OpLabel
|
||||
%22 = OpFunctionCall %void %abs_fd247f
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%24 = OpLabel
|
||||
%25 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %25
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%28 = OpLabel
|
||||
%29 = OpFunctionCall %void %abs_fd247f
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%31 = OpLabel
|
||||
%32 = OpFunctionCall %void %abs_fd247f
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,21 @@
|
|||
enable f16;
|
||||
|
||||
fn abs_fd247f() {
|
||||
var res : f16 = abs(f16());
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
abs_fd247f();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
abs_fd247f();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
abs_fd247f();
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
// 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
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
enable f16;
|
||||
|
||||
// fn acos(vec<2, f16>) -> vec<2, f16>
|
||||
fn acos_004aff() {
|
||||
var res: vec2<f16> = acos(vec2<f16>(f16()));
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
acos_004aff();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
acos_004aff();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
acos_004aff();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void acos_004aff() {
|
||||
vector<float16_t, 2> res = acos((float16_t(0.0h)).xx);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acos_004aff();
|
||||
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() {
|
||||
acos_004aff();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
acos_004aff();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
SKIP: FAILED
|
||||
|
||||
void acos_004aff() {
|
||||
vector<float16_t, 2> res = acos((float16_t(0.0h)).xx);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acos_004aff();
|
||||
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() {
|
||||
acos_004aff();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
acos_004aff();
|
||||
return;
|
||||
}
|
||||
FXC validation failure:
|
||||
D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B9F5C6E5B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
#version 310 es
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void acos_004aff() {
|
||||
f16vec2 res = acos(f16vec2(0.0hf));
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
acos_004aff();
|
||||
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
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
precision mediump float;
|
||||
|
||||
void acos_004aff() {
|
||||
f16vec2 res = acos(f16vec2(0.0hf));
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
acos_004aff();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void acos_004aff() {
|
||||
f16vec2 res = acos(f16vec2(0.0hf));
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
acos_004aff();
|
||||
}
|
||||
|
||||
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 acos_004aff() {
|
||||
half2 res = acos(half2(0.0h));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acos_004aff();
|
||||
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() {
|
||||
acos_004aff();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
acos_004aff();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; 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"
|
||||
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 %acos_004aff "acos_004aff"
|
||||
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
|
||||
%half = OpTypeFloat 16
|
||||
%v2half = OpTypeVector %half 2
|
||||
%17 = OpConstantNull %v2half
|
||||
%_ptr_Function_v2half = OpTypePointer Function %v2half
|
||||
%20 = OpTypeFunction %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%acos_004aff = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v2half Function %17
|
||||
%13 = OpExtInst %v2half %16 Acos %17
|
||||
OpStore %res %13
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %20
|
||||
%22 = OpLabel
|
||||
%23 = OpFunctionCall %void %acos_004aff
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%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
|
||||
%29 = OpLabel
|
||||
%30 = OpFunctionCall %void %acos_004aff
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%32 = OpLabel
|
||||
%33 = OpFunctionCall %void %acos_004aff
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,21 @@
|
|||
enable f16;
|
||||
|
||||
fn acos_004aff() {
|
||||
var res : vec2<f16> = acos(vec2<f16>(f16()));
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
acos_004aff();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
acos_004aff();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
acos_004aff();
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
// 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
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
enable f16;
|
||||
|
||||
// fn acos(vec<4, f16>) -> vec<4, f16>
|
||||
fn acos_203628() {
|
||||
var res: vec4<f16> = acos(vec4<f16>(f16()));
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
acos_203628();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
acos_203628();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
acos_203628();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void acos_203628() {
|
||||
vector<float16_t, 4> res = acos((float16_t(0.0h)).xxxx);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acos_203628();
|
||||
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() {
|
||||
acos_203628();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
acos_203628();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
SKIP: FAILED
|
||||
|
||||
void acos_203628() {
|
||||
vector<float16_t, 4> res = acos((float16_t(0.0h)).xxxx);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acos_203628();
|
||||
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() {
|
||||
acos_203628();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
acos_203628();
|
||||
return;
|
||||
}
|
||||
FXC validation failure:
|
||||
D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019D14DE1160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
#version 310 es
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void acos_203628() {
|
||||
f16vec4 res = acos(f16vec4(0.0hf));
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
acos_203628();
|
||||
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
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
precision mediump float;
|
||||
|
||||
void acos_203628() {
|
||||
f16vec4 res = acos(f16vec4(0.0hf));
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
acos_203628();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void acos_203628() {
|
||||
f16vec4 res = acos(f16vec4(0.0hf));
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
acos_203628();
|
||||
}
|
||||
|
||||
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 acos_203628() {
|
||||
half4 res = acos(half4(0.0h));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acos_203628();
|
||||
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() {
|
||||
acos_203628();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
acos_203628();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; 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"
|
||||
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 %acos_203628 "acos_203628"
|
||||
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
|
||||
%half = OpTypeFloat 16
|
||||
%v4half = OpTypeVector %half 4
|
||||
%17 = OpConstantNull %v4half
|
||||
%_ptr_Function_v4half = OpTypePointer Function %v4half
|
||||
%20 = OpTypeFunction %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%acos_203628 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v4half Function %17
|
||||
%13 = OpExtInst %v4half %16 Acos %17
|
||||
OpStore %res %13
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %20
|
||||
%22 = OpLabel
|
||||
%23 = OpFunctionCall %void %acos_203628
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%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
|
||||
%29 = OpLabel
|
||||
%30 = OpFunctionCall %void %acos_203628
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%32 = OpLabel
|
||||
%33 = OpFunctionCall %void %acos_203628
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,21 @@
|
|||
enable f16;
|
||||
|
||||
fn acos_203628() {
|
||||
var res : vec4<f16> = acos(vec4<f16>(f16()));
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
acos_203628();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
acos_203628();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
acos_203628();
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
// 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
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
enable f16;
|
||||
|
||||
// fn acos(f16) -> f16
|
||||
fn acos_303e3d() {
|
||||
var res: f16 = acos(f16());
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
acos_303e3d();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
acos_303e3d();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
acos_303e3d();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void acos_303e3d() {
|
||||
float16_t res = acos(float16_t(0.0h));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acos_303e3d();
|
||||
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() {
|
||||
acos_303e3d();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
acos_303e3d();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
SKIP: FAILED
|
||||
|
||||
void acos_303e3d() {
|
||||
float16_t res = acos(float16_t(0.0h));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acos_303e3d();
|
||||
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() {
|
||||
acos_303e3d();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
acos_303e3d();
|
||||
return;
|
||||
}
|
||||
FXC validation failure:
|
||||
D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021AE9120540(2,3-11): error X3000: unrecognized identifier 'float16_t'
|
||||
D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021AE9120540(2,13-15): error X3000: unrecognized identifier 'res'
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
#version 310 es
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void acos_303e3d() {
|
||||
float16_t res = acos(0.0hf);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
acos_303e3d();
|
||||
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
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
precision mediump float;
|
||||
|
||||
void acos_303e3d() {
|
||||
float16_t res = acos(0.0hf);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
acos_303e3d();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void acos_303e3d() {
|
||||
float16_t res = acos(0.0hf);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
acos_303e3d();
|
||||
}
|
||||
|
||||
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 acos_303e3d() {
|
||||
half res = acos(0.0h);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acos_303e3d();
|
||||
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() {
|
||||
acos_303e3d();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
acos_303e3d();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 33
|
||||
; 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"
|
||||
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 %acos_303e3d "acos_303e3d"
|
||||
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
|
||||
%half = OpTypeFloat 16
|
||||
%16 = OpConstantNull %half
|
||||
%_ptr_Function_half = OpTypePointer Function %half
|
||||
%19 = OpTypeFunction %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%acos_303e3d = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_half Function %16
|
||||
%13 = OpExtInst %half %15 Acos %16
|
||||
OpStore %res %13
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %19
|
||||
%21 = OpLabel
|
||||
%22 = OpFunctionCall %void %acos_303e3d
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%24 = OpLabel
|
||||
%25 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %25
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %9
|
||||
%28 = OpLabel
|
||||
%29 = OpFunctionCall %void %acos_303e3d
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%31 = OpLabel
|
||||
%32 = OpFunctionCall %void %acos_303e3d
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,21 @@
|
|||
enable f16;
|
||||
|
||||
fn acos_303e3d() {
|
||||
var res : f16 = acos(f16());
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
acos_303e3d();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
acos_303e3d();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
acos_303e3d();
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
// 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
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
enable f16;
|
||||
|
||||
// fn acos(vec<3, f16>) -> vec<3, f16>
|
||||
fn acos_f47057() {
|
||||
var res: vec3<f16> = acos(vec3<f16>(f16()));
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
acos_f47057();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
acos_f47057();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
acos_f47057();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
void acos_f47057() {
|
||||
vector<float16_t, 3> res = acos((float16_t(0.0h)).xxx);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acos_f47057();
|
||||
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() {
|
||||
acos_f47057();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
acos_f47057();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
SKIP: FAILED
|
||||
|
||||
void acos_f47057() {
|
||||
vector<float16_t, 3> res = acos((float16_t(0.0h)).xxx);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acos_f47057();
|
||||
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() {
|
||||
acos_f47057();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
acos_f47057();
|
||||
return;
|
||||
}
|
||||
FXC validation failure:
|
||||
D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020584057560(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
#version 310 es
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void acos_f47057() {
|
||||
f16vec3 res = acos(f16vec3(0.0hf));
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
acos_f47057();
|
||||
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
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
precision mediump float;
|
||||
|
||||
void acos_f47057() {
|
||||
f16vec3 res = acos(f16vec3(0.0hf));
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
acos_f47057();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void acos_f47057() {
|
||||
f16vec3 res = acos(f16vec3(0.0hf));
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
acos_f47057();
|
||||
}
|
||||
|
||||
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 acos_f47057() {
|
||||
half3 res = acos(half3(0.0h));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acos_f47057();
|
||||
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() {
|
||||
acos_f47057();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
acos_f47057();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; 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"
|
||||
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 %acos_f47057 "acos_f47057"
|
||||
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
|
||||
%half = OpTypeFloat 16
|
||||
%v3half = OpTypeVector %half 3
|
||||
%17 = OpConstantNull %v3half
|
||||
%_ptr_Function_v3half = OpTypePointer Function %v3half
|
||||
%20 = OpTypeFunction %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%acos_f47057 = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v3half Function %17
|
||||
%13 = OpExtInst %v3half %16 Acos %17
|
||||
OpStore %res %13
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %20
|
||||
%22 = OpLabel
|
||||
%23 = OpFunctionCall %void %acos_f47057
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %9
|
||||
%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
|
||||
%29 = OpLabel
|
||||
%30 = OpFunctionCall %void %acos_f47057
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %9
|
||||
%32 = OpLabel
|
||||
%33 = OpFunctionCall %void %acos_f47057
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,21 @@
|
|||
enable f16;
|
||||
|
||||
fn acos_f47057() {
|
||||
var res : vec3<f16> = acos(vec3<f16>(f16()));
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
acos_f47057();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
acos_f47057();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
acos_f47057();
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
// 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
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
enable f16;
|
||||
|
||||
// fn acosh(vec<2, f16>) -> vec<2, f16>
|
||||
fn acosh_5f49d8() {
|
||||
var res: vec2<f16> = acosh(vec2<f16>(f16()));
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
acosh_5f49d8();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
acosh_5f49d8();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
acosh_5f49d8();
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
vector<float16_t, 2> tint_acosh(vector<float16_t, 2> x) {
|
||||
return log((x + sqrt(((x * x) - float16_t(1.0h)))));
|
||||
}
|
||||
|
||||
void acosh_5f49d8() {
|
||||
vector<float16_t, 2> res = tint_acosh((float16_t(0.0h)).xx);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acosh_5f49d8();
|
||||
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() {
|
||||
acosh_5f49d8();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
acosh_5f49d8();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
SKIP: FAILED
|
||||
|
||||
vector<float16_t, 2> tint_acosh(vector<float16_t, 2> x) {
|
||||
return log((x + sqrt(((x * x) - float16_t(1.0h)))));
|
||||
}
|
||||
|
||||
void acosh_5f49d8() {
|
||||
vector<float16_t, 2> res = tint_acosh((float16_t(0.0h)).xx);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acosh_5f49d8();
|
||||
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() {
|
||||
acosh_5f49d8();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
acosh_5f49d8();
|
||||
return;
|
||||
}
|
||||
FXC validation failure:
|
||||
D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001641C7488B0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
#version 310 es
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
f16vec2 tint_acosh(f16vec2 x) {
|
||||
return mix(acosh(x), f16vec2(0.0hf), lessThan(x, f16vec2(1.0hf)));
|
||||
}
|
||||
|
||||
void acosh_5f49d8() {
|
||||
f16vec2 res = tint_acosh(f16vec2(0.0hf));
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
acosh_5f49d8();
|
||||
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
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
precision mediump float;
|
||||
|
||||
f16vec2 tint_acosh(f16vec2 x) {
|
||||
return mix(acosh(x), f16vec2(0.0hf), lessThan(x, f16vec2(1.0hf)));
|
||||
}
|
||||
|
||||
void acosh_5f49d8() {
|
||||
f16vec2 res = tint_acosh(f16vec2(0.0hf));
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
acosh_5f49d8();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
f16vec2 tint_acosh(f16vec2 x) {
|
||||
return mix(acosh(x), f16vec2(0.0hf), lessThan(x, f16vec2(1.0hf)));
|
||||
}
|
||||
|
||||
void acosh_5f49d8() {
|
||||
f16vec2 res = tint_acosh(f16vec2(0.0hf));
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
acosh_5f49d8();
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void main() {
|
||||
compute_main();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
half2 tint_acosh(half2 x) {
|
||||
return select(acosh(x), half2(0.0h), (x < half2(1.0h)));
|
||||
}
|
||||
|
||||
void acosh_5f49d8() {
|
||||
half2 res = tint_acosh(half2(0.0h));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acosh_5f49d8();
|
||||
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() {
|
||||
acosh_5f49d8();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
acosh_5f49d8();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 45
|
||||
; 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"
|
||||
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 %tint_acosh "tint_acosh"
|
||||
OpName %x "x"
|
||||
OpName %acosh_5f49d8 "acosh_5f49d8"
|
||||
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
|
||||
%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
|
||||
%_ptr_Function_v2half = OpTypePointer Function %v2half
|
||||
%31 = OpTypeFunction %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%tint_acosh = OpFunction %v2half None %9
|
||||
%x = OpFunctionParameter %v2half
|
||||
%14 = OpLabel
|
||||
%18 = OpFOrdLessThan %v2bool %x %17
|
||||
%22 = OpExtInst %v2half %23 Acosh %x
|
||||
%15 = OpSelect %v2half %18 %21 %22
|
||||
OpReturnValue %15
|
||||
OpFunctionEnd
|
||||
%acosh_5f49d8 = OpFunction %void None %24
|
||||
%27 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v2half Function %21
|
||||
%28 = OpFunctionCall %v2half %tint_acosh %21
|
||||
OpStore %res %28
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %31
|
||||
%33 = OpLabel
|
||||
%34 = OpFunctionCall %void %acosh_5f49d8
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %24
|
||||
%36 = OpLabel
|
||||
%37 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %37
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %24
|
||||
%40 = OpLabel
|
||||
%41 = OpFunctionCall %void %acosh_5f49d8
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %24
|
||||
%43 = OpLabel
|
||||
%44 = OpFunctionCall %void %acosh_5f49d8
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,21 @@
|
|||
enable f16;
|
||||
|
||||
fn acosh_5f49d8() {
|
||||
var res : vec2<f16> = acosh(vec2<f16>(f16()));
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
acosh_5f49d8();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
acosh_5f49d8();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
acosh_5f49d8();
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
// 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
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
enable f16;
|
||||
|
||||
// fn acosh(f16) -> f16
|
||||
fn acosh_a37dfe() {
|
||||
var res: f16 = acosh(f16());
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
acosh_a37dfe();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
acosh_a37dfe();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
acosh_a37dfe();
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
float16_t tint_acosh(float16_t x) {
|
||||
return log((x + sqrt(((x * x) - float16_t(1.0h)))));
|
||||
}
|
||||
|
||||
void acosh_a37dfe() {
|
||||
float16_t res = tint_acosh(float16_t(0.0h));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acosh_a37dfe();
|
||||
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() {
|
||||
acosh_a37dfe();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
acosh_a37dfe();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
SKIP: FAILED
|
||||
|
||||
float16_t tint_acosh(float16_t x) {
|
||||
return log((x + sqrt(((x * x) - float16_t(1.0h)))));
|
||||
}
|
||||
|
||||
void acosh_a37dfe() {
|
||||
float16_t res = tint_acosh(float16_t(0.0h));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acosh_a37dfe();
|
||||
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() {
|
||||
acosh_a37dfe();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
acosh_a37dfe();
|
||||
return;
|
||||
}
|
||||
FXC validation failure:
|
||||
D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000285D7A33130(1,1-9): error X3000: unrecognized identifier 'float16_t'
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
#version 310 es
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
float16_t tint_acosh(float16_t x) {
|
||||
return ((x < 1.0hf) ? 0.0hf : acosh(x));
|
||||
}
|
||||
|
||||
void acosh_a37dfe() {
|
||||
float16_t res = tint_acosh(0.0hf);
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
acosh_a37dfe();
|
||||
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
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
precision mediump float;
|
||||
|
||||
float16_t tint_acosh(float16_t x) {
|
||||
return ((x < 1.0hf) ? 0.0hf : acosh(x));
|
||||
}
|
||||
|
||||
void acosh_a37dfe() {
|
||||
float16_t res = tint_acosh(0.0hf);
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
acosh_a37dfe();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
float16_t tint_acosh(float16_t x) {
|
||||
return ((x < 1.0hf) ? 0.0hf : acosh(x));
|
||||
}
|
||||
|
||||
void acosh_a37dfe() {
|
||||
float16_t res = tint_acosh(0.0hf);
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
acosh_a37dfe();
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void main() {
|
||||
compute_main();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
half tint_acosh(half x) {
|
||||
return select(acosh(x), 0.0h, (x < 1.0h));
|
||||
}
|
||||
|
||||
void acosh_a37dfe() {
|
||||
half res = tint_acosh(0.0h);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acosh_a37dfe();
|
||||
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() {
|
||||
acosh_a37dfe();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
acosh_a37dfe();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 42
|
||||
; 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"
|
||||
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 %tint_acosh "tint_acosh"
|
||||
OpName %x "x"
|
||||
OpName %acosh_a37dfe "acosh_a37dfe"
|
||||
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
|
||||
%half = OpTypeFloat 16
|
||||
%9 = OpTypeFunction %half %half
|
||||
%half_0x1p_0 = OpConstant %half 0x1p+0
|
||||
%bool = OpTypeBool
|
||||
%18 = OpConstantNull %half
|
||||
%void = OpTypeVoid
|
||||
%21 = OpTypeFunction %void
|
||||
%_ptr_Function_half = OpTypePointer Function %half
|
||||
%28 = OpTypeFunction %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%tint_acosh = OpFunction %half None %9
|
||||
%x = OpFunctionParameter %half
|
||||
%13 = OpLabel
|
||||
%16 = OpFOrdLessThan %bool %x %half_0x1p_0
|
||||
%19 = OpExtInst %half %20 Acosh %x
|
||||
%14 = OpSelect %half %16 %18 %19
|
||||
OpReturnValue %14
|
||||
OpFunctionEnd
|
||||
%acosh_a37dfe = OpFunction %void None %21
|
||||
%24 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_half Function %18
|
||||
%25 = OpFunctionCall %half %tint_acosh %18
|
||||
OpStore %res %25
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %28
|
||||
%30 = OpLabel
|
||||
%31 = OpFunctionCall %void %acosh_a37dfe
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %21
|
||||
%33 = OpLabel
|
||||
%34 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %34
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %21
|
||||
%37 = OpLabel
|
||||
%38 = OpFunctionCall %void %acosh_a37dfe
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %21
|
||||
%40 = OpLabel
|
||||
%41 = OpFunctionCall %void %acosh_a37dfe
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,21 @@
|
|||
enable f16;
|
||||
|
||||
fn acosh_a37dfe() {
|
||||
var res : f16 = acosh(f16());
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
acosh_a37dfe();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
acosh_a37dfe();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
acosh_a37dfe();
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
// 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
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
enable f16;
|
||||
|
||||
// fn acosh(vec<4, f16>) -> vec<4, f16>
|
||||
fn acosh_de60d8() {
|
||||
var res: vec4<f16> = acosh(vec4<f16>(f16()));
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
acosh_de60d8();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
acosh_de60d8();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
acosh_de60d8();
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
vector<float16_t, 4> tint_acosh(vector<float16_t, 4> x) {
|
||||
return log((x + sqrt(((x * x) - float16_t(1.0h)))));
|
||||
}
|
||||
|
||||
void acosh_de60d8() {
|
||||
vector<float16_t, 4> res = tint_acosh((float16_t(0.0h)).xxxx);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acosh_de60d8();
|
||||
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() {
|
||||
acosh_de60d8();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
acosh_de60d8();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
SKIP: FAILED
|
||||
|
||||
vector<float16_t, 4> tint_acosh(vector<float16_t, 4> x) {
|
||||
return log((x + sqrt(((x * x) - float16_t(1.0h)))));
|
||||
}
|
||||
|
||||
void acosh_de60d8() {
|
||||
vector<float16_t, 4> res = tint_acosh((float16_t(0.0h)).xxxx);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acosh_de60d8();
|
||||
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() {
|
||||
acosh_de60d8();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
acosh_de60d8();
|
||||
return;
|
||||
}
|
||||
FXC validation failure:
|
||||
D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027AF4D645C0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
#version 310 es
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
f16vec4 tint_acosh(f16vec4 x) {
|
||||
return mix(acosh(x), f16vec4(0.0hf), lessThan(x, f16vec4(1.0hf)));
|
||||
}
|
||||
|
||||
void acosh_de60d8() {
|
||||
f16vec4 res = tint_acosh(f16vec4(0.0hf));
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
acosh_de60d8();
|
||||
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
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
precision mediump float;
|
||||
|
||||
f16vec4 tint_acosh(f16vec4 x) {
|
||||
return mix(acosh(x), f16vec4(0.0hf), lessThan(x, f16vec4(1.0hf)));
|
||||
}
|
||||
|
||||
void acosh_de60d8() {
|
||||
f16vec4 res = tint_acosh(f16vec4(0.0hf));
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
acosh_de60d8();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
f16vec4 tint_acosh(f16vec4 x) {
|
||||
return mix(acosh(x), f16vec4(0.0hf), lessThan(x, f16vec4(1.0hf)));
|
||||
}
|
||||
|
||||
void acosh_de60d8() {
|
||||
f16vec4 res = tint_acosh(f16vec4(0.0hf));
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
acosh_de60d8();
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void main() {
|
||||
compute_main();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
half4 tint_acosh(half4 x) {
|
||||
return select(acosh(x), half4(0.0h), (x < half4(1.0h)));
|
||||
}
|
||||
|
||||
void acosh_de60d8() {
|
||||
half4 res = tint_acosh(half4(0.0h));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acosh_de60d8();
|
||||
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() {
|
||||
acosh_de60d8();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
acosh_de60d8();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 45
|
||||
; 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"
|
||||
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 %tint_acosh "tint_acosh"
|
||||
OpName %x "x"
|
||||
OpName %acosh_de60d8 "acosh_de60d8"
|
||||
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
|
||||
%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
|
||||
%_ptr_Function_v4half = OpTypePointer Function %v4half
|
||||
%31 = OpTypeFunction %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%tint_acosh = OpFunction %v4half None %9
|
||||
%x = OpFunctionParameter %v4half
|
||||
%14 = OpLabel
|
||||
%18 = OpFOrdLessThan %v4bool %x %17
|
||||
%22 = OpExtInst %v4half %23 Acosh %x
|
||||
%15 = OpSelect %v4half %18 %21 %22
|
||||
OpReturnValue %15
|
||||
OpFunctionEnd
|
||||
%acosh_de60d8 = OpFunction %void None %24
|
||||
%27 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v4half Function %21
|
||||
%28 = OpFunctionCall %v4half %tint_acosh %21
|
||||
OpStore %res %28
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %31
|
||||
%33 = OpLabel
|
||||
%34 = OpFunctionCall %void %acosh_de60d8
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %24
|
||||
%36 = OpLabel
|
||||
%37 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %37
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %24
|
||||
%40 = OpLabel
|
||||
%41 = OpFunctionCall %void %acosh_de60d8
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %24
|
||||
%43 = OpLabel
|
||||
%44 = OpFunctionCall %void %acosh_de60d8
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,21 @@
|
|||
enable f16;
|
||||
|
||||
fn acosh_de60d8() {
|
||||
var res : vec4<f16> = acosh(vec4<f16>(f16()));
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
acosh_de60d8();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
acosh_de60d8();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
acosh_de60d8();
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
// 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
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
enable f16;
|
||||
|
||||
// fn acosh(vec<3, f16>) -> vec<3, f16>
|
||||
fn acosh_f56574() {
|
||||
var res: vec3<f16> = acosh(vec3<f16>(f16()));
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
acosh_f56574();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
acosh_f56574();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
acosh_f56574();
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
vector<float16_t, 3> tint_acosh(vector<float16_t, 3> x) {
|
||||
return log((x + sqrt(((x * x) - float16_t(1.0h)))));
|
||||
}
|
||||
|
||||
void acosh_f56574() {
|
||||
vector<float16_t, 3> res = tint_acosh((float16_t(0.0h)).xxx);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acosh_f56574();
|
||||
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() {
|
||||
acosh_f56574();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
acosh_f56574();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
SKIP: FAILED
|
||||
|
||||
vector<float16_t, 3> tint_acosh(vector<float16_t, 3> x) {
|
||||
return log((x + sqrt(((x * x) - float16_t(1.0h)))));
|
||||
}
|
||||
|
||||
void acosh_f56574() {
|
||||
vector<float16_t, 3> res = tint_acosh((float16_t(0.0h)).xxx);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acosh_f56574();
|
||||
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() {
|
||||
acosh_f56574();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
acosh_f56574();
|
||||
return;
|
||||
}
|
||||
FXC validation failure:
|
||||
D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000221246484D0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
#version 310 es
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
f16vec3 tint_acosh(f16vec3 x) {
|
||||
return mix(acosh(x), f16vec3(0.0hf), lessThan(x, f16vec3(1.0hf)));
|
||||
}
|
||||
|
||||
void acosh_f56574() {
|
||||
f16vec3 res = tint_acosh(f16vec3(0.0hf));
|
||||
}
|
||||
|
||||
vec4 vertex_main() {
|
||||
acosh_f56574();
|
||||
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
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
precision mediump float;
|
||||
|
||||
f16vec3 tint_acosh(f16vec3 x) {
|
||||
return mix(acosh(x), f16vec3(0.0hf), lessThan(x, f16vec3(1.0hf)));
|
||||
}
|
||||
|
||||
void acosh_f56574() {
|
||||
f16vec3 res = tint_acosh(f16vec3(0.0hf));
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
acosh_f56574();
|
||||
}
|
||||
|
||||
void main() {
|
||||
fragment_main();
|
||||
return;
|
||||
}
|
||||
#version 310 es
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
f16vec3 tint_acosh(f16vec3 x) {
|
||||
return mix(acosh(x), f16vec3(0.0hf), lessThan(x, f16vec3(1.0hf)));
|
||||
}
|
||||
|
||||
void acosh_f56574() {
|
||||
f16vec3 res = tint_acosh(f16vec3(0.0hf));
|
||||
}
|
||||
|
||||
void compute_main() {
|
||||
acosh_f56574();
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void main() {
|
||||
compute_main();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
half3 tint_acosh(half3 x) {
|
||||
return select(acosh(x), half3(0.0h), (x < half3(1.0h)));
|
||||
}
|
||||
|
||||
void acosh_f56574() {
|
||||
half3 res = tint_acosh(half3(0.0h));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value [[position]];
|
||||
};
|
||||
|
||||
float4 vertex_main_inner() {
|
||||
acosh_f56574();
|
||||
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() {
|
||||
acosh_f56574();
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void compute_main() {
|
||||
acosh_f56574();
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 45
|
||||
; 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"
|
||||
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 %tint_acosh "tint_acosh"
|
||||
OpName %x "x"
|
||||
OpName %acosh_f56574 "acosh_f56574"
|
||||
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
|
||||
%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
|
||||
%_ptr_Function_v3half = OpTypePointer Function %v3half
|
||||
%31 = OpTypeFunction %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%tint_acosh = OpFunction %v3half None %9
|
||||
%x = OpFunctionParameter %v3half
|
||||
%14 = OpLabel
|
||||
%18 = OpFOrdLessThan %v3bool %x %17
|
||||
%22 = OpExtInst %v3half %23 Acosh %x
|
||||
%15 = OpSelect %v3half %18 %21 %22
|
||||
OpReturnValue %15
|
||||
OpFunctionEnd
|
||||
%acosh_f56574 = OpFunction %void None %24
|
||||
%27 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v3half Function %21
|
||||
%28 = OpFunctionCall %v3half %tint_acosh %21
|
||||
OpStore %res %28
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main_inner = OpFunction %v4float None %31
|
||||
%33 = OpLabel
|
||||
%34 = OpFunctionCall %void %acosh_f56574
|
||||
OpReturnValue %5
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %24
|
||||
%36 = OpLabel
|
||||
%37 = OpFunctionCall %v4float %vertex_main_inner
|
||||
OpStore %value %37
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %24
|
||||
%40 = OpLabel
|
||||
%41 = OpFunctionCall %void %acosh_f56574
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %24
|
||||
%43 = OpLabel
|
||||
%44 = OpFunctionCall %void %acosh_f56574
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,21 @@
|
|||
enable f16;
|
||||
|
||||
fn acosh_f56574() {
|
||||
var res : vec3<f16> = acosh(vec3<f16>(f16()));
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
acosh_f56574();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
acosh_f56574();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
acosh_f56574();
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
// 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
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
enable f16;
|
||||
struct SB_RO {
|
||||
arg_0: array<f16>,
|
||||
};
|
||||
@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
|
||||
|
||||
// fn arrayLength(ptr<storage, array<f16>, read>) -> u32
|
||||
fn arrayLength_8421b9() {
|
||||
var res: u32 = arrayLength(&sb_ro.arg_0);
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
arrayLength_8421b9();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
arrayLength_8421b9();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
arrayLength_8421b9();
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
SKIP: FAILED
|
||||
|
||||
gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
|
||||
arg_0: array<f16>,
|
||||
^^^^^^^^^^
|
||||
|
||||
gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
|
||||
/* align(2) size(2) */ struct SB_RO {
|
||||
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
|
||||
/* */ };
|
||||
struct SB_RO {
|
||||
^^^^^^
|
||||
|
||||
gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
|
||||
@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
|
||||
^^^^^
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
SKIP: FAILED
|
||||
|
||||
gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
|
||||
arg_0: array<f16>,
|
||||
^^^^^^^^^^
|
||||
|
||||
gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
|
||||
/* align(2) size(2) */ struct SB_RO {
|
||||
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
|
||||
/* */ };
|
||||
struct SB_RO {
|
||||
^^^^^^
|
||||
|
||||
gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
|
||||
@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
|
||||
^^^^^
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
SKIP: FAILED
|
||||
|
||||
gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
|
||||
arg_0: array<f16>,
|
||||
^^^^^^^^^^
|
||||
|
||||
gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
|
||||
/* align(2) size(2) */ struct SB_RO {
|
||||
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
|
||||
/* */ };
|
||||
struct SB_RO {
|
||||
^^^^^^
|
||||
|
||||
gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
|
||||
@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
|
||||
^^^^^
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
SKIP: FAILED
|
||||
|
||||
gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
|
||||
arg_0: array<f16>,
|
||||
^^^^^^^^^^
|
||||
|
||||
gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
|
||||
/* align(2) size(2) */ struct SB_RO {
|
||||
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
|
||||
/* */ };
|
||||
struct SB_RO {
|
||||
^^^^^^
|
||||
|
||||
gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
|
||||
@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
|
||||
^^^^^
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
SKIP: FAILED
|
||||
|
||||
gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
|
||||
arg_0: array<f16>,
|
||||
^^^^^^^^^^
|
||||
|
||||
gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
|
||||
/* align(2) size(2) */ struct SB_RO {
|
||||
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
|
||||
/* */ };
|
||||
struct SB_RO {
|
||||
^^^^^^
|
||||
|
||||
gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
|
||||
@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
|
||||
^^^^^
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
SKIP: FAILED
|
||||
|
||||
gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
|
||||
arg_0: array<f16>,
|
||||
^^^^^^^^^^
|
||||
|
||||
gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
|
||||
/* align(2) size(2) */ struct SB_RO {
|
||||
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
|
||||
/* */ };
|
||||
struct SB_RO {
|
||||
^^^^^^
|
||||
|
||||
gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
|
||||
@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
|
||||
^^^^^
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
// 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
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
enable f16;
|
||||
struct SB_RW {
|
||||
arg_0: array<f16>,
|
||||
};
|
||||
@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
|
||||
|
||||
// fn arrayLength(ptr<storage, array<f16>, read_write>) -> u32
|
||||
fn arrayLength_cbd6b5() {
|
||||
var res: u32 = arrayLength(&sb_rw.arg_0);
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
arrayLength_cbd6b5();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
arrayLength_cbd6b5();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
arrayLength_cbd6b5();
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
SKIP: FAILED
|
||||
|
||||
gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
|
||||
arg_0: array<f16>,
|
||||
^^^^^^^^^^
|
||||
|
||||
gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
|
||||
/* align(2) size(2) */ struct SB_RW {
|
||||
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
|
||||
/* */ };
|
||||
struct SB_RW {
|
||||
^^^^^^
|
||||
|
||||
gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
|
||||
@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
|
||||
^^^^^
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
SKIP: FAILED
|
||||
|
||||
gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
|
||||
arg_0: array<f16>,
|
||||
^^^^^^^^^^
|
||||
|
||||
gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
|
||||
/* align(2) size(2) */ struct SB_RW {
|
||||
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
|
||||
/* */ };
|
||||
struct SB_RW {
|
||||
^^^^^^
|
||||
|
||||
gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
|
||||
@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
|
||||
^^^^^
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
SKIP: FAILED
|
||||
|
||||
gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
|
||||
arg_0: array<f16>,
|
||||
^^^^^^^^^^
|
||||
|
||||
gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
|
||||
/* align(2) size(2) */ struct SB_RW {
|
||||
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
|
||||
/* */ };
|
||||
struct SB_RW {
|
||||
^^^^^^
|
||||
|
||||
gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
|
||||
@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
|
||||
^^^^^
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
SKIP: FAILED
|
||||
|
||||
gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
|
||||
arg_0: array<f16>,
|
||||
^^^^^^^^^^
|
||||
|
||||
gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
|
||||
/* align(2) size(2) */ struct SB_RW {
|
||||
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
|
||||
/* */ };
|
||||
struct SB_RW {
|
||||
^^^^^^
|
||||
|
||||
gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
|
||||
@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
|
||||
^^^^^
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
SKIP: FAILED
|
||||
|
||||
gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
|
||||
arg_0: array<f16>,
|
||||
^^^^^^^^^^
|
||||
|
||||
gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
|
||||
/* align(2) size(2) */ struct SB_RW {
|
||||
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
|
||||
/* */ };
|
||||
struct SB_RW {
|
||||
^^^^^^
|
||||
|
||||
gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
|
||||
@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
|
||||
^^^^^
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
SKIP: FAILED
|
||||
|
||||
gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
|
||||
arg_0: array<f16>,
|
||||
^^^^^^^^^^
|
||||
|
||||
gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
|
||||
/* align(2) size(2) */ struct SB_RW {
|
||||
/* offset(0) align(2) size(2) */ arg_0 : array<f16>;
|
||||
/* */ };
|
||||
struct SB_RW {
|
||||
^^^^^^
|
||||
|
||||
gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
|
||||
@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
|
||||
^^^^^
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
// 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
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
enable f16;
|
||||
|
||||
// fn asin(f16) -> f16
|
||||
fn asin_11dfda() {
|
||||
var res: f16 = asin(f16());
|
||||
}
|
||||
|
||||
@vertex
|
||||
fn vertex_main() -> @builtin(position) vec4<f32> {
|
||||
asin_11dfda();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
@fragment
|
||||
fn fragment_main() {
|
||||
asin_11dfda();
|
||||
}
|
||||
|
||||
@compute @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
asin_11dfda();
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue