Closed ghost closed 1 year ago
Well looks like it's working all right ... but it doesn't raise the D3D level, it's still at D3D9. DXVK may work differently than D3D8TO9 and similar. Perhaps what I need is something like D3D8TO11 or D3D9TO11 (there is one attempt but unsuccessful), or just wait until profilers support Vulkan properly.
EDIT: The below text is a side comment that's totally unrelated but the lag around the green lines (patriot binary data stream) is what I was trying to debug with the profilers so it was all happening at the same time as with trying DXVK an D3D8TO9 etc.
The picture actually depicts a modified case, the green patriot datalink lines are disabled and thus the lag is completely gone (30FPS instead of 1-5), it was a fairly simple INI workaround, but we're not yet to the bottom why those green lines take so much horsepower.
Well looks like it's working all right ... but it doesn't raise the D3D level, it's still at D3D9. DXVK may work differently than D3D8TO9 and similar.
You're using D3D8to9 and DXVK as your D3D9 implementation. What exactly did you expect? DXVK gets D3D9 calls from the game.
About the performance: that only happens with DXVK, right? If thats the case, please make an apitrace with that setting turned on and post it here.
@altimumdelta unlike D3D8TO9, DXVK translates D3D9 directly to Vulkan. It does not first translates D3D9 to 10 or 11. So all is good if you see D3D9 in the HUD.
@altimumdelta if for some reason you need to translate DX8 to DX11 (I'm not sure how much of a bump you need here), you can try dgVoodoo 2. DXVK only translates DX9/10/11 directly to Vulkan, so I don't think it's what you're looking for.
About the performance: that only happens with DXVK, right? If thats the case, please make an apitrace with that setting turned on and post it here.
Oh sorry, no, the USA Patriot Missile Assist Datalink was lagging already and for a long long time, perhaps it did not lag on 2003 hardware/drivers/WinXP which I played on myself, it's been my fav RTS for a long time, I was deepely involved in modding and still get back to it every few months/years so I know a lot about it, but I don't think I can remember it not lagging there, or perhaps in the old days I didn't build such crazy defenses.
I dug into it this time around with my past experience with such tools (which can be quite hard to come randomly across if you're not looking for them specifically, I never knew Intel GPA existed before last week)
All it took was setting NumBeams to zero and everything else still works in the logic behind the feature, the green lines just don't get drawn:
Object PatriotBinaryDataStream
; *** ART Parameters ***
Draw = W3DLaserDraw ModuleTag_01
Texture = EXBinaryStream32.tga
NumBeams = 0 ;Number of overlapping cylinders that make the beam. 1 beam will just use inner data. Current max: 10
InnerBeamWidth = 4 ;The total width of beam
InnerColor = R:0 G:255 B:0 A:180 ;The inside color of the laser (hot)
Tile = Yes ;The height of the texture will determine how many times to tile the texture to fit without scaling.
ScrollRate = -0.25 ;Scrolls the texture offset this fast -- towards(-) away(+)
Segments = 20 ;Number of segments -- more segments give smoother curve (but more joints) Current max: 20
ArcHeight = 30.0 ;The height of the arc
SegmentOverlapRatio = 0.0000 ;This value overlaps(+) or separates(-) the segments by ratio
TilingScalar = 0.25 ;Stretches tiling if value > 1.0, otherwise shrinks it (1.0 is natural)
End
KindOf = IMMOBILE
ClientUpdate = LaserUpdate ModuleTag_02
;nothing
End
; A patriot uses this stream as an event triggered thing, not something turned on and off with a state.
Behavior = DeletionUpdate ModuleTag_03
MinLifetime = 600 ; min lifetime in msec
MaxLifetime = 600 ; max lifetime in msec
End
End
Ah, right they call it "Binary Data Stream" it's just as a helper graphic not required, so the missiles, smokes and explosions don't really cause any slowdown. It's a 30FPS game so that FPS right there is optimal (perhaps there's a 60FPS hack that I forgot but it affects game speed if modified)
The Patriot Assist feature is about other Patriot Missile batteries being able to fire beyond their normal range (temporairly switches to a secondary weapon with bonus range) but they have to be withing the certain radius of the Patriot that is calling them which has to see the target within it's normal range. The called ones are therefore assisting, and the more Patriots you have the more green beams you have all over the freaking place.
There it is, the EXBinaryDataStream.tga texture:
This would be like 2-3 FPS with severe slowdown in terms of gamespeed, so it's also lagging the process it self.
RenderDoc works fine with DXVK fwiw, you just need to set the environment variable ENABLE_VULKAN_RENDERDOC_CAPTURE=1
and not start the application it through the RenderDoc GUI.
I have success! With AMD RGP
RenderDoc works fine with DXVK fwiw, you just need to set the environment variable
ENABLE_VULKAN_RENDERDOC_CAPTURE=1
and not start the application it through the RenderDoc GUI.
Yeah it crashes GenZH in all cases on boot, either generals.exe or game.dat crashes.
Whether the env variable set only in Windows (without RenderDoc open), or it's set with both RenderDoc and Windows, or only in Renderdoc. And all those combinations again with or without Capture Child Process.
The error is that renderdoc.dll isn't found in the process, usually, or similar.
In the end I tried the Thyme project which has it's own launcher that replaces generals.exe
RDOC 005908: [23:28:16] win32_process.cpp( 514) - Log - Running process D:\Igre\Win10\C&C Generals Zero Hour\launchthyme.exe
RDOC 005908: [23:28:16] win32_process.cpp( 597) - Log - Injecting renderdoc into process 376
RDOC 003776: [23:28:16] core.cpp( 421) - Log - RenderDoc v1.6 Windows 32-bit Release (0e7f772596035137416be01766c2d61205efc63e) loaded in replay application
RDOC 003776: [23:28:16] win32_process.cpp( 597) - Log - Injecting renderdoc into process 376
RDOC 000376: [23:28:16] core.cpp( 421) - Log - RenderDoc v1.6 Windows 32-bit Release (0e7f772596035137416be01766c2d61205efc63e) capturing application
RDOC 000376: [23:28:16] crash_handler.h( 150) - Log - Timer Waiting for crash handling server - 27.040 ms
RDOC 000376: [23:28:16] crash_handler.h( 156) - Log - Created crash-handling server \\.\pipe\RenderDocBreakpadServer7581231964
RDOC 000376: [23:28:16] crash_handler.h( 87) - Log - Connecting to server \\.\pipe\RenderDocBreakpadServer7581231964
RDOC 000376: [23:28:16] win32_libentry.cpp( 66) - Log - Loading into D:\Igre\Win10\C&C Generals Zero Hour\launchthyme.exe
RDOC 000376: [23:28:16] sys_win32_hooks.cpp( 82) - Log - Registering Win32 system hooks
RDOC 000376: [23:28:16] d3d11_hooks.cpp( 125) - Log - Registering D3D11 hooks
RDOC 000376: [23:28:16] d3d12_hooks.cpp( 184) - Log - Registering D3D12 hooks
RDOC 000376: [23:28:16] d3d8_hooks.cpp( 36) - Log - Registering D3D8 hooks
RDOC 000376: [23:28:16] d3d9_hooks.cpp( 45) - Log - Registering D3D9 hooks
RDOC 000376: [23:28:16] dxgi_hooks.cpp( 250) - Log - Registering DXGI hooks
RDOC 000376: [23:28:16] egl_hooks.cpp( 967) - Log - Registering EGL hooks
RDOC 000376: [23:28:16] gl_hooks.cpp( 255) - Log - Registering OpenGL hooks
RDOC 000376: [23:28:16] wgl_hooks.cpp( 612) - Log - Registering WGL hooks
RDOC 000376: [23:28:16] vk_layer.cpp( 53) - Log - Registering Vulkan hooks
RDOC 000376: [23:28:16] crash_handler.h( 51) - Log - Re-using crash-handling server \\.\pipe\RenderDocBreakpadServer7581231964
RDOC 000376: [23:28:16] crash_handler.h( 87) - Log - Connecting to server \\.\pipe\RenderDocBreakpadServer7581231964
RDOC 005908: [23:28:16] target_control.cpp( 576) - Log - Got remote handshake: launchthyme [376]
RDOC 000376: [23:28:16] win32_process.cpp( 597) - Log - Injecting renderdoc into process 5368
RDOC 005368: [23:28:16] core.cpp( 421) - Log - RenderDoc v1.6 Windows 32-bit Release (0e7f772596035137416be01766c2d61205efc63e) capturing application
RDOC 005368: [23:28:16] crash_handler.h( 150) - Log - Timer Waiting for crash handling server - 26.685 ms
RDOC 005368: [23:28:16] crash_handler.h( 156) - Log - Created crash-handling server \\.\pipe\RenderDocBreakpadServer7581600214
RDOC 005368: [23:28:16] crash_handler.h( 87) - Log - Connecting to server \\.\pipe\RenderDocBreakpadServer7581600214
RDOC 005368: [23:28:16] win32_libentry.cpp( 66) - Log - Loading into D:\Igre\Win10\C&C Generals Zero Hour\game.dat
RDOC 005368: [23:28:16] sys_win32_hooks.cpp( 82) - Log - Registering Win32 system hooks
RDOC 005368: [23:28:16] d3d11_hooks.cpp( 125) - Log - Registering D3D11 hooks
RDOC 005368: [23:28:16] d3d12_hooks.cpp( 184) - Log - Registering D3D12 hooks
RDOC 005368: [23:28:16] d3d8_hooks.cpp( 36) - Log - Registering D3D8 hooks
RDOC 005368: [23:28:16] d3d9_hooks.cpp( 45) - Log - Registering D3D9 hooks
RDOC 005368: [23:28:16] dxgi_hooks.cpp( 250) - Log - Registering DXGI hooks
RDOC 005368: [23:28:16] egl_hooks.cpp( 967) - Log - Registering EGL hooks
RDOC 005368: [23:28:16] gl_hooks.cpp( 255) - Log - Registering OpenGL hooks
RDOC 005368: [23:28:16] wgl_hooks.cpp( 612) - Log - Registering WGL hooks
RDOC 005368: [23:28:16] vk_layer.cpp( 53) - Log - Registering Vulkan hooks
RDOC 005368: [23:28:16] crash_handler.h( 51) - Log - Re-using crash-handling server \\.\pipe\RenderDocBreakpadServer7581600214
RDOC 005368: [23:28:16] crash_handler.h( 87) - Log - Connecting to server \\.\pipe\RenderDocBreakpadServer7581600214
RDOC 005908: [23:28:16] target_control.cpp( 717) - Log - Got a new child process: 5368 38921
RDOC 005908: [23:28:17] win32_network.cpp( 258) - Warning - recv: WSAECONNRESET: An existing connection was forcibly closed by the remote host.
RDOC 005908: [23:28:17] target_control.cpp( 576) - Log - Got remote handshake: game [5368]
RDOC 005368: [23:28:17] win32_process.cpp( 597) - Log - Injecting renderdoc into process 5668
RDOC 005668: [23:28:17] core.cpp( 421) - Log - RenderDoc v1.6 Windows 32-bit Release (0e7f772596035137416be01766c2d61205efc63e) capturing application
RDOC 005668: [23:28:17] crash_handler.h( 150) - Log - Timer Waiting for crash handling server - 27.268 ms
RDOC 005668: [23:28:17] crash_handler.h( 156) - Log - Created crash-handling server \\.\pipe\RenderDocBreakpadServer7585320967
RDOC 005668: [23:28:17] crash_handler.h( 87) - Log - Connecting to server \\.\pipe\RenderDocBreakpadServer7585320967
RDOC 005668: [23:28:17] win32_libentry.cpp( 66) - Log - Loading into D:\Igre\Win10\C&C Generals Zero Hour\thymecrashhandler.exe
RDOC 005668: [23:28:17] sys_win32_hooks.cpp( 82) - Log - Registering Win32 system hooks
RDOC 005668: [23:28:17] d3d11_hooks.cpp( 125) - Log - Registering D3D11 hooks
RDOC 005668: [23:28:17] d3d12_hooks.cpp( 184) - Log - Registering D3D12 hooks
RDOC 005668: [23:28:17] d3d8_hooks.cpp( 36) - Log - Registering D3D8 hooks
RDOC 005668: [23:28:17] d3d9_hooks.cpp( 45) - Log - Registering D3D9 hooks
RDOC 005668: [23:28:17] dxgi_hooks.cpp( 250) - Log - Registering DXGI hooks
RDOC 005668: [23:28:17] egl_hooks.cpp( 967) - Log - Registering EGL hooks
RDOC 005668: [23:28:17] gl_hooks.cpp( 255) - Log - Registering OpenGL hooks
RDOC 005668: [23:28:17] wgl_hooks.cpp( 612) - Log - Registering WGL hooks
RDOC 005668: [23:28:17] vk_layer.cpp( 53) - Log - Registering Vulkan hooks
RDOC 005668: [23:28:17] crash_handler.h( 51) - Log - Re-using crash-handling server \\.\pipe\RenderDocBreakpadServer7585320967
RDOC 005668: [23:28:17] crash_handler.h( 87) - Log - Connecting to server \\.\pipe\RenderDocBreakpadServer7585320967
RDOC 005908: [23:28:17] target_control.cpp( 717) - Log - Got a new child process: 5668 38920
RDOC 005368: [23:28:19] d3d8_hooks.cpp( 49) - Log - App creating d3d8 dc
RDOC 005368: [23:28:19] d3d9_hooks.cpp( 103) - Log - App creating d3d9 20
RDOC 005368: [23:28:19] core.cpp(1691) - Log - Adding Vulkan device frame capturer for 0x08AC56E0
RDOC 005368: [23:28:19] vk_device_funcs.cpp( 763) - Log - Initialised capture layer in Vulkan instance.
RDOC 005368: [23:28:19] vk_device_funcs.cpp(1352) - Log - physical device 0: Radeon (TM) RX 480 Graphics (ver 2.0 patch 0x7f) - 1002:67df
RDOC 005908: [23:28:19] win32_network.cpp( 258) - Warning - recv: WSAECONNRESET: An existing connection was forcibly closed by the remote host.
RDOC 005908: [23:28:19] win32_network.cpp( 339) - Warning - recv: WSAECONNRESET: An existing connection was forcibly closed by the remote host.
RDOC 005908: [23:28:19] streamio.cpp( 319) - Warning - Error reading from socket
Seems like RenderDoc doesn't have options to deal with these child processes, shouldn't be injecting into thymecrashhandler.exe
Perhaps I'll have to open a ticket on RenderDoc about this, unless ... I figure this out.
Hi, has that been solved? I am having maybe the same problem. C&C is very slow with Gentool. Maybe Vulkan is not working right?
No one has looked into this yet.
Just for future reference: format 65 is D3DFMT_W11V11U10. That's a format that's technically not part of D3D9.
I do not understand your answer yet, it is on a too high technical level. Also if I see it right the initial thread opener tries to run it without gentool? I found this project: https://github.com/crosire/d3d8to9 with it (also compiled dlls were offered somewhere) c&c runs smoothly again. but I had to replace the d3d8.dll in the game and with it gentool got disabled. What I'd like to do is to play the game online. Is gentool really not compatible with vulkan and wine?
That comment was meant towards me or other DXVK developers.
I have no clue what gentool is. If it also uses d3d8.dll, then you can't use it with DXVK on Windows. No such problem on Linux though.
I found this project: https://github.com/michael-fadely/d3d8to11 but I do not know how to build it on linux. I would like to download a .dll file.
Regarding the issue to combine gentoo with d3d8to9 I found this hint: https://www.gamereplays.org/community/index.php?showtopic=1013678
They suggest that Gentool hooks in a d3d8.dll file iin the game folder and loads the system's d3d8 later and this file can be still replaced with some d3d8to9.dll
I tried it, but it did not lead to a visible improvement. not sure which .dll Gentool loads where in the wine environment.
I implemented the missing texture format.
I assume it's fixed by implementing the missing texture format so I'm gonna close this issue.
If it's still broken, please either reopen or open a new issue.
Hello
I got as far as I could yesterday to try daisy-chaining but it doesn't look like it'll work out of the box. I'm thinking I must have misunderstood this project, is this meant to be used only on Linux and Wine? The DXVK installation script seems to be meant only for Linux too.
I'm trying to get a better idea of the lag in C&C Generals that has been plaguing everyone for a long time, to be able to help with workaround/fix efforts. However various various profilers and debuggers these days don't support DX9 let alone DX8.1, with the exception of Intel GPA which supports DX9 and that's how I was able to use it so D3D8TO9 does work it for sure.
In a way I may already be happy with just that one, so I might get all the things I need from it, but it kinda uses a legacy simple toolset compared to the modern one with later APIs. I'm just being stubborn as I kinda want this to work as an example and for my own enjoyment/challenge :)
UPDATE1:
I now got rid of the gentool and it's proxy DLL loading feature and tens of other combinations of namings and cleaned out all the experimentation, only placed D3D8TO9's dll as "d3d8.dll" and DXVK's 32-bit "d3d9.dll" into the Generals ZH root, for a long time I haven't seen any indication of it working but later in the evening I noticed a DXVK logfile "d3d9.log" so that's a good sign.
Note: C&C Generals uses child process for the main engine executable called
game.dat
as other Westwood/EALA games at the time. But it must be started withgenerals.exe
or else it won't boot.AMD GPUPerfStudio still reports DX9 is active and won't work since it doesn't support DX9 anyway ... but then again it doesn't support Vulkan either what was I thinking, the thing is from 2015 with last update on 2016 somewhere.
Intel GPA also won't work now, it launches, doesn't crash, but won't work ... now I figure out it doesn't support Vulkan either, what in the hell was I thinking, how the heck did I miss that, because I got the latest version a week ago I thought it should have but yeah I must have mixed that news with RenderDoc being the one adding Vulkan support.
RenderDoc just won't work either, perhaps it's a RenderDoc problem and not DXVK. RenderDoc is not a profiler so it will not help me as much but it would be great to make it run just to prove the point, perhaps it may be useful for other DXVK cases if this problem also affects other daisy-chained games. RenderDoc won't launch the game no matter what I try, it'll just crash the game and even one of it's own components. Lastly the only combination that worked the best so far was injecting it into game.dat which is launched by Thyme. (TheAssemblyArmada's project) It doesn't work but it doesn't crash, game runs normally, but no API is detected and can't do anything really so it's so far useless.