dxvk icon indicating copy to clipboard operation
dxvk copied to clipboard

[D3D9] FUZZUP - Unknown Format encountered

Open SoffiMeower opened this issue 4 months ago • 17 comments

Attempting to use DXVK causes the game to be unable to load certain images, such as player profiles, making them be a fallback image.

DX9/actual player card:

Image

DXVK/Fallback player card:

Image

Software information

GitaDora FUZZUP

System information

  • GPU: RX 7900 XT
  • Driver: 25.8.1
  • Windows version: Windows 11 Pro (24H2 26100.5074)
  • DXVK version: 2.7.1

Apitrace file(s)

Can't trace. Game crashes loading after scanning arcade card. Game log shows at crash:

[2025/09/01 14:31:42] I:debughook: apitrace: warning: IDirect3DDevice9::QueryInterface: unsupported IID IID_IDirect3DDxva2Container9
[2025/09/01 14:31:42] I:debughook: apitrace: warning: pVtbl = 00007FFABC9EB7D8 (C:\WINDOWS\system32\d3d9.dll!+0x14b7d8)
[2025/09/01 14:31:42] I:debughook: apitrace: warning: IDirect3DDevice9::QueryInterface: unsupported IID IID_IDirect3DDxva2Container9
[2025/09/01 14:31:42] I:debughook: apitrace: warning: pVtbl = 00007FFABC9EB7D8 (C:\WINDOWS\system32\d3d9.dll!+0x14b7d8)
[2025/09/01 14:31:42] I:debughook: apitrace: warning: IDirect3DDevice9::QueryInterface: unsupported IID IID_IDirect3DDxva2Container9
[2025/09/01 14:31:42] I:debughook: apitrace: warning: pVtbl = 00007FFABC9EB7D8 (C:\WINDOWS\system32\d3d9.dll!+0x14b7d8)
[2025/09/01 14:31:42] I:debughook: error: IDirect3DSurface9: unexpected virtual method 34 of instance pvObj=0000000007AFC178 pWrapper=00000000253BA6E0 pVtbl=00007FFABC9E89E8
[2025/09/01 14:31:42] I:debughook: apitrace: warning: pVtbl = 00007FFABC9E89E8 (C:\WINDOWS\system32\d3d9.dll!+0x1489e8)
[2025/09/01 14:31:42] I:debughook: apitrace: warning: pVtbl = 00007FFABC9E89E8 (C:\WINDOWS\system32\d3d9.dll!+0x1489e8)
[2025/09/01 14:31:42] I:debughook: apitrace: flushing trace

Log files

Game's log file for Graphics module:

[2025/09/01 14:14:47] I:libutils: found user-supplied d3d9.dll in modules directory
[2025/09/01 14:14:48] I:graphics: initializing
[2025/09/01 14:14:48] I:graphics::d3d9: initializing
[2025/09/01 14:14:48] M:graphics: CreateWindowExA hook hit (0x00000000, 0xc21d, (null), 0x90000000, -2147483648, -2147483648, 1280, 720, 0x0, 0x0, 0x400000, 0x7ffa20b3bae0)
[2025/09/01 14:14:48] M:graphics: CreateWindowExW hook hit (0, 0x7ffaf4fcf4c0, CicMarshalWnd, 88000000, 0, 0, 0, 0, 0xfffffffffffffffd, 0x0, 0x7ffaf4eb0000, 0x0)
[2025/09/01 14:14:48] M:graphics::d3d9: Direct3DCreate9 hook hit
[2025/09/01 14:14:48] M:graphics::d3d9: IDirect3D9::GetDeviceCaps hook hit
[2025/09/01 14:14:48] M:graphics::d3d9: IDirect3D9::CreateDevice hook hit (0, 1, 0x1209ce, D3DCREATE_FPU_PRESERVE | D3DCREATE_MULTITHREADED | D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_DISABLE_PSGP_THREADING, 0x7ffa1db45b00, 0x7ffa1d5fce60)
[2025/09/01 14:14:48] I:graphics::d3d9: D3D9 presentation parameters for adapter 0: BackBufferWidth: 1280, BackBufferHeight: 720, Format: D3DFMT_X8R8G8B8, BackBufferCount: 1, MultiSampleType: 0, MultiSampleQuality: 0, SwapEffect: 1, Windowed: 1, EnableAutoDepthStencil: 0, AutoDepthStencilFormat: D3DFMT_D24S8, Flags: 16, FullScreen_RefreshRateInHz: 0, PresentationInterval: 0x0
[2025/09/01 14:14:48] I:graphics-windowed: change window rect - window offset: 0x0, client size: 2560x1440
[2025/09/01 14:14:48] M:graphics::d3d9: WrappedIDirect3DDevice9::Reset
[2025/09/01 14:14:48] M:graphics::d3d9: WrappedIDirect3DDevice9::Present
[2025/09/01 14:14:49] M:graphics::d3d9: WrappedIDirect3DDevice9::BeginScene
[2025/09/01 14:14:49] M:graphics::d3d9: SurfaceHook - Backbuffer: 1280 720 1
[2025/09/01 14:14:49] M:graphics::d3d9: WrappedIDirect3DDevice9::EndScene
[2025/09/01 14:14:49] M:graphics: CreateWindowExW hook hit (0, 0xc170, GDI+ Window (spice64.exe), 80000000, 0, 0, 1, 1, 0x0, 0x0, 0x7ffac9ce0000, 0x0)

DXVK log file: spice64_d3d9.log

SoffiMeower avatar Sep 01 '25 18:09 SoffiMeower

For that bot there That sure is a virus if I've seen one https://www.virustotal.com/gui/file/3e3327bf97d696b3f4fe1a8d19b7709750baf8a3dd976c2b04bd9fde80ff40a7/community

SoffiMeower avatar Sep 01 '25 18:09 SoffiMeower

Can't trace. Game crashes loading after scanning arcade card. Game log shows at crash:

Sure you can. For one you can attach a trace with dxvk up to the point of the crash, which would be helpful (whatever it captures up to apitrace: flushing trace). And you can also capture a trace of the game without dxvk, getting past the point of the crash, which will help us (hopefully) reproduce the crash on trace playback. In any case, we can't do much wihout traces.

WinterSnowfall avatar Sep 01 '25 19:09 WinterSnowfall

Can't trace. Game crashes loading after scanning arcade card. Game log shows at crash:

Sure you can. For one you can attach a trace with dxvk up to the point of the crash, which would be helpful (whatever it captures up to apitrace: flushing trace). And you can also capture a trace of the game without dxvk, getting past the point of the crash, which will help us (hopefully) reproduce the crash on trace playback. In any case, we can't do much wihout traces.

Well, to be fair, that was without DXVK I think. Seeing as according to https://github.com/doitsujin/dxvk/wiki/Using-Apitrace I had to replace DXVK's d3d9.dll with APITrace's variant of d3d9.dll

SoffiMeower avatar Sep 01 '25 19:09 SoffiMeower

So literally the game is just... Crashing at that point with APITrace's d3d9.dll

SoffiMeower avatar Sep 01 '25 19:09 SoffiMeower

Oh, so even apitrace crashes on capture, got it. Sigh. Yeah, it might also not like those dubious interfaces the game is trying to use, not sure.

WinterSnowfall avatar Sep 01 '25 19:09 WinterSnowfall

Oh, so even apitrace crashes on capture, got it. Sigh. Yeah, it might also not like those dubious interfaces the game is trying to use, not sure.

But... https://drive.google.com/file/d/1v4Y73EIR2qt9lreYDqojDdelwwwJwlRu/view?usp=drive_link

Here's the .trace for it.

Like I said, it works until I scan a card, then the game tries loading some things for graphics and well, I guess crashes APITrace.

[2025/09/01 15:29:36] I:eamuse: [P1] Card insert on reader (total active count: 2)
[2025/09/01 15:29:39] I:debughook: apitrace: warning: IDirect3DDevice9::QueryInterface: unsupported IID IID_IDirect3DDxva2Container9
[2025/09/01 15:29:39] I:debughook: apitrace: warning: pVtbl = 00007FFABC9EB7D8 (C:\WINDOWS\system32\d3d9.dll!+0x14b7d8)
[2025/09/01 15:29:39] I:debughook: apitrace: warning: IDirect3DDevice9::QueryInterface: unsupported IID IID_IDirect3DDxva2Container9
[2025/09/01 15:29:39] I:debughook: apitrace: warning: pVtbl = 00007FFABC9EB7D8 (C:\WINDOWS\system32\d3d9.dll!+0x14b7d8)
[2025/09/01 15:29:39] I:debughook: apitrace: warning: IDirect3DDevice9::QueryInterface: unsupported IID IID_IDirect3DDxva2Container9
[2025/09/01 15:29:39] I:debughook: apitrace: warning: pVtbl = 00007FFABC9EB7D8 (C:\WINDOWS\system32\d3d9.dll!+0x14b7d8)
[2025/09/01 15:29:39] I:debughook: error: IDirect3DSurface9: unexpected virtual method 34 of instance pvObj=0000000007AF6838 pWrapper=000000002536FCF0 pVtbl=00007FFABC9E89E8
[2025/09/01 15:29:39] I:debughook: apitrace: warning: pVtbl = 00007FFABC9E89E8 (C:\WINDOWS\system32\d3d9.dll!+0x1489e8)
[2025/09/01 15:29:39] I:debughook: apitrace: warning: pVtbl = 00007FFABC9E89E8 (C:\WINDOWS\system32\d3d9.dll!+0x1489e8)
[2025/09/01 15:29:39] I:debughook: apitrace: flushing trace

SoffiMeower avatar Sep 01 '25 19:09 SoffiMeower

So looking at it, the formats are... DXT1 (VK_FORMAT_BC1_RGBA_UNORM_BLOCK), ATI2 (VK_FORMAT_BC5_UNORM_BLOCK), and a DX10 header

SoffiMeower avatar Sep 01 '25 21:09 SoffiMeower

Also that APItrace crash seems to happen any time the game tries to play a video... So I think the main reason it crashes is when trying to play the video background for the title screen

SoffiMeower avatar Sep 02 '25 00:09 SoffiMeower

@SoftieTechCat Which formats are DXT1 and ATI2?

warn: ConvertFormat: Unknown format encountered: 826496599

That's FOURCC for WVC1. The FOURCC WVC1 is mentioned on here: https://learn.microsoft.com/en-us/windows/win32/medfound/usingthewindowsmediavideo9advancedprofilecodec.

That seems sensible considering the game is also trying to use DXVA (old DirectX video API).

IDirect3DDevice9::QueryInterface: unsupported IID IID_IDirect3DDxva2Container9

warn: ConvertFormat: Unknown format encountered: 1448433993

That's IYUV.

warn: ConvertFormat: Unknown format encountered: 808596553

That's I420.

All of them are mentioned on here: https://learn.microsoft.com/en-us/windows/win32/medfound/video-subtype-guids

That said, using those FOURCC formats in D3D9 might be some cursed implementation detail of how DXVA works on Windows. We won't support that if thats the case. It'll come down to what Wine does and whether the game works with that.

@SoftieTechCat

The game isn't on Steam and I can't find it online. So where can we find the game to test it?

K0bin avatar Sep 02 '25 00:09 K0bin

Well that formats thing was me just trying to search up the format values and finding stuff on other forums LMAO.

The game seemed to work on wine... Well, albeit from no Exclusive Audio support from wine, but WineASIO fixes that issue.

ALSO, I renamed the Movies folder so the game couldn't play any video, then:

https://drive.google.com/file/d/1YCB-oalQQ8_TiV4EO08RxYmxoKz7bLSR/view?usp=drive_link

APITrace was able to let me progress to where the issue with the textures typically happens!

SoffiMeower avatar Sep 02 '25 00:09 SoffiMeower

As for the game, I would probably have to be the one to test it.

Unless y'all want to add me on discord. Seeing as I'd have to give you a card ID.

(Seeing as this game needs a custom server to run-)

SoffiMeower avatar Sep 02 '25 00:09 SoffiMeower

https://drive.google.com/file/d/1YCB-oalQQ8_TiV4EO08RxYmxoKz7bLSR/view?usp=drive_link

There's a failure on an UpdateTexture call, which is why, I guess, you are seeing the "placeholder" image.

It looks like it's hitting this validation on our end:

    if (srcFirstMipExtent != dstFirstMipExtent) {
      // UpdateTexture can be used with textures that have different mip lengths.
      // It will either match the the top mips or the bottom ones.
      // If the largest mip maps don't match in size, we try to take the smallest ones
      // of the source.

      srcMipOffset = srcTexInfo->Desc()->MipLevels - mipLevels;
      srcFirstMipExtent = util::computeMipLevelExtent(srcTexInfo->GetExtent(), srcMipOffset);
      dstFirstMipExtent = dstTexInfo->GetExtent();
    }

    if (srcFirstMipExtent != dstFirstMipExtent)
      return D3DERR_INVALIDCALL;

I guess the fallback we have isn't sufficient to address whatever the game is doing.

P.S.: It looks fine if I comment that block, but obviously we have to figure out why it misbehaves vs native:

Image

WinterSnowfall avatar Sep 02 '25 07:09 WinterSnowfall

The card artwork bug is fixed now on master. Regarding those cursed video interfaces the game is querying, I don't really see a way forward, so it's most likely something we'll have to live without in dxvk.

WinterSnowfall avatar Sep 11 '25 14:09 WinterSnowfall

Do those missing video interfaces cause actual issues?

K0bin avatar Sep 11 '25 15:09 K0bin

Do those missing video interfaces cause actual issues?

I think @SoftieTechCat mentioned video playback is still off sync on Windows with dxvk, however if that's down to those missing interfaces or anything else is anyone's guess.

WinterSnowfall avatar Sep 11 '25 15:09 WinterSnowfall

Yeah, video just seems heavily desynced (Like, playing slower than it should). For some songs, the video will be in the middle of the chorus even though the actual song already ended. Which is a good 10+ second desync.

SoffiMeower avatar Sep 11 '25 15:09 SoffiMeower

Do those missing video interfaces cause actual issues?

I think @SoftieTechCat mentioned video playback is still off sync on Windows with dxvk, however if that's down to those missing interfaces or anything else is anyone's guess.

They affect the quality of videos in some cases, halo 2 vista's Microsoft Game Studio's intro for example has more banding and visible aliasing on the text in the absence of these interfaces

Squall-Leonhart avatar Oct 22 '25 06:10 Squall-Leonhart