diff --git a/drivers/metal/rendering_device_driver_metal.mm b/drivers/metal/rendering_device_driver_metal.mm index 0d88a14fbc4..9d691a0d230 100644 --- a/drivers/metal/rendering_device_driver_metal.mm +++ b/drivers/metal/rendering_device_driver_metal.mm @@ -3112,7 +3112,7 @@ RenderingDeviceDriverMetal::Result> RenderingDeviceDriverMetal:: NSArray *constants = function.functionConstantsDictionary.allValues; bool is_sorted = true; for (uint32_t i = 1; i < constants.count; i++) { - if (constants[i - 1].index < constants[i].index) { + if (constants[i - 1].index > constants[i].index) { is_sorted = false; break; }