From 809c1d4cf5da5873e419e393e456ca136efd97f3 Mon Sep 17 00:00:00 2001 From: r-a-sattarov Date: Wed, 17 Jan 2024 22:46:36 +0300 Subject: [PATCH] [d3d9] workaround for EDG frontend based compilers --- src/d3d9/d3d9_state.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/d3d9/d3d9_state.h b/src/d3d9/d3d9_state.h index ad113d13..6ad4d709 100644 --- a/src/d3d9/d3d9_state.h +++ b/src/d3d9/d3d9_state.h @@ -303,7 +303,8 @@ namespace dxvk { } else { for (UINT i = 0; i < Count; i++) - set->fConsts[StartRegister + i] = replaceNaN(pConstantData + (i * 4)); + // The (float*) cast is a workaround for a bug in the EDG compiler frontend + set->fConsts[StartRegister + i] = replaceNaN((float*)pConstantData + (i * 4)); } } else if constexpr (ConstantType == D3D9ConstantType::Int) {