Returns the maximum value for a given property that is guaranteed to be compatible with all of the current devices (GPUs, etc.) in the system.


size_t IOSurfaceGetPropertyMaximum(CFStringRef property);


The most important values to obtain are:

  • kIOSurfaceBytesPerRow

  • kIOSurfaceWidth

  • kIOSurfaceHeight

  • kIOSurfacePlaneBytesPerRow

  • kIOSurfacePlaneWidth

  • kIOSurfacePlaneHeight

For the width and height properties, the maximum values are the largest that are guaranteed to work for both reading and writing. In OpenGL terms this translates into the largest size that will work for both textures and render targets.

This function returns 0 for properties that have no predefined limit or where the concept of a limit would be considered invalid (such as kIOSurfacePixelFormat).