The-Wineskin-Project / WineskinServer

Wineskin
GNU Lesser General Public License v2.1
2.47k stars 170 forks source link

No GPU acceleration inside Wineskin wrapped app and artifacts with DX10 #355

Closed Drovosek01 closed 1 year ago

Drovosek01 commented 1 year ago

Environment (please complete the following information):

Describe the bug

  1. There is no option in the game settings to select dynamic lighting with DirectX 11
  2. When using dynamic lighting with DirectX 10, there are no sun rays or sunlight in the game

To Reproduce

  1. Make blank Wineskin wrapper using engine WS11WineCX64Bit22.0.1-2 or WS11WineCX64Bit22.0.1-1
  2. Download "S.T.A.L.K.E.R.: Call of Pripyat v1.6.0.2" GOG version
  3. Install game in wrapper and select default path for base Windows app "C:\GOG Games\S.T.A.L.K.E.R. Call of Pripyat\Stalker-COP.exe"
  4. Test Run. It works because GOG installer include and install some DirectX and Visual C++ components
  5. In game menu open settings and set "Enhanced full dyn. lighting (DX10)", Apply changes and restart game/wrapper
  6. Start new game or load any saves and look on sky, trees and environment
  7. Using Winetricks install all d3d* components
  8. Run game and repeat point 6

Expected behavior No graphic artifacts

Screenshots

image

image

image

Game settings when game opened using Crossover: Снимок экрана 2023-02-18 в 23 20 05

Game settings when game opened using Wineskin wrapper: Снимок экрана 2023-02-18 в 23 16 49

LastRunWine.log

https://paste.ee/p/cOwJO

Additional context

I will describe the situation in more detail. I downloaded the game installer "S.T.A.L.K.E.R.: Call of Pripyat" and installed it in Crossover 22.1. In Crossover, the game started without problems, and it also starts and works without any graphic artifacts when dynamic lighting DX10 is selected. Also in the graphics settings of the game there is an item with a choice of dynamic lighting DX11.

I understand that the game somehow analyzes hardware components and if the GPU supports DirectX 11, then in the game settings it becomes possible to select graphics with DX11, but this is just my hypothesis.

However, if you select dynamic lighting DX11 in the graphics settings of the game and restart the game (so that the selected settings take effect), the game will stop running, but this is not important to me at the moment.

Using Winetricks, I installed various dll components, restarted the game many times, recreated Wineskin wrap several times, downloaded and installed Directx.exe inside the Wine bottle manually, but this did not fix the problem with missing sunlight when using dynamic lighting with DX10.

I Googled and experimented a lot, I tried to replace the drive_c created with Crossover with the one inside the Wine bottle created by Wineskin Winery, but as you understand, it didn't help.

Then I launched winecfg from the Wine bottle and from the Crossover bottle and I saw that more applications were added to the Crossover bottles and various libraries were added, probably they somehow affected the work of DirectX in the game and the bottle.

It seems to me there is some kind of problem in Wine and information about the video card or hardware acceleration is not transmitted to the Wine bottle.

Gcenx commented 1 year ago

I will describe the situation in more detail. I downloaded the game installer "S.T.A.L.K.E.R.: Call of Pripyat" and installed it in Crossover 22.1. In Crossover, the game started without problems, and it also starts and works without any graphic artifacts when dynamic lighting DX10 is selected. Also in the graphics settings of the game there is an item with a choice of dynamic lighting DX11.

You can’t compare CrossOver-22.1.0 to WineCX22.0.1. CrossOver-22.1.0 added support for 32Bit DirectX10/11 over Vulkan where prior versions didn’t support this.

I understand that the game somehow analyzes hardware components and if the GPU supports DirectX 11, then in the game settings it becomes possible to select graphics with DX11, but this is just my hypothesis.

However, if you select dynamic lighting DX11 in the graphics settings of the game and restart the game (so that the selected settings take effect), the game will stop running, but this is not important to me at the moment.

If you read over the log you’ve proved it shows the game is running via OpenGL and it complains about missing extensions the game requires. CrossOver-22.1.0 is running the game over Vulkan.

Using Winetricks, I installed various dll components, restarted the game many times, recreated Wineskin wrap several times, downloaded and installed Directx.exe inside the Wine bottle manually, but this did not fix the problem with missing sunlight when using dynamic lighting with DX10.

You should avoid installing to many winetricks verbs for no reason these can actually case more problems than they solve.

I Googled and experimented a lot, I tried to replace the drive_c created with Crossover with the one inside the Wine bottle created by Wineskin Winery, but as you understand, it didn't help.

That’s no a good idea.

Then I launched winecfg from the Wine bottle and from the Crossover bottle and I saw that more applications were added to the Crossover bottles and various libraries were added, probably they somehow affected the work of DirectX in the game and the bottle.

CrossOver bottle template adds these overrides these can be ignored.

Drovosek01 commented 1 year ago

You can’t compare CrossOver-22.1.0 to WineCX22.0.1. CrossOver-22.1.0 added support for 32Bit DirectX10/11 over Vulkan where prior versions didn’t support this.

You're right ((

I made an archive of the bottle with the game that I created in Crossover 22.1 and completely deleted Crossover. Therefore, I installed Crossover 21.2 and installed the archived bottle and started the game and I ran into the same problem as when starting the game with DX10 in Wine - there is no sunlight and there is no item with DX11 in the graphics settings of the game. I have updated Crossover to version 22.0.1 and there is also the same problem.

This game is 32-bit. It turns out that on all games that are not compiled for 64-bit Windows, but in the graphics settings use DX10 or DX11 in Wine and in older versions of Crossover there will be graphic artifacts?

P.S. I tried to replace the game engine with an open source 64-bit engine, but now the game doesn't run at all

Gcenx commented 1 year ago

WineCX22.1.0-rc1 along with the recent winetricks push I’ve done that revises the DXVK verbs it’s now possible to run 32Bit DirectX10/11 games on macOS Catalina or later.