protonscr

Bayonetta: broken sea rendering during Sapientia boss fight

dxvkclosed
doitsujin/dxvk#1619 · opened 2020-05-09 by Valmar33 · updated 2021-12-05 · 8 comments · github
VValmar33 2020-05-09 github

Software information

Bayonetta
All graphical settings set to max

System information

  • GPU: RX 580
  • Driver: Mesa 20.2.0_devel.123332.5f01869f74a-1
  • Wine version: proton_tkg_5.7.r12.g24000422.DXVK.fs_hack
  • DXVK version: v1.6.1-61-g774f74cd+

Apitrace file(s)

https://mega.nz/file/CYVnBAZS#gCDB-s8yxUMaZATgajw0Ha4pMKSn-UqGd-8gOUa7YmY

Log files

Bayonetta_d3d9.log

CCME42 2020-05-10 github

Seems like it's some INF fun:
Bildschirmfoto von 2020-05-10 03-17-01

This patch adds float emulation for mul, which fixes the rendering issue in this game, but i guess other instructions need this treatment too, or some other solution (i haven't checked what native d3d9 does in this case).

diff --git a/src/dxso/dxso_compiler.cpp b/src/dxso/dxso_compiler.cpp
index 0e5fa38c..f63fc42a 100644
--- a/src/dxso/dxso_compiler.cpp
+++ b/src/dxso/dxso_compiler.cpp
@@ -1797,6 +1797,10 @@ namespace dxvk {
         result.id = m_module.opFMul(typeId,
           emitRegisterLoad(src[0], mask).id,
           emitRegisterLoad(src[1], mask).id);
+        if (m_moduleInfo.options.d3d9FloatEmulation) {
+          result.id = m_module.opNMin(typeId, result.id,
+            m_module.constfReplicant(FLT_MAX, result.type.ccount));
+        }
         break;
       case DxsoOpcode::Rcp:
         result.id = m_module.opFDiv(typeId,
Mmisyltoad 2020-05-10 github

I really don't want to do an NMin on every MUL for this one game.

VValmar33 2020-05-10 github

Cheers, CME. Will test.

VValmar33 2020-05-10 github

"I really don't want to do an NMin on every MUL for this one game."

If it's any consolation, maybe some other D3D9 do similarly weird shit. I dunno, though.

Wwgpierce 2020-05-10 github

This same issue also affects wined3d, so I filed https://bugs.winehq.org/show_bug.cgi?id=49133

VValmar33 2020-05-13 github

So, this particular issue is fixed by a combination of Josh's changes to DXVK, along with some patches for Mesa.

Not sure whether I should close it or not...

Mmartinpl 2020-08-19 github

Still happens on Proton 5.0-9 / Nvidia 450.66 / GTX 1070 / Arch Linux

KK0bin maintainer 2021-12-05 github

Should be fixed by c13395db970d16a5631a7c0926e2c4529d2710c3

Proton versions

Upstream links