Contents

textureBarrier()

Adds a barrier, which forces any texture read operations to wait until write operations to the same texture finish.

Declaration

func textureBarrier()

Discussion

Use a barrier if you use the same texture for both an input to a shader and as a rendering destination for the render pass.

A barrier let’s your app safely write to and then correctly read from the same texture. The barrier ensures that the draw calls before the barrier finish their write operations before any draw calls after the barrier read from the texture.

See Also

Deprecated methods