tint: Add tests showing tint:1332 is fixed
The abstract-numeric work has fixed this, by removing the error for small floating point numbers. Fixed: tint:1332 Change-Id: Ibf7382795210220d343d62fe22d201cf67db1ccc Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92244 Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Commit-Queue: Ben Clayton <bclayton@chromium.org>
This commit is contained in:
parent
e58a712fdd
commit
b1d5bc8418
|
@ -0,0 +1,5 @@
|
|||
@stage(compute) @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
let a = 1.23;
|
||||
var b = max(a, 1.17549435e-38);
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
#version 310 es
|
||||
|
||||
void compute_main() {
|
||||
float b = max(1.230000019f, 1.17549435e-38f);
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void main() {
|
||||
compute_main();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
float b = max(1.230000019f, 1.17549435e-38f);
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
kernel void compute_main() {
|
||||
float const a = 1.230000019f;
|
||||
float b = fmax(1.230000019f, 1.17549435e-38f);
|
||||
return;
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 13
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%8 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %compute_main "compute_main"
|
||||
OpName %b "b"
|
||||
%void = OpTypeVoid
|
||||
%1 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%float_1_23000002 = OpConstant %float 1.23000002
|
||||
%float_1_17549435en38 = OpConstant %float 1.17549435e-38
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%12 = OpConstantNull %float
|
||||
%compute_main = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%b = OpVariable %_ptr_Function_float Function %12
|
||||
%7 = OpExtInst %float %8 NMax %float_1_23000002 %float_1_17549435en38
|
||||
OpStore %b %7
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,5 @@
|
|||
@stage(compute) @workgroup_size(1)
|
||||
fn compute_main() {
|
||||
let a = 1.230000019;
|
||||
var b = max(a, 1.17549435e-38);
|
||||
}
|
Loading…
Reference in New Issue