tint: Remove use of inf / nans from e2e tests

We're not supporting these, even as hex-floats. Replace them with finite
float values.

Bug: tint:1504
Change-Id: Id5e304d2bdd79576b68b43a1afb5cce2cd6ad01a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91967
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton 2022-05-31 21:35:00 +00:00 committed by Dawn LUCI CQ
parent bfb5fd794c
commit 16175ac2df
12 changed files with 651 additions and 652 deletions

View File

@ -35,31 +35,31 @@
%18 = OpTypeFunction %void
%float = OpTypeFloat 32
%_ptr_Function_float = OpTypePointer Function %float
%float_0x1_8p_128 = OpConstant %float 0x1.8p+128
%float_1 = OpConstant %float 1.0
%bool = OpTypeBool
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%uint = OpTypeInt 32 0
%uint_2 = OpConstant %uint 2
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%buf0 = OpTypeStruct %_arr_int_uint_2
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%_ = OpVariable %_ptr_Uniform_buf0 Uniform
%int_0 = OpConstant %int 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%_ptr_Uniform_int = OpTypePointer Uniform %int
%uint_1 = OpConstant %uint 1
%_arr_float_uint_1 = OpTypeArray %float %uint_1
%_arr_float_uint_1 = OpTypeArray %float %uint_1
%buf1 = OpTypeStruct %_arr_float_uint_1
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%__0 = OpVariable %_ptr_Uniform_buf1 Uniform
%_ptr_Uniform_float = OpTypePointer Uniform %float
%_ptr_Uniform_float = OpTypePointer Uniform %float
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%_GLF_color = OpVariable %_ptr_Output_v4float Output
%main = OpFunction %void None %18
%35 = OpLabel
%undefined = OpVariable %_ptr_Function_float Function
%36 = OpExtInst %float %1 Sinh %float_0x1_8p_128
%36 = OpExtInst %float %1 Sinh %float_1
OpStore %undefined %36
%37 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
%10 = OpLoad %int %37

View File

@ -30,7 +30,7 @@ fn main_1() {
var undefined : f32;
var x_45 : bool;
var x_46_phi : bool;
undefined = sinh(0x1.8p+128);
undefined = sinh(1.0);
let x_10 : i32 = x_6.x_GLF_uniform_int_values[0].el;
let x_38 : bool = (1 == x_10);
x_46_phi = x_38;

View File

@ -26,24 +26,24 @@
%_ptr_Function_v4float = OpTypePointer Function %v4float
%uint = OpTypeInt 32 0
%uint_7 = OpConstant %uint 7
%_arr_float_uint_7 = OpTypeArray %float %uint_7
%_arr_float_uint_7 = OpTypeArray %float %uint_7
%buf0 = OpTypeStruct %_arr_float_uint_7
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%_ = OpVariable %_ptr_Uniform_buf0 Uniform
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%int_2 = OpConstant %int 2
%_ptr_Uniform_float = OpTypePointer Uniform %float
%float_1_57079637 = OpConstant %float 1.57079637
%float_1_11976957 = OpConstant %float 1.11976957
%float_0x1_8p_128 = OpConstant %float 0x1.8p+128
%float_0_927295208 = OpConstant %float 0.927295208
%27 = OpConstantComposite %v4float %float_1_57079637 %float_1_11976957 %float_0x1_8p_128 %float_0_927295208
%_ptr_Output_v4float = OpTypePointer Output %v4float
%_ptr_Uniform_float = OpTypePointer Uniform %float
%float_1_57079637 = OpConstant %float 1.57079637
%float_1_11976957 = OpConstant %float 1.11976957
%float_1 = OpConstant %float 1.0
%float_0_927295208 = OpConstant %float 0.927295208
%27 = OpConstantComposite %v4float %float_1_57079637 %float_1_11976957 %float_1 %float_0_927295208
%_ptr_Output_v4float = OpTypePointer Output %v4float
%_GLF_color = OpVariable %_ptr_Output_v4float Output
%bool = OpTypeBool
%uint_0 = OpConstant %uint 0
%_ptr_Function_float = OpTypePointer Function %float
%_ptr_Function_float = OpTypePointer Function %float
%int_4 = OpConstant %int 4
%int_5 = OpConstant %int 5
%uint_1 = OpConstant %uint 1

View File

@ -31,7 +31,7 @@ fn main_1() {
let x_45 : f32 = x_6.x_GLF_uniform_float_values[0].el;
let x_47 : f32 = x_6.x_GLF_uniform_float_values[2].el;
v1 = vec4<f32>(x_41, x_43, x_45, x_47);
v2 = vec4<f32>(1.570796371, 1.119769573, 0x1.8p+128, 0.927295208);
v2 = vec4<f32>(1.570796371, 1.119769573, 1.0, 0.927295208);
let x_50 : f32 = x_6.x_GLF_uniform_float_values[0].el;
v3 = vec4<f32>(x_50, x_50, x_50, x_50);
let x_52 : vec4<f32> = v1;

View File

@ -31,36 +31,36 @@
%14 = OpTypeFunction %void
%float = OpTypeFloat 32
%_ptr_Function_float = OpTypePointer Function %float
%float_0x1_8p_128 = OpConstant %float 0x1.8p+128
%float_1 = OpConstant %float 1.0
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%gl_FragCoord = OpVariable %_ptr_Input_v4float Input
%_ptr_Input_v4float = OpTypePointer Input %v4float
%gl_FragCoord = OpVariable %_ptr_Input_v4float Input
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Input_float = OpTypePointer Input %float
%_ptr_Input_float = OpTypePointer Input %float
%uint_1 = OpConstant %uint 1
%_arr_float_uint_1 = OpTypeArray %float %uint_1
%_arr_float_uint_1 = OpTypeArray %float %uint_1
%buf0 = OpTypeStruct %_arr_float_uint_1
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%_ = OpVariable %_ptr_Uniform_buf0 Uniform
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%_ptr_Uniform_float = OpTypePointer Uniform %float
%bool = OpTypeBool
%_ptr_Output_v4float = OpTypePointer Output %v4float
%_GLF_color = OpVariable %_ptr_Output_v4float Output
%uint_2 = OpConstant %uint 2
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%buf1 = OpTypeStruct %_arr_int_uint_2
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%__0 = OpVariable %_ptr_Uniform_buf1 Uniform
%int_1 = OpConstant %int 1
%_ptr_Uniform_int = OpTypePointer Uniform %int
%_ptr_Uniform_int = OpTypePointer Uniform %int
%main = OpFunction %void None %14
%34 = OpLabel
%f0 = OpVariable %_ptr_Function_float Function
%f1 = OpVariable %_ptr_Function_float Function
OpStore %f0 %float_0x1_8p_128
OpStore %f0 %float_1
%35 = OpLoad %float %f0
%36 = OpExtInst %float %1 Fract %35
OpStore %f1 %36

View File

@ -31,7 +31,7 @@ var<private> x_GLF_color : vec4<f32>;
fn main_1() {
var f0 : f32;
var f1 : f32;
f0 = 0x1.8p+128;
f0 = 1.0;
let x_35 : f32 = f0;
f1 = fract(x_35);
let x_38 : f32 = gl_FragCoord.x;

View File

@ -38,23 +38,23 @@
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%uint_2 = OpConstant %uint 2
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%buf0 = OpTypeStruct %_arr_int_uint_2
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%_ = OpVariable %_ptr_Uniform_buf0 Uniform
%int_0 = OpConstant %int 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_1 = OpConstant %int 1
%_ptr_Function_float = OpTypePointer Function %float
%_arr_float_uint_2 = OpTypeArray %float %uint_2
%_arr_float_uint_2 = OpTypeArray %float %uint_2
%buf1 = OpTypeStruct %_arr_float_uint_2
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%__0 = OpVariable %_ptr_Uniform_buf1 Uniform
%_ptr_Uniform_float = OpTypePointer Uniform %float
%float_0x1_8p_128 = OpConstant %float 0x1.8p+128
%_ptr_Uniform_float = OpTypePointer Uniform %float
%float_1 = OpConstant %float 1.0
%bool = OpTypeBool
%uint_1 = OpConstant %uint 1
%_ptr_Output_float = OpTypePointer Output %float
%_ptr_Output_float = OpTypePointer Output %float
%main = OpFunction %void None %16
%34 = OpLabel
%a = OpVariable %_ptr_Function_float Function
@ -74,7 +74,7 @@
OpStore %_GLF_color %43
%44 = OpAccessChain %_ptr_Uniform_float %__0 %int_0 %int_1
%45 = OpLoad %float %44
%46 = OpFMod %float %45 %float_0x1_8p_128
%46 = OpFMod %float %45 %float_1
OpStore %a %46
%47 = OpLoad %float %a
%48 = OpAccessChain %_ptr_Uniform_float %__0 %int_0 %int_0

View File

@ -34,7 +34,7 @@ fn main_1() {
let x_13 : i32 = x_5.x_GLF_uniform_int_values[0].el;
x_GLF_color = vec4<f32>(f32(x_10), f32(x_11), f32(x_12), f32(x_13));
let x_45 : f32 = x_8.x_GLF_uniform_float_values[1].el;
a = (x_45 - (0x1.8p+128 * floor((x_45 / 0x1.8p+128))));
a = (x_45 - (1.0 * floor((x_45 / 1.0))));
let x_47 : f32 = a;
let x_49 : f32 = x_8.x_GLF_uniform_float_values[0].el;
if ((x_47 != x_49)) {

View File

@ -38,23 +38,23 @@
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%uint_2 = OpConstant %uint 2
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%buf0 = OpTypeStruct %_arr_int_uint_2
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%_ = OpVariable %_ptr_Uniform_buf0 Uniform
%int_0 = OpConstant %int 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_1 = OpConstant %int 1
%_ptr_Function_float = OpTypePointer Function %float
%float_n0x1_8p_128 = OpConstant %float -0x1.8p+128
%_arr_float_uint_2 = OpTypeArray %float %uint_2
%float_1 = OpConstant %float 1.0
%_arr_float_uint_2 = OpTypeArray %float %uint_2
%buf1 = OpTypeStruct %_arr_float_uint_2
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%__0 = OpVariable %_ptr_Uniform_buf1 Uniform
%_ptr_Uniform_float = OpTypePointer Uniform %float
%_ptr_Uniform_float = OpTypePointer Uniform %float
%bool = OpTypeBool
%uint_1 = OpConstant %uint 1
%_ptr_Output_float = OpTypePointer Output %float
%_ptr_Output_float = OpTypePointer Output %float
%main = OpFunction %void None %16
%34 = OpLabel
%a = OpVariable %_ptr_Function_float Function
@ -74,7 +74,7 @@
OpStore %_GLF_color %43
%44 = OpAccessChain %_ptr_Uniform_float %__0 %int_0 %int_1
%45 = OpLoad %float %44
%46 = OpFMod %float %float_n0x1_8p_128 %45
%46 = OpFMod %float %float_1 %45
OpStore %a %46
%47 = OpLoad %float %a
%48 = OpAccessChain %_ptr_Uniform_float %__0 %int_0 %int_0

View File

@ -34,7 +34,7 @@ fn main_1() {
let x_13 : i32 = x_5.x_GLF_uniform_int_values[0].el;
x_GLF_color = vec4<f32>(f32(x_10), f32(x_11), f32(x_12), f32(x_13));
let x_45 : f32 = x_8.x_GLF_uniform_float_values[1].el;
a = (-0x1.8p+128 - (x_45 * floor((-0x1.8p+128 / x_45))));
a = (1.0 - (x_45 * floor((1.0 / x_45))));
let x_47 : f32 = a;
let x_49 : f32 = x_8.x_GLF_uniform_float_values[0].el;
if ((x_47 != x_49)) {

View File

@ -30,29 +30,28 @@
%14 = OpTypeFunction %void
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%mat2v2float = OpTypeMatrix %v2float 2
%mat2v2float = OpTypeMatrix %v2float 2
%_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_arr_float_uint_1 = OpTypeArray %float %uint_1
%_arr_float_uint_1 = OpTypeArray %float %uint_1
%buf0 = OpTypeStruct %_arr_float_uint_1
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%_ = OpVariable %_ptr_Uniform_buf0 Uniform
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%_ptr_Uniform_float = OpTypePointer Uniform %float
%buf1 = OpTypeStruct %v2float
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%__0 = OpVariable %_ptr_Uniform_buf1 Uniform
%uint_0 = OpConstant %uint 0
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
%_ptr_Function_float = OpTypePointer Function %float
%_ptr_Function_v2float = OpTypePointer Function %v2float
%float_n0x1_8p_128 = OpConstant %float -0x1.8p+128
%32 = OpConstantComposite %v2float %float_n0x1_8p_128 %float_1
%_ptr_Function_float = OpTypePointer Function %float
%_ptr_Function_v2float = OpTypePointer Function %v2float
%32 = OpConstantComposite %v2float %float_1 %float_1
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%_ptr_Output_v4float = OpTypePointer Output %v4float
%_GLF_color = OpVariable %_ptr_Output_v4float Output
%bool = OpTypeBool
%36 = OpConstantComposite %v2float %float_0 %float_0

View File

@ -31,7 +31,7 @@ fn main_1() {
m24 = mat2x2<f32>(vec2<f32>(x_40, x_42), vec2<f32>((x_44 * 1.0), x_47));
let x_51 : mat2x2<f32> = m24;
a = x_51[0u].x;
v2 = vec2<f32>(-0x1.8p+128, 1.0);
v2 = vec2<f32>(1.0, 1.0);
let x_53 : vec2<f32> = v2;
let x_54 : f32 = a;
let x_55 : vec2<f32> = vec2<f32>(x_54, 1.0);