fix iOS 16.x version failed to pass MTLBinding's arg.used check #3271
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It failed to pass this check:
bgfx/src/renderer_mtl.mm
Lines 1956 to 1957 in 4cb7b71
on:
My test devices are :
iPhone X with iOS version 16.7.6 and iPhone 8 Plus with iOS version 16.7.6
iPhone 15 pro with iOS version 17.2/17.4
iPhone SE3 with iOS version 17.2/17.4
The option Queue Debugging enable or not will affect MTLBinding's used value. If disable, it will always false; ortherwise true.
But in iOS 17.x, this value(MTLBinding.used) are always true.
This problem also relate to this issue:
##3116
I write this code to locate this problom:
add this code before this line:
checkRelfectionArguments(reflection);
https://github.com/bkaradzic/bgfx/blob/master/src/renderer_mtl.mm#L2361
I found that reflection.vertexBindings / reflection.fragmentBindings is equal to reflection.vertexArgumens/reflection.fragmentArguments's MTLArgument with active is true
So, I think it's no need to check MTLBinding's used in ProcessArguments function.