On line 837 of toMetalOperand.cpp, we see the following code
oss << "[" << fullIndexOss.str() << " %% 4]";
Is this by any chance the intended code?
I ask because, when I passed the string that popped up there to the metal api as is and checked the shader compile error, I got a compile error because what should have been treated as %(remainder operation) was treated as %% in that part.