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

My thoughts about hassle_rs::compile_hlsl #48

Open
BeastLe9enD opened this issue Oct 9, 2022 · 1 comment
Open

My thoughts about hassle_rs::compile_hlsl #48

BeastLe9enD opened this issue Oct 9, 2022 · 1 comment

Comments

@BeastLe9enD
Copy link
Contributor

BeastLe9enD commented Oct 9, 2022

I just looked into hassle_rs::compile_hlsl and I saw that the compiler is recreated every time the function is called. I though about using a thread local to store the DxcLibrary and DxcCompiler and just take the compiler for the current thread (as Dxc is not thread safe). Just had the idea and wanted to ask what your thoughts are on it.

This is more of a discussion than an issue, but I'm posting it here because I can't create a discussion :)

If you agree with me on the idea, I can of course make a pull request!

@MarijnS95
Copy link
Member

I also want this function to be gone, and instead improve the error reporting in Dxc::compile() directly at which point the helper function hardly provides any extra functionality over just constructing Dxc with a default constructor and calling .compile() on it directly. I've worked on this on and off, there's an error/errors branch around that I'll try to revive and finish.

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

No branches or pull requests

2 participants