vulkano-rs / vulkano

Safe and rich Rust wrapper around the Vulkan API
Apache License 2.0
4.4k stars 435 forks source link

Please update the bundled glslangValidator in glsl-to-spirv, it is buggy #944

Closed hlavaatch closed 5 years ago

hlavaatch commented 6 years ago

Bundled glslangValidator in glsl-to-spirv is generating invalid SPIR-V code for memory barriers, please update to latest version and publish a new glsl-to-spirv crate

Compute shaders using memory barriers compiled with it are reported as invalid by spirv-val:

error: 125: MemoryBarrier: Vulkan specification requires Memory Semantics to have one of the following bits set: Acquire, Release, AcquireRelease or SequentiallyConsistent

See attachment for repro. invalid_spirv_repro.zip

tomaka commented 6 years ago

That is a legitimate concern. I no longer have access to a Windows machine to build the precompiled Windows binary, however.

If someone (preferably a trusted already-existing constructor) has access to a Windows machine, it would be really nice to handle this! However I will just remove the Windows-specific code and update glslValidator.

hlavaatch commented 6 years ago

Here is 64bit glslangValidator.exe from the LunarG Vulkan SDK 1.1.70.1, it has digital signature by LunarG glslangValidator.zip

hlavaatch commented 6 years ago

32bit version here glslangValidator32bit.zip

hlavaatch commented 6 years ago

Btw, the bundled exe seems to be 64bit, what happens on 32bit systems?

hlavaatch commented 6 years ago

I have asked LunarG at info@lunarg.com if its OK to redistribute the binary from their sdk, and they said yes.

You are free to take components from the LunarG SDK and do as you wish. In regards to the glslangValidator.exe, all we did was build it from source as well...

Karen Ghavam
CEO and Engineering Director
LunarG, Inc. - 3D Graphics Software Innovations
karen@lunarg.com
970-988-9043

> Hi,
>I was wondering if we could package the pre-built binary glslangValidator.exe from the LunarG Vulkan SDK as part of the glsl-to-spirv Rust library crate?
>It would be nice to have a trusted source for binary with LunarG digital signature instad of having to build it from source...
rukai commented 5 years ago

Resolved by https://github.com/vulkano-rs/vulkano/pull/947