From 67035040f687fddbf38b7675c4ab23fa20b1fdaf Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Tue, 20 Jul 2021 12:47:58 +0000 Subject: [PATCH] D3D12: Enable IEEE strictness Bug: tint:976 Change-Id: I4e2d625adad89402774584ccff72b5e33dc69957 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/58724 Commit-Queue: Corentin Wallez Auto-Submit: Ben Clayton Reviewed-by: Corentin Wallez --- src/dawn_native/d3d12/RenderPipelineD3D12.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dawn_native/d3d12/RenderPipelineD3D12.cpp b/src/dawn_native/d3d12/RenderPipelineD3D12.cpp index 2c9741c346..fdfa123d58 100644 --- a/src/dawn_native/d3d12/RenderPipelineD3D12.cpp +++ b/src/dawn_native/d3d12/RenderPipelineD3D12.cpp @@ -343,6 +343,10 @@ namespace dawn_native { namespace d3d12 { // 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; + D3D12_GRAPHICS_PIPELINE_STATE_DESC descriptorD3D12 = {}; PerStage entryPoints;