update options for newer SPIRV-Cross version#5
Conversation
|
Hi Joel, thanks for the fixes. I've was mostly busy with emulator stuff over the holidays so I haven't checked any Oryol/Sokol-related issues and PRs :) I'm pondering adding the Oryol shader code generation as a new output option into the sokol-shdc tool, since both tools do nearly the same thing, and sokol-shdc is more recent and contains a lot of other new features, so I'll probably not merge this PR, but it will be helpful when I get around extending sokol-shdc :) |
|
Cool, thanks! I wasn't aware of the sokol-shdc tool, I'll take a look at that. I think what would be ideal for me is to rewrite each version of shader code itself for metal/hlsl but still have the cpp wrapper api. I haven't really looked at doing that in the current pipeline yet. |
I had some trouble using oryol with metal after upgrading to recent osx/xcode. Updating to the most recent SPIRV-Cross seemed to fix most of it (float[1]/clip_distance errors), this pull request contains some minor changes to handle change in the options api (opts.pad_and_pack_uniform_structs appears to have been removed, not sure).
Applying this change and also updating fips-sprirvcross to point to the latest seems to work. Additionally, I had to change the GLSL version in the shader compile scripts to use ver 420 so I could add "layout (location=0)" specifiers so that the vert/fragment shaders would link in metal, otherwise only very simple shaders would link if the "user(locN)" specifiers happened to line up, I don't know enough about spirv-cross to know if there's a better way to fix this.
Feel free to ignore this if you're not doing metal stuff or focusing on sokol, I just thought it might be helpful.