protonscr

[d3d8/9] Support for n-patches tesselation / ATI TruForm

dxvkopen feature setd3d9d3d8
doitsujin/dxvk#4322 · opened 2024-10-04 by WinterSnowfall · updated 2025-08-02 · 19 comments · github
WWinterSnowfall 2024-10-04 github

There are a few d3d8 games that can apparently leverage n-patches (originally in conjunction with ATI cards), namely:

-> BorderZone
-> Unreal Tournament 2003/2004
-> C&C: Renegade

C&C: Renegade configuration screen (Curved Surfaces)

image

-> Serious Sam (or maybe it's exclusive to the OpenGL renderer? Will have to check)

Here's a list of other titles, though most of these are OpenGL based: https://en.wikipedia.org/wiki/ATI_TruForm#Games_with_TruForm_support

Would be nice to see if we can add support for it at some point.

Also, here's a very interesting read about TruForm in general and in d3d8/OpenGL. Also included as part of the Wikipedia page, as external links, (see above) are archive.org references to the ATI TruForm Whitepaper and Developer FAQ.

P.S.: @Blisto91 needs this feature URGENTLY! Don't dawdle.

Mmrdeathjr28 2024-10-04 github

Another title support n-patches is hellforces

4404219-hellforces-windows-front-cover

WWinterSnowfall 2024-10-04 github

Another title support n-patches is hellforces

It's using the same engine as BorderZone. What a small world :).

Mmrdeathjr28 2024-10-04 github

Hell forces have many graphic options, a few similar with tomb raider angel of darkness launcher (many graphic options)

hllfopt

and n-patches option appear but dont possible activate in my case

RRiasatSalminSami 2025-02-03 github

Are there any wrappers for openGL tesselation? I know DgVoodoo2 can do the dx8, 9 tesselation but after googling for hours, I haven't found any solution for opengl games.

WWinterSnowfall 2025-02-03 github

If modern OpenGL drivers no longer support/expose the needed extensions (ATI_pn_triangles IIRC), I'm not entirely sure how that could be addressed to be honest.

Nniobium93 2025-02-03 github

Maybe open a Mesa issue asking for the extension to be implemented? Zink and/or RadeonSI might do it.

Mmirh 2025-02-03 github

Wasn't tessellation supposed to be the glorified modern version? Even then, cpu emulation is probably fast enough today.

Anyway, what are the odds? Just yesterday I was reading this.
https://web.archive.org/web/20011218111826/http://www.ati.com/na/pages/faq/truform_faq.html
Too bad I couldn't find the npatch/pntriangles samples anywhere (a wine dev discussed it here but nothing more).

WWinterSnowfall 2025-02-08 github

There are some open source OpenGL samples here as well (along with TruQuake/TruQuake2): https://github.com/seishuku/NitroGL-Demos/tree/master/TruForm

Eeebssk1 2025-05-25 github

I tried enable ATI Tesselation(I suppose it is the TruForm?) on a old MMORPG action game(d3d9) with DXVk 2.4.1(emulate a amd card), the games just crash after launch. I suppose it's not supported yet in dxvk?

WWinterSnowfall 2025-05-25 github

I suppose it's not supported yet in dxvk?

No, and we don't even advertise support for it, so it shouldn't even be selectable, unless the game doesn't check that at all.

the games just crash after launch.

Hmmm, that shouldn't happen, unless it's the game that crashes, not dxvk. As far as dxvk is concerned it should work just fine, just that no tessellation will happen.

Btw, just for the sake of posterity, which game is this?

Eeebssk1 2025-05-25 github

I suppose it's not supported yet in dxvk?

No, and we don't even advertise support for it, so it shouldn't even be selectable, unless the game doesn't check that at all.

the games just crash after launch.

Hmmm, that shouldn't happen, unless it's the game that crashes, not dxvk. As far as dxvk is concerned it should work just fine, just that no tessellation will happen.

Btw, just for the sake of posterity, which game is this?

It's continent of the ninth seal. I'm using client from a private server. The option is not in settings but can be enabled by manually change config file.
So I decompiled the game. It seems if you are ati/amd card(or with emu amd) and enabled the option then it just goes that way without further check.
Also I traced the crash with windbg. It DID crash at d3d9(dxvk in this case) though.

WWinterSnowfall 2025-05-25 github

Also I traced the crash with windbg. It DID crash at d3d9 though.

Interesting. That shouldn't happen. Please open a separate issue about it and get a trace of the game as per the issue template, and I'll look into it. Ideally two apitraces would be nice: one of the game working and one of it crashing when you fake report an AMD/ATI card.

Eeebssk1 2025-05-25 github

Also I traced the crash with windbg. It DID crash at d3d9 though.

Interesting. That shouldn't happen. Please open a separate issue about it and get a trace of the game as per the issue template, and I'll look into it. Ideally two apitraces would be nice: one of the game working and one of it crashing when you fake report an AMD/ATI card.

How do you fake GPUID? Did apitrace also support this?

WWinterSnowfall 2025-05-25 github

How do you fake GPUID? Did apitrace also support this?

You can capture an apitrace of the game using dxvk (so dxvk would do the faking, as usual) if you're on Linux, just by dropping the apitrace dll next to the game executable. It will be loaded first and will hook the dxvk dll (which sits in system32/syswow64 on your Wine prefix).

Eeebssk1 2025-05-25 github

How do you fake GPUID? Did apitrace also support this?

You can capture an apitrace of the game using dxvk (so dxvk would do the faking, as usual) if you're on Linux, just by dropping the apitrace dll next to the game executable. It will be loaded first and will hook the dxvk dll (which sits in system32/syswow64 on your Wine prefix).

"Advanced capturing via hooking the game exe" seems should work for windows. I'll try it.

Eeebssk1 2025-05-25 github

How do you fake GPUID? Did apitrace also support this?

You can capture an apitrace of the game using dxvk (so dxvk would do the faking, as usual) if you're on Linux, just by dropping the apitrace dll next to the game executable. It will be loaded first and will hook the dxvk dll (which sits in system32/syswow64 on your Wine prefix).

Unfortunately, the game seem does not like apitrace dll, no trace file are generated. Also tried inject with apitrace.dll but it also fail.

WWinterSnowfall 2025-05-25 github

Unfortunately, the game seem does not like apitrace dll, no trace file are generated. Also tried inject with apitrace.dll but it also fail.

No worries, thank you for trying. I guess simply don't use n-patches/tesselation with it on dxvk then. Was curious to see what causes the crash, but then again it's not like we support it anyway.

BBlisto91 2025-06-23 github

It's like a piece of me is missing. I think TruForm support will fill that void inside.

WWinterSnowfall 2025-08-02 github

@eebssk1 If you're still around and still play that game, it would be interesting to give it a go with this build: https://github.com/doitsujin/dxvk/actions/runs/16695952914/artifacts/3673856380. I think the crashes with ATI Tesselation enabled should be resolved (hopefully).

DLLs