BridgeApi - RemixApi wrapper for x86 games#12
BridgeApi - RemixApi wrapper for x86 games#12xoxor4d wants to merge 1 commit intoNVIDIAGameWorks:mainfrom
Conversation
nv-nfreybler
left a comment
There was a problem hiding this comment.
Overall looks great, thanks for doing this! There is certainly a promising future for exposing RemixApi like this.
One overall comment: Please rename everything from BridgeApi to RemixApi and similar. We see this more so as exposing the RemixApi directly to the games/mods, as opposed to wrapping it through a layer, and we don't want to conflate the RemixApi with the bridge's actual API, which is basically just the d3d9 API.
review fixes
a874b5d to
e6c64ef
Compare
|
@nv-nfreybler Firstly, thanks for taking the time to review this! I've made the required changes and squashed everything into one commit. I've remove almost all traces of |
|
Thanks for making all these changes! A couple things to note:
Thanks for doing that, I know it can be a long and tedious task to rename things. I appreciate your calling it out in particular, as we are actively discussing the |
|
Just wanted to post an update here that we're currently actively internally reviewing and working on this PR, for the better part of the last couple weeks, to be honest. We appreciate your patience, and want to assure you that it is not forgotten. |
|
Thank you for the update, really appreciate it! I hope this hasn't caused too much trouble internally 🙂 |
- #12 - Includes Remix API headers under new ext/remix/ top-level dir - remix_c.h and remix.h - Added an #ifndef to be able to turn off non-x64 compiler error at top of remix_c.h - Add new root dir public/include/ for bridge-specific Remix API header - public/include/remixapi/bridge_remix_api.h - Adds new util Serializable<T> helper class in util_serializable.h - Defines a uniform interface of functions to de-/serialize generic classes - Adds new RemixApi util helpers in util_remixapi.h/.cpp - Defines Serializable<T>s for remixapi types, and adds extra helpers to handle their quirks - Adds remix_api.h/.cpp to both Client and Server - Helpers for handling the x86 -> x64 conversion
- #12 - [REMIX-3433] - Includes Remix API headers under new `ext/remix/` top-level dir - `remix_c.h` and `remix.h` - Added an #ifndef to be able to turn off non-x64 compiler error at top of `remix_c.h` - Add new root dir `public/include/` for bridge-specific Remix API header - `public/include/remixapi/bridge_remix_api.h` - Adds new util `Serializable<T>` helper class in `util_serializable.h` - Defines a uniform interface of functions to de-/serialize generic classes - Adds new RemixApi util helpers in `util_remixapi.h/.cpp` - Defines `Serializable<T>`s for remixapi types, and adds extra helpers to handle their quirks - Adds `remix_api.h/.cpp` to both Client and Server\ - Helpers for handling the x86 -> x64 conversion
|
Please see commit 2dd0a0e. We overhauled quite a bit from the original PR, mostly to eliminate the code duplication between the original Thank you again for the PR. If you consider this sufficient, please go ahead and close this, or else we can. |
|
I'll now close the PR because the latest builds are running great and everything seems to be ironed out and working as expected. |
This PR adds a intermediary api called
to the bridge that allows x86 games to use parts of the x64 remix-runtime api.BridgeApiOverview:
BridgeApiand sends the data of received api calls to the server client/bridge_api.cppBehavior on init:
CreateDevice/CreateDeviceExInitializeD3Dif client optiongetEnableBridgeApi()is true by callingremixapi_lib_loadRemixDllAndInitializewith the optained device pointerUsage:
BridgeApirequires the user to be internal (dll/asi injection or by other means - requires game process access)client.exposeRemixApitruedevice->EndSceneis called:Notes:
I've set client option(now false by default)client.exposeRemixApitotrueby defaultI'm using a mutex to get the device here. (I don't have much experience working with threads -> not sure if correct)
I've directly included
remix_c.hfromdxvk-remix(should be made a dependency that's pulled?)There is no RemixApi version check nor does
bridge_c.hexpose any versionSending
const char*orwchar_t*via rpc can result in the string no longer having the null terminator in the correct location. This can lead to strings with "junk data" attached to them. The returned length/size is correct tho. This also happens forBridge_DebugMessage. This leads to special handling in every api case inserver/main.cppthat`s using strings:Api_DebugPrintusingstd::string(data, length)to construct a new string with the proper lengthApi_CreateOpaqueMaterialusingNVPULL_PATH->std::wstring(data, length)to construct a new wstring with the proper lengthExample usage of almost every feature:
Developer)