You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C:\Users\jonat>C:\Users\jonat\Desktop\SPIRV-Tools-master-windows-x64-Release\bin\spirv-val.exe C:\Users\jonat\Projects\test-project\spir-v\atomicArraySum.spv
error: line 8: Invalid capability operand: 6033
error: line 8: Invalid capability operand: 6033
It was suggested (gfx-rs/wgpu-rs#564 (comment)) the bug likely originates from an error in the tool used to compile the GLSL to SPIR-V (C:/VulkanSDK/1.2.148.1/Bin/glslc).
Since I beleive this is the repo for glslc I thought it best to open this issue here.
Comment from the issue which contains link to test project (importantly the GLSL .comp file and resultant SPIR-V .spv file): gfx-rs/wgpu-rs#564 (comment)
Compilation of the GLSL to SPIR-V has been done by running:
There is a bunch of info in the original issue (gfx-rs/wgpu-rs#564), but I would recommend reading from the bottom up since it is quite long and the stuff near the bottom is most relevant.
The text was updated successfully, but these errors were encountered:
JonathanWoollett-Light
changed the title
When using glslc to compile a shader containing atomicAdd causes a bug
Using glslc to compile a shader containing atomicAdd causes a bug
Oct 16, 2020
Running on ToT checkouts of shaderc and spirv-tools I am unable to reproduce this on Linux.
The specific error you are seeing appears to be for a relatively new extension, so I suspect there is a version issue somewhere along the way, i.e. some tools have support for this extension and others do not.
I am not sure if there is much for shaderc to do, but I am going to send this over to dneto@ since he is more familiar with package/release process for the ecosystem, so might have some thoughts.
Your copy of spirv-val is old. It was built without support for SPV_EXT_shader_atomic_float_add, and so it doesn't know about OpCapability AtomicFloat32AddEXT
spirv-val comes from the SPIRV-Tools project. If you built SPIRV-Tools locally, be sure to rebuild it with an updated copy of SPIRV-Headers, as that is where it gets most of its information about the set of valid tokens (and extensions).
I discovered a bug which lead any shader using
atomicAdd
to be unable to compile from SPIR-V when using wgpu-rs (gfx-rs/wgpu-rs#564).Eventually after using
SPIRV-Tools-master-windows-x64-Release\bin\spirv-val.exe
(from https://github.com/KhronosGroup/SPIRV-Tools) to check the.spv
file and it producing:It was suggested (gfx-rs/wgpu-rs#564 (comment)) the bug likely originates from an error in the tool used to compile the GLSL to SPIR-V (
C:/VulkanSDK/1.2.148.1/Bin/glslc
).Since I beleive this is the repo for
glslc
I thought it best to open this issue here.Comment from the issue which contains link to test project (importantly the GLSL
.comp
file and resultant SPIR-V.spv
file): gfx-rs/wgpu-rs#564 (comment)Compilation of the GLSL to SPIR-V has been done by running:
(
--target-env=vulkan1.1
has also been tried)There is a bunch of info in the original issue (gfx-rs/wgpu-rs#564), but I would recommend reading from the bottom up since it is quite long and the stuff near the bottom is most relevant.
I also considered opening an issue in the https://github.com/KhronosGroup/glslang repo but decided against it for now.
The text was updated successfully, but these errors were encountered: