[PATCH vkd3d 4/4] vkd3d: Add a helper function to calculate variable binding upper bound.