D3D11_CPU_ACCESS_FLAG enumeration (d3d11.h)

Specifies the types of CPU access allowed for a resource.

Syntax

typedef enum D3D11_CPU_ACCESS_FLAG {
  D3D11_CPU_ACCESS_WRITE = 0x10000L,
  D3D11_CPU_ACCESS_READ = 0x20000L
} ;

Constants

 
D3D11_CPU_ACCESS_WRITE
Value: 0x10000L
The resource is to be mappable so that the CPU can change its contents. Resources created with this flag cannot be set as outputs of the pipeline and must be created with either dynamic or staging usage (see D3D11_USAGE).
D3D11_CPU_ACCESS_READ
Value: 0x20000L
The resource is to be mappable so that the CPU can read its contents. Resources created with this flag cannot be set as either inputs or outputs to the pipeline and must be created with staging usage (see D3D11_USAGE).

Remarks

This enumeration is used in D3D11_BUFFER_DESC, D3D11_TEXTURE1D_DESC, D3D11_TEXTURE2D_DESC, D3D11_TEXTURE3D_DESC.

Applications may combine one or more of these flags with a bitwise OR. When possible, create resources with no CPU access flags, as this enables better resource optimization.

The D3D11_RESOURCE_MISC_FLAG cannot be used when creating resources with D3D11_CPU_ACCESS flags.

Requirements

Requirement Value
Header d3d11.h

See also

Resource Enumerations