-
Notifications
You must be signed in to change notification settings - Fork 813
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
Generating functions improperly #78
Comments
I stand corrected, it can't attach the binary file. Here is the source: attribute vec2 position; varying vec2 texcoord; void main() |
After a bit more research, I realize it's not that it's generating functions improperly. The function that it is creating is really supposed to just be a name (OpName, opcode 5). So it's incorrectly generating opcodes. Even OpExtInstImport is being generated as opcode 4 instead of opcode 11. Is there a new standard i'm missing where these things have changed? |
Building from head code the binary SPIR-V seems fine for me (OpExtInstImport first word highlighted with **s):
OpExtInstImport was opcode 4 in rev 30 of SPIR-V, but glslang generates rev 31 which is opcode 11. Maybe you're building glslang from somewhere else, or running an older binary? |
I downloaded the official windows executable from the https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/ website. (https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang/Install). I didn't realize it was so out of date, I will update tomorrow. Thanks for the help, I thought it was something weird because they were all formed properly just that the opcode # wasn't matching up with the reference api. |
FYI, I updated the binaries at Khronos, but yes, they are generally updated less frequently than the source here at GitLab. |
Thanks, I did get it to compile, but it didn't do so under vs 2010. I had
to use cmake to generate new project files and download vs 2015.
|
There is a poll in #42 about which VS version to support, currently vs2010 would almost work but needs some minor tweaks. I have a branch that isn't up to date where I try and keep 2010 working, since that's what I need. |
Not a big deal, didn't realize the binary was that outdated and wasn't
|
I am working on a Spir-V Decompiler and am looking at some binaries produced by glslang. It incorrectly generates opcode 54 (OpFunction) with only a 4 byte word count, followed by multiple other OpFunction opcodes. This is incorrect, because it should be immediately followed by 55, OpFunctionParameter, for each argument, and then followed by a 56 for OpFuncitonEnd. There is no generated OpFunctionParameter or OpFuncitonEnd in the created binary. Both source and binary are attached. Compiled using version 2.2.687
The text was updated successfully, but these errors were encountered: