-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
DirectX 11 Overlay #28
Conversation
Ok, although it worked on a sample, it crashed BFBC2 without notice. Don’t pull yet. :) |
Wasn't the whole reason pcgod never applied this patch that it didn't work on anything but the samples? In any case. You should override the author field of the first patch instead of putting the the source in the commit message. Much cleaner that way. |
yeah |
Updated. Does not crash anymore, but does not work yet neither (in dx samples neither anymore). |
overlay11.hex is actually overlay.hex, and your overlay.pro still has a conflict in it. |
rebased |
BTW i got your branch compiling, but it crashes with EmptyProject11 |
I was able to get this working by using fxc /Tfx_5_0 to generate overlay.hex /Tfx_4_0 generates a overlay.hex that crashes CreateEffect |
Works in intro screen of bfbc2, but not the game itself (no sign of overlay) |
You don’t need to attach a full-fledged debugger. |
Got everything working on BF3. Will test out a few other dx11 games then post the patches. |
Here are the issues
Unfortunately, fxc outputs a header that generates a global g_main const.
Question about the Effects library: i noticed your overlay.pro references the local directory and not the dxsdk directory. Should mumble be just copying the Effects source files as is into the repo? are there licensing issues? if there are licensing issues, then more crazy things have to be added to the build instructions. |
Works in Deus Ex, but not BFBC2. DeferredContext creation fails. |
@nyetwurk: That sounds great. We would love to see patches for DX11 and, given they are stable, will gladly accept them. |
We have to patch the Effects source files (I have a modified version somewhere) to avoid depending on a specific DirectX version, but I don't know if we can do that by checking in the Effects source or just a patch which has to be applied to the Effects source in the SDK (which would make the build instructions even more complicated)... |
https://gist.github.com/1323422 Note that this STILL doesn't help bfbc2, but at least it doesn't crash (for me) |
I verified that BFBC2 is creating the pDevice with D3D11_CREATE_DEVICE_SINGLETHREADED, so when we get the pDevice using swapchain->GetDevice(), you can't use it to create a deferred context. Any ideas? Is there another way to create a DeferredContext other than from the SwapChain's pDevice? |
Awesome to see some progress here. |
I could use your help; I'm way out of my depth. Is it really necessary to have the pDevice from the swapchain creation around for creating a deferred context? Can you just make a pDevice not connected to anything to create a DeferredContext, or do you HAVE to use the one you got when you made the swapchain? |
I was more fooling around than doing what I know. Applying the outdated patch to the (then) current codebase and then trying some things out (deferred context) until time ran short again. |
Haha ok good. I thought I was the lone noob :) Hopefully pcgod can figure it out, because I just can't figure out how to do it w/o either deferred context or save blocks. and i hvae NO idea how to do save blocks in dx11 |
Ok, on further investigation, the ImmediateContext path is definitely VERY VERY bad unless we can save/restore state. Unless we find a way to implement DX11 SaveBlocks, the ImmediateContext code should be removed... |
Now that I have BFBC2 support working, how do we move forward with the DX11 Effects code? More junk in the build instructions, or copy DX11 Effects code into the git repo? |
Any way you can make a version that works with BF3? I don't think BC2 support is a very high priority any more - my BC2 server has been empty since BF3 was released, and my BF3 servers + mumble server are completely full all the time now. |
The dx11 branch works in bf3.. its just a bit tricky to build. |
From 0ef1320b7b1bc9839774a89df8e3593d8016a398 Mon Sep 17 00:00:00 2001 From: Benjamin Jemlich <[email protected]> Date: Thu, 19 Aug 2010 00:37:34 +0200 Subject: [PATCH] Overlay DX 11 support
Today I tried out nyets installer he compiled, and the overlay worked in BC2. |
… and include path)
…t type conversion (warning), d3d10.cpp: actually, put in the lost Mutex again overlay.c: const a bufSize var, use it again
logging context prefix some more logging more descriptive varnames descriptive comments remove unused vars
Resolved Conflicts: installer/Product.wxs main.pro
Unfortunately the overlay does not work in the game The Secret World (if you use DirectX11). |
So you compiled this dx11 branch yourself and tried it? |
Unfortunately, I do not know how to do it. Why can not I enter this code into the mainline? |
My precompiled DX11 binaries are here: |
The file is missing? I can't download it? |
Re-uploaded. Try now |
|
To keep any followers updated: I plan to commit all non-effects11 changes to master soon(ish) (after some other PRs). |
necro pull request! Glad to see progress again. Thanks, Kissaki. Got tired of pulling/merging/rebuilding quite some time ago... |
Closed in favor of a rebase with selected commits/changes. |
mumble_ol.dll increased in size, from 127 to 291 KB
new dependencies: MSVCR, D3DCompiler (DLLs)
because dx11 does not include the effects anymore, the DX SDK sample effects has to be used and adapted, for compilation. By default it compiles as a static library, but thus will use libcmt, which will result in a fatal error, duplicate definition of functions. To fix this, the effects lib has to be compiled with the linker settings “ignore specific default library: LIBCMT”, and “additional dependencies: MSVCRT.lib” (added D for the debug versions).