Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

glslang performance compared to naga #3035

Closed
KlingelingelingDerEiermann opened this issue Sep 25, 2022 · 3 comments
Closed

glslang performance compared to naga #3035

KlingelingelingDerEiermann opened this issue Sep 25, 2022 · 3 comments
Labels

Comments

@KlingelingelingDerEiermann

Hey i read this and i was a really bit shocked that naga is supposed to be 30x faster than glslang when compiling glsl code
http://kvark.github.io/naga/shader/2022/02/17/shader-translation-benchmark.html

What is the reason ? Just curious =)

@jeremy-lunarg
Copy link
Contributor

It appears to be a translator; not a compiler.

@KlingelingelingDerEiermann
Copy link
Author

GLSL to SPIR-V
[...]
Nobody else processes GLSL inputs, so we are only comparing Naga with Glslang. Naga is roughly 30x faster. I’m sure Glslang does a lot of work in validating the incoming GLSL that we aren’t, so that explains some of that difference. It’s also probably trying to optimize the result. We’ll be working on configuring the build to do less of that.

It is GLSL -> SPIRV, so its a compiler. It is also a translator, because it can convert SPIRV -> GLSL

@greg-lunarg
Copy link
Contributor

We are not sure offhand the reason for the difference. If you find out, let us know. Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants