mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 00:17:03 +00:00
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:
@@ -146,7 +146,7 @@ OpDecorate %20 Binding 1
|
||||
%128 = OpLoad %50 %10
|
||||
%129 = OpLoad %52 %20
|
||||
%130 = OpSampledImage %124 %129 %128
|
||||
%131 = OpImageSampleProjImplicitLod %v4float %130 %126
|
||||
%131 = OpImageSampleProjImplicitLod %v4float %130 %47
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ OpDecorate %20 Binding 1
|
||||
%128 = OpLoad %50 %10
|
||||
%129 = OpLoad %52 %20
|
||||
%130 = OpSampledImage %124 %129 %128
|
||||
%131 = OpImageSampleProjExplicitLod %v4float %130 %126 Lod %29
|
||||
%131 = OpImageSampleProjExplicitLod %v4float %130 %47 Lod %29
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ OpDecorate %20 Binding 1
|
||||
%128 = OpLoad %50 %10
|
||||
%129 = OpLoad %52 %20
|
||||
%130 = OpSampledImage %124 %129 %128
|
||||
%131 = OpImageSampleProjDrefImplicitLod %float %130 %126 %float_0_200000003
|
||||
%131 = OpImageSampleProjDrefImplicitLod %float %130 %47 %float_0_200000003
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ OpDecorate %20 Binding 1
|
||||
%128 = OpLoad %50 %10
|
||||
%129 = OpLoad %52 %20
|
||||
%130 = OpSampledImage %124 %129 %128
|
||||
%131 = OpImageSampleProjDrefExplicitLod %float %130 %126 %float_0_200000003 Lod %29
|
||||
%131 = OpImageSampleProjDrefExplicitLod %float %130 %47 %float_0_200000003 Lod %29
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
|
||||
Reference in New Issue
Block a user