You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CUDA support in PhysX is closed-source and requires redistributing a pair of additional DLLs. PhysXDevice64.dll and PhysXGpu_64.dll For Linux there is just a single libPhysXGpu_64.so.
These DLLs are fairly huge, even bigger than PhysX its self, so I don't think it makes sense to include them in the Mochi.PhysX.Native packages since not everyone will want or need them.
For whatever reason, these DLLs are not copied to the install folder. So we need to dig them out of the bin directory ourselves.
Additionally, for Windows PhysXGpu_64.dll is only present in the win.x86_64.vc140.mt folder. For other versions of MSVC it is copied from there. The PhysXDevice64.dll is present in all folders, although it's just the same file copied over and over.
It is worth noting that none of these files are the same between build variants. I accidentally loaded the release GPU DLL with a checked build and it crashed, so it's important we match variants.
As such I think we should extend MochiPhysX.SelectRuntimeVariant to call PxSetPhysXGpuLoadHook as appropriate on the user's behalf. It might also be wise to force it to an invalid value in the event the DLL is missing in order to prevent a crash in the scenario where the developer has a Mochi.PhysX.Native.win-x64-checked and ``Mochi.PhysX.NativeGpu.win-x64installed but notMochi.PhysX.NativeGpu.win-x64.checked`. (PhysX gracefully handles the DLL missing, presumably running as if GPU support wasn't enabled. The structure of `SnippetHelloGRB` somewhat implies this is partially the consumer's responsibility, but in practice it doesn't actually seem to work that way.)
The text was updated successfully, but these errors were encountered:
Note that while the PhysX user guide doesn't mention PhysXDevice64.dll, it is mentioned in the Windows platform readme. It is required, and reside alongside PhysXGPU_64.dll.
CUDA support in PhysX is closed-source and requires redistributing a pair of additional DLLs.
PhysXDevice64.dll
andPhysXGpu_64.dll
For Linux there is just a singlelibPhysXGpu_64.so
.These DLLs are fairly huge, even bigger than PhysX its self, so I don't think it makes sense to include them in the
Mochi.PhysX.Native
packages since not everyone will want or need them.For whatever reason, these DLLs are not copied to the
install
folder. So we need to dig them out of thebin
directory ourselves.Additionally, for Windows
PhysXGpu_64.dll
is only present in thewin.x86_64.vc140.mt
folder. For other versions of MSVC it is copied from there. ThePhysXDevice64.dll
is present in all folders, although it's just the same file copied over and over.It is worth noting that none of these files are the same between build variants. I accidentally loaded the
release
GPU DLL with achecked
build and it crashed, so it's important we match variants.As such I think we should extend
MochiPhysX.SelectRuntimeVariant
to callPxSetPhysXGpuLoadHook
as appropriate on the user's behalf. It might also be wise to force it to an invalid value in the event the DLL is missing in order to prevent a crash in the scenario where the developer has aMochi.PhysX.Native.win-x64-checked
and ``Mochi.PhysX.NativeGpu.win-x64installed but not
Mochi.PhysX.NativeGpu.win-x64.checked`. (PhysX gracefully handles the DLL missing, presumably running as if GPU support wasn't enabled. The structure of `SnippetHelloGRB` somewhat implies this is partially the consumer's responsibility, but in practice it doesn't actually seem to work that way.)The text was updated successfully, but these errors were encountered: