dawn: enable IEEE strictness for compute pipeline to match render pipeline
This is the only flag we set for FXC compilation of render pipelines that we don't set for compute.
This fixes a (potentially unrelated) bug I've been looking into it (tint:1887
Bug: tint:1887
Change-Id: Iaf67ebe9221cd1d6e4e20afe0bcd3e5aa6e89366
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/125820
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/src/dawn/native/d3d12/ComputePipelineD3D12.cpp b/src/dawn/native/d3d12/ComputePipelineD3D12.cpp
index 8585940..9c6845a 100644
--- a/src/dawn/native/d3d12/ComputePipelineD3D12.cpp
+++ b/src/dawn/native/d3d12/ComputePipelineD3D12.cpp
@@ -50,6 +50,10 @@
// SPRIV-cross does matrix multiplication expecting row major matrices
compileFlags |= D3DCOMPILE_PACK_MATRIX_ROW_MAJOR;
+ // FXC can miscompile code that depends on special float values (NaN, INF, etc) when IEEE
+ // strictness is not enabled. See crbug.com/tint/976.
+ compileFlags |= D3DCOMPILE_IEEE_STRICTNESS;
+
const ProgrammableStage& computeStage = GetStage(SingleShaderStage::Compute);
ShaderModule* module = ToBackend(computeStage.module.Get());