protonscr

Graphic bugs on SoulWorker

dxvkclosed needs apitraced3d9amd proprietary
doitsujin/dxvk#2973 · opened 2022-10-01 by fantasyair18 · updated 2023-10-21 · 13 comments · github
Ffantasyair18 2022-10-01 github

Software information

Game name:SoulWorker
Question:Graphic error
1
2

System information

  • GPU:Radeon RX 570 Series
  • Driver:latest(2022/9/21)
  • Wine version:
  • DXVK version: 1.10.3

Apitrace file(s)

Unable to trace game with apitrace

Log files

BBlisto91 2022-10-01 github
Ffantasyair18 2022-10-01 github
BBlisto91 2022-10-01 github

The game doesn't work on Linux because of anti cheat. But i can reproduce on Windows.
It appears to be a regression as it works in a old version i tried. Gonna try to see if i can pinpoint the commit

Ffantasyair18 2022-10-01 github

The game doesn't work on Linux because of anti cheat. But i can reproduce on Windows. It appears to be a regression as it works in a old version i tried. Gonna try to see if i can pinpoint the commit

Thank you

KK0bin maintainer 2022-10-01 github

We need that apitrace to fix this.

Please give it another go: https://github.com/doitsujin/dxvk/wiki/Using-Apitrace

BBlisto91 2022-10-01 github

I have an apitrace. Will upload here later

BBlisto91 2022-10-01 github

https://mega.nz/file/8ohnGDDL#eIRUiJBKs4nsFMxeK2yLRg_NVyVYeypHjtBPIbP9vuU

Issue only happens with AMD's own driver (Windows/amdvlk) not with Linux radv. Haven't tried on Nvidia.
I'm guessing from the commit that breaks that this could be a driver issue? https://github.com/doitsujin/dxvk/commit/23691cd0ff6d9a2af6c84872cacf08e8cb5079c0

Ddoitsujin maintainer 2022-10-01 github

Yes, this is a rather common issue on Windows AMD drivers on older GPUs. Can't really fix on our end.

Ffantasyair18 2022-10-02 github

I tried to use version 1.7 and it looks fine, but the shadows have bugs.
dxvk
d3d9.log:SoulWorker_d3d9-1.7.log

BBlisto91 2022-10-02 github

You'll sadly have to deal with the issues above until (or if) amd fixes the original issue. Or play the native version.
You could try reporting a bug to amd, but dunno how much they care about games that use dxvk on Windows.

Ffantasyair18 2022-10-02 github

I tried removing the latest driver.
Using the driver from Windows Update, it looks ok.
Driver:26.20.12028.2(2019/08/16)
3
Thank you for helping

BBlisto91 2022-10-02 github

Oh that's great to hear. Didn't notice you weren't using the latest driver.
My card isn't supported anymore with amd's own drivers so couldn't test the latest one myself

Ss09289728096 2023-10-21 github

I just noticed this issue and try to fix it. Here is the result.

commit b34421b055df5c81192faac800906be5985fe175 (HEAD)
Author: Philip Rebohle <[email protected]>
Date:   Mon Jul 4 16:13:06 2022 +0200

[dxvk] Always enable extendedDynamicState feature

I found this commit led to the bad displaying, and the git diff is:

elwin@DESKTOP-A0VR4BU:~/dxvk/master$ git diff f19607c1
diff --git a/src/dxvk/dxvk_adapter.cpp b/src/dxvk/dxvk_adapter.cpp
index 1ceda524..8ba0359d 100644
--- a/src/dxvk/dxvk_adapter.cpp
+++ b/src/dxvk/dxvk_adapter.cpp
@@ -328,7 +328,7 @@ namespace dxvk {
	 DxvkNameList extensionNameList = extensionsEnabled.toNameList();

	 // Enable additional device features if supported
-    enabledFeatures.extExtendedDynamicState.extendedDynamicState = m_deviceFeatures.extExtendedDynamicState.extendedDynamicState;
+    enabledFeatures.extExtendedDynamicState.extendedDynamicState = VK_TRUE;

	 enabledFeatures.ext4444Formats.formatA4B4G4R4 = m_deviceFeatures.ext4444Formats.formatA4B4G4R4;
	 enabledFeatures.ext4444Formats.formatA4R4G4B4 = m_deviceFeatures.ext4444Formats.formatA4R4G4B4;
diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp
index b66169d8..261752da 100644
--- a/src/dxvk/dxvk_context.cpp
+++ b/src/dxvk/dxvk_context.cpp
@@ -19,9 +19,6 @@ namespace dxvk {
	 m_gfxBarriers (DxvkCmdBuffer::ExecBuffer),
	 m_queryManager(m_common->queryPool()),
	 m_staging     (device, StagingBufferSize) {
-    if (m_device->features().extExtendedDynamicState.extendedDynamicState)
-      m_features.set(DxvkContextFeature::ExtendedDynamicState);
-
	 // Init framebuffer info with default render pass in case
	 // the app does not explicitly bind any render targets
	 m_state.om.framebufferInfo = makeFramebufferInfo(m_state.om.renderTargets);
@@ -4988,13 +4985,8 @@ namespace dxvk {

	 // Vertex bindigs get remapped when compiling the
	 // pipeline, so this actually does the right thing
-    if (m_features.test(DxvkContextFeature::ExtendedDynamicState)) {
-      m_cmd->cmdBindVertexBuffers2(0, m_state.gp.state.il.bindingCount(),
-        buffers.data(), offsets.data(), lengths.data(), nullptr);
-    } else {
-      m_cmd->cmdBindVertexBuffers(0, m_state.gp.state.il.bindingCount(),
-        buffers.data(), offsets.data());
-    }
+    m_cmd->cmdBindVertexBuffers2(0, m_state.gp.state.il.bindingCount(),
+      buffers.data(), offsets.data(), lengths.data(), nullptr);
   }

This commit use another bind method and the argument lengths.data() is suspicious.

Thus I fix the display issue even in tag v2.3 with this.

elwin@DESKTOP-A0VR4BU:~/dxvk/dxvk$ git diff
diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp
index 80c2620d..17109b64 100644
--- a/src/dxvk/dxvk_context.cpp
+++ b/src/dxvk/dxvk_context.cpp
@@ -5677,7 +5677,7 @@ namespace dxvk {
   // Vertex bindigs get remapped when compiling the
   // pipeline, so this actually does the right thing
   m_cmd->cmdBindVertexBuffers(0, m_state.gp.state.il.bindingCount(),
-      buffers.data(), offsets.data(), lengths.data(),
+      buffers.data(), offsets.data(), nullptr,
	 newDynamicStrides ? strides.data() : nullptr);
 }

You can access the files at here.

I think my problem has solved. I'm not understatnding about vulkan, so I don't know if this change makes another issue.

Nothing extracted yet.