Instance Method

supportsTextureSampleCount(_:)

Determines whether a device supports a given texture sample count.

Required.

Declaration

func supportsTextureSampleCount(_ sampleCount: Int) -> Bool

Parameters

sampleCount

The sample count that you are interested in using.

Return Value

true if the sample count is supported by the device; otherwise false.

Discussion

The following table lists the device support for each possible sample count value.

Table 1

Supported Sample Count Values

Sample Count Value

Device Support

1

All devices

2

All iOS and tvOS devices; some macOS devices

4

All devices

8

Some macOS devices

See Also

Querying Texture Support

func minimumLinearTextureAlignment(for: MTLPixelFormat) -> Int

Calculates the minimum alignment required for creating a linear texture with a given pixel format.

Required.

func minimumTextureBufferAlignment(for: MTLPixelFormat) -> Int

Calculates the minimum alignment required when creating a texture buffer from a buffer.

Required.

var readWriteTextureSupport: MTLReadWriteTextureTier

The device objects's read-write texture support tier.

Required.