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

__tracy_gpu_new_context_data has private field making it unconstructable #39

Closed
cwfitzgerald opened this issue May 25, 2022 · 3 comments · Fixed by #40
Closed

__tracy_gpu_new_context_data has private field making it unconstructable #39

cwfitzgerald opened this issue May 25, 2022 · 3 comments · Fixed by #40

Comments

@cwfitzgerald
Copy link
Contributor

Oddly it seems to have a completely private field which we need to fill to be able to call the function. I'm not sure what caused bindgen to emit this one field as private.

https://docs.rs/tracy-client-sys/latest/tracy_client_sys/struct.___tracy_gpu_new_context_data.html

@Imberflur
Copy link
Contributor

Imberflur commented May 25, 2022

It seems to be caused by this line

sed -i 's/pub type/type/g' 'tracy-client-sys/src/generated.rs'
which I think (looking at generated.rs) is for removing pub from generated type aliases.

@Imberflur
Copy link
Contributor

A simple fix might be to switch to:

 sed -i 's/pub type /type /g' 'tracy-client-sys/src/generated.rs'

@nagisa
Copy link
Owner

nagisa commented May 25, 2022

Yeah, the sed post-processing here is to avoid re-exporting

type __uint8_t = ::std::os::raw::c_uchar;

and similar. Happy to take a patch here.

nagisa pushed a commit that referenced this issue Aug 13, 2023
Depends on #39

Context Wumpf/wgpu-profiler#15

This adds the GPU api to tracy_client. It merely adds safe interfaces.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants