Error:
error: invalid type \'long\' for attribute index expression\nfragment main0_out main0(main0_in in [[stage_in]], texture2d<float> colormap [[texture(4294967295)]], sampler colorsampler [[sampler(2)]])\n
Here is a gist of the code:
https://gist.github.com/Toasterthegamer/43a209c3598d2c0717c81fc65c877680
Sorry if the code is messy and in the wrong order. I had to pull it from a few different places. To fix the issue I used the correct binding order:
layout(set = 0, binding = 0) uniform texture2D colormap;
layout(set = 0, binding = 1) uniform sampler colorsampler;
The error message is confusing though.
I see what's going on. So the bindings of the shader didn't match the ones of the pipeline layout. Neither gfx-rs or any vulkan driver expect this, so strictly speaking this would be up to validation errors to prevent (and user cleverness, to an extent). However, I do agree that we could easily detect this in the backend (as an invalid case) and report as a clearer assertion or pipeline creation error, instead of showing obscure output of MSL compilation. Therefore, this isn't a blocker, lowering the priority.
Most helpful comment
I see what's going on. So the bindings of the shader didn't match the ones of the pipeline layout. Neither gfx-rs or any vulkan driver expect this, so strictly speaking this would be up to validation errors to prevent (and user cleverness, to an extent). However, I do agree that we could easily detect this in the backend (as an invalid case) and report as a clearer assertion or pipeline creation error, instead of showing obscure output of MSL compilation. Therefore, this isn't a blocker, lowering the priority.