tint: make const eval of binary ops on concrete values fail on NaN/Inf

With this CL, binary ops add, subtract, multiply, and divide of concrete
values will now produce an error if the result is inf/NaN, as it was
doing with abstract values. This also affects the cross builtin, which
is written in terms of subtract and multiply.

Bug: tint:1581
Bug: tint:1747
Change-Id: Ib1d0d8deddc82c67ab53729a6011937636fcc1a5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110163
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
Antonio Maiorano
2022-11-18 05:45:17 +00:00
parent e956a04daf
commit 0da91e06c5
13 changed files with 145 additions and 165 deletions

View File

@@ -499,6 +499,14 @@ crbug.com/tint/1755 [ win10 ] webgpu:shader,execution,expression,call,builtin,pa
crbug.com/tint/1755 [ win10 ] webgpu:shader,execution,expression,call,builtin,pack4x8snorm:pack:inputSource="const" [ Failure ]
crbug.com/tint/1755 [ win10 ] webgpu:shader,execution,expression,call,builtin,pack4x8unorm:pack:inputSource="const" [ Failure ]
################################################################################
# Const-eval functions that fail on inf/nan inputs
# KEEP
################################################################################
crbug.com/tint/1581 webgpu:shader,execution,expression,binary,f32_arithmetic:division:inputSource="const";* [ Failure ]
crbug.com/tint/1581 [ win ] webgpu:shader,execution,expression,call,builtin,cross:f32:inputSource="const" [ Failure ]
crbug.com/tint/1581 [ linux ] webgpu:shader,execution,expression,call,builtin,cross:f32:inputSource="const" [ Failure ]
################################################################################
# untriaged failures
# KEEP