VOGONS


First post, by eddman

User metadata
Rank Member
Rank
Member

I recently discovered that dgvoodoo offers full API tracing, which finally ended my long search for tracing D3D6 and older.

I can now see which interfaces are in use, however, it seems that interface numbers are not listed for each trace; for example, the log shows "Direct3DDevice::SetRenderState" without a number, instead of "Direct3DDevice7::SetRenderState".

Without those it takes quite a while to determine which exact d3d version is used, specifically when it comes to D3D6 and older. It becomes even more difficult when games call different interface versions. I've seen games that load both d3dim700.dll and d3dim.dll.
In some cases, even when a game only loads d3dim.dll, it still queries different Direct3D interface versions, for example both Direct3DDevice2 and Direct3DDevice3.

Would it be possible for you to add the ability to show the interface numbers?

P.S.

I've noticed only Debugview++ shows full traces; The regular Debugview only shows dgvoodoo's own messages, and no traces. Is that normal, or is something wrong on my end?

Reply 1 of 4, by Dege

User metadata
Rank l33t
Rank
l33t
eddman wrote on 2023-09-22, 18:48:

Without those it takes quite a while to determine which exact d3d version is used, specifically when it comes to D3D6 and older. It becomes even more difficult when games call different interface versions.

In fact the version cannot be determined. You can query different versions of interfaces for DD/D3D objects at the same time. So, you can have a Direct3DDevice2 and Direct3DDevice3 interface pointing to the same device object. The same is true for DirectDrawSurcface and all other DD/D3D objects.
For example, creating a DD surface with a DirectDrawSurcface4 interface can only be achieved by creating a surface with a DirectDrawSurcface interface and query for DirectDrawSurcface4 through that.
And then either release the old one or use both, for the same object.

eddman wrote on 2023-09-22, 18:48:

I've seen games that load both d3dim700.dll and d3dim.dll.
In some cases, even when a game only loads d3dim.dll, it still queries different Direct3D interface versions, for example both Direct3DDevice2 and Direct3DDevice3.

d3dim dll's are not loaded by the game directly, that's done by ddraw.dll when a D3D interface is queried. d3dim700 is probably for D3D7 specific stuffs.
Direct3DDevice2 is a DX5 interface, Direct3DDevice3 is DX6. So, if a game is DX6, it can still query for both.

In the DD/D3D log I dump the object instances and not the interface instances through they are accessed, that's why there is no "version number" attached to them.
I thought it's more important than figuring out that whether 2 or more different interfaces are pointing to the same object or not.

I cannot remember if I dump the information about creating an interface object for a DD/D3D object in the spec release version, or I only do it in the debug version for myself.
If it is dumped then the interfaces for a given object can be back-tracked from the log.

eddman wrote on 2023-09-22, 18:48:

Would it be possible for you to add the ability to show the interface numbers?

It could be, but it's a lot of work, I should do it for each type of objects. Maybe step by step from version to version.

eddman wrote on 2023-09-22, 18:48:

I've noticed only Debugview++ shows full traces; The regular Debugview only shows dgvoodoo's own messages, and no traces. Is that normal, or is something wrong on my end?

There should be no differene. Messages and tracing are 2 different options in dgVoodoo. Maybe tracing was disabled when you used DebugView.

Reply 2 of 4, by eddman

User metadata
Rank Member
Rank
Member

Perhaps quering wasn't the best example for me to bring up, since as you mentioned, the game might query different versions. With other tracing tools like APiTrace and DxWnd, after you get past the initial queries and calls, you can see thousands of interface calls showing the same number, which means you can confidently tell the game is actually using that specific version for rendering.

With dgvoodoo it's more of a guessing game, but I still prefer it over the other two. ApiTrace I specially don't like, since I have to select which API it needs to trace, which makes it a bad choice for games that combine, say, d3d8, d3d7 and ddraw, and the UI also crashes with long logs.

DxWnd is powerful, but it's too complicated for me and usually needs the user to mess with different settings to make the game work. Dgvoodoo in the majority of cases just works out-of-the-box.

If it's too difficult and time consuming, it's fine. I don't intend to push anything.

Reply 3 of 4, by Dege

User metadata
Rank l33t
Rank
l33t

I implemented it after all. I found a simpler solution and the amount of needed work wasn't that much that I thought.
Now DD/D3D dumps versioned interface names and also, the incoming interface pointers (in some methods) are also extended with the object information.

So, for example

Direct3DDevice7::SetTexture (this = 0CF627C0, dwStage = 0, lpTexture7 = 0312E8E8 [obj = 0D010B88])

means that the D3D device is called into through a IDirect3DDevice7 interface and the device object instance is 0CF627C0.
And also, the incoming texture surface interface pointer is 0312E8E8 which refers to the surface object 0D010B88.

See the newest WIP:
Re: dgVodooo 2.8.x and related WIP versions