Skip to content
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

Loading Renderdoc Wrong #2793

Closed
cwfitzgerald opened this issue Jun 20, 2022 · 0 comments · Fixed by #2930
Closed

Loading Renderdoc Wrong #2793

cwfitzgerald opened this issue Jun 20, 2022 · 0 comments · Fixed by #2930
Labels
area: infrastructure Testing, building, coordinating issues good first issue Good for newcomers help required We need community help to make this happen. type: bug Something isn't working

Comments

@cwfitzgerald
Copy link
Member

cwfitzgerald commented Jun 20, 2022

Description

See #2789 for original issue.

We aren't properly loading renderdoc. We are missing some flags that needs to be passed to dlopen to make sure we never actually load renderdoc's ourselves we only pull the existing copy.

See the documentation here for more info: https://renderdoc.org/docs/in_application_api.html

The important bit:

To do this you’ll use your platforms dynamic library functions to see if the library is open already - e.g. GetModuleHandle on Windows, or dlopen with the RTLD_NOW | RTLD_NOLOAD flags if available on *nix systems. On most platforms you can just search for the module name - renderdoc.dll on Windows, or librenderdoc.so on Linux, or libVkLayer_GLES_RenderDoc.so on Android should be sufficient here, so you don’t need to know the path to where RenderDoc is running from.

In libloading terms:

On windows this should call https://docs.rs/libloading/latest/libloading/os/windows/struct.Library.html#method.open_already_loaded which is GetModuleHandle.

On linux this should call https://docs.rs/libloading/latest/libloading/os/unix/struct.Library.html#method.open with RTLD_NOW | RTLD_NOLOAD - the latter needs to be added to lib loading, but it's just an integer so we can just specify the value until lib loading adds it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: infrastructure Testing, building, coordinating issues good first issue Good for newcomers help required We need community help to make this happen. type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant