HardwareBufferUsage Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies how a hardware buffer will be used.
This enumeration supports a bitwise combination of its member values.
[System.Flags]
public enum HardwareBufferUsage
[<System.Flags>]
type HardwareBufferUsage =
- Inheritance
-
HardwareBufferUsage
- Attributes
Fields
| Name | Value | Description |
|---|---|---|
| None | 0 | Specifies no usage flags. |
| UsageCpuReadRarely | 2 | Specifies occasional CPU reads. |
| UsageCpuReadOften | 3 | Specifies frequent CPU reads. |
| UsageCpuWriteRarely | 32 | Specifies occasional CPU writes. |
| UsageCpuWriteOften | 48 | Specifies frequent CPU writes. |
| UsageGpuSampledImage | 256 | Specifies that the GPU reads from the buffer. |
| UsageGpuColorOutput | 512 | Specifies that the GPU writes to the buffer. |
| UsageComposerOverlay | 2048 | Specifies use as a hardware composer overlay through SurfaceControl. |
| UsageProtectedContent | 16384 | Requires the buffer to remain within a protected hardware path. |
| UsageVideoEncode | 65536 | Specifies that a hardware video encoder reads from the buffer. |
| UsageSensorDirectData | 8388608 | Specifies use for direct sensor data. |
| UsageGpuDataBuffer | 16777216 | Specifies use as a shader storage buffer or uniform buffer object. |
| UsageGpuCubeMap | 33554432 | Specifies use as a cube-map texture. |
| UsageGpuMipmapComplete | 67108864 | Specifies that the buffer contains a complete mipmap hierarchy. |
| UsageFrontBuffer | 4294967296 | Specifies front-buffer rendering, which can change how other usage flags are handled. |
Remarks
The CPU read modes are alternatives to each other, as are the CPU write modes. Select a mode for each kind of CPU access and combine it with other supported usage flags. Not every combination is supported.