diff --git a/src/d3d9/d3d9_state.h b/src/d3d9/d3d9_state.h index 8aeb23e3..b648a828 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) {