Describe the bug
Looks like the bias name is already reserved by some standard metal function so uniforms with that name is compiled to metal with bias0 name and as a result pipeline.getConstantLocation("bias") can't find a uniform.
To Reproduce
Just add a uniform float bias; to any shader and compile it to metal.
Expected behavior
Probably pipeline.getConstantLocation should handle that case, or provide a warning at least.
Execution Environment:
Host system (where you compile your code): macOS Ventura 13.3.1
Target system (where you run your code): macOS Ventura 13.3.1
Describe the bug Looks like the
bias
name is already reserved by some standard metal function so uniforms with that name is compiled to metal withbias0
name and as a resultpipeline.getConstantLocation("bias")
can't find a uniform.To Reproduce Just add a
uniform float bias;
to any shader and compile it to metal.Expected behavior Probably
pipeline.getConstantLocation
should handle that case, or provide a warning at least.Execution Environment: