-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text is not displaying in Empire Earth II #57
Comments
I suspect developers would rather prefer an apitrace of the issue (if it even works in this scenario that is). |
Indeed, an apitrace or D3D9 PIX capture would be helpful. |
Sorry, I thought that being able to reproduce the problem is important. This is what e.g. Nvidia asked me to provide in the past. Unfortunately, I was unable to record apitrace for DX12, because apitrace's d3d9.dll doesn't support "Direct3DCreate9On12" calls. OK, so first of all, the traces can be downloaded here: There is file "Commands used.txt" with additional information from me, and the commands used. I was able to record two traces:
While recording, the text was displaying correctly in both cases. When watching the replay, the DX8 version seems not to be displaying the text, just as with the DX12 bug. The DX9 version seems to display correctly. Is this helpful enough to take a look on this issue? @jenatali I am not very familiar with DirectX debugging (I'm not even a professional programmer). If necessary, could you please guide me how to create a EDIT: I tried PIX, but it can only record x64 processes, while old games are obviously x86: |
For the traces, try recording them without using the Force9on12 workaround. We can force d3d9 to load the 9on12 during playback of the trace on our end. In one rare case I've seen this make a difference in whether or not the trace reproed the issue, but generally this should work fine. For d3d9 pix, you will need to download the DirectX 2010 June SDK. Once that installs, you should be able to run d3d9 pix by searching for "PIXWin" from the start menu. Then you can create a "New Experiment" to run your game and capture the issue with F12, or whichever method you chose. In your edit, that is modern, d3d12 PIX. Much nicer tool, but as you can see it only supports x64 and d3d12 applications. D3D11 is supported by forcing 11on12. |
@vdwtanner Thank you for the reply. I can confirm, that none of apitraces attached by me in this post are forcing the D3D9to12 workaround. I only mentioned that I tried to record with the forced D3D9to12, because I was attempting to "fix" this issue by modifying d3d8to9. It's very likely that d3d9on12 does something incorrectly at function: Example call from the game is: If I set this function in d3d8to9 to do nothing, just return Another possibility is a problem at function: For example, when I modified flag I also read this article: "A Simple Blit Function For DirectX 8" and it seems like the game is doing something similar, since all 3 flags are matching I hope these information might be at least a bit useful. I will try the EDIT: Is it possible that I force d3d9on12 on this stream (for testing purposes), or it's rather some complicated procedure? |
I have found, with great help of @HerMajestyDrMona , that the issue can be solved via changing default graphic card (NVidia control panel) from Optimus to dedicated graphic card. This allows to launch correctly many old games. |
thats not a fix, its a workaround and has no relevance to intel only configurations. |
I think it's important that this issue is addressed. When I buy a new PC I find it important that I'm still able to enjoy older games. It's a big part of what makes PC gaming special. To return to games you've been playing for years and see them run better on a new PC. |
Empire Earth 2 is one of my favourite games. I really hope that this problem can be fixed. |
I spent some time looking at the PIX capture (thanks for that!), and so far something that I'm seeing which looks odd is that the game appears to be trying to set the ZRange min to .000453 instead of 0 when drawing text. This is causing it to be clipped. Still need to repeat some tests with 9on12 disabled to see if that is the same for d3d9 but somehow still draws correctly, but as of right now it seems like it may be an app bug that mysteriously works on native d3d9 drivers. |
keep in mind, there are faster ways than using 9on12 available, that do not have such problems, such as DGVoodoo. This removes the need to use a D3D(8) > 9 wrapper, before the 9on12 layer, and doesn't have the inherent performance issues that comes from not having a vendor optimized DDI in the driver. |
Thank you for checking it! I'm not sure where this ZRange is set in the game. Do you maybe know what DirectX function is called to draw this text with the Zrange parameter? If modifying some value to 0 could be done by D3D8to9, that would be already great. This game was natively programmed for DX 8, so some differences might also come from there. However, all of available DX8to9 converters somehow manage to render it correctly on DX 9. None of them use the game specific fixes for it.
It's not the matter of using 9on12, but the matter of being forced to use it in the newest Intel GPUs. |
DGVoodoo works fine with EE2, it implements a near complete implementation of D3D class 7, 8 and 9 hardware replicating those capabilities in D3D11 and 12, issues found would be flaws in the game itself, as vdwtanner has already identified some.
D3D8 to 11 would be ideal then. |
It doesn't, at least not on all configurations. It's easy to write "fine" if you're looking at the game for the first time, but experienced players will catch smaller or bigger problems immediately. DGVoodoo has problems with rendering fonts too, e.g. in Anno 1404 or EE2 itself. Also, I don't see a reason of talking about DgVoodoo in a GitHub thread related to D3D9on12. Such "tips" are not helping to solve the core issue, and are not helping to improve D3D9on12 if that's an issue related to it.
Maybe if it wasn't crashing the game with the |
9on12 will never work as a vendor developed DDI would. Ever. |
For now D3D8to9 works best with EE2, and D3D8on12 has no visible graphical issues in game, except these unfortunate texts. I believe D3D9to12 is the most futuristic way for THIS game. |
Thank you @vdwtanner ! It's awesome to have this issue fixed. Now people with newest Intel processors will be able to play again. Do you by any chance know ETA when such fixes for D3D9on12 appear in Windows Update? |
@XDamianX-coder Could you please tell me what exactly you changed in the NVIDIA control panel to fix the on-start crash? Did you change the Optimus profile for the game (selected "Empire Earth II" from the list), or globally? If you find some time, please visit the Support Chat in UP1.5 so I can ask some extra questions. We're currently trying to use NVAPI to edit the Nvidia profile to fix this problem, but it's weird because it looks like Nvidia is already auto-selected for it... |
Hi @HerMajestyDrMona, unfortunately I don't know the exact timeline for when it'll be generally available in a public update (as this isn't a security fix and it seems to be mostly tied to older apps with low usage it's hard to justify servicing the change outside of the general OS update cadence, and I'm not privy to all the details there). It will be available to insider flights sooner than general release of course, but in the short term the best option for your users might be to just build the open source version of 9on12 and have that in the same directory as the game's exe. That said, they would likely need to play in windowed mode. The open source version doesn't support exclusive fullscreen right now. The ground work has been laid for better support, but it's not enabled yet (no timeline on when that will come to fruition as of now). |
@vdwtanner Thank you for explanation! The most important part is that it will come to insider builds, so the "future of the game" is safe :) I was trying to compile D3D9on12 before, but for the 32bit version it wasn't putting the |
@HerMajestyDrMona That's expected, WinPIX (D3D12 PIX) is 64bit only, so there isn't a 32bit dll. All of the code that needs that dll is disabled in 32 bit. (You'll see some warnings about it in the build log iirc) |
@vdwtanner Thanks a lot! It makes sense why it was crashing for me the last time I tried to use my compiled version of D3D9On12. I was running in the fullscreen mode instead of windowed. I've recently added a nicely working borderless windowed mode to the game, so it's now starting correctly. |
@HerMajestyDrMona You are correct, there are a few pieces that we swap out internally that use unstable APIs. There has been some work to make the open source version more similar in that regard (but using new, stable APIs), but it's not generally available at this time. I would suggest making sure you've pulled the latest changes though as Jesse has made some nice performance improvements lately, and make sure that you are building in release mode. |
Yes, I "git cloned" D3D9On12 around 2 hours ago, so it should be all available :) And yes, I compiled it as Release. |
Iris and Arc have had the native d3d9 driver ported from the legacy igp driver, and use either it or dxvk in the newest drivers. |
Do you mean Intel has updated their drivers to support d3d9 without d3d9on12? Or it's some custom workaround method? Do you have any source to this? |
https://game.intel.com/story/intel-arc-graphics-directx9/ 3959 adds the igd9trinity dlls to the driver package |
Thank you for sharing this. Did you get any chance / possibility to test it? They don't mention that they don't use D3D9On12 anymore, just that some titles got better support. But I guess this is what they meant? I really hope they activate the native DX9 support to all games, not just selected titles that they tested. Thank you for sharing this information. Just now, I was working on an integrated fix with a "magic" name: But I'll pause for now :) |
I don't have an Xe handy, however a Twitter user has been testing it out on some questionable japanese sims and posting his findings |
I found a solution for the low FPS problem in the compiled open-source version of D3D9on12. It seems like it was as easy as checking the already-existing option "Disable V-Sync in DirectX 9". All this option does it setting: Instead of: The V-sync can later be enabled in the Graphics Control panel (e.g. Nvidia Control Panel), and it works just fine. I integrated a fix for this problem with Unofficial Patch 1.5. A guide how to enable it is available here: Temporary fix for the missing text problem in Empire Earth II. |
I'm developing an unofficial patch for Empire Earth II. I have recently received many messages from players who are unable to play the game, due that the text is not displaying in game. All these players have new laptops with Intel CPUs. Most of these players are refunding their laptops for this reason.
After reading this page, I learnt that Intel is now using D3D9On12 in their drivers:
I managed to re-produce the issue on my computer using ForceD3D9On12 d3d9.dll. My unofficial patch already supports d3d8to9, so d3d9.dll could be placed in the game folder and was loaded successfully.
Screenshots showing the issue:
Steps to reproduce the problem:
UnofficialVersionConfig.txt
and add:UseWorkingDirectoryWorkaround=1
.d3d9.dll
from ForceD3D9On12 to the game folder.* This step is required, so the Launcher copies the game executable to to the main game folder (as
EE3.exe
), instead of starting the game process from a different location. This is needed because otherwise the game would load d3d9.dll from the SysWOW64 directory.As the patch developer, I'm usually trying to fix similar issues myself, using dozens of workarounds, assembly, etc. However this time it looks like the problem is in
D3D9On12
itself, so maybe somebody could please check if this can be resolved? After all, the issue is quite serious since players who buy new laptops can't play the game.The text was updated successfully, but these errors were encountered: