AlpyneDreams / d8vk

Direct3D 8 to Vulkan translation for DXVK! Merged into dxvk: https://github.com/doitsujin/dxvk
zlib License
486 stars 6 forks source link

Chrome (Techland d3d8 game) - several issues #205

Closed WinterSnowfall closed 2 days ago

WinterSnowfall commented 4 months ago

Chrome has some issues when run with d8vk. And, ironically, other sets of issues with WineD3D. I'll list the problems it has with d8vk and discuss them separately:

Worthy of note is that WineD3D has problems of its own with some textures, both in the menu and in game, for example the missing crate texture in point (3.), which d8vk renders correctly.

Here's the game menu for reference:

WineD3D ![WineD3D](https://github.com/AlpyneDreams/d8vk/assets/6306593/2633660d-4aa4-4906-af2a-77ec488f293a)
d8vk ![d8vk](https://github.com/AlpyneDreams/d8vk/assets/6306593/fc651d76-db3d-4924-b047-05fab3ff2383)

Only point (3.) will be somewhat easy to investigate, as the game crashes when attempting to capture a d3d8 trace with apitrace. Capturing a d3d9 trace with d3d8to9 + WineD3D worked however.

In summary: (1.) and (2.) are d8vk specific, while (3.) is also a dxvk (d9vk) issue.

Software information

Chrome 1.2.0.0 (Gold Edition) - Retail copy

System information

Apitrace file(s)

This is a d3d9 trace, unfortunately: ChromeSingle.trace.tar.xz

Log files

ChromeSingle.log

WinterSnowfall commented 4 months ago

While investigating point (1.), ironically, I stumbled into the fix for (2.) as well, and it will also fix other games that expect calls to CreateImageSurface() to succeed regardless of the format they use.

P.S.: Fun fact: the game uses D3DFMT_R8G8B8 surfaces for lightmaps.

WinterSnowfall commented 3 months ago

Haven't had much luck looking into (3), so I'll note my meager findings here, lest I forget all about it.

I've looked at the sampler code in dxvk and it seems fine. That being said for the terrain texture in question we somehow get the first row of pixels in the mip repeated ad infinitum, rather than the full texture being tiled properly. I wasn't able to figure out why this is happening with dxvk, but simply works with WineD3D.

WinterSnowfall commented 2 days ago

(3) was also fixed and works with master dxvk now, most likely by @K0bin's fixed function rework.