Merge pull request #96209 from stuartcarnie/sgc/96077/fix_sdfgi

Metal: Use correct operator to ensure specialisation constants are sorted
This commit is contained in:
Rémi Verschelde 2024-08-28 13:14:34 +02:00
commit f648de1a83
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -3112,7 +3112,7 @@ RenderingDeviceDriverMetal::Result<id<MTLFunction>> RenderingDeviceDriverMetal::
NSArray<MTLFunctionConstant *> *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;
}