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>
This commit is contained in:
Antonio Maiorano 2023-03-31 12:24:10 +00:00 committed by Dawn LUCI CQ
parent 2451618be9
commit d8f0f44b54
1 changed files with 4 additions and 0 deletions

View File

@ -50,6 +50,10 @@ MaybeError ComputePipeline::Initialize() {
// 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());