-
Notifications
You must be signed in to change notification settings - Fork 15
Attempting to run the 'hello-cube' example on OS X v10.11 El Capitan gives error: "[ERROR gfx_backend_metal::device] Error compiling the shader" #60
Comments
If you have time can you pull the code from the wgpu repo to test the examples? The best example to test is likely |
Related to the array constants in the equirectangular_to_cube_faces_vert shader. Example: const vec2[6] verts = {
vec2(-1.0, -1.0),
vec2(1.0, -1.0),
vec2(-1.0, 1.0),
vec2(-1.0, 1.0),
vec2(1.0, -1.0),
vec2(1.0, 1.0)
}; Compiles to: constant spvUnsafeArray<float2, 6> _53 = spvUnsafeArray<float2, 6>({ float2(-1.0), float2(1.0, -1.0), float2(-1.0, 1.0), float2(-1.0, 1.0), float2(1.0, -1.0), float2(1.0) }); |
wgpu-rs Version: commit Just tested them… and you’re absolutely right! 😂 While simple examples like Starting with As for
Of particular interest is this part of the error:
which I believe confirms your suspicion. 😩 |
As a side note the custom pipeline example works because it's pretty basic. You can write out some of your own pipelines and shaders which should work fine as long as you stay within the confines of metal 1. I could fix the issue above by possibly using a uniform and passing in the different const arrays that way, but I'm not sure I want to try and support metal 1 as it has some limitations that I plan on breaking fairly soon.. The biggest one being the lack of support for arrays of textures. |
Hi everybody! There is a lot of stuff mixed up here.
IIRC, SPIRV-Cross has issues with arrays on Metal. Things like KhronosGroup/SPIRV-Cross#1394 (there are more issues in there).
This is gfx-rs/wgpu#103, which has been known for a while. I concluded this to be a driver issue, and it was indeed fixed in one of the OS updates after 10.11. Right now I'm on 10.15, and it woks correctly. It's unlikely that you'll hit the issue unless you use texture arrays with depth comparison.
The water example also presumably fails because SPIRV-Cross fails to check for MSL version when it tries to add the |
Thanks for that link to the issue for the driver bug! At this point, it seems like staying on 10.11 is far too limiting; I have an SSD on the way (APFS runs horribly on HDDs) and will just update to 10.15 as soon as possible. 😅 |
bd4300ffbc651aeea8e625606645d90021cad83a
stable-x86_64-apple-darwin (default)
rustc 1.44.1 (c7087fe00 2020-06-17)
When attempting to run the
hello-cube
example, I get the following output:I’m guessing that error is related to me using OS X v10.11 El Capitan (the very first version of macOS to support Metal, and thus is using Metal 1).
Sidenote: The other examples run on this computer (with warnings), except for
benchmark
which gives a compile time error.The text was updated successfully, but these errors were encountered: