Skip to content

LockMode enumeration

Tells consumers how a call to Lock reaches the pixel buffer.

public enum LockMode
name value description
Direct 0 The buffer is already in CPU memory and is exposed without an intermediate copy or conversion.
Readback 1 The buffer lives on the GPU, so Lock copies it back after waiting for the GPU, stalling the CPU on a sync barrier.

Consumers that have a deferred path can avoid invoking Lock when it would trigger a GPU sync barrier.