Previously the shader associated with a batch was assigned separately. This meant on occasion, the incorrect shader was used with the Metal backend. Updating the shader fetch to use the context bound shader instead of the batch shader member as per OpenGL/Vulkan backends. Also include state change check to be consistent with OpenGL. Authored by Apple: Michael Parkin-White Co-authored-by: Michael Parkin-White <mparkinwhite@apple.com> Pull Request: https://projects.blender.org/blender/blender/pulls/111112